Building muCommander for OSX Mountain Lion

When I upgraded from a 2010 MacBook Pro to a MacBook Pro retina with OSX Mountain Lion, I was unhappy that I couldn’t install muCommander. muCommander is a dual pane file manager, very much like Norton Commander and Total Commander. The problem with Mountain Lion is that it does not allow execution of applications downloaded from the Internet, if they are not signed using a sort of developer certificate. So, I decided to build the app myself, which proved a bit trickier than I expected.

The build recipe

Download muCommander source using

svn checkout mucommander

The application is written in Java, and a JDK is available in OSX – I don’t remember how it ended on my system but I think it was pre-installed. The whole build process is orchestrated by Apache Ant, which is provided by Mountain Lion, so nothing needed there.

The project dependencies are managed using Apache Ivy. Go to the Ivy download page, download the latest version, open the archive and find the jar archive (named ivy-2.3.0.jar in my case). Place this archive into the directory ~/.ant/lib/ – this directory should be created if not present.

In the build file, there is a target to obfuscate the resulting jar archive. This is performed by proguard. There are some version incompatibilities with Java 7, proguard and maven repositories which makes this step problematic. I chose to ignore this step by disabling the original target. I had to create an alternative one to satisfy ant target dependencies, that copies the original jar to the filename for the obfuscated jar. All this is performed by the following change in file build.xml, lines (presented in diff format).

--- build.xml (revision 3979)
+++ build.xml (working copy)
@@ -673,6 +673,11 @@
 <!-- = JAR generation ========================================================================================== -->
 <!-- =========================================================================================================== -->
 <target name="obfuscate" depends="jar,load-muant">
+ <copy file="${jar.normal}" tofile="${jar.obf}" overwrite="true"/>
+ </target>
+ <target name="obfuscate.disable" depends="jar,load-muant">
 <libpath property="java.lib" library="rt.jar:classes.jar"/>
 <libpath property="jsse.lib" library="jsse.jar"/>
 <libpath property="jce.lib" library="jce.jar"/>

Now, it’s time to build the app. On your terminal, issue the command

ant app

and enjoy watching Ivy as it resolves dependencies and downloads various jars. The resulting application will be placed in directory dist/. Copy this file to your Applications folder and, happy dual pane file browsing with muCommander!


Posted on May 19, 2013, in Uncategorized and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: