Old 6th March 2010, 09:28   #1
hellik
Junior Member
 
Join Date: Mar 2010
Posts: 14
functions in the finish page

Hi,

I'm very new to the great NSIS-scripting system.

first i've tried following two functions in my installer script. they are working and launch the application and the open the html-file.

+---
;README after successfull install

Function .onInstSuccess

MessageBox MB_YESNO "Installation was sucessfull. Do you want to see the GRASS ${DEV65_VERSION_NUMBER} Reference Manual" IDNO NoReadme
ExecShell "open" "$INSTALL_DIR\docs\html\index.html"
NoReadme:

FunctionEnd
;---
;start Grass Gis after closing installation wizard

Function .onGUIEnd

MessageBox MB_YESNO "Do you want to start GRASS ${DEV65_VERSION_NUMBER}?" IDNO NoGrassStart
Exec '"$INSTALL_DIR\${GRASS_COMMAND}.bat" "-wxpython"'
NoGrassStart:

FunctionEnd
;---

now i want to integrate this in finish page:

[...]
;These indented statements modify settings for MUI_PAGE_FINISH
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_RUN_TEXT "Launch Grass"
!define MUI_FINISHPAGE_RUN_FUNCTION LaunchGrass
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ReadManual
!insertmacro MUI_PAGE_FINISH
[...]
;---

Function LaunchGrass

Exec '"$INSTALL_DIR\${GRASS_COMMAND}.bat" "-wxpython"'

FunctionEnd

;---

Function ReadManual

ExecShell "open" "$INSTALL_DIR\docs\html\index.html"

FunctionEnd

;---

now during compiling the nsis-script I get following error message:

2 warnings:
unknown variable/constant "INSTALL_DIR\grass65svn.bat"" detected, ignoring (C:\temp\GRASS-Installer.nsi:383)
unknown variable/constant "INSTALL_DIR\docs\html\index.html" detected, ignoring (C:\temp\GRASS-Installer.nsi:391)

best regards
Helmut
hellik is offline   Reply With Quote
Old 7th March 2010, 01:59   #2
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
Do you have Var INSTALL_DIR somewhere in the script?

InstallDir/InstallDirRegKey use the variable $INSTDIR, maybe that was the one you were looking for?
redxii is offline   Reply With Quote
Old 7th March 2010, 07:26   #3
hellik
Junior Member
 
Join Date: Mar 2010
Posts: 14
thanks! it works now.

best regards
Helmut
hellik 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