training-academy/scripts/create-distribution.bat

164 lines
6.4 KiB
Batchfile

@echo off
echo.
echo 📦 Gooner Training Academy - Distribution Packager
echo =================================================
echo.
:: Set distribution info
set DIST_NAME=Gooner-Training-Academy-v0.5-Beta
set BUILD_DATE=%DATE:~-4,4%-%DATE:~-10,2%-%DATE:~-7,2%
set OUTPUT_DIR=..\%DIST_NAME%
echo 🎯 Creating distribution package: %DIST_NAME%
echo 📅 Build Date: %BUILD_DATE%
echo 📁 Output Directory: %OUTPUT_DIR%
echo.
:: Clean previous build
if exist "%OUTPUT_DIR%" (
echo 🧹 Cleaning previous build...
rmdir /s /q "%OUTPUT_DIR%"
)
:: Create distribution directory
echo 📂 Creating distribution directory...
mkdir "%OUTPUT_DIR%"
:: Copy core files
echo 📄 Copying core application files...
copy index.html "%OUTPUT_DIR%\"
copy quick-play.html "%OUTPUT_DIR%\"
copy training-academy.html "%OUTPUT_DIR%\"
copy campaign.html "%OUTPUT_DIR%\"
copy library.html "%OUTPUT_DIR%\"
copy porn-cinema.html "%OUTPUT_DIR%\"
copy player-stats.html "%OUTPUT_DIR%\"
copy user-profile.html "%OUTPUT_DIR%\"
copy hypno-gallery.html "%OUTPUT_DIR%\"
copy package.json "%OUTPUT_DIR%\"
:: Copy documentation
echo 📚 Copying documentation...
copy README.md "%OUTPUT_DIR%\"
mkdir "%OUTPUT_DIR%\docs"
if exist docs\ACADEMY_PHASE1_COMPLETE.md copy docs\ACADEMY_PHASE1_COMPLETE.md "%OUTPUT_DIR%\docs\"
if exist docs\TRAINING_MODULES.md copy docs\TRAINING_MODULES.md "%OUTPUT_DIR%\docs\"
if exist docs\MODULE_RANK_SYSTEM.md copy docs\MODULE_RANK_SYSTEM.md "%OUTPUT_DIR%\docs\"
if exist docs\LEVELS_1-15_BREAKDOWN.md copy docs\LEVELS_1-15_BREAKDOWN.md "%OUTPUT_DIR%\docs\"
if exist docs\LEVELS_16-20_BREAKDOWN.md copy docs\LEVELS_16-20_BREAKDOWN.md "%OUTPUT_DIR%\docs\"
if exist docs\GAME_STATS_PANEL_FIX.md copy docs\GAME_STATS_PANEL_FIX.md "%OUTPUT_DIR%\docs\"
if exist docs\training-game-redesign xcopy docs\training-game-redesign "%OUTPUT_DIR%\docs\training-game-redesign\" /e /i /q
:: Copy setup scripts
echo 🔧 Copying setup scripts...
copy scripts\setup.bat "%OUTPUT_DIR%\"
copy scripts\setup.sh "%OUTPUT_DIR%\"
copy scripts\Start-webgame.bat "%OUTPUT_DIR%\"
:: Copy source code (excluding user data)
echo 💻 Copying source code...
xcopy src "%OUTPUT_DIR%\src\" /e /i /q
:: Copy assets (clean)
echo 🎨 Copying clean assets...
xcopy assets "%OUTPUT_DIR%\assets\" /e /i /q
:: Copy empty directories for user content
echo 📁 Creating user content directories...
mkdir "%OUTPUT_DIR%\photos"
mkdir "%OUTPUT_DIR%\photos\captured"
mkdir "%OUTPUT_DIR%\audio"
mkdir "%OUTPUT_DIR%\videos"
mkdir "%OUTPUT_DIR%\videos\recorded"
mkdir "%OUTPUT_DIR%\backups"
:: Copy sample audio (if exists)
if exist audio\*.mp3 (
echo 🎵 Copying sample audio files...
xcopy audio "%OUTPUT_DIR%\audio\" /e /i /q /y
)
:: Create distribution info file
echo 📋 Creating distribution info...
echo # Gooner Training Academy - Distribution Info > "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo Version: 4.1 Beta >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo Build Date: %BUILD_DATE% >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo Package Type: Beta Testing Build >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo. >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo INSTALLATION: >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo 1. Run setup.bat (Windows) or setup.sh (Mac/Linux) >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo 2. Follow setup prompts >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo 3. Launch with Start-webgame.bat or npm start >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo. >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo DOCUMENTATION: >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - README.md: Complete documentation >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - docs/: Campaign and training module guides >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo. >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo TESTING FOCUS: >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - Campaign Mode: 30 levels across 6 story arcs >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - Training Modules: 8 focused modules (2 available) >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - Photo Session, Humiliation modules unlocked >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - Level progression, stats tracking, media library >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo. >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo REQUIREMENTS: >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - Node.js 16+ >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - Modern browser (Chrome 90+, Firefox 88+) >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - Webcam for full functionality >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
echo - 100MB+ free storage >> "%OUTPUT_DIR%\DISTRIBUTION_INFO.txt"
:: Set executable permissions for shell scripts
echo 🔐 Setting permissions...
if exist "%OUTPUT_DIR%\setup.sh" (
icacls "%OUTPUT_DIR%\setup.sh" /grant Everyone:F >nul 2>&1
)
:: Clean up any development files that may have been copied
echo 🧹 Final cleanup...
if exist "%OUTPUT_DIR%\.git" rmdir /s /q "%OUTPUT_DIR%\.git"
if exist "%OUTPUT_DIR%\node_modules" rmdir /s /q "%OUTPUT_DIR%\node_modules"
if exist "%OUTPUT_DIR%\.DS_Store" del /q "%OUTPUT_DIR%\.DS_Store"
if exist "%OUTPUT_DIR%\package-lock.json" del /q "%OUTPUT_DIR%\package-lock.json"
:: File count summary
echo.
echo 📊 Distribution Summary:
echo =====================
for /f %%i in ('dir "%OUTPUT_DIR%" /s /b /a-d ^| find /c /v ""') do set FILE_COUNT=%%i
echo Total Files: %FILE_COUNT%
:: Calculate directory size (approximate)
for /f "tokens=3" %%a in ('dir "%OUTPUT_DIR%" /s /-c ^| find "bytes"') do set DIR_SIZE=%%a
echo Directory Size: %DIR_SIZE% bytes
echo.
echo ✅ Distribution package created successfully!
echo 📍 Location: %OUTPUT_DIR%
echo.
echo 🎯 Next Steps:
echo 1. Test the distribution package on a clean system
echo 2. Verify all features work correctly
echo 3. Create archive for distribution (ZIP/7z)
echo 4. Share with testers
echo.
set /p CREATE_ZIP="📦 Create ZIP archive for distribution? (y/n): "
if /i "%CREATE_ZIP%"=="y" (
echo.
echo 🗜️ Creating ZIP archive...
:: Use PowerShell to create ZIP (Windows 8+)
powershell -command "Compress-Archive -Path '%OUTPUT_DIR%\*' -DestinationPath '%DIST_NAME%.zip' -Force"
if exist "%DIST_NAME%.zip" (
echo ✅ ZIP archive created: %DIST_NAME%.zip
for %%i in ("%DIST_NAME%.zip") do echo 📏 Archive Size: %%~zi bytes
) else (
echo ❌ Failed to create ZIP archive
echo Try creating manually or use 7-Zip/WinRAR
)
)
echo.
echo 🎉 Distribution packaging complete!
pause