Installers never start SteamVR to register; headset payload rebuilt

- frame-home --install/--uninstall and frame-switcher --install/--uninstall check for SteamVR's server first: on
  Windows, connecting as a utility started SteamVR. Not running: exit 3 and the installer writes SteamVR's config
  files, as on the headset.
- frame/payload: Frame Home, the panel, fenv-tool and the compositor layer built on the Steam Frame from this
  source (installed there; locomotion tests 0 failed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ToastconcernandClaude Opus 5.5 committed 2026-10-21 15:03:09 -05:00
1 parent 3469b77ca3
commit 1863e495d2
6 files changed
+25

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.
+22
View File
@@ -266,6 +266,28 @@ inline int run(const std::vector<std::string>& args, int nice, bool wait) {
inline void sleepMs(int ms) { std::this_thread::sleep_for(std::chrono::milliseconds(ms)); }
// Is SteamVR running (its server)? Asked before connecting as a utility: on Windows, connecting starts SteamVR.
inline bool steamVrRunning() {
#ifdef _WIN32
bool found = false;
const HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (snap == INVALID_HANDLE_VALUE) return false;
PROCESSENTRY32W e = {};
e.dwSize = sizeof e;
for (BOOL ok = Process32FirstW(snap, &e); ok && !found; ok = Process32NextW(snap, &e)) found = _wcsicmp(e.szExeFile, L"vrserver.exe") == 0;
CloseHandle(snap);
return found;
#else
std::error_code ec;
for (const auto& e : std::filesystem::directory_iterator("/proc", ec)) {
std::string comm;
std::getline(std::ifstream(e.path() / "comm"), comm);
if (comm == "vrserver") return true;
}
return false;
#endif
}
// Files by path, whatever the characters in it (Windows: the wide API; a user name like "José" is no problem).
inline FILE* openFile(const std::filesystem::path& p, const char* mode) {
#ifdef _WIN32
+1
View File
@@ -1915,6 +1915,7 @@ int runInstall(bool install) {
<< " \"description\": \"Meta homes as SteamVR's environment\" } }\n"
<< " } ]\n}\n";
}
if (!homeos::steamVrRunning()) { LOG("SteamVR isn't running: the installer registers Frame Home in its config files"); return 3; }
vr::EVRInitError ierr = vr::VRInitError_None;
vr::VR_Init(&ierr, vr::VRApplication_Utility);
if (ierr != vr::VRInitError_None) { LOG("VR_Init: %s (SteamVR not running)", vr::VR_GetVRInitErrorAsEnglishDescription(ierr)); return 3; }
+2
View File
@@ -1858,6 +1858,7 @@ int runInstall() {
<< "\",\n \"arguments\": \"\",\n \"is_dashboard_overlay\": true,\n"
" \"strings\": { \"en_us\": { \"name\": \"Environments\",\n"
" \"description\": \"Switch SteamVR's environment (Frame Home)\" } }\n } ]\n}\n";
if (!homeos::steamVrRunning()) { LOG("SteamVR isn't running: the installer registers the panel in its config files"); return 3; }
vr::EVRInitError ierr = vr::VRInitError_None;
vr::VR_Init(&ierr, vr::VRApplication_Utility);
// 3: SteamVR not running — the installer registers the manifest in SteamVR's config files instead.
@@ -1877,6 +1878,7 @@ int runInstall() {
// The panel off SteamVR: no longer started with it, its manifest gone, a running one closed.
int runUninstall() {
const fs::path manifest = rootDir() / "frame-switcher.vrmanifest";
if (!homeos::steamVrRunning()) return 3; // (connecting would start it: the uninstaller edits its files)
vr::EVRInitError ierr = vr::VRInitError_None;
vr::VR_Init(&ierr, vr::VRApplication_Utility);
if (ierr != vr::VRInitError_None) { LOG("VR_Init: %s (SteamVR not running)", vr::VR_GetVRInitErrorAsEnglishDescription(ierr)); return 3; }