-
Notifications
You must be signed in to change notification settings - Fork 0
/
macdep.sh
40 lines (22 loc) · 806 Bytes
/
macdep.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
#!/usr/bin/env bash
set -x
# Paths
script_dir="$(dirname "$0")"
toplvl_dir="$(realpath "$script_dir" || grealpath "$script_dir")"
build_dir="$toplvl_dir/build"
emg_dir="$build_dir/EMG"
rsc_dir="$emg_dir/EMG.app/Contents/Resources"
m64p_dir="$rsc_dir/m64p"
plugin_dir="$m64p_dir/plugin"
# Abort if directories are missing
if [[ ! -d "$m64p_dir" ]] || [[ ! -d "$plugin_dir" ]] ; then
echo "Directories are missing. Please run compile.sh first."
exit 1
fi
# Bundle dependencies
pushd "$m64p_dir"
mkdir -p lib
for f in *.dylib; do ./dylibbundler -x $f -b -d ./lib -p ./lib -of; done
for f in plugin/*.dylib; do ./dylibbundler -x $f -b -d ./lib -p ./lib -of; done
./dylibbundler -x ./mupen64plus -b -d ./lib -p ./lib -of
./dylibbundler -x ./sdl2-jstest -b -d ./lib -p ./lib -of