-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathget-dependencies.sh
More file actions
53 lines (45 loc) · 1.67 KB
/
get-dependencies.sh
File metadata and controls
53 lines (45 loc) · 1.67 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
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
set -eu
ARCH=$(uname -m)
echo "Installing package dependencies..."
echo "---------------------------------------------------------------"
pacman -Syu --noconfirm \
cmake \
fmt \
libdecor \
libzip \
ninja \
nlohmann-json \
sdl2 \
sdl2_net \
spdlog \
tinyxml2
echo "Installing debloated packages..."
echo "---------------------------------------------------------------"
get-debloated-pkgs --add-common --prefer-nano
# Comment this out if you need an AUR package
make-aur-package zenity-rs-bin
# If the application needs to be manually built that has to be done down here
echo "Making stable build of SpaghettiKart..."
echo "---------------------------------------------------------------"
REPO="https://github.com/HarbourMasters/SpaghettiKart"
VERSION="$(git ls-remote --tags --sort="v:refname" "$REPO" | tail -n1 | sed 's/.*\///; s/\^{}//')"
git clone --branch "$VERSION" --single-branch --recursive --depth 1 "$REPO" ./SpaghettiKart
echo "$VERSION" > ~/version
mkdir -p ./AppDir/bin
cd ./SpaghettiKart
patch -Np1 -i ../spaghettikart-cmake-flags.patch
cmake . \
-Bbuild \
-GNinja \
-DNON_PORTABLE=On
cmake --build build --config Release
cmake --build build --config Release --target GenerateO2R
mv -v build/yamls ../AppDir/bin
mv -v build/meta ../AppDir/bin
mv -v build/Spaghettify ../AppDir/bin
mv -v build/config.yml ../AppDir/bin
mv -v build/spaghetti.o2r ../AppDir/bin
wget -O ../AppDir/bin/gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
cp -v icon.png ../AppDir/.DirIcon
mv -v icon.png ../AppDir/spaghettikart.png