-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathbuild_mac.sh
executable file
·36 lines (27 loc) · 1.04 KB
/
build_mac.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $Id: build_mac.sh 339M 2010-05-02 14:24:15Z (local) $
#!/bin/sh
cd src
echo "|------------------------------|"
echo "| Building Sudoku for Mac OS X |"
echo "|------------------------------|"
echo "[1/6] Generating an Xcode project file ..."
qmake Sudoku_release.pro
echo "[2/6] Building the project using the Release configuration ..."
rm -rf Sudoku.app
xcodebuild -project Sudoku.xcodeproj -configuration Release build clean > /dev/null
echo "[3/6] Copy the necessary Qt frameworks into the application bundle ..."
macdeployqt Sudoku.app > /dev/null
echo "[4/6] Packaging into a DMG ..."
hdiutil unmount -force -notimeout -quiet /Volumes/Sudoku.dmg
rm -f ~/Desktop/Sudoku.dmg
mkdir dmgtmp
mv Sudoku.app dmgtmp/
hdiutil create -srcfolder dmgtmp -volname "Sudoku" ~/Desktop/Sudoku.dmg > /dev/null
mv dmgtmp/Sudoku.app ./
rm -rf dmgtmp
echo "[5/6] Mounting the created DMG ..."
hdiutil attach ~/Desktop/Sudoku.dmg > /dev/null
echo "[6/6] Showing the mounted DMG ..."
open /Volumes/Sudoku
cd ..
echo "All done! ~/Desktop/Sudoku.dmg is ready for release!"