Page 1 of 1
Problem with the tis-openmodelica package
Published: Dec 9, 2025 - 7:22 PM
by Olivier Schmitt
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.
Re: Problem with the tis-openmodelica package
Published: Dec 10, 2025 - 10:35
by italbot
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
Re: Problem with the tis-openmodelica package
Published: Dec 10, 2025 - 1:33 PM
by Olivier Schmitt
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…
Re: Problem with the tis-openmodelica package
Published: Dec 10, 2025 - 3:40 PM
by italbot
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
Re: Problem with the tis-openmodelica package
Published: Dec 10, 2025 - 6:33 PM
by Olivier Schmitt
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,
Re: Problem with the tis-openmodelica package
Published: Dec 15, 2025 - 11:09
by italbot
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
Re: Problem with the tis-openmodelica package
Published: Dec 15, 2025 - 9:42 PM
by Olivier Schmitt
Thank you for your response.
Re: Problem with the tis-openmodelica package
Published: Dec 19, 2025 - 09:30
by italbot
Hello,
I've made the change to the package; it will be available in 5 days. In the meantime, you can find it in pre-production on the store.
Sincerely,
Ingrid