yahtzee-server/build_server.sh

20 lines
751 B
Bash
Executable File

#!/usr/bin/env bash
set -e
APP_NAME="YahtzeeServer"
MAIN_FILE="server_main.py"
echo "---> [1/2] Baue Linux Server Executable..."
python3 -m PyInstaller --console --onefile --clean \
--distpath "dist/linux" --workpath "build/linux" \
--name "${APP_NAME}_Linux" "$MAIN_FILE"
chmod +x "dist/linux/${APP_NAME}_Linux"
echo "---> [2/2] Baue Windows Server .exe (via Wine)..."
WINE_PY=$(find ~/.wine/drive_c -iname "python.exe" 2>/dev/null | grep -i "Python3" | head -n 1)
wine "$WINE_PY" -m PyInstaller --console --onefile --clean \
--distpath "dist/windows" --workpath "build/windows" \
--name "${APP_NAME}" "$MAIN_FILE"
rm -f "${APP_NAME}.spec" "${APP_NAME}_Linux.spec"
echo "✅ Server-Builds fertig in dist/linux/ und dist/windows/!"