Old 29th November 2011, 10:37   #1
rumovoice
Junior Member
 
Join Date: Nov 2011
Posts: 11
What is the best way to make an updater?

I've made a setup that has only one default section and a bunch of MUI2 pages. Now I want to make an update mode (command line switch '/update', updater is downloaded and launched by a program itself) that will hide all MUI pages and display only progress bar. Also updater has a completely different code so I want to make a different section for it. What is the best way to do it?
rumovoice is offline   Reply With Quote
Old 29th November 2011, 10:42   #2
rumovoice
Junior Member
 
Join Date: Nov 2011
Posts: 11
I forgot to mention that both modes share the same set of files
rumovoice is offline   Reply With Quote
Old 29th November 2011, 11:39   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
No need to make a different section for it. Just set a variable in .onInit if the /update parameter was passed. Then in the section use a giant if variable==update, else, endif.

1) GetParameters: http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.11
2) Download plugin such as inetc.
3) Skip pages by calling abort in their prefunctions.

Edit: No need to worry about files being the same for both types - NSIS will only compress one copy of a file, even if you File it several times.
MSG is offline   Reply With Quote
Old 29th November 2011, 13:33   #4
rumovoice
Junior Member
 
Join Date: Nov 2011
Posts: 11
Is there a command to turn off MUI i.e. switch to default UI with progress bar only?
rumovoice is offline   Reply With Quote
Old 29th November 2011, 13:36   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
No, the interface is hard-coded in the installer exe as far as I know. There are several threads about popup windows etc. But why not just use a MUI page?
MSG 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