spikey_nick
24th February 2005 22:58 UTC
page skip not skipping
I'm having some trouble getting a page to skip properly. I'm using the following code: page instfiles JRE_CHECK
The JRE_CHECK function Aborts if the installation page doesn't need to be run. No files are installed, but it still shows an empty page with a next button. What do I need to to in order to make the page skip completely?
Thanks
Pidgeot
25th February 2005 02:01 UTC
Try using Abort - this is what the NSIS installer uses when checking for previously installed versions.
spikey_nick
28th February 2005 05:23 UTC
I am using Abort (look at the first line of the second paragraph)
Afrow UK
28th February 2005 11:57 UTC
Do you happen to be skipping two pages in succession? If this is the case, then it does that for some reason (you get an empty page). You need to use this: http://nsis.sourceforge.net/archive/...php?pageid=575
If that isn't the case, then try making a cut-down version of your script which produces the same problem for us to look at.
-Stu
spikey_nick
28th February 2005 18:45 UTC
no I'm only trying to skip one page. Here is some very stripped down code that produces the same effect, the .exe that this code compiled into can be found at http://ucsu.colorado.edu/~romanysh/skip.exe
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
;--------------------------------
;General
;Name and file
Name "skip"
OutFile "skip.exe"
LicenseData ".\PlaceholderFTLLicense.txt"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_WELCOME
page instfiles JRE_CHECK "" ""
page license
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Section "Install Java" IJAVA
SectionEnd
;-----------------------
Function JRE_CHECK
Abort
FunctionEnd
Afrow UK
1st March 2005 07:56 UTC
First thing that I found wrong with your script, is that you're using Modern UI, but you aren't using the MUI page macros:
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_PRE JRE_CHECK
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_LICENSE ".\PlaceholderFTLLicense.txt"
Still, however, Abort does not work.
So you need to use this instead:
http://nsis.sourceforge.net/archive/...ances=0,11,814
Perhaps this is a new bug.
-Stu
kichik
1st March 2005 18:40 UTC
Use SetAutoClose true before calling Abort.