john.mcnamee
31st May 2005 04:34 UTC
Patch to enable canceling during file copy
I really needed to allow users to cancel an installation while it's copying files. I know this is on the TODO list for a future NSIS release, but I couldn't wait. It only took a few changes to the installer stub -- the patch is attached.
You have to specifically enable the Cancel button if you want it (I didn't want to break existing installers). For example:
Section
; Enable CANCEL button
GetDlgItem $0 $HWNDPARENT 2
EnableWindow $0 1
SectionEnd
scully13
2nd June 2005 21:09 UTC
Thanks, I got this working although I never figured out the correct way to use the txt file as a patch. I ended up just copying and pasting the changes in as needed. It worked fine under 2.06 and I was also able to modify it a little to get it working in 2.0 since that's the version I'm currently sending everything out in. Good job. I've been wanting this not because I thought it should be there but because my QA department keeps pointing it out. We've also had a few calls from customers.
john.mcnamee
3rd June 2005 05:00 UTC
Thanks, I got this working although I never figured out the correct way to use the txt file as a patch.
I think you can use patch.exe from
http://unxutils.sourceforge.net/.
I've been wanting this not because I thought it should be there but because my QA department keeps pointing it out. We've also had a few calls from customers.
Aborting an installation may leave a mess behind, but you've got to consider the alternative. I've got a large installation that can take 10 minutes to complete. If I didn't provide some way for users to bail out, they'll bring up Task Manager and start nuking random processes.
kichik
4th June 2005 22:01 UTC
Please submit a patch for easier tracking. I hope I'll be able to get to it next weekend.
One outstanding problem is that you still can't cancel during extraction of big files. It'll be great if you can resolve this in your patch. However, I'll probably include the current patch as an option, even if you don't.
john.mcnamee
5th June 2005 02:02 UTC
Originally posted by kichik
One outstanding problem is that you still can't cancel during extraction of big files.
Good point! I'll upload a new patch to SourceForge.
Ender7584
11th August 2005 16:32 UTC
I can't get NSIS patched. I need the cancel button, but can't figure out how to get this patch installed.
I tried to use patch.exe from http://unxutils.sourceforge.net/ with no success. I tried to modify the NSIS source code manually, but my compiler is screwed and gives me error messages.
Anyone have any suggestions on how to get this working?
Thanks
CrushBug
18th August 2005 17:48 UTC
I gather that this is something that has not made it into NSIS yet. We were just looking into this exact issue and you cannot cancel during the file copy.