I have an installation file packed with NSIS, can you help me see the packaging of that file?
Announcement
Collapse
No announcement yet.
CreateIPaddress control to ini file
Collapse
X
-
-
outfile 'test_install.exe'
!include 'nsdialogs.nsh'
!include "MUI2.nsh"
Name "Program"
OutFile Program.exe
InstallDir $Temp
!insertmacro MUI_PAGE_DIRECTORY
Page custom CreatePage
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section Install
SectionEnd
Function CreatePage
!insertmacro MUI_HEADER_TEXT "Set IP address" "Please input the IP address you want to set"
nsDialogs::Create 1018
Pop $0
${If} $0 == error
Abort
${EndIf}
${NSD_CreateLabel} 0u 2u 64u 8u "IP Address:"
${NSD_CreateIPaddress} 70u 0u 80u 12u ""
nsDialogs::Show
FunctionEnd
Comment
-
PHP Code:Page custom CreatePage PageLeave
...
var ipaddrhwnd
var ipaddr
Function CreatePage
...
${NSD_CreateIPaddress} 70u 0u 80u 12u ""
Pop $ipaddrhwnd
nsDialogs::Show
FunctionEnd
Function PageLeave
${NSD_GetText} $ipaddrhwnd $ipaddr
MessageBox mb_ok $ipaddr
FunctionEnd
Section
SetOutPath $InstDir
WriteIniStr "$InstDir\config.ini" Server IP $ipaddr
SectionEnd
IntOp $PostCount $PostCount + 1
Comment
Comment