forked from gottcode/focuswriter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmac_deploy.sh
More file actions
executable file
·59 lines (50 loc) · 1.3 KB
/
mac_deploy.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.3 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
APP='FocusWriter'
BUNDLE="$APP.app"
VERSION='1.3.1'
# Create disk folder
echo -n 'Copying application bundle... '
rm -f "${APP}_$VERSION.dmg"
rm -rf "$APP"
mkdir "$APP"
cp -pf COPYING "$APP/"
cp -pf README "$APP/"
cp -Rpf "$BUNDLE" "$APP/"
echo 'Done'
# Copy translations
echo -n 'Copying translations... '
TRANSLATIONS=$APP/$BUNDLE/Contents/Resources/translations
mkdir $TRANSLATIONS
cp -Rf translations/*.qm $TRANSLATIONS
echo 'Done'
# Copy icons
echo -n 'Copying icons... '
ICONS="$APP/$BUNDLE/Contents/Resources/icons"
mkdir $ICONS
cp -Rf icons/oxygen/hicolor $ICONS
echo 'Done'
# Copy dictionaries
echo -n 'Copying dictionaries... '
DICTIONARIES="$APP/$BUNDLE/Contents/Resources/Dictionaries"
mkdir $DICTIONARIES
cp -f dict/* $DICTIONARIES
echo 'Done'
# Copy sounds
echo -n 'Copying sounds... '
SOUNDS="$APP/$BUNDLE/Contents/Resources/sounds"
mkdir $SOUNDS
cp -Rf sounds/* $SOUNDS
echo 'Done'
# Copy frameworks and plugins
echo -n 'Copying frameworks and plugins... '
macdeployqt "$APP/$BUNDLE"
echo 'Done'
# Create disk image
echo -n 'Creating disk image... '
hdiutil create -quiet -ov -srcfolder "$APP" -format UDBZ -volname "$APP" "${APP}_$VERSION.dmg"
hdiutil internet-enable -quiet -yes "${APP}_$VERSION.dmg"
echo 'Done'
# Clean up disk folder
echo -n 'Cleaning up... '
rm -rf "$APP"
echo 'Done'