diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..ca557f2 --- /dev/null +++ b/build.bat @@ -0,0 +1,53 @@ +@echo off +setlocal enabledelayedexpansion + +echo --- Fluxer Reaper Windows Build Script --- + +:: Check for venv +if not exist "venv" ( + echo Creating virtual environment... + python -m venv venv + if errorlevel 1 ( + echo Error: Failed to create venv. Make sure Python is installed. + exit /b 1 + ) +) + +echo Activating virtual environment... +call venv\Scripts\activate + +echo Ensuring build dependencies are up to date... +python -m pip install --upgrade pip --quiet +pip install pyinstaller --quiet +pip install -r requirements.txt --quiet + +echo Cleaning previous build artifacts... +if exist "build" rd /s /q build +if exist "dist" rd /s /q dist + +echo Starting PyInstaller build... +pyinstaller --clean fluxer-reaper.spec + +echo Generating Launch-Reaper.bat launcher... +( +echo @echo off +echo cd /d "%%~dp0" +echo if exist "fluxer-reaper.exe" ^( +echo fluxer-reaper.exe +echo ^) else ^( +echo echo Error: fluxer-reaper.exe not found! +echo pause +echo ^) +) > dist\Launch-Reaper.bat + +echo Packaging release: fluxer-reaper-windows.zip... +copy config.example.yaml dist\ +powershell -Command "Compress-Archive -Path 'dist\fluxer-reaper.exe', 'dist\Launch-Reaper.bat', 'dist\config.example.yaml' -DestinationPath 'dist\fluxer-reaper-windows.zip' -Force" + +echo ----------------------------------- +echo Build complete! +echo Standalone executable: dist\fluxer-reaper.exe +echo Launcher script: dist\Launch-Reaper.bat +echo Release Package: dist\fluxer-reaper-windows.zip +echo --- +pause diff --git a/build.sh b/build.sh index 00fe258..3499957 100755 --- a/build.sh +++ b/build.sh @@ -58,8 +58,21 @@ fi EOF chmod +x dist/Launch-Reaper.sh +echo "Packaging release: fluxer-reaper-linux.zip..." +cp config.example.yaml dist/ +cd dist +if command -v zip >/dev/null 2>&1; then + zip -q fluxer-reaper-linux.zip fluxer-reaper Launch-Reaper.sh config.example.yaml + echo "Package created: dist/fluxer-reaper-linux.zip" +else + echo "Warning: 'zip' command not found. Skipping zip creation." + echo "Files available in dist/ directory." +fi +cd .. + echo "-----------------------------------" echo "Build complete!" echo "Standalone executable: dist/fluxer-reaper" echo "Launcher script: dist/Launch-Reaper.sh" +echo "Release Package: dist/fluxer-reaper-linux.zip" echo "---"