Archive: MUI_UNPAGE_CONFIRM leading to error


MUI_UNPAGE_CONFIRM leading to error
I've got a lengthy script that I'm porting from NSIS 1 to NSIS 2 MUI.

I'm basically there, but have a problem with the uninstaller confirmation page. As soon as

!insertmacro MUI_UNPAGE_CONFIRM

is used, the compile gives an error:

Adding plug-ins initializing function... Done!
Error: resolving pre-page function "un.mui.ConfirmPre" in uninstall pages
Note: uninstall functions must begin with "un.", and install functions must not
Error - aborting creation process

It seems to work in the examples and I'm not clear which aprt of my script might fuck it up?

Thanks,
Andi


.


You are combining old and new MUI code. Remove page defines like MUI_COMPONENTSPAGE, MUI_UNINSTALLER etc. Please check the Modern UI Readme.


Joost,

thank you for the suggestion. I've radically downsized the example, but problem still exists:

!include "MUI.nsh"

;--------------------------------
;Modern UI Configuration

!insertmacro MUI_PAGE_STARTMENU

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES


;General
OutFile "CpuIdleInstaller.exe"

;Folder-selection page
InstallDir "$PROGRAMFILES\myprogram"



;--------------------------------
; The stuff to install
Section "Program Files" CpuIdleProgramFiles
WriteUninstaller "uninstall.exe"
SectionEnd

;--------------------------------
;Uninstaller Section

; special uninstall section.
Section "Uninstall"

SectionEnd


Can you see other old code in here? Error message is still the same?

Thanks,
Andreas


Are you using the latest version of NSIS (CSV). I compiled your original script with no problems using CSV, 2003-06-25, version of NSIS.

Vytautas

[edit]Sorry my edited script did not actually generate the uninstaller, I cut too much stuff out of it.[/edit]


Version as download just now from nsis.sf.net, yes. Any debugging setting I could turn on? Tried -v9 on the command line, but that didn't give more insight.

Cheers,
Andi


Just to make sure, tried with CVS snapshot from *now*, doesn't work. I'll retest with tonight's snapshot again.

Andi


Don't forget SF.net CVS servers are 24 hours behind at the mo.


This script does not rely on features that have been added < 24 hours ago. Please attach the full script again (with the corrections).


there you go


Please read the Modern UI Readme and check the examples. Lots of things are missing:

1) MUI_PRODUCT and MUI_VERSION defines

2) The pages like MUI_PAGE_COMPONENTS, MUI_PAGE_DIRECTORY, MUI_PAGE_INSTFILES etc.

3) A language (after the page macro's): !insertmacro MUI_LANGUAGE "English"


I may have stripped out too much- but the error message was there even before:

!include "MUI.nsh"

!define MUI_PRODUCT "test"
!define MUI_VERSION "7"

;--------------------------------
;Modern UI Configuration

!insertmacro MUI_PAGE_STARTMENU
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES


;General
OutFile "CpuIdleInstaller.exe"

;Folder-selection page
InstallDir "$PROGRAMFILES\myprogram"

!insertmacro MUI_LANGUAGE "English"


;--------------------------------
; The stuff to install
Section "Program Files" CpuIdleProgramFiles
WriteUninstaller "uninstall.exe"
SectionEnd

;--------------------------------
;Uninstaller Section

; special uninstall section.
Section "Uninstall"

SectionEnd


Your last script works fine for me. Make sure you have the latest development version from http://nsis.sf.net


Guys, thank you for your support. Issues are resolved, seemed to be an interesting case of old and new MUI syntax mixed (didn't realise *how* much had changed since I've last checked), some clean install issues and too much other stuff going on at the same time.

Cheers,
Andi