Deko Servidoni
4th November 2010 16:21 UTC
Problem with UMUI
Hi everyone.
I looked in the forum, but i didn't find anything about this problem (see attachment).
When i use UMUI.nsh, on Windows Server 2008, after my script
execute a "Page custom <name function>", appears an empty window...
I don't know how to fix it.
Thks
Sorry again if i duplicate the post but
i don't find anything on the forum.
Animaether
4th November 2010 19:13 UTC
I guess this doesn't occur on XP/Vista/Win7 - have you tested this?
Without seeing the code, I wouldn't venture to guess what might be the issue directly. However, have you tried systematically removing items from your custom page (start with a blank one) to see if one of the dialog items might be the cause? If the dialog items aren't the cause, try systematically removing code from your page create/show functions (if the error occurs when you click 'next', check the leave function).
Deko Servidoni
11th November 2010 16:34 UTC
On XP/Vista/Win7 doesn't occur, only on Windows Server 2008
this occurs between "Page Custom Requisito" and "Page Custom InfoReqs"
here is my code:
;interface da instalacao
!insertmacro MUI_PAGE_WELCOME
Page Custom Requisito
Page Custom InfoReqs
!insertmacro UMUI_PAGE_SETUPTYPE
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro UMUI_PAGE_ALTERNATIVESTARTMENU Application $STARTMENU_FOLDER
!define UMUI_CONFIRMPAGE_TEXT_TITLE "Configuração atual:"
!insertmacro UMUI_PAGE_CONFIRM
!insertmacro MUI_PAGE_INSTFILES
Page Custom InfoPosInstall
!define MUI_FINISHPAGE_LINK "${COMPANY}"
!define MUI_FINISHPAGE_LINK_LOCATION "${URL}"
!insertmacro MUI_PAGE_FINISH
;interface da desinstalacao
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
;linguagem do instalador
!insertmacro MUI_LANGUAGE "PortugueseBR"
Function InfoReqs
; abrindo arquivo .ini
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "${REQINSTALLFILE}"
; escrevendo no arquivo .ini
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 7" "Text" "$WINVER"
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 8" "Text" "$DNFVER"
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 9" "Text" "$JAVVER"
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 13" "Text" "$SO"
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 14" "Text" "$DOTNET"
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 15" "Text" "$JAVA"
; escrevendo a mensagen de OK ou ERRO, e indicando qual e/ou quais sao as causas
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 10" "Text" "$MSG"
${If} "$DOTNET" == "ERRO"
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 11" "Text" "$MSGDN"
${EndIf}
${If} "$JAVA" == "ERRO"
!insertmacro INSTALLOPTIONS_WRITE "${REQINSTALLFILE}" "Field 12" "Text" "$MSGJ"
${EndIf}
; titulo e subtitulo da pagina
!insertmacro MUI_HEADER_TEXT "Pré-requisitos de funcionamento"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "${REQINSTALLFILE}"
${If} "$DOTNET" == "ERRO"
${OrIf} "$JAVA" == "ERRO"
MessageBox MB_OK|MB_ICONSTOP "Finalizando instalador."
Quit
${EndIf}
FunctionEnd
T.Slappy
18th November 2010 08:26 UTC
I am not sure about this, but is it possible to mix MUI and UMUI pages?
Anyway: when you create a custom page, it MUST have a creator function.
It should look like this:
Function customPage
GetTempFileName $R0
File /oname=$R0 customPage.ini ; <<< HERE is ini file with definition of dialog controls
InstallOptions::dialog $R0 ; << here the dialog is created
Pop $R1
StrCmp $R1 "cancel" done
StrCmp $R1 "back" done
StrCmp $R1 "success" done
error: MessageBox MB_OK|MB_ICONSTOP "InstallOptions error:$\r$\n$R1"
done:
FunctionEnd
This function must be set for each custom page you have - in your case they should be named 'Requisito' and 'InfoReqs'
See section 4.5.4 Page in NSIS help -
http://nsis.sourceforge.net/Docs/Chapter4.html#4.5.4
Please post that code for your installer - maybe you do something wrong in those functions because I can see only some writing to the INI files and actually no code for dialog creating
By the way: For Modern UI 2 it is better to avoid using of these old .ini fiels and use nsDialogs instead of it.
Deko Servidoni
23rd November 2010 15:29 UTC
T.Slappy thanks for the help but i found the problem...
The problem occurs on the another part of the code:
GetVersion::WindowsType
Pop $0
StrCpy $WINVER "$WINVER $0"
So i used another method to get information about the windows and fix the problem.
Thanks :)