Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 24th July 2003, 12:52   #1
mhollander
Junior Member
 
mhollander's Avatar
 
Join Date: Jun 2003
Location: South Africa
Posts: 44
Angry Problem compiling script with uninstall section.

Hi,

I have been battling with this script for the past 2 hours and am getting nowhere fast. I have tried the documentation, checked the sample files, checked the archives and I still cannot see what I am doing wrong.

When I compile this script I get the following error.
Processed 1 file, writing output:
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

Could someone please look at it and tell me what I have done wrong.

I know the script is huge, please help me with the uninstall issue.
Attached Files
File Type: zip zxfusion.zip (26.8 KB, 53 views)
mhollander is offline   Reply With Quote
Old 24th July 2003, 13:04   #2
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
Do the example scripts with uninstall functions compile on you system or is this related to the script?

Vytautas
Vytautas is offline   Reply With Quote
Old 24th July 2003, 13:09   #3
mhollander
Junior Member
 
mhollander's Avatar
 
Join Date: Jun 2003
Location: South Africa
Posts: 44
It appears to be related to my scrip as the samples do work.
BTW. It is Version 2.0B4 of the NSIS software
mhollander is offline   Reply With Quote
Old 24th July 2003, 14:16   #4
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
Yes I did get the same error when I tried to compile your script, I will try to figure something out although I can't promise anything, not tonight anyway.

Vytautas

PS. You were not joking when you said it was a huge script
Vytautas is offline   Reply With Quote
Old 24th July 2003, 14:22   #5
mhollander
Junior Member
 
mhollander's Avatar
 
Join Date: Jun 2003
Location: South Africa
Posts: 44
Thats what happens when one's installers do not know how to RTFM Read The Fine Manual.

And we poor developers have to spoon feed them.
mhollander is offline   Reply With Quote
Old 24th July 2003, 14:26   #6
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
I do agree. I once had the same problem with the uninstaller, after a while I descided to leave it out since in that program it was not essencial. However now is the time to revisit and hopefully solve this problem.

Vytautas
Vytautas is offline   Reply With Quote
Old 24th July 2003, 14:50   #7
mhollander
Junior Member
 
mhollander's Avatar
 
Join Date: Jun 2003
Location: South Africa
Posts: 44
Unhappy

I have simplified the script and still get the same error.


!include "MUI.nsh"

;------------------------------------
; Add Defines Here
;------------------------------------

!define MUI_PRODUCT "ZXFusion"
!define MUI_VERSION "4.0"
!define MUI_ICON "COMMON\ICONS\INST.ICO"
!define MUI_UNICON "COMMON\ICONS\UNINST.ICO"
!define MUI_CHECKBITMAP "COMMON\GRAPHICS\Checks_Sajal_Nails.bmp"
!define MUI_BRANDINGTEXT "Atcom Computer Services (c) 2000-2003 "
!define MUI_UI "${NSISDIR}\Contrib\UIs\default.exe"





!define MUI_WELCOMEPAGE
!define MUI_SPECIALBITMAP "COMMON\GRAPHICS\zxflogorot.bmp"

!define MUI_CUSTOMPAGECOMMANDS

!define MUI_COMPONENTSPAGE
!define MUI_COMPONENTSPAGE_NODESC
!define MUI_HEADERBITMAP "COMMON\GRAPHICS\zxflogo.BMP"

!define MUI_DIRECTORYPAGE

!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_NOREBOOTSUPPORT

!define MUI_CONFIRM

!define MUI_ABORTWARNING


;-------------------------------------
; Macro Insertions Here
;-------------------------------------

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

!insertmacro MUI_PAGE_FINISH

;-------------------------------------
; Config Section
;-------------------------------------
Outfile "Test.exe"
ShowInstDetails "nevershow"
ShowUninstDetails "nevershow"
CRCCheck on
XPStyle On

Section "Test" TEST
SetOutPath $INSTDIR
WriteUninstaller "Unwise.exe"
SectionEnd

function .oninit
Messagebox MB_OK "Start"
StrCpy $INSTDIR "C:\@PROGRAM\ZXFUSION\INSTALL40"
functionend

Section "Uninstall"
MessageBox MB_OK "UnInstall"
SectionEnd

mhollander is offline   Reply With Quote
Old 24th July 2003, 17:12   #8
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 569
The simplified script does not follow the rules given in the current MUI ReadMe.

The latest MUI no longer uses Page "defines" such as

!define MUI_WELCOMEPAGE
!define MUI_DIRECTORYPAGE
etc

All you need now are the "!insertmacro" commands such as

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
etc

If you move the

!insertmacro MUI_LANGUAGE "English"

line further down the script, say after all of the "!insertmacro MUI_PAGE..." lines, the simplified script compiles without the error you complained about in your first post.

If you read the MUI ReadMe you will find that it gives step-by-step instructions for creating scripts. Step 1 is the !include "MUI.nsh" command, Step 3 covers the new PAGE !insertmacro commands but it is not until Step 6 that the MUI_LANGUAGE commands are discussed.
pengyou is offline   Reply With Quote
Reply
Go Back   Winamp 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