MantisBT - CMake
View Issue Details
0015165CMakeCPackpublic2014-09-19 09:122015-03-02 08:57
Richard Ulrich 
Nils Gladitz 
normalminoralways
closedfixed 
CMake 3.0 
CMake 3.1 
0015165: WiX : Remember the INSTALL_ROOT directory for upgrades
If a user installs to a custom directory, upon upgrade the directory dialog initializes to the standard location again.
It would be nice if it started at the previously used custom location.

I think this could help:
http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/ [^]
I'm in the process of implementing this in my wxs files. But I think it would be a feature that would make sense for the standard.
No tags attached.
Issue History
2014-09-19 09:12Richard UlrichNew Issue
2014-09-19 09:13Nils GladitzAssigned To => Nils Gladitz
2014-09-19 09:13Nils GladitzStatusnew => assigned
2014-09-19 16:49Nils GladitzNote Added: 0036836
2014-09-22 08:31Richard UlrichNote Added: 0036838
2014-09-22 08:36Nils GladitzNote Added: 0036839
2014-09-24 04:33Richard UlrichNote Added: 0036861
2014-09-24 09:45Nils GladitzNote Added: 0036863
2014-09-24 09:45Nils GladitzStatusassigned => resolved
2014-09-24 09:45Nils GladitzFixed in Version => CMake 3.1
2014-09-24 09:45Nils GladitzResolutionopen => fixed
2015-03-02 08:57Robert MaynardNote Added: 0038131
2015-03-02 08:57Robert MaynardStatusresolved => closed

Notes
(0036836)
Nils Gladitz   
2014-09-19 16:49   
I've staged and merged "wix-remember-install-dir" for testing: http://www.cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=refs/heads/wix-remember-install-dir [^]
(0036838)
Richard Ulrich   
2014-09-22 08:31   
Wow, that was fast. But unfortunately it didn't work for my installer.

properties.wxi is generated, and looks as it should at first sight.

excerpt from the second installation log file:
MSI (c) (14:84) [11:19:16:606]: PROPERTY CHANGE: Adding WIX_UPGRADE_DETECTED property. Its value is '{DA5A91EB-BA13-441F-BED0-7261761811B6}'.
MSI (c) (14:84) [11:19:16:684]: PROPERTY CHANGE: Adding INSTALL_ROOT property. Its value is 'C:\Program Files (x86)\PointLine\PointLine23\'.
MSI (c) (14:84) [11:19:16:715]: Dir (target): Key: INSTALL_ROOT , Object: C:\Program Files (x86)\PointLine\PointLine23\
MSI (c) (14:84) [11:35:28:937]: Switching to server: TARGETDIR="C:\" PROGRAM_MENU_FOLDER="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PointLine23\" INSTALL_ROOT="C:\Program Files (x86)\PointLine\PointLine23\" INSTALL_PREFIX_1="C:\Program Files (x86)\PointLine\" WIX_UPGRADE_DETECTED="{DA5A91EB-BA13-441F-BED0-7261761811B6}" CURRENTDIRECTORY="O:\UlR" CLIENTUILEVEL="0" CLIENTPROCESSID="2324" USERNAME="Richard.Ulrich" SOURCEDIR="O:\UlR\" ACTION="INSTALL" EXECUTEACTION="INSTALL" MIGRATE="{DA5A91EB-BA13-441F-BED0-7261761811B6}" ROOTDRIVE="C:\" INSTALLLEVEL="1" WIXUI_INSTALLDIR_VALID="1" SECONDSEQUENCE="1" ADDLOCAL=DirectXRedist,runtimes,desktopShortcutsStandard,CM_C_base,ProductFeature,CM_C_converter,CM_C_gui,CM_C_python,CM_C_runtime,CM_C_shared
MSI (s) (64:3C) [11:36:14:297]: PROPERTY CHANGE: Adding INSTALL_ROOT property. Its value is 'C:\Program Files (x86)\PointLine\PointLine23\'.


The registry key HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\DA5A91EB-BA13-441F-BED0-7261761811B6\InstallLocation is empty.
(0036839)
Nils Gladitz   
2014-09-22 08:36   
It seemed to be working for me with this test project:
https://github.com/ngladitz/cmake-wix-testsuite/blob/master/basic/CMakeLists.txt [^]

Can you reduce your case to a minimal non-working example?
(0036861)
Richard Ulrich   
2014-09-24 04:33   
It took a while to figure out, but finally I found the problem.
I have a custom WIX.template.in and I did a diff, but missed the new include at the bottom. Somehow I expected includes only to come at the top.

Your implementation totally works. Thanks for solving this so fast.

So, when can I download a release version that includes this? ;-)


I thought about why I need a custom WIX.template.in, and it's because I need to place some stuff inside the Product tag. It's not just Features with ComponentRef's, but also a second UIRef. So, what do you think about including a custom.wxi in your WIX.template.in and shipping an empty custom.wxi file. I would then override only this in my custom modules directory.
(0036863)
Nils Gladitz   
2014-09-24 09:45   
Thanks for testing!
I don't know when but it should be in 3.1.

For the <Product> element feel free to open another issue so it doesn't get lost.
I'm thinking maybe an include could be combined with the existing patch mechanism.
(0038131)
Robert Maynard   
2015-03-02 08:57   
Closing resolved issues that have not been updated in more than 4 months.