mkxp-sunshine/make-oneshot-linux.sh
theboxyguy 4ef447f7f0 creating venv folder and make it more linux friendly
it will check if venv folder exsist if not it will skip it
2026-08-18 08:57:22 +03:00

62 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 ../..
#creating venv and installing python packages if not exsist
if [ ! -d "venv" ]; then
echo "Creating venv folder and install pip packages"
python3 -m venv venv
# the pakages themselves
pip install --upgrade pip
pip install pyqt5 pyinstaller
else
echo "The 'venv' folder already exists."
fi
pyinstaller journal/unix/journal.spec #--windowed
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