Skip to content

Commit

Permalink
Adding Mac build script
Browse files Browse the repository at this point in the history
  • Loading branch information
thommcgrath committed Oct 7, 2016
1 parent 916574f commit f8edfd0
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Installers/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions Installers/Mac/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Output
16 changes: 16 additions & 0 deletions Installers/Mac/Beacon.sparsebundle/Info.bckup
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>band-size</key>
<integer>8388608</integer>
<key>bundle-backingstore-version</key>
<integer>1</integer>
<key>diskimage-bundle-type</key>
<string>com.apple.diskimage.sparsebundle</string>
<key>size</key>
<integer>100020736</integer>
</dict>
</plist>
16 changes: 16 additions & 0 deletions Installers/Mac/Beacon.sparsebundle/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>band-size</key>
<integer>8388608</integer>
<key>bundle-backingstore-version</key>
<integer>1</integer>
<key>diskimage-bundle-type</key>
<string>com.apple.diskimage.sparsebundle</string>
<key>size</key>
<integer>100020736</integer>
</dict>
</plist>
Binary file added Installers/Mac/Beacon.sparsebundle/bands/0
Binary file not shown.
Binary file added Installers/Mac/Beacon.sparsebundle/bands/1
Binary file not shown.
Binary file added Installers/Mac/Beacon.sparsebundle/bands/5
Binary file not shown.
Binary file added Installers/Mac/Beacon.sparsebundle/bands/b
Binary file not shown.
Empty file.
31 changes: 31 additions & 0 deletions Installers/Mac/Build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

APPNAME="Beacon";
PARENT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd );
SOURCE="${PARENT}/../../Project/Builds - Beacon.xojo_project/Mac OS X (Cocoa Intel)";
DEST="/Volumes/${APPNAME}";
OUTPUT="${PARENT}/Output";

if [ ! -d "${SOURCE}/${APPNAME}.app" ]; then
echo "Make a client build with Xojo first.";
exit;
fi

mkdir -p "${OUTPUT}";

hdiutil convert "${PARENT}/${APPNAME}.sparsebundle" -format UDSP -o "${OUTPUT}/${APPNAME}.sparseimage";
hdiutil mount "${OUTPUT}/${APPNAME}.sparseimage";
if [ -e "${DEST}/${APPNAME}.app/Contents" ]; then
rm -rf "${DEST}/${APPNAME}.app/Contents";
fi
cp -R "${SOURCE}/${APPNAME}.app/Contents" "${DEST}/${APPNAME}.app";
find "${DEST}/${APPNAME}.app" -type d -exec chmod 755 {} +;
find "${DEST}/${APPNAME}.app" -type f -exec chmod 644 {} +;

hdiutil eject "${DEST}";
if [ -e "${OUTPUT}/${APPNAME}.dmg" ]; then
rm -rf "${OUTPUT}/${APPNAME}.dmg";
fi
hdiutil convert "${OUTPUT}/${APPNAME}.sparseimage" -format UDBZ -o "${OUTPUT}/${APPNAME}.dmg";
hdiutil internet-enable -yes "${OUTPUT}/${APPNAME}.dmg";
rm -rf "${OUTPUT}/${APPNAME}.sparseimage";

0 comments on commit f8edfd0

Please sign in to comment.