Phase 8D: universal deployment package (XP + Win10/11, two entry points)
One RIOJoy-<ver>.zip now deploys on both OS generations (~75 MB with the offline XP prerequisites): - Layout: RIOJoy\app (net48 x64) + RIOJoy\app-xp (net40 x86) + RIOJoy\vendor (ViGEmBus; vendor\xp: .NET 4.0 offline installer + KB2468871, both signature-verified; RioGamepadXP driver slots in when 8B lands - build warns/skips until then). - RIOJoy\install-core.bat: shared OS-detecting install logic (ver -> 5.1 = XP); pure cmd.exe on the XP path, delegates to install-rio.ps1 on 10/11. Exports RIOJOY_APPDIR for shortcut creation. - postinstall.bat (TeslaConsole, unattended): elevates, runs the core, then deletes install.bat + README.txt so C:\games stays clean. - install.bat (standalone computers): same core + Start Menu/desktop shortcuts via make-shortcut.vbs (XP-safe); keeps the README. - README.txt at the zip root explains which entry point to run. - deploy *.ps1 re-encoded UTF-8-with-BOM: Windows PowerShell read the BOM-less files as ANSI, where an em-dash byte parses as a curly quote and breaks string parsing (bit install-rio.ps1 in dry-run testing). Verified: zip layout correct; extracted package dispatch-tested on Win10 non-elevated (OS detect -> modern route -> admin guard, system untouched). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem RIOJoy standalone install entry point - for a computer WITHOUT the
|
||||
rem TeslaConsole launcher. Extract the whole zip somewhere permanent (e.g.
|
||||
rem C:\games), then run this as administrator. Installs the prerequisites
|
||||
rem for this Windows version (XP or 10/11) via the shared install core and
|
||||
rem creates Start Menu + desktop shortcuts to the right flavor of the app.
|
||||
rem Nothing auto-starts: launch RIOJoy from the shortcut when you want it.
|
||||
rem See README.txt for details.
|
||||
rem ===========================================================================
|
||||
setlocal
|
||||
title RIOJoy install
|
||||
|
||||
rem --- elevate if we are not already administrator --------------------------
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
rem "if errorlevel" evaluates at run time (a %var% here would be stale).
|
||||
ver | findstr /C:"Version 5.1" >nul
|
||||
if not errorlevel 1 (
|
||||
echo This installer must run as an Administrator user.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo Requesting administrator privileges...
|
||||
powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
cd /d "%~dp0"
|
||||
|
||||
call "%~dp0RIOJoy\install-core.bat"
|
||||
set RC=%errorlevel%
|
||||
if %RC% neq 0 goto done
|
||||
|
||||
rem --- shortcuts (Start Menu + desktop) --------------------------------------
|
||||
rem RIOJOY_APPDIR is set by install-core.bat to app (modern) or app-xp (XP).
|
||||
set EXE=%RIOJOY_APPDIR%\RioJoy.Tray.exe
|
||||
if not exist "%EXE%" (
|
||||
echo ERROR: app executable not found: %EXE%
|
||||
set RC=1
|
||||
goto done
|
||||
)
|
||||
echo Creating shortcuts...
|
||||
cscript //nologo "%~dp0RIOJoy\make-shortcut.vbs" "%EXE%" "RIOJoy" "%RIOJOY_APPDIR%"
|
||||
|
||||
:done
|
||||
echo.
|
||||
if %RC% neq 0 (
|
||||
echo install FAILED with exit code %RC%.
|
||||
) else (
|
||||
echo install completed. Launch RIOJoy from the Start Menu or desktop shortcut.
|
||||
)
|
||||
pause
|
||||
exit /b %RC%
|
||||
Reference in New Issue
Block a user