Skip to content

Commit

Permalink
Added dmg scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
acornejo committed Oct 17, 2013
1 parent 68819a3 commit 13556ae
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions kilogui/create_dmg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
DMG=$PWD/dmg
VOLNAME=KiloGUI
DMGNAME=kilogui.dmg
SIZE=20M

rm -fR $DMG
rm -f pack.temp.dmg
rm -f $DMGNAME
mkdir -p $DMG
mkdir -p $DMG/.background
cp images/background.png $DMG/.background
cp -a kilogui.app $DMG/kilogui.app

osascript<<END
tell application "Finder"
make new alias file to POSIX file "/Applications" at POSIX file "$DMG" with properties {name: "Applications"}
end tell
END

if [ -f "dmg_DS_Store" ]; then
cp dmg_DS_Store $DMG/.DS_Store
fi

hdiutil create -srcfolder "${DMG}" -volname "${VOLNAME}" -fs HFS+ -format UDRW -size ${SIZE} pack.temp.dmg

if [ ! -f "dmg_DS_Store" ]; then
device=$(hdiutil attach -readwrite -noverify -noautoopen "pack.temp.dmg" | egrep '^/dev/' | sed 1q | awk '{print $1}')

echo $device
open $device
open $device/.background
echo "Setup the view options of the folders, and eject the volume before continuing."
read
fi
hdiutil convert "pack.temp.dmg" -format UDZO -imagekey zlib-level=9 -o ${DMGNAME}
rm -f pack.temp.dmg
rm -fr $DMG
Binary file added kilogui/dmg_DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions kilogui/kilogui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

int main(int argc, char *argv[]) {
QApplication app(argc, argv);
/* app.setStyle("windowsvista"); */

KiloWindow window;
window.show();
Expand Down

0 comments on commit 13556ae

Please sign in to comment.