Product Version, Revision Code and Persistant Variables
Posted: Mon Feb 22, 2016 7:39 am
I'm struggling to create a pattern for updates to a product. I understand that the native engine stores a database on the target system and thus in order for the product to remain "clean" an uninstall must be performed before the update. This is quirky but manageable, i have changed some of the application settings behaviour to comply.
If i change the "Product Version" i can use the updates.ini to get updates run. Ideally an update should update, here it uninstalls and then installs. The problem is mainly three things, the component selection, the TARGETDIR and one of my own INSTANCENAME.
If i "Set Persistant Variable" it will only work if the Revision Code remains the same /between/ product versions. At least this far i see the persistant variables not being persistant anymore as soon as i change the Revision Code (i have not checked the component selection yet). This feels very strange and this whole post is about confirming that this is the intended behaviour [actual question 1 here]. Should i persist the revision code between product versions [actual question 2 here]?
Also, if i have the same Revision Code between Product Versions, the installer will not understand that an uninstallation must be done before the installation. Maybe i can alleviate this by comparing the Product Version, but that will entail the same problems with persistance...
Persisting by writing to a file does not cut it because the uninstallation removes said file. With a (per documentation recommendation) changed Revision Code between builds the TARGETDIR is also reset to "default". I'll also be having problems updating secondary instances but that can of worms will remained closed until i get this solved.
A note aside; trying to create a patch (not related to the above), i saw a post here recommending to save the project in a different folder under the same project name and then change the product version and the output filename. However, when you do this only the project file and dialogs get saved in the new directory (at least if they are on the same level) and the scripts gets referenced in the project file in the old directory. So when i started to change paths using the file tool i ended up with an indescribable mess. Now, when trying to create a viable pattern for updates i copied the whole directory first. That works better BUT the directory isn't stated in the main window title bar nor in the open/reopen dropdowns and dialogues. This makes it difficult and dangerous to work with two different versions. Either the path or the product version should be clearly shown, IMHO.
If i change the "Product Version" i can use the updates.ini to get updates run. Ideally an update should update, here it uninstalls and then installs. The problem is mainly three things, the component selection, the TARGETDIR and one of my own INSTANCENAME.
If i "Set Persistant Variable" it will only work if the Revision Code remains the same /between/ product versions. At least this far i see the persistant variables not being persistant anymore as soon as i change the Revision Code (i have not checked the component selection yet). This feels very strange and this whole post is about confirming that this is the intended behaviour [actual question 1 here]. Should i persist the revision code between product versions [actual question 2 here]?
Also, if i have the same Revision Code between Product Versions, the installer will not understand that an uninstallation must be done before the installation. Maybe i can alleviate this by comparing the Product Version, but that will entail the same problems with persistance...
Persisting by writing to a file does not cut it because the uninstallation removes said file. With a (per documentation recommendation) changed Revision Code between builds the TARGETDIR is also reset to "default". I'll also be having problems updating secondary instances but that can of worms will remained closed until i get this solved.
A note aside; trying to create a patch (not related to the above), i saw a post here recommending to save the project in a different folder under the same project name and then change the product version and the output filename. However, when you do this only the project file and dialogs get saved in the new directory (at least if they are on the same level) and the scripts gets referenced in the project file in the old directory. So when i started to change paths using the file tool i ended up with an indescribable mess. Now, when trying to create a viable pattern for updates i copied the whole directory first. That works better BUT the directory isn't stated in the main window title bar nor in the open/reopen dropdowns and dialogues. This makes it difficult and dangerous to work with two different versions. Either the path or the product version should be clearly shown, IMHO.