-
Notifications
You must be signed in to change notification settings - Fork 2
⚠ Extra information
Simon Tushev edited this page Aug 15, 2021
·
5 revisions
ℹ These notes are mostly a self-reminder, however, they may be useful to others.
When AJUpdateWatcher.exe
is started, it performs the following steps:
- Check for scheduled task-related command line option, like
-deletetask
. Execute them if present, exit immediately after (no further steps). - Check/try upgrading own settings from the previous versions
- Check for self (
AJUpdateWatcher
) updates. If there is an update and user agrees - proceed with it (leave this list). - Load local settings, list of installations etc. Show disclaimers etc.
- If app considers itself as 'not configured' or there is
-config
parameter - open Configuration window (leave this list). - Otherwise, perform a check for updates for a list of configured AdoptOpenJDK installations:
- If there are AdoptOpenJDK updates => Show them to the user
- If there is no updates:
- On the first run or on start menu shortcut (since 2.0.1.0) => Show message that there are no updates
- On the second and further invocations (or on start menu shortcut, pre-2.0.1.0) => Silently terminate
So, if you click on the .exe
and nothing happens - this is OK, this is not a bug. It means that the app went through the following steps: 1 → 6 → ii → b
. There were no updates, and there are no other messages to show, so nothing is shown.
There are two types of installations: manually configured ones and auto-discovered.
Every time the app checks for the updates, if performs the following steps:
- Get a fresh list of auto-discovered at this very moment installations (via Windows Registry). In Configuration Window, this happens only when setting the checkboxes, on start, or on UpdatesInstallationComplete event.
- Get a list of user-configured updates. Check if some of these override some auto-discovered ones.
- For each
enabled
(by checkbox) installation:- Try to obtain local version:
- For auto-discovered installations, get
MSIRevision
field via Registry, all other fields - viarelease
file (as described below). - For manually-added installations, get all fields from
release
file: processJAVA_VERSION → FULL_VERSION → SEMANTIC_VERSION
fields, if present. Parse them, fill fields.
- For auto-discovered installations, get
- Get
latest
version from API. - If latest version is not marked as
skipped
by user, compare local and API versions:- Major (Feature)
- Minor (Interim)
- Security (Update)
- Either compare
-
local:MSIRevision
vsapi:semver.build
- ifMSIRevision
is present and only if API version is newer (added in2.0.3
) - Or continue comparing:
- Patch
- Build
- AdoptBuild
-
- If API version is newer, suggest to update.
- Try to obtain local version:
The following registry keys are enumerated - in both x32
and x64
registry views and in both HKEY_LOCAL_MACHINE
and HKEY_CURRENT_USER
:
- SOFTWARE\AdoptOpenJDK
- SOFTWARE\Eclipse Foundation
- SOFTWARE\Temurin
- SOFTWARE\Semeru