Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mac OS X Packaging

mkbundle now creates a dmg with the .app and necessary license files.
  • Loading branch information...
commit c8850b5acf9c10c9f3def41591aae46b3060c07f 1 parent b5e84f1
Matt Zweig authored
Showing with 39 additions and 7 deletions.
  1. +4 −0 PACKAGING
  2. +7 −1 configure.in
  3. +28 −6 mkbundle.sh
4 PACKAGING
View
@@ -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
8 configure.in
View
@@ -1,5 +1,5 @@
PACKAGE=epiar
-VERSION=0.2.0
+VERSION=0.4.2
dnl Init
AC_INIT(README)
@@ -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"
esac
34 mkbundle.sh 100644 → 100755
View
@@ -1,7 +1,29 @@
#!/usr/bin/env bash
-mkdir -p Epiar.app/Contents/MacOS
-cp Epiar Epiar.app/Contents/MacOS
-cp -r Resources Epiar.app/Contents/
-cp Info.plist Epiar.app/Contents/
-cp Resources/Graphics/Epiar_Icon.icns Epiar.app/Contents/Resources/
-rm -rf Epiar.app/Contents/Resources/Graphics/*.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
+
+DMG_LOC=`pwd`/Epiar$EPIAR_VERSION_FULL/
+APP_LOC=$DMG_LOC/Epiar.app/
+echo "Creating Epiar.app 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."
+cp AUTHORS $DMG_LOC
+cp COPYING $DMG_LOC
+cp LICENSE* $DMG_LOC
+cp README $DMG_LOC
+
+# Package Epiar into a .dmg
+echo "Creating Epiar dmg..."
+hdiutil create Epiar$EPIAR_VERSION_FULL.dmg -srcfolder $DMG_LOC
Please sign in to comment.
Something went wrong with that request. Please try again.