sinfar-installer/Pages/page_download_files.nsi
2025-04-20 08:56:39 -04:00

43 lines
1.0 KiB
NSIS

Function Page_DownloadContent
nsDialogs::Create 1018
Pop $0
${NSD_CreateLabel} 0 0 100% 12u "Downloading required files..."
Pop $1
${NSD_CreateProgressBar} 0 14u 100% 12u ""
Pop $2
MessageBox MB_OK "Saving to: $INSTPATH\sinfarFiles.7z"
; Real progress bar download using inetc plugin
inetc::get /CAPTION "Downloading files..." /RESUME /POPUP "" /NOCANCEL \
/FILE "$INSTPATH\sinfarFiles.7z" \
"https://sinfar.net/haks/sinfar_all_files_v30.7z"
Pop $0
StrCmp $0 "OK" +2
Goto download_failed
; Download the 7za executable (or bundle it inside installer — up to you)
;NSISdl::download "https://your.url/7za.exe" "$INSTPATH\7za.exe"
;Pop $0
;StrCmp $0 "cancel" download_failed
; Extract archive
;nsExec::ExecToLog '"$INSTPATH\7za.exe" x "$INSTPATH\sinfarFiles.7z" -o"$INSTPATH" -y'
; Delete "$INSTPATH\sinfarFiles.7z"
; Delete "$INSTPATH\7za.exe"
nsDialogs::Show
Goto done
download_failed:
MessageBox MB_ICONSTOP "Download failed or was canceled."
Abort
done:
FunctionEnd