/
build-patchfile.sh
executable file
·69 lines (54 loc) · 2.37 KB
/
build-patchfile.sh
OlderNewer
1
2
3
4
5
#!/bin/sh
# Just die if anything fails.
set -e
6
7
8
9
10
11
12
# revert everything to a sane state.
make
strip -S ./bin/mojopatch
mv ./bin/mojopatch ./MojoPatch.app/Contents/MacOS/
rm -rf ./MojoPatch.app/default.mojopatch
rm -rf "/Users/icculus/Desktop/Shadows of Undrentide Installer.app"
rm -rf "/Users/icculus/Desktop/Hordes of the Underdark Installer.app"
13
14
15
# Just a blank dir, so everything in the patch dir is added in the patch...
mkdir -p tmp
16
17
18
19
20
21
# Bioware doesn't want us to check for 1.62 or later and patch as necessary,
# but rather force installation of 1.62, even if it downgrades the game.
#
# While this arguably simplifies the installers, it's a little silly. --ryan.
22
# Put the 1.62 patch together...
23
24
25
26
27
28
29
30
#./MojoPatch.app/Contents/MacOS/mojopatch --create --alwaysadd --zliblevel 1 \
#--product "Neverwinter Nights" \
#--identifier "nwmain.icns" \
#--version "0.0.1d1" --newversion "1.62" --replace --append --quietonsuccess \
#--titlebar "Neverwinter Nights 1.62 patch" \
#"./MojoPatch.app/default.mojopatch" \
#"./tmp" \
#"/Users/icculus/Desktop/nwn162"
31
32
# Copy initial patchfile to seperate expansion pack installers...
33
34
35
36
37
# Stupid spaces in the name! Copy to a temp dir to nuke .svn dirs first...
cp -R MojoPatch.app x.app
for feh in `find x.app -name ".svn" -type d -exec echo {} \;` ; do rm -rf $feh ; done
38
echo "copying initial patch to SoU branch..."
39
cp -R x.app "/Users/icculus/Desktop/Shadows of Undrentide Installer.app"
40
41
echo "copying initial patch to HotU branch..."
42
43
44
cp -R x.app "/Users/icculus/Desktop/Hordes of the Underdark Installer.app"
rm -rf x.app
45
46
# Add XP1 data to patchfile...
47
./MojoPatch.app/Contents/MacOS/mojopatch --create --alwaysadd --zliblevel 1 \
48
49
50
--product "Neverwinter Nights" \
--identifier "SoU" \
--version "a" --newversion "b" --replace --append --quietonsuccess \
51
--titlebar "NWN Shadows of Undrentide Expansion Pack" \
52
"/Users/icculus/Desktop/Shadows of Undrentide Installer.app/default.mojopatch" \
53
"./tmp" \
54
"/Users/icculus/Desktop/XP1-1.62.8047f"
55
56
# Add XP2 data to the other patchfile...
57
./MojoPatch.app/Contents/MacOS/mojopatch --create --alwaysadd --zliblevel 9 \
58
59
60
61
62
63
--product "Neverwinter Nights" \
--identifier "HotU" \
--version "a" --newversion "b" --replace --append \
--titlebar "NWN Hordes of the Underdark Expansion Pack" \
"/Users/icculus/Desktop/Hordes of the Underdark Installer.app/default.mojopatch" \
"./tmp" \
64
"/Users/icculus/Desktop/XP2-1.62.8047f"
65
66
67
68
rmdir tmp
exit 0;