-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-modules
More file actions
executable file
·43 lines (37 loc) · 1.32 KB
/
build-modules
File metadata and controls
executable file
·43 lines (37 loc) · 1.32 KB
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
#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if ! [ -d "$SCRIPT_DIR"/assets/sce_sys/resources ]; then
mkdir "$SCRIPT_DIR"/assets/sce_sys/resources
fi
if [ -f "$SCRIPT_DIR"/assets/sce_sys/resources/kernel.skprx ] && [ -f "$SCRIPT_DIR"/assets/sce_sys/resources/user.suprx ] && [ -f "$SCRIPT_DIR"/c/libVitaShellUser_stub_weak.a ]; then
echo "assets/sce_sys/resources/kernel.skprx and assets/sce_sys/resources/user.suprx exists and continue!"
else
echo "start to build assets/sce_sys/resources/kernel.skprx and assets/sce_sys/resources/user.suprx"
# build vitashell kernel
cd "$SCRIPT_DIR"/extern/VitaShell/modules/kernel
rm -rf build
mkdir build
cd build
cmake ..
make
# move kernel
cp kernel.skprx "$SCRIPT_DIR"/assets/sce_sys/resources
rm -rf "$SCRIPT_DIR"/extern/VitaShell/modules/user/kernel
mkdir "$SCRIPT_DIR"/extern/VitaShell/modules/user/kernel
cp libVitaShellKernel2_stub.a ../../user/kernel/
cd ../
rm -rf build
# build vitashell user
cd "$SCRIPT_DIR"/extern/VitaShell/modules/user
rm -rf build
mkdir build
cd build
cmake ..
make
# move user
cp user.suprx "$SCRIPT_DIR"/assets/sce_sys/resources
cp libVitaShellUser_stub_weak.a "$SCRIPT_DIR"/c
cd ../
rm -rf build
rm -rf "$SCRIPT_DIR"/extern/VitaShell/modules/user/kernel
fi