mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
63 lines
1.6 KiB
Bash
Executable file
63 lines
1.6 KiB
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
# User-configurable variables.
|
|
oneshot_id="$(cat steam_appid.txt)"
|
|
STEAMWORKS_PATH=$(realpath ..)/steamworks
|
|
|
|
cmake . -B build/ "$@"
|
|
cd build
|
|
make -j$(nproc)
|
|
cd ..
|
|
|
|
mkdir -p build/bandle
|
|
mkdir -p build/bandle
|
|
mkdir -p build/bandle/Data
|
|
|
|
# Compile steamshim.
|
|
#echo -e "-> ${cyan}Compile steamshim...${color_reset}"
|
|
#cd steamshim_parent
|
|
#mkdir build
|
|
#cd build
|
|
#cmake -DSTEAMWORKS_PATH=${STEAMWORKS_PATH} .. > steamshim.cmake.out
|
|
#cp "$STEAMWORKS_PATH/redistributable_bin/linux64/libsteam_api.so" .
|
|
#make -j${make_threads} > steamshim.make.out
|
|
#cd ../..
|
|
|
|
if [ ! -d "venv" ]; then
|
|
echo "Creating venv folder and installing pip packages"
|
|
python3 -m venv venv
|
|
source venv/bin/activate
|
|
# the packages themselves
|
|
pip install --upgrade pip
|
|
pip install pyqt5 pyinstaller
|
|
else
|
|
echo "The 'venv' folder already exists."
|
|
source venv/bin/activate
|
|
fi
|
|
pyinstaller journal/unix/journal.spec #--windowed
|
|
deactivate
|
|
ruby rpgscript.rb scripts/ build/bandle/
|
|
|
|
cp -r dist/_______/* build/bandle/
|
|
cp build/oneshot build/bandle/
|
|
|
|
#yes | cp steamshim_parent/build/steamshim "$ONESHOT_PATH"
|
|
#echo "$oneshot_id" > "$ONESHOT_PATH/steam_appid.txt"
|
|
|
|
# Copy libraries.
|
|
mkdir -p libs
|
|
ldd build/oneshot | ruby libraries.rb
|
|
#ldd steamshim_parent/build/steamshim | ruby libraries.rb
|
|
cp libs/* build/bandle
|
|
cp build/oneshot build/bandle
|
|
|
|
cp -r ../SunshineAssets/* build/bandle
|
|
cp oneshot.conf build/bandle
|
|
zip -9 -r build/OneshotSunshine_Linux.zip build/bandle/*
|
|
|
|
# Cleanup.
|
|
rm -rf journal/unix/__pycache__
|
|
#rm -rf build/*
|
|
rm -rf dist
|
|
#rm -rf steamshim_parent/build
|
|
rm -rf libs
|