-
Notifications
You must be signed in to change notification settings - Fork 3
/
make_release
executable file
·71 lines (61 loc) · 2.32 KB
/
make_release
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
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/csh -f
# script to build OSX application bundle and prepare a release directory
# useful resources:
# https://developer.apple.com/documentation/bundleresources
# https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html
set release = "release" ; # destination directory name
set bundle = "$release/wangemu.app" ; # name of application bundle
set contents = "$bundle/Contents" ; # app Contents subdir
set MacOS = "$bundle/Contents/MacOS" ; # where the binary lives
set resources = "$bundle/Contents/Resources" ; # where external resources live
if (-e $release) then
echo "Stopping: $release already exists"
exit 99
endif
# name of directory to build the .app bundle in
mkdir -p $contents
cat > $contents/Info.plist <<END
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>wangemu</string>
<key>CFBundleIconFile</key>
<string>wang.icns</string>
<key>CFBundleIdentifier</key>
<string>org.wang2200.www</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>3.0</string>
<key>ApplePressAndHoldEnabled</key>
<false/>
</dict>
</plist>
END
echo -n 'APPL????' > $contents/PkgInfo
# the executable
mkdir -p $MacOS
cp wangemu $MacOS/wangemu
# I'm going to leave the binary unstripped. if there is a crash, perhaps the
# presense of the symbol table will report information useful to diagnosing the
# problem.
# unstripped: 6536928
# stripped: 5415168
#strip $MacOS/wangemu
# resources external to the executable
mkdir -p $resources
cp -r html_osx $resources/html
cp -r sounds $resources/sounds
cp -r relnotes.txt $resources/relnotes.txt
cp -r src/wang.icns $resources/wang.icns
# copy all the stuff that lives in parallel to the app
cp LICENSE README.md build.txt code.txt relnotes.txt $release
cp makefile make_release make_dmg $release
cp -r disks scripts sounds src wvdutil $release
ln -s "wangemu.app/Contents/MacOS/wangemu" $release/wangemu