![]() |
Problem with NSIS install
Hi
I have a problem with the install file I have made with NSIS. When I make the exe file it all works fine and I can run the Install shield and then the program that I want to install is installed. But then I place the file on a ftp server and something goes wrong. I can download the file but when I go through some of the custom made windows the install wizard freezes just before it should start installing the files. Is there any one that has had the same problem and knows how to fix it? |
Quote:
e.g. code: |
This is how I have used the custom page:
; Customer page Page custom SetCustom ValidateCustom ; Instfiles page !insertmacro MUI_PAGE_INSTFILES When I press on install from the page det install wizard freezes. the .onInit look like this Function .onInit !insertmacro MUI_LANGDLL_DISPLAY FunctionEnd I don't know way the wizard stopped working. |
yes, not extracting to $PLUGINSDIR can cause many issues, so you might want to check that all external files referenced in your code are properly extracted.
|
If you don't mind attach the script, only the 2 functions SetCustom ValidateCustom.
|
Function SetCustom
!insertmacro MUI_HEADER_TEXT "$(LABEL_TITEL)" "" !insertmacro MUI_INSTALLOPTIONS_EXTRACT "Custom.ini" !insertmacro MUI_INSTALLOPTIONS_WRITE "Custom.ini" "Field 1" "Text" "$(LABEL_NAME)" !insertmacro MUI_INSTALLOPTIONS_WRITE "Custom.ini" "Field 2" "Text" "$(LABEL_NAME_TEXT)" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "Custom.ini" FunctionEnd Function ValidateCustom ReadINIStr $0 "$PLUGINSDIR\Custom.ini" "Field 3" "State" StrCmp $0 "" message1 done message1: MessageBox MB_ICONEXCLAMATION|MB_OK "$(LABEL_MESSAGE1)" Abort done: ${GetTime} "" "LS" $3 $4 $5 $6 $7 $8 $9 ClearErrors FileOpen $2 $INSTDIR\Programs\ls.ini w IfErrors done FileWrite $2 "#X © Defaults$\r$\n" FileWrite $2 "#Date=$3/$4/$5 ($6)Time=$7:$8:$9$\r$\n" FileWrite $2 "Name=$0$\r$\n" ${WordReplace} $INSTDIR "\" "/" "+" $3 FileWrite $2 "defaultDataDir=$3/Data$\r$\n" FileWrite $2 "Company=X$\r$\n" StrCmp "1030" "$LANGUAGE" languageWriteDK languageWriteEN languageWriteDK: FileWrite $2 "defaultLanguage=da" Goto close languageWriteEN: FileWrite $2 "defaultLanguage=en" Goto close close: FileClose $2 FunctionEnd |
code: EDIT: Also I noticed that you're referring $INSTDIR on ValidateCustom function. $INSTDIR has to be initialized either in directory page (that you probably already had before the custom page), or in InstallDir if you don't include directory page. |
It seams to work but I will try to test it some on another machine tomorrow thanks for the help :)
|
| All times are GMT. The time now is 04:35. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.