aboutsummaryrefslogtreecommitdiff
path: root/tools/darwin/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'tools/darwin/packaging')
-rwxr-xr-xtools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh99
-rw-r--r--tools/darwin/packaging/xbmc-icon/mirrors.xbmc.org.pngbin0 -> 5927 bytes
-rwxr-xr-xtools/darwin/packaging/xbmc-icon/mkdeb-xbmc-iconpack.sh59
-rwxr-xr-xtools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh88
-rw-r--r--tools/darwin/packaging/xbmc-osx/Makefile18
-rw-r--r--tools/darwin/packaging/xbmc-osx/VolumeDSStorebin0 -> 12292 bytes
-rw-r--r--tools/darwin/packaging/xbmc-osx/VolumeDSStoreAppbin0 -> 12292 bytes
-rw-r--r--tools/darwin/packaging/xbmc-osx/VolumeIcon.icnsbin0 -> 219878 bytes
-rw-r--r--tools/darwin/packaging/xbmc-osx/background/DiskImageBackground.pngbin0 -> 22292 bytes
-rw-r--r--tools/darwin/packaging/xbmc-osx/background/DiskImageBackgroundDebug.pngbin0 -> 22292 bytes
-rwxr-xr-xtools/darwin/packaging/xbmc-osx/dmgmaker.pl83
-rw-r--r--tools/darwin/packaging/xbmc-seatbeltunlock/03e48c66a9cae1ff768eb3fe7981c499.patchbin0 -> 427 bytes
-rw-r--r--tools/darwin/packaging/xbmc-seatbeltunlock/12313417e3afeba6531255af58cb5283.patchbin0 -> 423 bytes
-rw-r--r--tools/darwin/packaging/xbmc-seatbeltunlock/42d00865f281bb662b6ce447c9815e59.patchbin0 -> 430 bytes
-rw-r--r--tools/darwin/packaging/xbmc-seatbeltunlock/5a28620a15c15d41e1ae836dd1f95f8d.patchbin0 -> 432 bytes
-rwxr-xr-xtools/darwin/packaging/xbmc-seatbeltunlock/mkdeb-xbmc-seatbeltunlock.sh106
16 files changed, 453 insertions, 0 deletions
diff --git a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh
new file mode 100755
index 0000000000..82a6186668
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh
@@ -0,0 +1,99 @@
+#!/bin/sh
+# usage: ./mkdeb-xbmc-atv2.sh release/debug (case insensitive)
+# Allows us to run mkdeb-xbmc-atv2.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-atv2 folder only
+SWITCH=`echo $1 | tr [A-Z] [a-z]`
+DIRNAME=`dirname $0`
+
+if [ ${SWITCH:-""} = "debug" ]; then
+ echo "Packaging Debug target for ATV2"
+ XBMC="$DIRNAME/../../../../build/Debug-iphoneos/XBMC.frappliance"
+elif [ ${SWITCH:-""} = "release" ]; then
+ echo "Packaging Release target for ATV2"
+ XBMC="$DIRNAME/../../../../build/Release-iphoneos/XBMC.frappliance"
+ echo $XBMC
+else
+ echo "You need to specify the build target"
+ exit 1
+fi
+
+if [ ! -d $XBMC ]; then
+ echo "XBMC.frappliance not found! are you sure you built $1 target?"
+ exit 1
+fi
+if [ -f "/usr/bin/sudo" ]; then
+ SUDO="/usr/bin/sudo"
+fi
+if [ -f "/Users/Shared/xbmc-depends/ios-4.2_armv7/bin/dpkg-deb" ]; then
+ # make sure we pickup our tar, gnutar will fail when dpkg -i
+ bin_path=$(cd /Users/Shared/xbmc-depends/ios-4.2_armv7/bin; pwd)
+ export PATH=${bin_path}:${PATH}
+fi
+
+PACKAGE=org.xbmc.xbmc-atv2
+
+VERSION=10.0
+REVISION=7
+ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
+
+echo Creating $PACKAGE package version $VERSION revision $REVISION
+${SUDO} rm -rf $DIRNAME/$PACKAGE
+${SUDO} rm -rf $DIRNAME/$ARCHIVE
+
+# create debian control file.
+mkdir -p $DIRNAME/$PACKAGE/DEBIAN
+echo "Package: $PACKAGE" > $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Priority: Extra" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Name: XBMC-ATV2" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Depends: curl, org.awkwardtv.whitelist, org.xbmc.xbmc-seatbeltunlock" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Version: $VERSION-$REVISION" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Architecture: iphoneos-arm" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Description: XBMC Multimedia Center for AppleTV 2" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Homepage: http://xbmc.org/" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Maintainer: Scott Davilla, Edgar Hucek" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Author: TeamXBMC" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Section: Multimedia" >> $DIRNAME/$PACKAGE/DEBIAN/control
+
+# prerm: called on remove and upgrade - get rid of existing bits.
+echo "#!/bin/sh" > $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "rm -rf /Applications/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "if [ \"\`uname -r\`\" = \"10.3.1\" ]; then" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo " rm -rf /Applications/Lowtide.app/Appliances/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "else" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo " rm -rf /Applications/AppleTV.app/Appliances/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "fi" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm
+
+# postinst: symlink XBMC.frappliance into correct location and reload Lowtide/AppleTV.
+echo "#!/bin/sh" > $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "if [ \"\`uname -r\`\" = \"10.3.1\" ]; then" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo " ln -sf /Applications/XBMC.frappliance /Applications/Lowtide.app/Appliances/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo " killall Lowtide" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "else" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo " ln -sf /Applications/XBMC.frappliance /Applications/AppleTV.app/Appliances/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo " killall AppleTV" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "fi" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
+
+# prep XBMC.frappliance
+mkdir -p $DIRNAME/$PACKAGE/Applications
+cp -r $XBMC $DIRNAME/$PACKAGE/Applications/
+find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.gitignore' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store' -exec rm -rf {} \;
+
+# set ownership to root:root
+${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
+
+echo Packaging $PACKAGE
+# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
+# extended attributes (e.g. resource forks) to ._* archive members.
+# Also allows archiving and extracting actual ._* files.
+export COPYFILE_DISABLE=true
+export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
+#
+dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
+dpkg-deb --info $DIRNAME/$ARCHIVE
+dpkg-deb --contents $DIRNAME/$ARCHIVE
+
+# clean up by removing package dir
+${SUDO} rm -rf $DIRNAME/$PACKAGE
diff --git a/tools/darwin/packaging/xbmc-icon/mirrors.xbmc.org.png b/tools/darwin/packaging/xbmc-icon/mirrors.xbmc.org.png
new file mode 100644
index 0000000000..9d860f5c24
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-icon/mirrors.xbmc.org.png
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-icon/mkdeb-xbmc-iconpack.sh b/tools/darwin/packaging/xbmc-icon/mkdeb-xbmc-iconpack.sh
new file mode 100755
index 0000000000..b24ffc47d4
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-icon/mkdeb-xbmc-iconpack.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+if [ -f "/usr/bin/sudo" ]; then
+ SUDO="/usr/bin/sudo"
+fi
+
+PACKAGE=org.xbmc.xbmc-iconpack
+
+VERSION=1.0
+REVISION=0
+ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
+
+echo Creating $PACKAGE package version $VERSION revision $REVISION
+${SUDO} rm -rf $PACKAGE
+${SUDO} rm -rf $ARCHIVE
+
+# create debian control file.
+mkdir -p $PACKAGE/DEBIAN
+echo "Package: $PACKAGE" > $PACKAGE/DEBIAN/control
+echo "Priority: Extra" >> $PACKAGE/DEBIAN/control
+echo "Name: XBMC-IconPack" >> $PACKAGE/DEBIAN/control
+echo "Version: $VERSION-$REVISION" >> $PACKAGE/DEBIAN/control
+echo "Architecture: iphoneos-arm" >> $PACKAGE/DEBIAN/control
+echo "Description: XBMC Icon Pack" >> $PACKAGE/DEBIAN/control
+echo "Homepage: http://xbmc.org/" >> $PACKAGE/DEBIAN/control
+echo "Maintainer: TeamXBMC" >> $PACKAGE/DEBIAN/control
+echo "Author: TeamXBMC" >> $PACKAGE/DEBIAN/control
+echo "Section: Multimedia" >> $PACKAGE/DEBIAN/control
+echo "Icon: file:///Applications/Cydia.app/Sources/mirrors.xbmc.org.png" >> $PACKAGE/DEBIAN/control
+
+# prerm: called on remove and upgrade - get rid of existing bits.
+echo "#!/bin/sh" > $PACKAGE/DEBIAN/prerm
+echo "rm -f /Applications/Cydia.app/Sources/mirrors.xbmc.org.png">> $PACKAGE/DEBIAN/prerm
+chmod +x $PACKAGE/DEBIAN/prerm
+
+# postinst: nothing for now.
+echo "#!/bin/sh" > $PACKAGE/DEBIAN/postinst
+chmod +x $PACKAGE/DEBIAN/postinst
+
+# create the patch directory and copy in patch
+mkdir -p $PACKAGE/Applications/Cydia.app/Sources
+cp mirrors.xbmc.org.png $PACKAGE/Applications/Cydia.app/Sources/
+
+# set ownership to root:root
+${SUDO} chown -R 0:0 $PACKAGE
+
+echo Packaging $PACKAGE
+# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
+# extended attributes (e.g. resource forks) to ._* archive members.
+# Also allows archiving and extracting actual ._* files.
+export COPYFILE_DISABLE=true
+export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
+#
+../../ios-depends/build/bin/dpkg-deb -b $PACKAGE $ARCHIVE
+../../ios-depends/build/bin/dpkg-deb --info $ARCHIVE
+../../ios-depends/build/bin/dpkg-deb --contents $ARCHIVE
+
+# clean up by removing package dir
+${SUDO} rm -rf $PACKAGE
diff --git a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh
new file mode 100755
index 0000000000..4533a556db
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# usage: ./mkdeb-xbmc-ios.sh release/debug (case insensitive)
+# Allows us to run mkdeb-xbmc-ios.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-ios folder only
+SWITCH=`echo $1 | tr [A-Z] [a-z]`
+DIRNAME=`dirname $0`
+
+if [ ${SWITCH:-""} = "debug" ]; then
+ echo "Packaging Debug target for iOS"
+ XBMC="$DIRNAME/../../../../build/Debug-iphoneos/XBMC.app"
+elif [ ${SWITCH:-""} = "release" ]; then
+ echo "Packaging Release target for iOS"
+ XBMC="$DIRNAME/../../../../build/Release-iphoneos/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
+if [ -f "/usr/bin/sudo" ]; then
+ SUDO="/usr/bin/sudo"
+fi
+if [ -f "/Users/Shared/xbmc-depends/ios-4.2_armv7/bin/dpkg-deb" ]; then
+ # make sure we pickup our tar, gnutar will fail when dpkg -i
+ bin_path=$(cd /Users/Shared/xbmc-depends/ios-4.2_armv7/bin; pwd)
+ export PATH=${bin_path}:${PATH}
+fi
+
+PACKAGE=org.xbmc.xbmc-ios
+
+VERSION=10.0
+REVISION=7
+ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
+
+echo Creating $PACKAGE package version $VERSION revision $REVISION
+${SUDO} rm -rf $DIRNAME/$PACKAGE
+${SUDO} rm -rf $DIRNAME/$ARCHIVE
+
+# create debian control file.
+mkdir -p $DIRNAME/$PACKAGE/DEBIAN
+echo "Package: $PACKAGE" > $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Priority: Extra" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Name: XBMC-iOS" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Depends: firmware (>= 4.1), curl, org.xbmc.xbmc-iconpack" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Version: $VERSION-$REVISION" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Architecture: iphoneos-arm" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Description: XBMC Multimedia Center for 4.x iOS" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Homepage: http://xbmc.org/" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Maintainer: Scott Davilla, Edgar Hucek" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Author: TeamXBMC" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Section: Multimedia" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Icon: file:///Applications/Cydia.app/Sources/mirrors.xbmc.org.png" >> $DIRNAME/$PACKAGE/DEBIAN/control
+
+# prerm: called on remove and upgrade - get rid of existing bits.
+echo "#!/bin/sh" > $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "rm -rf /Applications/XBMC.app" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm
+
+# postinst: nothing for now.
+echo "#!/bin/sh" > $DIRNAME/$PACKAGE/DEBIAN/postinst
+chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
+
+# prep XBMC.app
+mkdir -p $DIRNAME/$PACKAGE/Applications
+cp -r $XBMC $DIRNAME/$PACKAGE/Applications/
+find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.gitignore' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store' -exec rm -rf {} \;
+
+# set ownership to root:root
+${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
+
+echo Packaging $PACKAGE
+# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
+# extended attributes (e.g. resource forks) to ._* archive members.
+# Also allows archiving and extracting actual ._* files.
+export COPYFILE_DISABLE=true
+export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
+#
+dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
+dpkg-deb --info $DIRNAME/$ARCHIVE
+dpkg-deb --contents $DIRNAME/$ARCHIVE
+
+# clean up by removing package dir
+${SUDO} rm -rf $DIRNAME/$PACKAGE
diff --git a/tools/darwin/packaging/xbmc-osx/Makefile b/tools/darwin/packaging/xbmc-osx/Makefile
new file mode 100644
index 0000000000..4b0990b184
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/Makefile
@@ -0,0 +1,18 @@
+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/VolumeDSStore b/tools/darwin/packaging/xbmc-osx/VolumeDSStore
new file mode 100644
index 0000000000..387b6e21eb
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/VolumeDSStore
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-osx/VolumeDSStoreApp b/tools/darwin/packaging/xbmc-osx/VolumeDSStoreApp
new file mode 100644
index 0000000000..f1a82a4bbb
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/VolumeDSStoreApp
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-osx/VolumeIcon.icns b/tools/darwin/packaging/xbmc-osx/VolumeIcon.icns
new file mode 100644
index 0000000000..75215701b6
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/VolumeIcon.icns
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-osx/background/DiskImageBackground.png b/tools/darwin/packaging/xbmc-osx/background/DiskImageBackground.png
new file mode 100644
index 0000000000..2299a1ac75
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/background/DiskImageBackground.png
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-osx/background/DiskImageBackgroundDebug.png b/tools/darwin/packaging/xbmc-osx/background/DiskImageBackgroundDebug.png
new file mode 100644
index 0000000000..2299a1ac75
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/background/DiskImageBackgroundDebug.png
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-osx/dmgmaker.pl b/tools/darwin/packaging/xbmc-osx/dmgmaker.pl
new file mode 100755
index 0000000000..539d730f58
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-osx/dmgmaker.pl
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2008-2009 Team XBMC http://www.xbmc.org
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use strict;
+use warnings;
+
+sub make_dmg {
+ my $mpkg = shift;
+ my $volname = shift;
+ my $pkgname = shift;
+ my $dev_handle;
+
+ die("Could not find \"$mpkg\"\n")
+ if ! -d $mpkg;
+
+ my $ext = $1 if $mpkg =~ /.*\.(.*?)$/;
+ $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`;
+ chomp $dev_handle;
+ $dev_handle = $1 if $dev_handle =~ /^\/dev\/(disk.)/;
+ die("Could not obtain device handle\n") if !$dev_handle;
+ print "Got device handle \"$dev_handle\"\n";
+ print "Ignore \"No space left on device\" warnings from ditto, they are an autosize artifact\n";
+ `ditto "$mpkg" "/Volumes/$volname/$pkgname.$ext"`;
+
+ # set a volume icon if we have one
+ if ( -f "VolumeIcon.icns" ) {
+ `ditto VolumeIcon.icns "/Volumes/$volname/.VolumeIcon.icns"`;
+ }
+ # make symlink to /Applications
+ `ln -s /Applications "/Volumes/$volname/Applications"`;
+
+ if ( -d "background" ) {
+ `mkdir "/Volumes/$volname/background"`;
+ `ditto background "/Volumes/$volname/background/"`;
+ }
+ if ( -f "VolumeDSStore" ) {
+ `ditto VolumeDSStore "/Volumes/$volname/.DS_Store"` if $ext ne "app";
+ `ditto VolumeDSStoreApp "/Volumes/$volname/.DS_Store"` if $ext eq "app";
+ }
+ if ( -d "background" ) {
+ `/Developer/Tools/SetFile -a V "/Volumes/$volname/background"`;
+ }
+ `/Developer/Tools/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"`;
+}
+
+if (! defined $ARGV[0]) {
+ die("Please specify the mpkg to make a DMG of as the first argument\n".
+ "or -c to create a package and use it.\n");
+}
+
+if ( $ARGV[0] eq "-c" ) {
+ die("TODO: -c\n");
+ #make_dmg(make_mpkg(), "XBMC Atlantis - 8.10", "XBMC Media Center");
+ exit;
+}
+
+make_dmg($ARGV[0], "XBMC", "XBMC");
diff --git a/tools/darwin/packaging/xbmc-seatbeltunlock/03e48c66a9cae1ff768eb3fe7981c499.patch b/tools/darwin/packaging/xbmc-seatbeltunlock/03e48c66a9cae1ff768eb3fe7981c499.patch
new file mode 100644
index 0000000000..b58f5bd838
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-seatbeltunlock/03e48c66a9cae1ff768eb3fe7981c499.patch
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-seatbeltunlock/12313417e3afeba6531255af58cb5283.patch b/tools/darwin/packaging/xbmc-seatbeltunlock/12313417e3afeba6531255af58cb5283.patch
new file mode 100644
index 0000000000..960edae2d2
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-seatbeltunlock/12313417e3afeba6531255af58cb5283.patch
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-seatbeltunlock/42d00865f281bb662b6ce447c9815e59.patch b/tools/darwin/packaging/xbmc-seatbeltunlock/42d00865f281bb662b6ce447c9815e59.patch
new file mode 100644
index 0000000000..f10a1b3571
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-seatbeltunlock/42d00865f281bb662b6ce447c9815e59.patch
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-seatbeltunlock/5a28620a15c15d41e1ae836dd1f95f8d.patch b/tools/darwin/packaging/xbmc-seatbeltunlock/5a28620a15c15d41e1ae836dd1f95f8d.patch
new file mode 100644
index 0000000000..12ea6fc9b1
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-seatbeltunlock/5a28620a15c15d41e1ae836dd1f95f8d.patch
Binary files differ
diff --git a/tools/darwin/packaging/xbmc-seatbeltunlock/mkdeb-xbmc-seatbeltunlock.sh b/tools/darwin/packaging/xbmc-seatbeltunlock/mkdeb-xbmc-seatbeltunlock.sh
new file mode 100755
index 0000000000..067827b737
--- /dev/null
+++ b/tools/darwin/packaging/xbmc-seatbeltunlock/mkdeb-xbmc-seatbeltunlock.sh
@@ -0,0 +1,106 @@
+#!/bin/sh
+
+if [ -f "/usr/bin/sudo" ]; then
+ SUDO="/usr/bin/sudo"
+fi
+if [ -f "../../ios-depends/build/bin/dpkg-deb" ]; then
+ DPKGDEB="../../ios-depends/build/bin/dpkg-deb"
+else
+ DPKGDEB="dpkg-deb"
+fi
+
+PACKAGE=org.xbmc.xbmc-seatbeltunlock
+
+VERSION=1.0
+REVISION=4
+ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
+
+echo Creating $PACKAGE package version $VERSION revision $REVISION
+${SUDO} rm -rf $PACKAGE
+${SUDO} rm -rf $ARCHIVE
+
+# create debian control file
+mkdir -p $PACKAGE/DEBIAN
+echo "Package: $PACKAGE" > $PACKAGE/DEBIAN/control
+echo "Priority: Extra" >> $PACKAGE/DEBIAN/control
+echo "Depends: coreutils, bsdiff, gawk" >> $PACKAGE/DEBIAN/control
+echo "Name: XBMC seatbelt unlock for AppleTV 2" >> $PACKAGE/DEBIAN/control
+echo "Version: $VERSION-$REVISION" >> $PACKAGE/DEBIAN/control
+echo "Architecture: iphoneos-arm" >> $PACKAGE/DEBIAN/control
+echo "Description: XBMC tweeks, removes seatbelt" >> $PACKAGE/DEBIAN/control
+echo "Homepage: http://xbmc.org/" >> $PACKAGE/DEBIAN/control
+echo "Maintainer: Scott Davilla" >> $PACKAGE/DEBIAN/control
+echo "Author: TeamXBMC" >> $PACKAGE/DEBIAN/control
+echo "Section: Tweaks" >> $PACKAGE/DEBIAN/control
+
+# postinst: find lowtide/appletv, binary patch out seatbelt-profile key,
+# rm/mv replace lowtide/appletv. Last step is critical as profiles are
+# vnode based and there might be an existing file vnode profile.
+echo "#!/bin/sh" > $PACKAGE/DEBIAN/postinst
+echo "if [ \"\`uname -r\`\" = \"10.3.1\" ]; then" >> $PACKAGE/DEBIAN/postinst
+echo " BINPATH=/Applications/Lowtide.app/Lowtide" >> $PACKAGE/DEBIAN/postinst
+echo " echo \"Found ATV2 running ios 4.1/Lowtide\"" >> $PACKAGE/DEBIAN/postinst
+echo "else" >> $PACKAGE/DEBIAN/postinst
+echo " BINPATH=/Applications/AppleTV.app/AppleTV" >> $PACKAGE/DEBIAN/postinst
+echo " echo \"Found ATV2 running ios 4.2+/AppleTV\"" >> $PACKAGE/DEBIAN/postinst
+echo "fi" >> $PACKAGE/DEBIAN/postinst
+echo "case \`md5sum \$BINPATH | awk '{print \$1}'\` in" >> $PACKAGE/DEBIAN/postinst
+echo " 12313417e3afeba6531255af58cb5283 )" >> $PACKAGE/DEBIAN/postinst
+echo " echo \"Found 4.1 (8M89):Removing seatbelt profile key from Lowtide\"" >> $PACKAGE/DEBIAN/postinst
+echo " bspatch /Applications/Lowtide.app/Lowtide /var/tmp/Lowtide-nosb /var/tmp/12313417e3afeba6531255af58cb5283.patch" >> $PACKAGE/DEBIAN/postinst
+echo " rm /var/tmp/12313417e3afeba6531255af58cb5283.patch" >> $PACKAGE/DEBIAN/postinst
+echo " chmod 755 /var/tmp/Lowtide-nosb" >> $PACKAGE/DEBIAN/postinst
+echo " mv -f /Applications/Lowtide.app/Lowtide /Applications/Lowtide.app/Lowtide_org" >> $PACKAGE/DEBIAN/postinst
+echo " mv /var/tmp/Lowtide-nosb /Applications/Lowtide.app/Lowtide" >> $PACKAGE/DEBIAN/postinst
+echo " killall Lowtide ;;" >> $PACKAGE/DEBIAN/postinst
+echo " 5a28620a15c15d41e1ae836dd1f95f8d )" >> $PACKAGE/DEBIAN/postinst
+echo " echo \"Found 4.2.1 (8C154):Removing seatbelt profile key from AppleTV\"" >> $PACKAGE/DEBIAN/postinst
+echo " bspatch /Applications/AppleTV.app/AppleTV /var/tmp/AppleTV-nosb /var/tmp/5a28620a15c15d41e1ae836dd1f95f8d.patch" >> $PACKAGE/DEBIAN/postinst
+echo " rm /var/tmp/5a28620a15c15d41e1ae836dd1f95f8d.patch" >> $PACKAGE/DEBIAN/postinst
+echo " chmod 755 /var/tmp/AppleTV-nosb" >> $PACKAGE/DEBIAN/postinst
+echo " mv -f /Applications/AppleTV.app/AppleTV /Applications/AppleTV.app/AppleTV_org" >> $PACKAGE/DEBIAN/postinst
+echo " mv /var/tmp/AppleTV-nosb /Applications/AppleTV.app/AppleTV" >> $PACKAGE/DEBIAN/postinst
+echo " killall AppleTV ;;" >> $PACKAGE/DEBIAN/postinst
+echo " 03e48c66a9cae1ff768eb3fe7981c499 )" >> $PACKAGE/DEBIAN/postinst
+echo " echo \"Found 4.3 (8F202):Removing seatbelt profile key from AppleTV\"" >> $PACKAGE/DEBIAN/postinst
+echo " bspatch /Applications/AppleTV.app/AppleTV /var/tmp/AppleTV-nosb /var/tmp/03e48c66a9cae1ff768eb3fe7981c499.patch" >> $PACKAGE/DEBIAN/postinst
+echo " rm /var/tmp/03e48c66a9cae1ff768eb3fe7981c499.patch" >> $PACKAGE/DEBIAN/postinst
+echo " chmod 755 /var/tmp/AppleTV-nosb" >> $PACKAGE/DEBIAN/postinst
+echo " mv -f /Applications/AppleTV.app/AppleTV /Applications/AppleTV.app/AppleTV_org" >> $PACKAGE/DEBIAN/postinst
+echo " mv /var/tmp/AppleTV-nosb /Applications/AppleTV.app/AppleTV" >> $PACKAGE/DEBIAN/postinst
+echo " killall AppleTV ;;" >> $PACKAGE/DEBIAN/postinst
+echo " 42d00865f281bb662b6ce447c9815e59 )" >> $PACKAGE/DEBIAN/postinst
+echo " echo \"Found 4.3.2 (8F305):Removing seatbelt profile key from AppleTV\"" >> $PACKAGE/DEBIAN/postinst
+echo " bspatch /Applications/AppleTV.app/AppleTV /var/tmp/AppleTV-nosb /var/tmp/42d00865f281bb662b6ce447c9815e59.patch" >> $PACKAGE/DEBIAN/postinst
+echo " rm /var/tmp/42d00865f281bb662b6ce447c9815e59.patch" >> $PACKAGE/DEBIAN/postinst
+echo " chmod 755 /var/tmp/AppleTV-nosb" >> $PACKAGE/DEBIAN/postinst
+echo " mv -f /Applications/AppleTV.app/AppleTV /Applications/AppleTV.app/AppleTV_org" >> $PACKAGE/DEBIAN/postinst
+echo " mv /var/tmp/AppleTV-nosb /Applications/AppleTV.app/AppleTV" >> $PACKAGE/DEBIAN/postinst
+echo " killall AppleTV ;;" >> $PACKAGE/DEBIAN/postinst
+echo " * )" >> $PACKAGE/DEBIAN/postinst
+echo " echo \"Frontrow app md5sum is unknown, not patching\" ;;" >> $PACKAGE/DEBIAN/postinst
+echo "esac" >> $PACKAGE/DEBIAN/postinst
+chmod +x $PACKAGE/DEBIAN/postinst
+
+# create the patch directory and copy in patch
+mkdir -p $PACKAGE/var/tmp
+cp 12313417e3afeba6531255af58cb5283.patch $PACKAGE/var/tmp/
+cp 5a28620a15c15d41e1ae836dd1f95f8d.patch $PACKAGE/var/tmp/
+cp 03e48c66a9cae1ff768eb3fe7981c499.patch $PACKAGE/var/tmp/
+cp 42d00865f281bb662b6ce447c9815e59.patch $PACKAGE/var/tmp/
+
+# set ownership to root:root
+${SUDO} chown -R 0:0 $PACKAGE
+
+echo Packaging $PACKAGE
+# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
+# extended attributes (e.g. resource forks) to ._* archive members.
+# Also allows archiving and extracting actual ._* files.
+export COPYFILE_DISABLE=true
+export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
+${DPKGDEB} -b $PACKAGE $ARCHIVE
+${DPKGDEB} --info $ARCHIVE
+${DPKGDEB} --contents $ARCHIVE
+
+# clean up by removing package dir
+${SUDO} rm -rf $PACKAGE