|
17 | 17 | # "libisl.so.23: ELF load command address/offset not page-aligned" |
18 | 18 | # |
19 | 19 | # - This script can not be exucuted in steps (e.g. depends, sources, build, |
20 | | -# install, configure) as it will resets the gcc:armhf installation to |
| 20 | +# install, configure) as it will reset the gcc:armhf installation to |
21 | 21 | # gcc:arm64. |
22 | 22 | # |
23 | 23 |
|
@@ -197,19 +197,23 @@ function install_gmloader() { |
197 | 197 |
|
198 | 198 | function configure_gmloader() { |
199 | 199 | local apk_dir="$romdir/ports/droidports" |
200 | | - local maldita_url="https://github.com/Exarkuniv/game-data/raw/main/Maldita_Castilla_ouya.apk" |
201 | 200 | local am2r_url="https://archive.org/download/am-2-r-1.5.5-for-android/AM2R%20v1.5.5%20for%20Android.apk" |
| 201 | + local maldita_url="https://github.com/Exarkuniv/game-data/raw/main/Maldita_Castilla_ouya.apk" |
202 | 202 | local spelunky_url="https://github.com/yancharkin/SpelunkyClassicHD/releases/download/1.1.7-optimized/spelunky_classic_hd-android-armv7.apk" |
203 | 203 |
|
204 | 204 | if [[ "$md_mode" == "install" ]]; then |
205 | 205 | mkUserDir "$apk_dir" |
206 | 206 | local dl_url |
207 | | - for dl_url in "$maldita_url" "$am2r_url" "$spelunky_url"; do |
208 | | - local apk_file="$apk_dir/$(basename ${dl_url})" |
| 207 | + for dl_url in "$am2r_url" "$maldita_url" "$spelunky_url"; do |
| 208 | + local dest_file |
| 209 | + dest_file=$(basename ${dl_url}) |
| 210 | + if case "$dest_file" in AM2R*) ;; *) false;; esac; then |
| 211 | + dest_file="AM2R.apk" |
| 212 | + fi |
| 213 | + local apk_file="$apk_dir/$dest_file" |
209 | 214 | if [[ ! -f "$apk_file" ]]; then |
210 | | - download "$dl_url" "$apk_dir" |
| 215 | + download "$dl_url" "$apk_file" |
211 | 216 | chown $user:$user "$apk_file" |
212 | | - mv -f $apk_dir/AM2R%20v1.5.5%20for%20Android.apk $apk_dir/AM2R.apk |
213 | 217 | fi |
214 | 218 | done |
215 | 219 |
|
@@ -240,12 +244,15 @@ _EOF_ |
240 | 244 | fi |
241 | 245 | fi |
242 | 246 |
|
243 | | - local maldita_file="$apk_dir/$(basename ${maldita_url})" |
244 | | - local spelunky_file="$apk_dir/$(basename ${spelunky_url})" |
245 | | - local am2r_file="$apk_dir/$(basename ${am2r_url})" |
| 247 | + local am2r_file |
| 248 | + local maldita_file |
| 249 | + local spelunky_file |
| 250 | + am2r_file="$apk_dir/AM2R.apk" |
| 251 | + maldita_file="$apk_dir/$(basename ${maldita_url})" |
| 252 | + spelunky_file="$apk_dir/$(basename ${spelunky_url})" |
| 253 | + addPort "$md_id" "droidports" "AM2R - Another Metroid 2 Remake" "$md_inst/gmlauncher.sh %ROM%" "$am2r_file" |
246 | 254 | addPort "$md_id" "droidports" "Maldita Castilla" "$md_inst/gmlauncher.sh %ROM%" "$maldita_file" |
247 | 255 | addPort "$md_id" "droidports" "Spelunky Classic HD" "$md_inst/gmlauncher.sh %ROM%" "$spelunky_file" |
248 | | - addPort "$md_id" "droidports" "AM2R - Another Metroid 2 Remake" "$md_inst/gmlauncher.sh %ROM%" "$am2r_file" |
249 | 256 |
|
250 | 257 | moveConfigDir "$home/.config/gmloader" "$md_conf_root/droidports" |
251 | 258 | } |
0 commit comments