aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/README.osx10
-rw-r--r--tools/darwin/packaging/xbmc-osx/Makefile18
-rwxr-xr-xtools/darwin/packaging/xbmc-osx/dmgmaker.pl16
-rwxr-xr-xtools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh41
4 files changed, 53 insertions, 32 deletions
diff --git a/docs/README.osx b/docs/README.osx
index 2485d6b16d..fa4ec456d7 100644
--- a/docs/README.osx
+++ b/docs/README.osx
@@ -216,11 +216,11 @@ distribution.
1. build XBMC.app from XCode so that the application bundle is correctly updated.
- 2. make -C tools/darwin/packaging/xbmc-osx
+ 2. $ cd tools/darwin/packaging/xbmc-osx
- 3. If completed successfully, a disk image named XBMC_for_Mac.dmg will be
- present in the users XBMC build directory:
+ 3. $ ./mkdmg-xbmc-osx.sh release
-Remember to unmount/eject XBMC.dmg before attempting to recreate it,
-otherwise dmgmaker.pl will fail.
+ 4. Use release or debug - you have to be sure that you build the corresponding
+ version before.
+ 6. Find the corresponding dmg in the packaging dir.
diff --git a/tools/darwin/packaging/xbmc-osx/Makefile b/tools/darwin/packaging/xbmc-osx/Makefile
deleted file mode 100644
index d1d0b80df0..0000000000
--- a/tools/darwin/packaging/xbmc-osx/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-TARGET = ../../../../XBMC_for_Mac.dmg
-
-all: $(TARGET)
-
-include ../../../../Makefile.include
-
-$(TARGET): dist/XBMC.dmg
- mv -f dist/XBMC.dmg $(TARGET)
-
-ifeq ($(findstring D_DEBUG,$(CFLAGS)),D_DEBUG)
-dist/XBMC.dmg:
- if [ -e "/Volumes/XBMC" ] ; then umount /Volumes/XBMC ; fi
- ./dmgmaker.pl ../../../../build/Debug/XBMC.app
-else
-dist/XBMC.dmg:
- if [ -e "/Volumes/XBMC" ] ; then umount /Volumes/XBMC ; fi
- ./dmgmaker.pl ../../../../build/Release/XBMC.app
-endif
diff --git a/tools/darwin/packaging/xbmc-osx/dmgmaker.pl b/tools/darwin/packaging/xbmc-osx/dmgmaker.pl
index 6e6caacaa9..1047d0a848 100755
--- a/tools/darwin/packaging/xbmc-osx/dmgmaker.pl
+++ b/tools/darwin/packaging/xbmc-osx/dmgmaker.pl
@@ -32,10 +32,8 @@ sub make_dmg {
$ext = "mpkg" if !$ext;
# thanks to http://dev.simon-cozens.org/songbee/browser/release-manager-tools/build-dmg.sh
- `rm -fr dist`;
- `mkdir dist`;
- `hdiutil create -fs HFS+ -volname "$volname" -format UDRW -srcfolder "$mpkg" "dist/$volname.dmg"`;
- $dev_handle = `hdiutil attach -readwrite -noverify -noautoopen "dist/$volname.dmg" | grep Apple_HFS`;
+ `hdiutil create -fs HFS+ -volname "$volname" -format UDRW -srcfolder "$mpkg" "$volname.dmg"`;
+ $dev_handle = `hdiutil attach -readwrite -noverify -noautoopen "$volname.dmg" | grep Apple_HFS`;
chomp $dev_handle;
$dev_handle = $1 if $dev_handle =~ /^\/dev\/(disk.)/;
die("Could not obtain device handle\n") if !$dev_handle;
@@ -63,10 +61,10 @@ sub make_dmg {
}
`xcrun SetFile -a C "/Volumes/$volname/"`;
`hdiutil detach $dev_handle`;
- `hdiutil convert "dist/$volname.dmg" -format UDZO -imagekey zlib-level=9 -o "dist/$volname.udzo.dmg"`;
- `rm -f "dist/$volname.dmg"`;
- `mv "dist/$volname.udzo.dmg" "dist/$volname.dmg"`;
- `hdiutil internet-enable -yes "dist/$volname.dmg"`;
+ `hdiutil convert "$volname.dmg" -format UDZO -imagekey zlib-level=9 -o "$volname.udzo.dmg"`;
+ `rm -f "$volname.dmg"`;
+ `mv "$volname.udzo.dmg" "$volname.dmg"`;
+ `hdiutil internet-enable -yes "$volname.dmg"`;
}
if (! defined $ARGV[0]) {
@@ -80,4 +78,4 @@ if ( $ARGV[0] eq "-c" ) {
exit;
}
-make_dmg($ARGV[0], "XBMC", "XBMC");
+make_dmg($ARGV[0], $ARGV[1], "XBMC");
diff --git a/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh b/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh
new file mode 100755
index 0000000000..34b8abb62f
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# usage: ./mkdmg-xbmc-osx.sh release/debug (case insensitive)
+# Allows us to run mkdmg-xbmc-osx.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-osx folder only
+SWITCH=`echo $1 | tr [A-Z] [a-z]`
+DIRNAME=`dirname $0`
+
+if [ ${SWITCH:-""} = "debug" ]; then
+ echo "Packaging Debug target for OSX"
+ XBMC="$DIRNAME/../../../../build/Debug/XBMC.app"
+elif [ ${SWITCH:-""} = "release" ]; then
+ echo "Packaging Release target for OSX"
+ XBMC="$DIRNAME/../../../../build/Release/XBMC.app"
+else
+ echo "You need to specify the build target"
+ exit 1
+fi
+
+if [ ! -d $XBMC ]; then
+ echo "XBMC.app not found! are you sure you built $1 target?"
+ exit 1
+fi
+ARCHITECTURE=`file $XBMC/Contents/MacOS/XBMC | awk '{print $NF}'`
+
+PACKAGE=org.xbmc.xbmc-osx
+
+VERSION=13.0
+REVISION=0~alpha2
+ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_macosx-intel-${ARCHITECTURE}
+
+echo Creating $PACKAGE package version $VERSION revision $REVISION
+${SUDO} rm -rf $DIRNAME/$ARCHIVE
+
+if [ -e "/Volumes/XBMC" ]
+then
+ umount /Volumes/XBMC
+fi
+
+$DIRNAME/dmgmaker.pl $XBMC $ARCHIVE
+
+echo "done"