Browse files

Mac OS X Packaging

mkbundle now creates a dmg with the .app and necessary license files.
  • Loading branch information...
1 parent b5e84f1 commit c8850b5acf9c10c9f3def41591aae46b3060c07f @knowknowledge committed Nov 21, 2010
Showing with 39 additions and 7 deletions.
  1. +4 −0 PACKAGING
  2. +7 −1
  3. +28 −6
@@ -57,6 +57,10 @@ normally but I was unable to get this working.)
Be sure to test the final app bundle on a computer without Xcode or the
frameworks installed to ensure static linking, etc. worked.
+Mac OS X has otool for analyzing object files. Run "otool -L epiar" to check
+for dynamically linked libraries. Only standard libraries should be included in a
+publicly distributed executable.
OS X apps are typically distributed as a .dmg file, which is a compressed
disk image file. Users are used to downloading these (they typically then
auto-mount and open a Finder window) and then merely dragging the Epiar
@@ -1,5 +1,5 @@
dnl Init
@@ -26,6 +26,12 @@ LIBS="$LIBS -lfreetype"
dnl Include FTGL
LIBS="$LIBS -lftgl"
+dnl Static path to dynamic Libraries.
+dnl LIBS="$LIBS /opt/local/lib/libfreetype.a"
+dnl LIBS="$LIBS /opt/local/lib/libftgl.a"
+dnl LIBS="$LIBS /opt/local/lib/libxml2.a"
+dnl LIBS="$LIBS /opt/local/lib/libz.a"
case "$target" in *-*-linux*)
CFLAGS="$CFLAGS -I/usr/include/freetype2"
34 100644 → 100755
@@ -1,7 +1,29 @@
#!/usr/bin/env bash
-mkdir -p
-cp Epiar
-cp -r Resources
-cp Info.plist
-cp Resources/Graphics/Epiar_Icon.icns
-rm -rf*.xcf
+EPIAR_VERSION_FULL=`awk '$2 == "EPIAR_VERSION_FULL" {print $3}' Source/version.h | tr -d '"'`
+echo "Update the version Number in the Info.plist to $EPIAR_VERSION_FULL."
+defaults write `pwd`/Info CFBundleShortVersionString "$EPIAR_VERSION_FULL"
+defaults read `pwd`/Info
+echo "Creating Package at $APP_LOC"
+mkdir -p $APP_LOC/Contents/MacOS
+cp Epiar $APP_LOC/Contents/MacOS
+cp -r Resources $APP_LOC/Contents/
+cp Info.plist $APP_LOC/Contents/
+cp Resources/Graphics/Epiar_Icon.icns $APP_LOC/Contents/Resources/
+# The .xcf files aren't used at run time
+# Deleting them saves 5.5 Megabytes
+echo "Removing unneeded files."
+rm -rf $APP_LOC/Contents/Resources/Graphics/*.xcf
+echo "Adding README and LICENSE files."
+# Package Epiar into a .dmg
+echo "Creating Epiar dmg..."
+hdiutil create Epiar$EPIAR_VERSION_FULL.dmg -srcfolder $DMG_LOC

0 comments on commit c8850b5

Please sign in to comment.