sbellon
27th April 2005 14:12 UTC
Custom page problem with 2.06
I had a NSIS installer working with Modern UI and one custom page with NSIS 2.04, running with wine from Debian Linux. Now, Debian ships a Linux-native version of NSIS 2.06 and the installer doesn't show the custom page anymore. The rest is working fine. I wonder whether it's a change between 2.04 and 2.06 or whether the Linux version has a problem.
The relevant part of the install script looks like this:
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "LICENSE.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
Page custom LicenseKeyInstallation ""
!insertmacro MUI_PAGE_FINISH
; later on
Var TempFile
Function LicenseKeyInstallation
GetTempFileName $TempFile
File /oname=$TempFile "win32\instkey.ini"
!insertmacro MUI_HEADER_TEXT "Install License Key" \
"Now you can optionally install your license key."
Push $R0
InstallOptions::dialog $TempFile
Pop $R0
StrCmp $R0 "success" 0 isNotSuccess
ReadINIStr $R0 $TempFile "Field 2" "State"
StrCmp $R0 "" isNotSuccess
CopyFiles /SILENT $R0 "$INSTDIR\license.key"
isNotSuccess:
Delete $TempFile
FunctionEnd
Previously (with makensis 2.04, using wine from Linux) it created an installer that showed that custom page and you could enter a file or leave it blank. Now, with native 2.06 on Linux that page does not appear at all. And the final "Installation finished, click to exit" page does not appear either.
kichik
28th April 2005 18:06 UTC
Make sure the INI file has Windows line endings. Windows doesn't seem to like INI files with just LF.
sbellon
29th April 2005 15:24 UTC
Ok, I just checked that.
But even if I don't use a custom page, the installer terminates after the MUI_PAGE_INSTFILES page without any other page. If I don't add a custom page, the MUI_PAGE_FINISH page is not displayed either. The installer scripts do have DOS endings. I checked with wine and 2.06 and that works.
So, it's in fact a problem with the Linux version: 2.06 windows works (even under wine), but 2.06 native Linux doesn't.
Any further ideas?
kichik
29th April 2005 16:19 UTC
Does the custom page show now, or did already have Windows line endings?
The finish page's INI file also needs to have Windows line endings. The file is located at /path/to/nsis/Contrib/Modern UI/ioSpecial.ini. The script doesn't need Windows line endings because makensis parses it and not Windows.
sbellon
29th April 2005 16:57 UTC
Changing the line endings of the custom page's .ini file didn't change anything. The .ini file of the finish page has already DOS line endings.
Are you saying you are using Modern UI successfully by building installers from Linux?
kichik
29th April 2005 22:39 UTC
Using the original package, I have no problems building scripts using the Modern UI. It works with custom, welcome and finish pages. It might be a problem with the InstallOptions plug-in compiled under MinGW, or one of the patches applied to the Debian package. You should submit a bug report to the package maintainer.