Identify installed version
Moderators: winston, another_commander
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Identify installed version
As far as I know Oolite shows it's version number in the window title.
What's the way to identify the installed version without having a human being reading the version after it has been started?
On Linux I can read a file with the complete version number. On MacOS I can at least read Info.plist and find major/minor version numbers.
But on Windows no such file exists, and in the prereleases we generate I can also not see special properties to be set on the executable.
What's the way to identify the installed version without having a human being reading the version after it has been started?
On Linux I can read a file with the complete version number. On MacOS I can at least read Info.plist and find major/minor version numbers.
But on Windows no such file exists, and in the prereleases we generate I can also not see special properties to be set on the executable.
Sunshine - Moonlight - Good Times - Oolite
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Identify installed version
The "oolite.app/Resources/manifest.plist" file has the Oolite version number inside.
Code: Select all
{
title = "Oolite core";
identifier = "org.oolite.oolite";
version = "1.91";
required_oolite_version = "1.91";
license = "GPL 2+ / CC-BY-NC-SA 3.0 - see LICENSE.TXT for details";
author = "Giles Williams, Jens Ayton and contributors";
information_url = "http://www.oolite.org/";
}
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Identify installed version
That works. Thank you.phkb wrote: ↑Sat Jul 08, 2023 4:07 amThe "oolite.app/Resources/manifest.plist" file has the Oolite version number inside.
Code: Select all
{ title = "Oolite core"; identifier = "org.oolite.oolite"; version = "1.91"; required_oolite_version = "1.91"; license = "GPL 2+ / CC-BY-NC-SA 3.0 - see LICENSE.TXT for details"; author = "Giles Williams, Jens Ayton and contributors"; information_url = "http://www.oolite.org/"; }
Sunshine - Moonlight - Good Times - Oolite
Re: Identify installed version
Latest.log ( found at C:\Oolite-Trunk\oolite.app\Logs on my install ) returns at least the major version number but not the internal build number.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Identify installed version
Another option, true. But it requires that Oolite has at least run once before.
On Linux, different Oolite installations would write to the same logfile $HOME/.Oolite/Logs/Latest.log so it would still be unknown what version that was...
Sunshine - Moonlight - Good Times - Oolite
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Identify installed version
I am coming back to this now. The version "1.91" is not good enough. I'd like to have the full version, such as "1.91.0.7541-231106-19bfb7d".hiran wrote: ↑Sat Jul 08, 2023 5:36 amThat works. Thank you.phkb wrote: ↑Sat Jul 08, 2023 4:07 amThe "oolite.app/Resources/manifest.plist" file has the Oolite version number inside.
Code: Select all
{ title = "Oolite core"; identifier = "org.oolite.oolite"; version = "1.91"; required_oolite_version = "1.91"; license = "GPL 2+ / CC-BY-NC-SA 3.0 - see LICENSE.TXT for details"; author = "Giles Williams, Jens Ayton and contributors"; information_url = "http://www.oolite.org/"; }
The reason is the sheer amount of 1.91s that we produce.
In Linux, after installation I find files like these
Code: Select all
GNUstep/Applications/Oolite-trunk/release.txt
GNUstep/Applications/Oolite/release.txt
Code: Select all
1.90.0.7282-200829-0b1ff49
How difficult could it be to have a --version command line parameter?
Sunshine - Moonlight - Good Times - Oolite
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Identify installed version
In Windows we have the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Oolitehiran wrote: ↑Mon Nov 06, 2023 10:47 amIn Linux, after installation I find files like theseAnd their content is likeCode: Select all
GNUstep/Applications/Oolite-trunk/release.txt GNUstep/Applications/Oolite/release.txt
What would be the equivalent on Windows? I suppose there is nothing in the registry, but is there also no such file on disk?Code: Select all
1.90.0.7282-200829-0b1ff49
How difficult could it be to have a --version command line parameter?
with the subkey
DisplayName (REG_SZ)
and example content Oolite 1.91.0.7499-230913-4549f87-dev
, which includes the entire version string.The problem with that is that it gets written in the registry only if the installer is run as admin.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Identify installed version
That is pretty close. The '-dev' part in the end is new to me but would not be a problem.another_commander wrote: ↑Mon Nov 06, 2023 11:12 amIn Windows we have the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Oolite
with the subkeyDisplayName (REG_SZ)
and example contentOolite 1.91.0.7499-230913-4549f87-dev
, which includes the entire version string.
The problem with that is that it gets written in the registry only if the installer is run as admin.
More problematic is the fact that it is not always there.
Could we change the installer so it writes the version into a file, just like on Linux?
The change does not look complicated, but I would only do it if I can also test the installer.
https://nsis.sourceforge.io/Write_text_to_a_file
Sunshine - Moonlight - Good Times - Oolite
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Identify installed version
In the latest build run I changed the Windows installation.
Could someone with a Windows machine check if the intended file 'release.txt' is created in the installation folder?
https://github.com/OoliteProject/oolite ... 6776156032
This is neither a release nor a prerelease so you have to access the workflow run asset.
Could someone with a Windows machine check if the intended file 'release.txt' is created in the installation folder?
https://github.com/OoliteProject/oolite ... 6776156032
This is neither a release nor a prerelease so you have to access the workflow run asset.
Sunshine - Moonlight - Good Times - Oolite
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Identify installed version
Yes, it works and the file containing the release string is there at the installation root. Just a minor problem - it does not get deleted when uninstalling. That's very easy to fix though, just add a deletion command somewhere around lines 309-314 where the uninstaller deletes the other root folder fileshiran wrote: ↑Tue Nov 07, 2023 6:56 amIn the latest build run I changed the Windows installation.
Could someone with a Windows machine check if the intended file 'release.txt' is created in the installation folder?
https://github.com/OoliteProject/oolite ... 6776156032
This is neither a release nor a prerelease so you have to access the workflow run asset.
Code: Select all
RMDir /r "$INSTDIR\oolite.app\oolite.app"
RMDir /r "$INSTDIR\oolite.app\Resources"
RMDir /r "$INSTDIR\oolite.app\Logs"
Delete "$INSTDIR\release.txt" <--------- add this somewhere here
Delete "$INSTDIR\Oolite.ico"
Delete "$INSTDIR\Oolite-HDR.ico"
Delete "$INSTDIR\Oolite_Readme.txt"
Delete "$INSTDIR\OoliteRS.pdf"
Delete "$INSTDIR\AdviceForNewCommanders.pdf"
Delete "$INSTDIR\OoliteReadMe.pdf"
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Identify installed version
Thank you for the feedback. I added the uninstall instruction. Once the build has finished, please check the windows installer atanother_commander wrote: ↑Tue Nov 07, 2023 7:13 amYes, it works and the file containing the release string is there at the installation root. Just a minor problem - it does not get deleted when uninstalling.hiran wrote: ↑Tue Nov 07, 2023 6:56 amIn the latest build run I changed the Windows installation.
Could someone with a Windows machine check if the intended file 'release.txt' is created in the installation folder?
https://github.com/OoliteProject/oolite ... 6776156032
This is neither a release nor a prerelease so you have to access the workflow run asset.
https://github.com/OoliteProject/oolite ... 6790152101
If it is good, I'll do a PR.
Sunshine - Moonlight - Good Times - Oolite
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Identify installed version
Tested it. It works as expected.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Identify installed version
Thank you.
I merged the changes.
Sunshine - Moonlight - Good Times - Oolite