Hello,
The OpenModelica installer is published for each sub-version, for example:
C:\Program Files\OpenModelica1.25.0-64bit
C:\Program Files\OpenModelica1.25.1-64bit
…
C:\Program Files\OpenModelica1.25.6-64bit
C:\Program Files\OpenModelica1.25.7-64bit
However, only one entry is registered in the registry for the uninstallation key.
I suggest modifying your package to run the uninstall() function before installing the new version.
It would also be possible to check the major version and only uninstall the folders corresponding to the version to be updated—in this case, all folders of the type:
C:\Program Files\OpenModelica1.25*
Thank you in advance.
Problem with the tis-openmodelica package
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Hello,
If I understand correctly, the problem is that the software doesn't differentiate between installed versions at the registry level, but instead installs different folders for each version, and these folders remain after each upgrade?
When I read the code, it seems that the uninstallation isn't done via the registry key, but rather from each version folder. I will run some tests to verify this and get back to you.
Sincerely,
Ingrid
If I understand correctly, the problem is that the software doesn't differentiate between installed versions at the registry level, but instead installs different folders for each version, and these folders remain after each upgrade?
When I read the code, it seems that the uninstallation isn't done via the registry key, but rather from each version folder. I will run some tests to verify this and get back to you.
Sincerely,
Ingrid
Tranquil IT
-
Olivier Schmitt
- Messages: 44
- Registration: Oct 22, 2024 - 1:25 p.m.
If I understand correctly, the problem is that the software doesn't differentiate between installed versions at the registry level, but instead installs different folders for each version, and these folders remain after each upgrade?
=> That's right.
So I ended up with about ten sub-versions installed, totaling approximately 80 GB. The program changes folders with each sub-version, but it only creates one entry for uninstallation…
I don't think the setup allows specifying the installation folder.
See the screenshot.
Indeed, I think the simplest solution is to uninstall all the non-major versions.
We can potentially base it on the control file section, for example:
version: 1.25.7.0-8.
We then retrieve the major version 1.25 from 1.25.7.0-8, and then list the folders corresponding to:
C:\Program Files\OpenModelica1.25*\.
Then, as with the uninstall() function, we can execute run(f'"{makepath(folder_path, "Uninstall.exe")}" /S').
I just tested OpenModelica-v1.25.7-64bit.exe /?.
It doesn't display any installation options, but we can clearly see in the window that a different folder is created for each version:
C:\Program Files\OpenModelica1.25.7-64bit.
No documentation seems to mention an option to enforce a common folder for each installation…
=> That's right.
So I ended up with about ten sub-versions installed, totaling approximately 80 GB. The program changes folders with each sub-version, but it only creates one entry for uninstallation…
I don't think the setup allows specifying the installation folder.
See the screenshot.
Indeed, I think the simplest solution is to uninstall all the non-major versions.
We can potentially base it on the control file section, for example:
version: 1.25.7.0-8.
We then retrieve the major version 1.25 from 1.25.7.0-8, and then list the folders corresponding to:
C:\Program Files\OpenModelica1.25*\.
Then, as with the uninstall() function, we can execute run(f'"{makepath(folder_path, "Uninstall.exe")}" /S').
I just tested OpenModelica-v1.25.7-64bit.exe /?.
It doesn't display any installation options, but we can clearly see in the window that a different folder is created for each version:
C:\Program Files\OpenModelica1.25.7-64bit.
No documentation seems to mention an option to enforce a common folder for each installation…
- Attachments
-
- openmodelica.png (20.22 KB) Viewed 11639 times
Okay, thank you for all the details. I can see the problem on my end. We'll modify the package on the store by adding the uninstallation script before the installation.
You suggest deleting only the folders for major versions, but shouldn't we delete all the OpenModelica folders? That's what we're currently doing in the uninstallation script. I'm not sure if there's any benefit to keeping the folders for older major versions.
I'll wait for your feedback before making any changes internally. In any case, thank you for bringing this issue to our attention.
Best regards,
Ingrid
You suggest deleting only the folders for major versions, but shouldn't we delete all the OpenModelica folders? That's what we're currently doing in the uninstallation script. I'm not sure if there's any benefit to keeping the folders for older major versions.
I'll wait for your feedback before making any changes internally. In any case, thank you for bringing this issue to our attention.
Best regards,
Ingrid
Tranquil IT
-
Olivier Schmitt
- Messages: 44
- Registration: Oct 22, 2024 - 1:25 p.m.
Hello,
Thank you for your efforts and work.
Regarding versions, as with other software, it can be beneficial to keep major versions for backward compatibility.
I can't say if there's a real advantage in this specific case, but version changes seem relatively infrequent.
It's conceivable that, as in other situations, it would be possible to automate the uninstallation of major versions via a script, integrated into a third-party cleanup package, since this is a less common operation.
The goal here is to avoid accumulating multiple identical installations when it's simply a matter of bug fixes.
Perhaps, as with other packages, you could comment out a portion of the code to allow users to choose between:
- either a complete update, involving the uninstallation of all existing versions;
- or a filtered update, based on the major version number defined in the control file.
If that requires too much work, I imagine simply calling your uninstall function beforehand will suffice.
However, some users might consider a major version change a burden and report it as a package bug.
Regards,
Thank you for your efforts and work.
Regarding versions, as with other software, it can be beneficial to keep major versions for backward compatibility.
I can't say if there's a real advantage in this specific case, but version changes seem relatively infrequent.
It's conceivable that, as in other situations, it would be possible to automate the uninstallation of major versions via a script, integrated into a third-party cleanup package, since this is a less common operation.
The goal here is to avoid accumulating multiple identical installations when it's simply a matter of bug fixes.
Perhaps, as with other packages, you could comment out a portion of the code to allow users to choose between:
- either a complete update, involving the uninstallation of all existing versions;
- or a filtered update, based on the major version number defined in the control file.
If that requires too much work, I imagine simply calling your uninstall function beforehand will suffice.
However, some users might consider a major version change a burden and report it as a package bug.
Regards,
Hello,
I think it's possible to uninstall only the versions between 1.25.0 and 1.25.7, for example. However, this means that older major versions aren't uninstalled, so they might accumulate. I'll still run some tests between versions 1.24 and 1.25.
In any case, I plan to add this code snippet as a comment if it works.
Best regards,
Ingrid
I think it's possible to uninstall only the versions between 1.25.0 and 1.25.7, for example. However, this means that older major versions aren't uninstalled, so they might accumulate. I'll still run some tests between versions 1.24 and 1.25.
In any case, I plan to add this code snippet as a comment if it works.
Best regards,
Ingrid
Tranquil IT
-
Olivier Schmitt
- Messages: 44
- Registration: Oct 22, 2024 - 1:25 p.m.
Thank you for your response.
