Old 18th December 2003, 19:49   #1
Wasteland
Junior Member
 
Join Date: Oct 2003
Location: San Jose
Posts: 40
Send a message via ICQ to Wasteland Send a message via AIM to Wasteland Send a message via Yahoo to Wasteland
Allow user to cancel during install?

Once the installer has started copying files, it seems the cancel button becomes disabled, and it does not let a user cancel the install unless something goes wrong (in which case it displays an error and enables the cancel button). Is there some way I can tell NSIS to always have the cancel button enabled? If I just send the windows message to enable the button, is the installer going to function correctly (i.e. stop if a user hits cancel), or does it expect the cancel button to stay disabled?
Wasteland is offline   Reply With Quote
Old 18th December 2003, 20:01   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can't enable the cancel button yet. It was originally planned for v2 but it looks like it will have to wait for 2.1. Enabling it manually will not work as you expect it, you shouldn't do that.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th December 2003, 20:08   #3
Wasteland
Junior Member
 
Join Date: Oct 2003
Location: San Jose
Posts: 40
Send a message via ICQ to Wasteland Send a message via AIM to Wasteland Send a message via Yahoo to Wasteland
Well... it seems all of the functionality is there for what I want to do (i.e. if the installer gets an error copying files, it exits out gracefully), it seems like it would be trivial for a user to trigger this condition... but okay, I'll wait and see if you get the feature in before our game ships.

Thanks for the quick response!
Wasteland is offline   Reply With Quote
Old 18th December 2003, 20:13   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Well, there are still some issues with it such as stopping plug-ins, stopping executed programs and not leaving partially installed applications behind.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th December 2003, 20:54   #5
Wasteland
Junior Member
 
Join Date: Oct 2003
Location: San Jose
Posts: 40
Send a message via ICQ to Wasteland Send a message via AIM to Wasteland Send a message via Yahoo to Wasteland
Well, for stopping Plugins, that's the purpose of the .onUserAbort thing, right?

And leaving partially installed applications behind is the expected behavior of canceling an install... in fact I think it might be the desired behavior, depending on the situation.

But, okay, I'll just keep on the lookout for when the feature is in...
Wasteland is offline   Reply With Quote
Old 18th December 2003, 21:03   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Quote:
Originally posted by Wasteland
Well, for stopping Plugins, that's the purpose of the .onUserAbort thing, right?
Not exactly. NSIS is not thread safe when it comes to scripting, it can't execute two scripts on the same time. So we can't execute .onUserAbort if a plug-in is already running. The plug-in will probably need to subclass and figure out if the user clicked the cancel button on its own. It'll probably be a opt-in option for plug-ins.

We'll cross all those bridges when we get to them, currently we have NSIS 2 to release first

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 9th March 2006, 16:57   #7
oborstad
Junior Member
 
Join Date: Jan 2006
Location: A Game company in Edmonton
Posts: 11
Talking

So, now that 2.0 is out any word on canceling during file extraction? I have a plug-in that decompresses files and I'm decompressing close to 3 gig of data... I would like to put a cancel option in if possible without having to resort to something like what the realprogress plugin does (for the progress bar) and hijack or mimick the cancel button...

Owen.
oborstad is offline   Reply With Quote
Old 9th March 2006, 16:59   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
No. But there's this:

http://sourceforge.net/tracker/index...49&atid=373087

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump