diff --git a/FlightGear-i18n.iss b/FlightGear-i18n.iss index a5c3a88..180dca0 100644 --- a/FlightGear-i18n.iss +++ b/FlightGear-i18n.iss @@ -17,6 +17,9 @@ ExtractingDownloadContentTitle=Extracting downloaded content ExtractingDownloadContentMessage=This step will perform extraction of the downloaded content ExtractingDownloadedFile=Extracting file UntarringDownloadedFile=Untarring file +ErrorDownloadingFile=Error downloading file from the web repository. Error details: %s +NotEnoughSpaceOnInstallationDisk=Not enough space on the destination disk. At least 6GB is needed. +NotEnoughSpaceOnTemporaryDisk=Not enough space on the temporary folder disk. At least 6GB is needed. pl.CreateDesktopIcon=Utwórz ikony na pulpicie pl.CreateDesktopIconGroup=Dodatkowe ikony: @@ -28,6 +31,7 @@ pl.ExtractingDownloadContentTitle=Rozpakowywanie pobranej dodatkowej treści pl.ExtractingDownloadContentMessage=Ten krok rozpakuje pobraną dodatkową treść pl.ExtractingDownloadedFile=Rozpakowywanie pliku pl.UntarringDownloadedFile=Roztarowanie pliku +pl.ErrorDownloadingFile=Błąd pobierania pliku z repozytorium web. Szczegóły błędu: %s es.CreateDesktopIcon=Crear icono en el escritorio es.RemoveAllSettings=Borrar todos los ajustes, escenarios y aviones descargados diff --git a/FlightGear.iss b/FlightGear.iss index 3c94e3c..7f45664 100644 --- a/FlightGear.iss +++ b/FlightGear.iss @@ -33,6 +33,7 @@ ; #define OTSoNumber "3" ; #define FGDetails "-nightly" ; #define IncludeData "FALSE" +; #define IncludeWeb "FALSE" ; ; Uninstall procedure with --uninstall flag: ; executed by fgfs.exe (fg_init.cxx): @@ -150,6 +151,7 @@ var DoCleanCheckbox : TNewCheckBox; CleanHelp : TNewStaticText; DownloadPage: TDownloadWizardPage; + DownloadPageId: Integer; ExtractDownload: TOutputProgressWizardPage; ResultCode: Integer; @@ -164,6 +166,7 @@ end; procedure InitializeWizard; begin DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnDownloadProgress); + DownloadPageId := DownloadPage.ID; ExtractDownload := CreateOutputProgressPage(ExpandConstant('{cm:ExtractingDownloadContentTitle}'), ExpandConstant('{cm:ExtractingDownloadContentMessage}')); end; @@ -270,11 +273,58 @@ begin end; end; +function ShouldSkipPage(PageID: Integer): Boolean; +begin; + if (PageID = DownloadPageId) then + begin + if (ExpandConstant('{#IncludeWeb}') = 'FALSE') then begin + Result := True; + end else begin + Result := False; + end + end + else + begin + Result := False; + end; +end; + function NextButtonClick(CurPageID: Integer): Boolean; var fgDataInstalled: Cardinal; + diskFreeMB, diskTotalMB: Cardinal; begin - if CurPageID = wpReady then begin + if CurPageID = wpSelectDir then begin + // check disk free space - installationFolder + if GetSpaceOnDisk(ExpandConstant('{app}'), True, diskFreeMB, diskTotalMB) then + begin + if diskFreeMB < 6000 then begin + MsgBox(ExpandConstant('{cm:NotEnoughSpaceOnInstallationDisk}'), mbError, MB_OK); + Result := False; + end + else begin + Result := True; + end; + end; + + // check disk free space - tempFolder + if GetSpaceOnDisk(ExpandConstant('{tmp}'), True, diskFreeMB, diskTotalMB) then + begin + if diskFreeMB < 6000 then begin + MsgBox(ExpandConstant('{cm:NotEnoughSpaceOnTemporaryDisk}'), mbError, MB_OK); + Result := False; + end + else begin + Result := True; + end; + end; + + // if cannot determine disk size, defaults to move on + if diskFreeMB = 0 then begin + Result := True; + end; + end + else if CurPageID = wpReady then begin DownloadPage.Clear; fgDataInstalled := 0; @@ -336,7 +386,7 @@ begin //if DownloadPage.AbortedByUser then // Log('Aborted by user.') //else - SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError, MB_OK, IDOK); + SuppressibleMsgBox(Format(ExpandConstant('{cm:ErrorDownloadingFile}'), [AddPeriod(GetExceptionMessage)]), mbCriticalError, MB_OK, IDOK); Result := False; end; finally diff --git a/build_release_windows.bat b/build_release_windows.bat index 4353e03..ebab932 100755 --- a/build_release_windows.bat +++ b/build_release_windows.bat @@ -155,6 +155,11 @@ IF %IS_NIGHTLY_BUILD% EQU 1 ( CALL :writeBaseConfig CALL :writeReleaseConfig iscc /Q FlightGear.iss + + REM FlightGear release: with fgdata web installer, output filename would be "FlightGear-x.x.x-web.exe" + CALL :writeBaseConfig + CALL :writeReleaseWebConfig + iscc /Q FlightGear.iss ) GOTO End @@ -173,6 +178,13 @@ ECHO #define FGDetails "" >> InstallConfig.iss ECHO #define IncludeData "TRUE" >> InstallConfig.iss GOTO End +:writeReleaseWebConfig +CALL :writeBaseConfig +ECHO #define FGDetails "-web" >> InstallConfig.iss +ECHO #define IncludeData "FALSE" >> InstallConfig.iss +ECHO #define IncludeWeb "TRUE" >> InstallConfig.iss +GOTO End + :writeNightlyFullConfig CALL :writeBaseConfig ECHO #define FGDetails "-nightly-full" >> InstallConfig.iss