Skip to content

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.

  1. Choose Help > Check for Updates…. The app asks the update server whether a newer version exists. Nothing is downloaded yet.
  2. 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.
  3. 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 .exe cannot: replace the file.
  • Linux: only the .AppImage can. A .deb or .rpm install 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.

  1. The machine policy file (you write it; users cannot change it):

    System File
    macOS /Library/Application Support/<product name>/policy.json
    Windows %ProgramData%\<product name>\policy.json
    Linux /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": false turns 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=off turns updates off (also beats a server from the build, but not a policy file that pins one), STRUKTJS_UPDATE_URL and STRUKTJS_UPDATE_CHANNEL fill in what the policy file left open. 3. The build: a customer build's updates block ({ "url": "https://...", "channel": "latest" } in customer.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

  1. 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.
  2. Quit struktJS.
  3. 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 portable struktJS <version>.exe, just replace the old file with the new one.
    • Linux: install the new .deb with your package manager, or replace the old .AppImage file.
  4. The new build is unsigned too, so the first-launch warning from Install and first launch may appear again.
  5. 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

  1. Quit struktJS.
  2. 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 .deb with your package manager, or delete the .AppImage.
  3. Optional: remove its data (nothing here is removed by the uninstall). Delete the Electron data folder, ~/.struktjs and ~/.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.