-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·50 lines (40 loc) · 1.46 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
#!/bin/bash
# The build times are pretty funny.
# On my system (Arch Linux, i7-4770s, DDR3 4x4GB 2000MT/s),
# - a build with Docker cache takes 17 minutes
# - a clean build (no Docker cache) takes 2 hours and 10 minutes!
# Good luck
set -e
set -o pipefail
rm -rf ./build
cp -r ./template ./build
cd ./build
function build() {
system=$1
cd ./$system
chmod +x ./build.sh
image_id="mupen_build/${system}" container_id="mupen_build_${system}_container" ./build.sh
cd ..
}
build linux_x86_64
build win_x86_64
build win_x86
build android
# TODO: Nintendo Switch build is not included yet,
# it's painful & I don't consider the vulnerability a major issue there
# consider: what could an attacker do on a switch console?
# Extract artifacts
mkdir -p ./out
mkdir -p ./out/x86
mkdir -p ./out/x86_64
# linux x64
cp ./linux_x86_64/developer/mupen64plus-core/projects/unix/libmupen64plus.so.2.0.0 ./out/x86_64
cp ./linux_x86_64/developer/mupen64plus-libretro-nx/mupen64plus_next_libretro.so ./out/x86_64
# windows x64
cp ./win_x86_64/developer/mupen64plus-core/projects/unix/mupen64plus.dll ./out/x86_64
cp ./win_x86_64/developer/mupen64plus-libretro-nx/mupen64plus_next_libretro.dll ./out/x86_64
# windows x86
cp ./win_x86/developer/mupen64plus-core/projects/unix/mupen64plus.dll ./out/x86
cp ./win_x86/developer/mupen64plus-libretro-nx/mupen64plus_next_libretro.dll ./out/x86
# android
cp ./android/mupen64plus-ae/app/build/outputs/apk/release/Mupen64PlusAE-release.apk ./out