Replace START.cmd with PS1 launcher, fix installer issues, add connection diagnostics#12
Replace START.cmd with PS1 launcher, fix installer issues, add connection diagnostics#12plyrthn wants to merge 4 commits intoKuijen:mainfrom
Conversation
START.cmd is now a 4-line stub that calls START.ps1 via PowerShell, avoiding cmd.exe parser bugs with paths containing parentheses (e.g. Program Files (x86)) and enabling richer scripting. START.ps1 adds: - Debug log at %APPDATA%\rtrp\debug.log (screen stays clean) - ADB device state checks (unauthorized, offline) with on-screen alerts - USB 2.0 detection warning - Headset WiFi auto-disable via ADB to prevent routing conflicts - USB Selective Suspend disabled at launch - Config copy failure now shows a real error instead of silently failing - Gnirehtet log filtering (WARN/ERROR only, drops connection flood) - Restart loop on gnirehtet failure instead of exiting
- OutFile: replace hardcoded C:\Users\$PROFILE\Desktop with $DESKTOP ($PROFILE expands to the full profile path, causing a double-expanded invalid path at build time) - InstallDir: $PROGRAMFILES -> $PROGRAMFILES64 (was installing to Program Files (x86) on 64-bit Windows) - File /r: replace hardcoded C:\Users\KUIJEN\Desktop\Source\ with a !define SRCDIR "Source" so the script is portable when building - Java: wrap Java Runtime ExecWait with IfFileExists guard so it doesn't fail when the Support folder isn't bundled - onInstSuccess: remove Delete of RT-RP Config.ini - was wiping user config on every reinstall; START.ps1 handles the missing-config case
After gnirehtet connects, checks whether the headset's rndis0 IP is in the same /24 as any PC adapter. If not, Virtual Desktop will cap streaming bitrate to ~60 Mbps, which causes ghosting and compression artifacts. Mismatch shown on screen in yellow; all detail goes to log.
|
Multiple lines have been changed but remain functionally the same so I don't see why this is needed, especially since I always pack everything up to serve as a ready made package after every update. |
Both RT-RP Config.ini and RT-RP debug.log now live in the user's Documents folder, consistent with the existing config location and easy to find without knowing AppData exists.
|
Hey, appreciate you taking the time. The config - we did not move it. The PS1 approach - nothing changes for the user, The debug log - there was zero diagnostic output before. When the config copy failed, nothing happened and nothing was written anywhere. ADB device state, USB speed, gnirehtet start output, whether the config copied - none of it went anywhere. Debugging my friend's install remotely I had nothing to go on. Now all of that is captured in The installer - understood you package it yourself. The two things worth keeping: Happy to adjust anything, not trying to step on the workflow. |
|
Sorry for the late reaction. Again, sorry for the late response and I hope you'll understand. |
|
Hey no worries! Take care of yourself and no issue. This is just what I needed to help someone out who was less savvy. Good luck with everything, and never any pressure. |
What this does
The original
START.cmdhad a few parser-level bugs that caused silent failures in certain setups, and was hitting the limits of what cmd.exe can do cleanly. This replaces it with a 4-line stub that hands off toSTART.ps1, which contains all the logic.Both Java and Rust editions updated.
START.cmd → START.ps1
Bugs fixed in the original:
(x86)(e.g.C:\Program Files (x86)\RTRP) break parenthesizedifblocks at parse time — the)closes the block early%errorlevel%inside a block evaluates when the block is parsed, not when the command runs, so the gnirehtet failure check always saw 0&&on the High Priority line was clobbering gnirehtet's exit code before it could be checkedcopy >NULsuppressed all output including errors, so the config copy silently failed with no message or fallbackNew in START.ps1:
%APPDATA%\rtrp\debug.log— screen stays clean, everything is captured for troubleshootingrndis0IP is in the same/24subnet as any PC adapter. If there's a mismatch, Virtual Desktop will cap streaming bitrate to ~60 Mbps and cause ghosting — this surfaces that as a visible warning so you know why it's happeningInstaller fixes
OutFile "C:\Users\$PROFILE\Desktop\..."→OutFile "$DESKTOP\..."—$PROFILEalready expands to a full path, so the original produced a broken double-expanded path at build timeInstallDir $PROGRAMFILES→$PROGRAMFILES64— was defaulting toProgram Files (x86)on 64-bit WindowsFile /r "C:\Users\KUIJEN\Desktop\Source\"→!define SRCDIR "Source"— hardcoded dev machine path, fails for anyone else building the installerExecwaitfor the Java Runtime installer now guarded withIfFileExists— was failing silently if the Support folder wasn't bundledonInstSuccess: removedDelete "$DOCUMENTS\RT-RP Config.ini"— this was wiping the user's existing config on every reinstall.START.ps1already handles the missing-config case by copying from the backupHappy to adjust anything. Tested the PS1 flow on a Quest 2 setup with gnirehtet-g7.