Updating and uninstalling¶
Audience: desktop users and administrators · ~7 min read · Prerequisites: Install and first launch
What it is¶
The desktop app can update itself, but only when someone has set up an update server for your installation. The standard download has none: it never checks for updates, never contacts anything, and you update by installing a newer build over the old one. A build made for your organisation (see White-labeled customer builds) can point at your own server, and your administrator can turn updates on, off or redirect them for every user of a machine.
When updates are on, the app never installs anything by itself: it tells you a new version exists, asks before downloading it, and asks again before restarting. Your projects and settings are stored outside the app, so they survive every update.
When you'd use it¶
When a new version is available, when something is broken and you want a clean reinstall, when you are an administrator deciding whether your people's apps may look for updates, or when you want struktJS gone from your machine.
Check for updates¶
This only does something if an update server is configured for your installation; otherwise it tells you so.
- Choose Help > Check for Updates…. The app asks the update server whether a newer version exists. Nothing is downloaded yet.
- If there is one, a message offers it: "
1.2.0 is available (you have 1.1.0). Download it now?" . Choose Download, or Later to do nothing. - When the download is finished, a second message asks: "
1.2.0 is ready. Restart to install it?" . Choose Restart now, or Later (the update stays downloaded for this session).
The app also checks by itself about 30 seconds after it starts, and says nothing unless there is an update to offer. Turn that off with the setting struktJS.updates.autoCheck (File > Preferences > Settings); the menu command keeps working.
What an update can replace depends on how the app was installed:
- Windows: the installer (
Setup .exe) can update itself. The portable.execannot: replace the file. - Linux: only the
.AppImagecan. A.debor.rpminstall cannot replace itself: install the new package. - macOS: macOS only installs an update into a code-signed app. Builds that are not signed (the project's own builds are unsigned for now) can be told about an update but macOS refuses to install it: update by hand until your build is signed.
For administrators and customer builds¶
Three places decide where, and whether, an installation looks for updates. The strongest wins, and a value from a stronger place is never overridden by a weaker one.
-
The machine policy file (you write it; users cannot change it):
System File macOS /Library/Application Support/<product name>/policy.jsonWindows %ProgramData%\<product name>\policy.jsonLinux /etc/<product-name>/policy.json(lower case, spaces become-){ "updates": { "enabled": false } }or, to pin the server and channel for every user of the machine:
{ "updates": { "feedUrl": "https://updates.example.com/workbench/", "channel": "stable" } }"enabled": falseturns updates off completely, whatever else is configured. A damaged or unreadable file is ignored. 2. Environment variables, for testing and per-session control:STRUKTJS_UPDATES=offturns updates off (also beats a server from the build, but not a policy file that pins one),STRUKTJS_UPDATE_URLandSTRUKTJS_UPDATE_CHANNELfill in what the policy file left open. 3. The build: a customer build'supdatesblock ({ "url": "https://...", "channel": "latest" }incustomer.json) is baked into the app.
The server address must be https:// and must not contain a user name or password (plain http:// works only for localhost,
for testing). The channel is a short name such as latest or beta; the default is latest.
Publishing an update. The packaging step writes latest-mac.yml (or latest.yml on Windows, latest-linux.yml on Linux)
next to the installers. Put those files, and the .zip / .exe / .AppImage they name, into the folder your server address
points at. Publish a new version by uploading the new files; the app compares versions and never installs an older one.
What leaves the machine. With no server configured, nothing. With one, the app fetches that one small file from your server when it checks, and the installer file only after the user chose Download. Nothing about the user or the machine is sent.
Update by hand¶
- Get the new build: download the new installer from wherever your team publishes them (the project's release workflow attaches installers to a GitHub Release), or build one yourself.
- Quit struktJS.
- Install over the old one:
- macOS: open the
.dmg, drag struktJS into Applications, and choose Replace when asked. - Windows: run the new
struktJS Setup <version>.exe. For the portablestruktJS <version>.exe, just replace the old file with the new one. - Linux: install the new
.debwith your package manager, or replace the old.AppImagefile.
- macOS: open the
- The new build is unsigned too, so the first-launch warning from Install and first launch may appear again.
- Check the version: the status bar at the bottom right shows
struktJS v<version>+<commit>.
Your projects, languages and preferences are kept. They live in your project folders,
~/.struktjs, ~/.theia and Electron's data folder; see Where your data lives.
A sample is an ordinary project folder: if you opened it in the app's own folder, an update replaces the sample files there,
so copy a sample you want to keep (or open the copy in ~/struktjs-samples/, which an update never touches).
Uninstall¶
- Quit struktJS.
- Remove the app:
- macOS: drag struktJS from Applications to the Trash.
- Windows: Settings > Apps > Installed apps, choose struktJS, Uninstall. For the portable build, delete the file.
- Linux: remove the
.debwith your package manager, or delete the.AppImage.
- Optional: remove its data (nothing here is removed by the uninstall). Delete the Electron data folder,
~/.struktjsand~/.theia, as listed in Where your data lives. Do not delete your project folders unless you mean to.
Every control¶
| # | Button/Option | What it does | Shortcut | Gotcha |
|---|---|---|---|---|
| 1 | Installer (.dmg, Setup .exe, .deb) |
Replaces the installed app with the new build. | none | Without a configured update server you fetch the file yourself. |
| 2 | Portable or .AppImage file |
The whole app is one file; replace it. An .AppImage can update itself when a server is configured. |
none | Keep a copy of the old file until the new one starts. The portable .exe never updates itself. |
| 3 | Help > Check for Updates… | Asks the configured update server whether a newer version exists. Downloads nothing. | none | With no update server configured it only says so. Turned off by an administrator's policy or STRUKTJS_UPDATES=off. |
| 4 | Download / Later (the offer) | Download fetches the new version; Later does nothing. | none | Nothing is downloaded until you choose Download. |
| 5 | Restart now / Later (after the download) | Restart now quits the app and installs the update; Later keeps it for this session. | none | macOS only installs into a code-signed app. |
| 6 | Setting struktJS.updates.autoCheck | Whether the app checks for an update about 30 seconds after it starts. On by default. | none | Only has an effect when an update server is configured. The menu command still works when it is off. |
| 7 | Help > About | Shows the Theia shell's details. | none | The struktJS version is in the status bar, not here. |