-
Notifications
You must be signed in to change notification settings - Fork 0
/
exultsnapshot.sh
executable file
·72 lines (56 loc) · 2 KB
/
exultsnapshot.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
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
72
#!/bin/zsh
#functions
. ./functions.sh
. ./snapshots/exult.sh
headermain EXULT
bundle_name=Exult_libs.app
program=exult
program2=mapedit/exult_studio
cd $HOME/code/snapshots/exult
/usr/bin/git pull --rebase=true 2> >(teelog >&2) || error Git pull
#configure options for all arches
CONF_OPT="-q --enable-exult-studio-support --enable-exult-studio --enable-mt32emu --enable-fluidsynth --disable-alsa --disable-timidity-midi --disable-tools"
export EXPACK=/opt/exult/expack
export HEAD2DATA=/opt/exult/head2data
#x86_64
build_x86_64
#arm64
build_arm64
#deploy
deploy
{
#make fat exult binary
lipo_build x86_64 arm64
#make fat exult_studio binary
lipo_build2 x86_64 arm64
#replace BundleVersion with date
sed -i '' "s|1.9.0git<|1.9.0 $(date +"%Y-%m-%d-%H%M")<|" info.plist
sed -i '' "s|1.9.0git<|1.9.0 $(date +"%Y-%m-%d-%H%M")<|" ./macosx/exult_studio_info.plist
# rename the libs bundle to the actual bundle - need to use a lib bundle, since otherwise "make clean" between arches would wipe the bundle
mv Exult_libs.app Exult.app
#bundle
#let's skip it because the image requires make bundle anyway
#make -s bundle || error bundle
#make -s studiobundle || error studiobundle
#image
REVISION=" $(/usr/bin/git log -1 --pretty=format:%h)"
export REVISION
make -s osxdmg || error disk image
make -s studiodmg > /dev/null 2>&1 || error studio disk image
#Notarize it
#first Exult then Studio. Arg is the disk image file name
notar Exult-snapshot.dmg || error notarize Exult
notar ExultStudio-snapshot.dmg || error notarize ExultStudio
#file it
cp -p Exult-snapshot.dmg $HOME/Snapshots/exult/"$(date +%y-%m-%d-%H%M) Exult$REVISION.dmg"
cp -p ExultStudio-snapshot.dmg $HOME/Snapshots/exult/"$(date +%y-%m-%d-%H%M) ExultStudio$REVISION.dmg"
mv Exult-snapshot.dmg $HOME/Snapshots/exult/
mv ExultStudio-snapshot.dmg $HOME/Snapshots/exult/
cp -R Exult.app /Applications/
cp -R Exult_Studio.app /Applications/
#upload
sf_upload
} 2>&1 | teelog -a ; pipestatus || return
#clean
make distclean > /dev/null
success