MantisBT - CMake
View Issue Details
0011206CMakeCPackpublic2010-09-03 17:502012-01-02 15:56
Clinton Stimpson 
Clinton Stimpson 
normalminorhave not tried
closedfixed 
 
CMake 2.8.6CMake 2.8.6 
0011206: nsis installer doesn't install a second time with components
When making a component installer, the installer doesn't work when run a second time and it skips installing files.

So for whoever maintains the NSIS cpack code....

Commit 83ec8c35933439305895b8569b2125a7e091fc57 introduced this behavior, with a comment:
 - Bug fix: NSIS installers now only install/remove the minimal
 number of files when re-run to update the installation (or by clicking
 "Change" in Add/Remove programs)

The "Change" button isn't working for me anyway.
To make the installer work a second time, I can do this:
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -627,9 +627,6 @@ CreateComponentDescription(cmCPackComponent *component,
     }
   componentCode += " SetOutPath \"$INSTDIR\"\n";
 
- componentCode += " IntCmp $" + component->Name
- + "_was_installed ${SF_SELECTED} noinstall_" + component->Name + "\n";
-
   // Create the actual installation commands
   if (component->IsDownloaded)
     {
@@ -779,7 +776,6 @@ CreateComponentDescription(cmCPackComponent *component,
     componentCode += " File /r \"${INST_DIR}\\" +
       component->Name + "\\*.*\"\n";
     }
- componentCode += " noinstall_" + component->Name + ":\n";
   componentCode += "SectionEnd\n";
 
No tags attached.
Issue History
2010-09-03 17:50Clinton StimpsonNew Issue
2010-09-03 18:08John M. DrescherNote Added: 0022085
2010-09-03 18:10John M. DrescherNote Edited: 0022085
2010-10-29 19:00Clinton StimpsonNote Added: 0022758
2010-11-10 12:57David ColeAssigned To => David Cole
2010-11-10 12:57David ColeStatusnew => assigned
2010-11-10 12:57David ColeTarget Version => CMake 2.8.4
2011-01-10 14:49David ColeNote Added: 0024549
2011-01-11 09:58David ColeNote Added: 0024581
2011-01-11 09:58David ColeTarget VersionCMake 2.8.4 =>
2011-04-14 14:32David ColeTarget Version => CMake 2.8.5
2011-05-25 17:03David ColeNote Added: 0026597
2011-05-25 17:03David ColeTarget VersionCMake 2.8.5 =>
2011-07-29 01:21Clinton StimpsonAssigned ToDavid Cole => Clinton Stimpson
2011-07-29 14:27Clinton StimpsonNote Added: 0027118
2011-07-29 14:27Clinton StimpsonStatusassigned => resolved
2011-07-29 14:27Clinton StimpsonFixed in Version => CMake 2.8.6
2011-07-29 14:27Clinton StimpsonResolutionopen => fixed
2011-07-29 14:58David ColeTarget Version => CMake 2.8.6
2012-01-02 15:56David ColeNote Added: 0028110
2012-01-02 15:56David ColeStatusresolved => closed

Notes
(0022085)
John M. Drescher   
2010-09-03 18:08   
(edited on: 2010-09-03 18:10)
I see this behavior as well. It causes me difficulty to install the same application more than 1 time with different versions. On the second install the install succeeds but only creates folders and does not install any files. To get it to work I then have to uninstall the new project and after that the next install will work.

(0022758)
Clinton Stimpson   
2010-10-29 19:00   
The patch fixes the immediate problem, but there are plenty of registry keys set by the installer that are not application version specific that should be.
(0024549)
David Cole   
2011-01-10 14:49   
Clinton, can you elaborate on what should and should not be version specific?

Should I apply this patch as-is for CMake 2.8.4?
(0024581)
David Cole   
2011-01-11 09:58   
Unsetting the "target version" field because the deadline for putting new features into CMake 2.8.4 has passed.

Postponed until next time.
(0026597)
David Cole   
2011-05-25 17:03   
Not for 2.8.5 - postponing until a future release
(0027118)
Clinton Stimpson   
2011-07-29 14:27   
Fixed with commit e6d2bcfd.
(0028110)
David Cole   
2012-01-02 15:56   
Closing resolved issues that have not been updated in more than 4 months.