- NSIS Discussion
- dir2nsi
Archive: dir2nsi
DragonSoull
8th February 2002 17:47 UTC
dir2nsi
Hello ppl new guy on the ranks :D
does anybody nows a easy way to add files to a installer with dir structure i made a small app but with lots of files in diferent dirs and adding one by one in the~script is a pain since i'm extremelly lasy :D.
Too the creator of NSIS: (some things I would love to see on NSIS)
- shortcut destination pane
- auto unistall (it would remove all the files installed)
rainwater
8th February 2002 17:58 UTC
Read the docs for File . It supports adding directory trees.
The uninstall support in NSIS is more powerful than just removing installed files. If you have a simple install you could remove a whole directory with just one line. But some apps require more steps like removing registry keys and such, and you don't want NSIS guessing which things it should remove.
shortcut destination pane
Whats this?
Rob
Joost Verburg
8th February 2002 22:53 UTC
Maybe he means a dialog to select a start menu group?
SmartyMan
11th February 2002 00:28 UTC
Originally posted by rainwater
If you have a simple install you could remove a whole directory with just one line. But some apps require more steps like removing registry keys and such, and you don't want NSIS guessing which things it should remove.
The makeNSIS uninstall functionality is powerfull indeed, but think about installing system DLLs or other stuff that expands other software - how can the author of the uninstall code asure that the uninstall code will remove only those files the installer has really installed ("SetOverwrite ifNewer")?
So i would like to see some automatic here, too - maybe the installer could log all the things he did in a special file and Justin could add a command reading this file and reversing all the actions.
That would make the uninstaller just more powerfull, wouldnt it?
rainwater
11th February 2002 01:22 UTC
Removal of dlls has been discussed before. Search the forums for more info on that.
NSIS is a very low-level scriptable installation system. I don't see automatically permorming tasks like these much of a priority as it would add to the overhead of the installer. There's a reason why it has so much functionality, so you can do things like this for yourself.
bballer182
11th February 2002 01:29 UTC
RW is correct
DragonSoull
11th February 2002 19:21 UTC
shortcut destination pane = dialog to select a start menu group
sorry for my bad english.
rainwater
11th February 2002 19:26 UTC
You can use InstallOptions for that.
SmartyMan
11th February 2002 23:34 UTC
Originally posted by rainwater
Removal of dlls has been discussed before. Search the forums for more info on that.
Thanks for that hint.
There's a reason why it has so much functionality, so you can do things like this for yourself.
OK, mybe you can guide me within the following expample: lets say that i want to write an installer which copys extended versions of the makeNSIS exmaple files in your NSIS folder.
I would use SetOverwrite ifNewer (of course) and the docs say, that the timestamp of all the files will be adjusted, even if my file was not installed.
Now: how can my unistaller find out which files are to be deleted (in other words: which of the existing files was installed by my installer)?
BTW: this example can also be an argument for makeNSIS creating a backup folder (dest for all files overwritten during installation):)
rainwater
12th February 2002 00:45 UTC
There are many ways to do this. You could check if the file is newer, then write to text file the name of file. Then overwrite it. Then your uninstaller just reads the file during the the uninstall and it will no which files to delete.
pjw62
13th February 2002 20:12 UTC
Just out of interest for easily selecting files, I wrote a quick little app. a while ago.. NSIS drag drop thing--drop files onto it and it copies the 'File' statements to the clipboard.
http://forums.winamp.com/showthread.php?threadid=66402
SmartyMan
13th February 2002 23:58 UTC
Originally posted by rainwater
There are many ways to do this. You could check if the file is newer, then write to text file the name of file. Then overwrite it. Then your uninstaller just reads the file during the the uninstall and it will no which files to delete.
I cant use "file /r" then (until there is a callback function for this purpose)...
If there are many ways to do what we discuss, then show us another ;)