Hello ppl new guy on the ranks 😁
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 😁.
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)
dir2nsi
12 posts
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
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
Maybe he means a dialog to select a start menu group?
Originally posted by rainwaterThe 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")?
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.
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?
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.
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.
RW is correct
shortcut destination pane = dialog to select a start menu group
sorry for my bad english.
sorry for my bad english.
You can use InstallOptions for that.
Originally posted by rainwaterThanks for that hint.
Removal of dlls has been discussed before. Search the forums for more info on that.
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)🙂
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.
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.
Originally posted by rainwaterI cant use "file /r" then (until there is a callback function for this purpose)...
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.
If there are many ways to do what we discuss, then show us another 😉