Creating Mac application of KeePass with Mono

2014-06-23
2014-06-23
  • This process should be easier to find or should be outlined on KeePass's website for Mac users. In any event, I stumbled across the process here after much searching: http://superuser.com/questions/132501/mac-how-to-create-a-app-from-a-mono-application/436108#436108.

    I've done this on two MBPs, one running 10.6.8 + Mono 2.10.11, the other 10.9.3 + Mono 3.4.0. Both systems have XQuartz installed. The resulting programs run very well on both systems; they seem more stable than the 2.23 package available through the KeePass website and which I was running previously.

    • Download the portable version of KeePass (I did 2.26); unzip.
    • Open a Terminal shell, navigate to the folder you just unzipped.
    • Run the following command:

    macpack -o:. -m:winforms -r:/Library/Frameworks/Mono.framework/Versions/Current/lib/ libCocoaSharpGlue.dylib -r:KeePass.chm -r:KeePass.XmlSerializers.dll -r:KeePassLibC32.dll -r:KeePassLibC64.dll -r:License.txt -r:ShinstUtil.exe -r:./XSL -n:KeePass -a:KeePass.exe

    • The command will take a bit of time to complete (under a minute, though). Once finished, it creates an icon for the application (called "KeePass"); this is like any other application icon.

    Both times I did this, the resulting application was really large (300-400 MBs). If you right-click the KeePass icon and say "Show Package Contents", you can delete practically all of the files in the "Contents/Resources" folder (mainly libraries). I kept, however, all the files listed in the above command (KeePass.chm etc.)—the application should now be <5MBs.

     
    Last edit: musicandprogramming 2014-06-23