View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009946CMakeCPackpublic2009-11-21 17:012012-09-03 16:02
ReporterPatrick R. Gansterer 
Assigned ToDavid Cole 
PrioritynormalSeveritymajorReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.9Fixed in Version 
Summary0009946: Auto-uninstall old before installing new
DescriptionAdd the following feature of NSIS to CPack:
http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new [^]
TagsNo tags attached.
Attached Filespatch file icon autouninstall.patch [^] (958 bytes) 2010-11-21 14:58 [Show Content]
patch file icon 0001-Added-CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL.patch [^] (2,095 bytes) 2011-06-11 05:56 [Show Content]
patch file icon 0001-Added-CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL-v2.patch [^] (2,838 bytes) 2011-06-11 06:16 [Show Content]

 Relationships

  Notes
(0026821)
Sukender (reporter)
2011-06-10 08:18

Hi,

I suggest the code to be enclosed/controlled by a CMake veriable (to let users disable it if needed).
And this is quite related: is it possible to also add a custom command, to let users add anything related to initialization (and potentially a replacement for the proposed code)?

Code would then look like:

Function .onInit
  @CPACK_NSIS_ON_INIT@
  StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 noUninstallBeforeInstall
    // Put uninstall things here.
  noUninstallBeforeInstall:

Thoughts?
(0026823)
Patrick R. Gansterer (developer)
2011-06-10 10:33

I agree completly on your suggestions!
Main problem is, that it seams that I'm not able to get attention from the CMake devs. :-(
If you look at the upload date, you see no progress (or at least additional comments) on this over a half year.
I'm willing to improve the patch, but I need feedback of the CMake devs.
(0026828)
Sukender (reporter)
2011-06-11 04:16

Well, I personally patched CMake/CPack 2.8.4 with your code and got expected result. Only drawbacks are you can't disable it (see my prvious post ;) ), and that there is no way to get translated sentence. It looks strange that the uninstall sentence is in english and the rest of the installer in the system language ! However I strongly prefer this solution over the current one.
(0026830)
Patrick R. Gansterer (developer)
2011-06-11 05:58

I added a new (git) patch (applys to current master) with the suggested improvement. IMO CPACK_NSIS_ON_INIT is an independent task.
(0026831)
Patrick R. Gansterer (developer)
2011-06-11 06:00

About the translation:
The strings for CPACK_NSIS_MODIFY_PATH (e.g. "Do not add CMake to the system PATH") don't get translated too.
(0026833)
Sukender (reporter)
2011-06-11 06:32

Thanks for the new patch. However I think CPACK_NSIS_ON_INIT is related, because users may want to insert a custom uninstall code (ex: silent uninstall). Well of course this allows users to add many unrelated things too...
(0026837)
danoushh (reporter)
2011-06-11 14:19

This is an excellent feature. Thank you for working on it.

I wonder though, is there a way to extend this functionality to other CPack generators such as MacOS and DEB?
(0026842)
Sukender (reporter)
2011-06-12 03:34

Well, I'm pretty sure it's 100% dependent on the generator... so the answer would be "maybe yes".
(0029297)
David Cole (manager)
2012-04-22 12:03

I applied this patch, and merged it to the CMake 'next' branch just now:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe58b67e24d007cb7dcd7005073a37bfba21737d [^]

Sorry these things sometimes take months to get around to...

If there is any further work required to fine tune this feature, please let me know by adding further notes here. Otherwise, I'll try to get this merged into 'master' in the next couple of weeks and have it ready for the CMake 2.8.9 release planned for June.

Thanks!
(0030893)
David Cole (manager)
2012-09-03 16:02

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2009-11-21 17:01 Patrick R. Gansterer New Issue
2010-11-21 14:58 Patrick R. Gansterer File Added: autouninstall.patch
2010-12-14 16:46 David Cole Assigned To => David Cole
2010-12-14 16:46 David Cole Status new => assigned
2011-06-10 08:18 Sukender Note Added: 0026821
2011-06-10 10:33 Patrick R. Gansterer Note Added: 0026823
2011-06-11 04:16 Sukender Note Added: 0026828
2011-06-11 05:56 Patrick R. Gansterer File Added: 0001-Added-CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL.patch
2011-06-11 05:58 Patrick R. Gansterer Note Added: 0026830
2011-06-11 06:00 Patrick R. Gansterer Note Added: 0026831
2011-06-11 06:16 Patrick R. Gansterer File Added: 0001-Added-CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL-v2.patch
2011-06-11 06:32 Sukender Note Added: 0026833
2011-06-11 14:19 danoushh Note Added: 0026837
2011-06-12 03:34 Sukender Note Added: 0026842
2012-04-22 12:03 David Cole Note Added: 0029297
2012-04-22 12:03 David Cole Target Version => CMake 2.8.9
2012-04-22 12:04 David Cole Status assigned => resolved
2012-04-22 12:04 David Cole Resolution open => fixed
2012-09-03 16:02 David Cole Note Added: 0030893
2012-09-03 16:02 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team