-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_app.sh
More file actions
executable file
·42 lines (37 loc) · 1 KB
/
build_app.sh
File metadata and controls
executable file
·42 lines (37 loc) · 1 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
#!/bin/bash
set -e
echo "=== Shutter App Builder ==="
echo ""
# Clean previous builds
rm -rf build dist *.egg-info
# Build the .app bundle
echo "Building Shutter.app..."
python setup.py py2app
echo ""
echo "Build complete: dist/Shutter.app"
echo ""
echo "To run: open dist/Shutter.app"
echo ""
# Optionally create DMG
if [ "$1" = "--dmg" ]; then
DMG_NAME="Shutter-0.1.0"
echo "Creating DMG..."
if command -v create-dmg &> /dev/null; then
create-dmg \
--volname "Shutter" \
--volicon "resources/icon.icns" \
--window-pos 200 120 \
--window-size 600 400 \
--icon-size 100 \
--icon "Shutter.app" 150 200 \
--app-drop-link 450 200 \
"dist/${DMG_NAME}.dmg" \
"dist/Shutter.app"
else
hdiutil create -volname "Shutter" \
-srcfolder "dist/Shutter.app" \
-ov -format UDZO \
"dist/${DMG_NAME}.dmg"
fi
echo "DMG created: dist/${DMG_NAME}.dmg"
fi