Archive: Still having major problems upgrading script.


Still having major problems upgrading script.
Having headaches upgrading my script from 2.0b3 to CVS 2.0b4

Basically I have now got it to compile (it was being VERY picky about where I put !insertmacro MUI_LANGUAGE "English").

Problem is now, when I run my compiled installer, I end up with 3 reboot dialogs!!! (this was a 100% working B3 script).

Anyone else seen this (I used latest CVS snapshot).

Here is the start "chunk" of my script:

;//My Script

SetCompressor ZLib
CRCCheck On

;Names
!include "MUI.nsh"
!include WinMessages.nsh
!define IDOK 1
name "${VERSION}" ;Installer name
BrandingText "Some Text Here"
!define MUI_ICON "my.ico"
!define MUI_UNICON "my.ico"

;Pages
!insertmacro MUI_PAGE_WELCOME
!ifdef BROWSE
!insertmacro MUI_PAGE_DIRECTORY
!endif
!ifdef KEYNEEDED
Page custom KEYINSTALL ;CustomDialog
var SrcFileLocation
var CustomDialogKeyPress
Page custom STARTINSTALL ;CustomDialog
!endif
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_INSTFILES
UninstPage custom un.RebootDialog ;CustomDialog

;Language
!insertmacro MUI_LANGUAGE "English"


!define MUI_PAGE_CUSTOMFUNCTION_PRE "WelcomePageInit"
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_PRE "FinishPageInit"
!insertmacro MUI_PAGE_FINISH



;Settings
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_HEADERBITMAP_RIGHT
!define MUI_ABORTWARNING
!define MUI_HEADERBITMAP "dek.bmp"
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_TEXT_WELCOME_INFO_TEXT "This is some welcome text"


Actually, it should be finish, welcome and then finish again. It's because you have isnerted the finish page macro, welcome after it and then the finish macro again. If you only want one finish page, insert it only once.

The settings should also be present above the pages' macros so the MUI will know which page that setting belongs to.


Duh.. Sorry about that. Obvious when you mentioned it... Annoyed I missed it...

Working fine now....