mirror of
https://github.com/Toastconcern/FrameStudio.git
synced 2026-10-28 23:03:21 +01:00
Updates: Frame Studio and Frame Home update themselves from GitHub
CI stamps every Studio build with its commit (FRAME_BUILD) and the release gets latest.json: the commit, Frame Home's identity (a hash of the headset programs in frame/payload) and the files in the release. Frame Studio (studio/updater.h): checks a few seconds after start and every 6 hours (Help > Check for Updates any time). A newer build shows "Update Available" in the top bar; Download and Install fetches this computer's build with the system's curl, unpacks it with tar, and swaps each item in (the old one renamed aside first, so the running copy keeps working and a failure rolls everything back). Restart Now closes through the normal unsaved-changes prompt, then starts the new copy; the next start deletes what was set aside. Local builds never update. New platform calls: systemTool (System32's curl/tar on Windows) and launch. Frame Home (src/switcher.cpp): on the Steam Frame the Environments panel checks a minute after it starts and every 6 hours. When the installed programs' hash isn't the release's, "Update Frame Home" shows beside Restart Frame Home; it downloads FrameHome-installer.zip and runs its install.sh in its own session (which restarts Frame Home and the panel), and the new panel says "Frame Home is updated". Also frame-switcher --check-update / --update from a terminal. frame/payload: frame-switcher rebuilt on the Steam Frame with this. Tested: Studio's full cycle (check, download, unpack, swap, relaunch, cleanup) and its rollback against a local fake release on Windows; the headset's check and update against a fake release on the Frame (old panel and Frame Home replaced, then up to date); Linux compile of Studio; Studio --selftest unchanged (98 passed, same 6 known fails). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39c8424391
commit
fedadd5ae3
12 files changed
+590
-3
No files matched your search
@@ -183,6 +183,17 @@ int run(const std::string& commandLine, const fs::path& workingDir, std::string&
|
||||
}
|
||||
|
||||
std::string sshTool(const char* name) { return std::string(name) + " "; }
|
||||
std::string systemTool(const char* name) { return std::string(name) + " "; }
|
||||
|
||||
bool launch(const fs::path& program) {
|
||||
#ifdef __APPLE__
|
||||
const std::string cmd = "open -n " + shellQuote(program.string()) + " >/dev/null 2>&1";
|
||||
#else // (its own output away from run's pipe, or run would wait for it to end)
|
||||
const std::string cmd = "cd " + shellQuote(program.parent_path().string()) + " && nohup " + shellQuote(program.string()) + " >/dev/null 2>&1 &";
|
||||
#endif
|
||||
std::string out;
|
||||
return run(cmd, {}, out) == 0;
|
||||
}
|
||||
|
||||
void openPath(const std::string& pathOrUrl) {
|
||||
#ifdef __APPLE__
|
||||
|
||||
Reference in new issue
Block a user