Old 24th May 2006, 20:50   #1
00zero
Junior Member
 
Join Date: May 2006
Location: pittsburgh
Posts: 7
help with custom page error

im new to scripting and i made and install srcipt with HMSoft. now i need to add a custom page to ask the loaction of mathematica so it auto loads a directory. i found the custom page tutorial and i have followed it but i get an error when i compile at the MUI_INSTALLOPTIONS_READ command that ther is a problem when reading the ini string.

custom page ini
code:

; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=2

[Field 1]
Type=FileRequest
State=
Left=64
Right=186
Top=60
Bottom=73

[Field 2]
Type=Label
Text=Please select the directory where Mathematica \r\nis installed.
Left=64
Right=246
Top=40
Bottom=57



the code calling the custom page
code:

; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME ""
!define PRODUCT_VERSION ""
!define PRODUCT_PUBLISHER ""
!define PRODUCT_WEB_SITE ""
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"



; MUI 1.67 compatible ------
!include "MUI.nsh"

Function .onint
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "...\mathlocal.ini" "MathLocal"
FunctionEnd

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "COPYING.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
;Mathematica Directory Page
LangString MATHLOCAL_TITLE ${LANG_ENGLISH} "Please enter the loaction of Mathematica"
LangString MATHLOCAL_SUBTITLE ${LANG_ENGLISH} " "
Page custom mathematicaloactionpage
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Readme.txt"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\3DNS"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

#custom page
#gets directory of mathmetica
Function mathematicaloactionpage
;title
!insertmacro MUI_HEADER_TEXT "$(MATHLOCAL_TITLE)" "$(MATHLOCAL_SUBTITLE)"
;displays the custom page
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "MathLocal"
;gets the user entered values
!insertmacro MUI_INSTALLOPTIONS_READ $MathematicaDir "MathLocal" "Field 1" "State"
FunctionEnd



like i said im new and realy kind of fumbeling my way through at this point adn any help would be appreciated.

thanks
Jonathan

ps
i know there are no program names or versions that is for copyright reasons for a part of the code that still need to be run by the author
00zero is offline   Reply With Quote
Old 24th May 2006, 20:54   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
I'd suggest examine the included InstallOptions examples :-)

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 25th May 2006, 16:54   #3
00zero
Junior Member
 
Join Date: May 2006
Location: pittsburgh
Posts: 7
i got it to work.
00zero 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