44 lines
1.2 KiB
NSIS
44 lines
1.2 KiB
NSIS
Function Page_DownloadContent
|
|
nsDialogs::Create 1018
|
|
Pop $0
|
|
|
|
|
|
IfFileExists "$EXEDIR\sinfar_all_files_v30.7z" skip_hak_download
|
|
|
|
inetc::get /CAPTION "Downloading Sinfar custom content" /POPUP "Sinfar v30 Files" /QUESTION "" "https://sinfar.net/haks/sinfar_all_files_v30.7z" "$EXEDIR\sinfar_all_files_v30.7z"
|
|
Pop $0
|
|
StrCmp $0 "OK" +2
|
|
Goto download_failed
|
|
|
|
skip_hak_download:
|
|
|
|
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/8181/win32_8181.zip" "$EE_EXEPATH\sinfarLauncher.zip"
|
|
; 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 |