sinfar-installer/Pages/page_download_files.nsi
2025-04-20 15:30:51 -04:00

42 lines
1.1 KiB
NSIS

Function Page_DownloadContent
nsDialogs::Create 1018
Pop $0
inetc::get /CAPTION "Downloading Sinfar custom content" /POPUP "Sinfar v30 Files" /QUESTION "" "https://sinfar.net/haks/sinfar_all_files_v30.7z" "$INSTPATH\sinfarFiles.7z"
Pop $0
StrCmp $0 "OK" +2
Goto download_failed
StrCmp $INSTALL_TYPE "diamond" diamond_download ee_download
diamond_download:
inetc::get /CAPTION "Downloading Sinfar Diamond Launcher" /POPUP "Sinfarx launcher" /QUESTION "" "https://nwn.sinfar.net/files/sinfarx.exe" "$INSTPATH\sinfarx.exe"
Pop $0
StrCmp $0 "OK" +2
Goto download_failed
Goto after_download
ee_download:
inetc::get /CAPTION "Downloading Sinfar EE Launcher" /POPUP "Sinfarx launcher" /QUESTION "" "https://nwn.sinfar.net/files/sinfarx_ee.exe" "$INSTPATH\sinfarx.exe"
Pop $0
StrCmp $0 "OK" +2
Goto download_failed
after_download:
${NSD_CreateLabel} 0 0 100% 12u "Ready to install Sinfar for Neverwinter Nights : $INSTALL_TYPE"
Pop $1
nsDialogs::Show
Goto done
download_failed:
MessageBox MB_ICONSTOP "Download failed or was cancelled. Install process will stop."
Abort
done:
FunctionEnd