forked from cemu-project/cemu_graphic_packs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
221 lines (202 loc) · 8.95 KB
/
build.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
#!/bin/bash
BGREEN='\033[1;32m'
GREEN='\033[0;32m'
BCYAN='\033[1;36m'
RED='\033[0;31m'
NC='\033[0m' # Removes Color
baseOutDir=$1
if [ -n "$baseOutDir" ]; then
if [ ! -d "$baseOutDir" ]; then
echo -e "${GREEN}Making base output directory ${BGREEN}$baseOutDir\n"
mkdir "$baseOutDir"
fi
fi
build_dir () {
srcDir=$1
dstDir=$2
if [ -n "$baseOutDir" ]; then
dstDir="$baseOutDir/$dstDir"
fi
params=( "$@" )
rest=( "${params[@]:2}" )
if [ ! -d "$dstDir" ]; then
mkdir -p "$dstDir"
else
rm "$dstDir"/*.txt
fi
for f in "$srcDir"/*.txt
do
filename=`basename $f`
outName="$dstDir/$filename"
echo -e "\t${GREEN}[PHP] ${NC}Exec $f to $outName with params ${rest[@]}"
php "$f" "${rest[@]}" > "$outName"
if [ $? -ne 0 ]; then
rm "$outName"
fi
done
}
res_360p489=( "Performance" 1920 360 )
res_360p=( "Performance" 640 360 )
res_480p489=( "Performance" 2562 480 )
res_480p=( "Performance" 854 480 )
res_540p219=( "Performance" 1280 540 )
res_540p489=( "Performance" 2880 540 )
res_540p=( "Performance" 960 540 )
res_720p219=( "Performance" 1706 720 )
res_720p489=( "Performance" 3840 720 )
res_720p=( "Performance" 1280 720 )
res_900p219=( "Quality" 2100 900 )
res_900p489=( "Quality" 4800 900 )
res_900p=( "Quality" 1600 900 )
res_1080p219=( "Quality" 2560 1080 )
res_1080p489=( "Quality" 5760 1080 )
res_1080p=( "Quality" 1920 1080 )
res_1440p219=( "Quality" 3440 1440 )
res_1440p489=( "Quality" 7680 1440 )
res_1440p=( "Quality" 2560 1440 )
res_1800p219=( "Quality" 4200 1800 )
res_1800p489=( "Quality" 9600 1800 )
res_1800p=( "Quality" 3200 1800 )
res_2160p219=( "Quality" 5120 2160 )
res_2160p489=( "Quality" 11520 2160 )
res_2160p=( "Quality" 3840 2160 )
res_2880p219=( "Enthusiast" 6880 2880 )
res_2880p489=( "Enthusiast" 15360 2880 )
res_2880p=( "Enthusiast" 5120 2880 )
res_4320p219=( "Enthusiast" 10240 4320 )
res_4320p489=( "Enthusiast" 23040 4320 )
res_4320p=( "Enthusiast" 7680 4320 )
res_5760p219=( "Enthusiast" 13760 5760 )
res_5760p489=( "Enthusiast" 30720 5760 )
res_5760p=( "Enthusiast" 10240 5760 )
std_respack () {
gameName=$1
params=( "$@" )
rest=( "${params[@]:1}" )
echo -e "${GREEN}[Building] ${BCYAN}$gameName ${NC}for ${rest[@]}"
for arrg in "${rest[@]}"
do
resvarname="res_${arrg}[@]"
if [ -v "$resvarname" ]; then
resdata=( "${!resvarname}" )
prefix="${resdata[0]}"
subparams=( "${resdata[@]:1}" )
inFolder="Source/$gameName"
outFolder="${gameName}_${arrg}"
if [ -n "$prefix" ]; then
outFolder="$prefix/$outFolder"
fi
#width="${subparams[0]}"
#height="${subparams[1]}"
#echo "$arrg w: $width h: $height inFolder: $inFolder outFolder: $outFolder"
build_dir "$inFolder" "$outFolder" "${subparams[@]}"
elif [ -n "$arrg" ]; then #only if requested resolution name not empty (which happens when you remove array elem naively)
echo -e "${RED}$arrg resolution not defined, define it in build.sh"
exit 1
fi
done
}
mod_onearg () {
params=( "$@" )
subparams=( "${params[@]:1}" )
mod_folder="${params[0]}"
echo -e "${GREEN}[Building] ${BCYAN}$mod_folder ${NC}with arguments: ${subparams[@]}"
for arrg in "${subparams[@]}"
do
inFolder="Source/$mod_folder"
outFolder="Modifications/${mod_folder}_${arrg}"
#echo "${arrg} inFolder: $inFolder outFolder: $outFolder"
build_dir "$inFolder" "$outFolder" "$arrg"
done
}
res16by9=( "360p" "480p" "540p" "720p" "900p" "1080p" "1440p" "1800p" "2160p" "2880p" "4320p" "5760p" )
res21by9=( "540p219" "720p219" "900p219" "1080p219" "1440p219" "1800p219" "2160p219" "2880p219" "4320p219" "5760p219" )
res48by9=( "360p489" "480p489" "540p489" "720p489" "900p489" "1080p489" "1440p489" "1800p489" "2160p489" "2880p489" "4320p489" "5760p489" )
just720p=( "720p" )
just1080p=( "1080p" )
std_respack "AdventureTimeEtDBIDK" "${res16by9[@]/$just1080p}"
std_respack "AdventureTimeFJI" "${res16by9[@]/$just720p}"
std_respack "AmiiboFestival" "${res16by9[@]/$just720p}"
std_respack "AquaTV" "${res16by9[@]/$just720p}"
std_respack "BatmanArkham" "${res16by9[@]/$just720p}"
std_respack "Bayonetta" "${res16by9[@]/$just720p}"
std_respack "Bayonetta2" "${res16by9[@]/$just720p}"
std_respack "Ben10Omniverse" "${res16by9[@]/$just720p}"
std_respack "BreathOfTheWild" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "Brunswick" "${res16by9[@]/$just720p}"
std_respack "CaptainToad" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "Chariot" "${res16by9[@]/$just720p}"
std_respack "ChimpuzzlePro" "${res16by9[@]/$just720p}"
std_respack "ChompyChompChompParty" "${res16by9[@]/$just720p}"
std_respack "CitizensOfEarth" "${res16by9[@]/$just720p}"
std_respack "ColorSplash" "${res16by9[@]/$just720p}"
std_respack "DevilsThird" "${res16by9[@]/$just720p}"
std_respack "DuckTalesRemastered" "${res16by9[@]/$just1080p}"
std_respack "ElectronicSuperJoyGrooveCity" "${res16by9[@]/$just1080p}"
std_respack "FASTRacingNEO" "${res16by9[@]/$just720p}"
std_respack "FamilyTennisSP" "${res16by9[@]/$just720p}"
std_respack "FistoftheNorthStar" "${res16by9[@]/$just720p}"
std_respack "FrenchyBird" "${res16by9[@]/$just720p}"
std_respack "GhostBladeHD" "${res16by9[@]/$just720p}"
std_respack "GhostlyAdventures" "${res16by9[@]/$just720p}"
std_respack "GhostlyAdventures2" "${res16by9[@]/$just720p}"
std_respack "Guacamelee" "${res16by9[@]/$just720p}"
std_respack "HyruleWarriors" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "InfinityRunner" "${res16by9[@]/$just720p}"
std_respack "KamenRider" "${res16by9[@]/$just720p}"
std_respack "KickandFennick" "${res16by9[@]/$just720p}"
std_respack "KirbyRainbowCurse" "${res16by9[@]/$just720p}"
std_respack "KungFuPanda" "${res16by9[@]/$just720p}"
std_respack "LEGOCityUndercover" "${res16by9[@]/$just720p}"
std_respack "MarioKart8" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "MarioSonicRio" "${res16by9[@]/$just720p}"
std_respack "MarioSonicSochi" "${res16by9[@]/$just720p}"
std_respack "MarioTennis" "${res16by9[@]/$just720p}"
std_respack "MarioParty10" "${res16by9[@]/$just720p}"
std_respack "MinecraftStory" "${res16by9[@]/$just720p}"
std_respack "MonsterHunter3Ultimate" "${res16by9[@]/$just1080p}"
std_respack "NBA2K13" "${res16by9[@]/$just720p}"
std_respack "NewSuperMarioBrosU" "${res16by9[@]/$just720p}"
std_respack "NinjaGaiden3RE" "${res16by9[@]/$just720p}"
std_respack "NintendoLand" "${res16by9[@]/$just720p}"
std_respack "OnePiece" "${res16by9[@]/$just720p}"
std_respack "PaperMonstersRecut" "${res16by9[@]/$just720p}"
std_respack "PhineasFerb" "${res16by9[@]/$just720p}"
std_respack "Pikmin3" "${res16by9[@]/$just720p}"
std_respack "PokkenTournament" "${res16by9[@]/$just720p}"
std_respack "ProjectZero" "${res16by9[@]/$just720p}"
std_respack "PuyoPuyoTetris" "${res16by9[@]/$just1080p}"
std_respack "RiseOfLyric" "${res16by9[@]/$just720p}"
std_respack "SanatoryHallways" "${res16by9[@]/$just720p}"
std_respack "ScribblenautsUnlimited" "${res16by9[@]/$just720p}"
std_respack "ScribblenautsUnmasked" "${res16by9[@]/$just720p}"
std_respack "Severed" "${res16by9[@]/$just720p}"
std_respack "ShantaeHGH" "${res16by9[@]/$just1080p}"
std_respack "ShovelKnight" "${res16by9[@]/$just1080p}"
std_respack "Smurfs2" "${res16by9[@]/$just1080p}"
std_respack "SonicLostWorld" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "Splatoon" "${res16by9[@]/$just720p}" "${res21by9[@]}"
std_respack "SpongeBob" "${res16by9[@]/$just720p}"
std_respack "StarFoxGuard" "${res16by9[@]/$just720p}"
std_respack "StarFoxZero" "${res16by9[@]/$just720p}"
std_respack "SuperMario3DWorld" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "SuperMarioMaker" "${res16by9[@]/$just720p}"
std_respack "SuperSmashBros" "${res16by9[@]/$just1080p}"
std_respack "TNTRacers" "${res16by9[@]/$just1080p}"
std_respack "TaikoNoTatsujin" "${res16by9[@]/$just720p}"
std_respack "Tekken" "${res16by9[@]/$just720p}"
std_respack "Tengami" "${res16by9[@]/$just720p}"
std_respack "TokyoMirage" "${res16by9[@]/$just720p}"
std_respack "TropicalFreeze" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "TurboSuperStuntSquad" "${res16by9[@]/$just720p}"
std_respack "TwilightPrincessHD" "${res16by9[@]/$just1080p}"
std_respack "WarriorsOrochi3" "${res16by9[@]/$just720p}"
std_respack "WiiUBIOS" "${res16by9[@]/$just720p}"
std_respack "WindWakerHD" "${res16by9[@]/$just1080p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "Wipeout3" "${res16by9[@]/$just720p}"
std_respack "WipeoutCreate" "${res16by9[@]/$just720p}"
std_respack "Wonderful101" "${res16by9[@]/$just720p}"
std_respack "WoollyWorld" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
std_respack "XenobladeX" "${res16by9[@]/$just720p}" "${res21by9[@]}" "${res48by9[@]}"
mod_onearg "BreathOfTheWild_StaticFPS" 30 45 60
echo -e "${NC}"