[CMake] cpack/nsis behavior
Clinton Stimpson
clinton at elemtech.com
Fri Sep 3 17:48:44 EDT 2010
On Friday, September 03, 2010 02:39:33 pm John Drescher wrote:
> On Fri, Sep 3, 2010 at 4:36 PM, John Drescher <drescherjm at gmail.com> wrote:
> >> I've got this case where I'm using cpack to create nsis packages with a
> >> set of components that I want packaged.
> >>
> >> If I run the installer, things work.
> >> But, if I run the installer a second time (without doing an uninstall
> >> first), it doesn't do anything. So, if one had manually removed files,
> >> the installer doesn't put them back.
> >>
> >> I suspect its because there are components, and it assumes it can skip
> >> things if the component was already installed before (it is saved in
> >> the registry what components were installed).
> >>
> >> Is there a way to force it to install files again? Much like a repair
> >> functionality would do?
> >>
> >> I tried with the cmake installer, and it installs files again just fine.
> >> I suspect that is because there are no components in that installer.
> >
> > I have this as well. I thought it was a nsis bug and filed a bugreport
> > on their site which instantly got closed as its probably the fault of
> > CMake.
>
> For me it's a little more complicated because I want to allow to
> install more than 1 version of the same application at the same time.
> On the second go the install folder is created and the bin folder is
> created inside that but no the installer ends quickly and nothing gets
> installed on the second go. I then uninstall the newly installed
> project and the next install will actually install files.
>
I see that behavior too.
So I see this commit introduce that behavior
<http://cmake.org/gitweb?p=cmake.git;a=commit;h=83ec8c35933439305895b8569b2125a7e091fc57>
And the intention was to "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 doesn't work for me anyway.
If I remove a few lines of code from cmCPackNSISGenerator.cxx then I get what
I want:
- componentCode += " IntCmp $" + component->Name
- + "_was_installed ${SF_SELECTED} noinstall_" + component->Name + "\n";
...
- componentCode += " noinstall_" + component->Name + ":\n";
Clint
More information about the CMake
mailing list