Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[osx] - adapt osx packaging - make it similar to what we do on ios an…

…d atv2 for consistency reasons
  • Loading branch information...
commit b2ab5daa388cdeb163be9fa3347b304ae9ccafa0 1 parent 7c45c17
Memphiz Memphiz authored
10 docs/README.osx
View
@@ -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.
18 tools/darwin/packaging/xbmc-osx/Makefile
View
@@ -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
16 tools/darwin/packaging/xbmc-osx/dmgmaker.pl
View
@@ -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 @@ sub make_dmg {
exit;
}
-make_dmg($ARGV[0], "XBMC", "XBMC");
+make_dmg($ARGV[0], $ARGV[1], "XBMC");
41 tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh
View
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.