From e9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Wed, 16 Jan 2019 00:35:20 +1100 Subject: Abort on download error --- appveyor/build.bat | 1 + installer/background.svg | 100 ++++++++++---------- installer/backgrounds/thePhoto.svg | 165 ++++++++++++++++++++++++++++++++ installer/backgrounds/theSlate.svg | 181 ++++++++++++++++++++++++++++++++++++ installer/metadata.txt | 1 + installer/process/installworker.cpp | 4 + installer/translations/en_AU.ts | 16 ++-- installer/translations/en_GB.ts | 16 ++-- installer/translations/en_NZ.ts | 16 ++-- installer/translations/en_US.ts | 16 ++-- installer/translations/pt_BR.ts | 16 ++-- installer/translations/vi_VN.ts | 16 ++-- 12 files changed, 453 insertions(+), 95 deletions(-) create mode 100644 installer/backgrounds/thePhoto.svg create mode 100644 installer/backgrounds/theSlate.svg diff --git a/appveyor/build.bat b/appveyor/build.bat index 3bfd0a9..062f912 100644 --- a/appveyor/build.bat +++ b/appveyor/build.bat @@ -30,6 +30,7 @@ echo *********************************************************** if not exist "deploy" mkdir deploy set DEPLOY=%cd%\deploy echo %~2 > installer\metadata.txt +copy /y installer\backgrounds\%~2.svg installer\background.svg mkdir %~1 pushd %~1 qmake ..\theInstaller.pro "LIBS += -L\"%ZLIBDIR%\"" "INCLUDEPATH += \"%ZLIBINCLUDEDIR%\"" diff --git a/installer/background.svg b/installer/background.svg index ec2022a..a540cdc 100644 --- a/installer/background.svg +++ b/installer/background.svg @@ -43,6 +43,37 @@ id="linearGradient5498" xlink:href="#linearGradient5496" inkscape:collect="always" /> + + + + + + - + - - - - - - - - - + y="187.69438" + x="104.77925" + sodipodi:role="line">thePhoto diff --git a/installer/backgrounds/thePhoto.svg b/installer/backgrounds/thePhoto.svg new file mode 100644 index 0000000..464d472 --- /dev/null +++ b/installer/backgrounds/thePhoto.svg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + thePhoto + + + diff --git a/installer/backgrounds/theSlate.svg b/installer/backgrounds/theSlate.svg new file mode 100644 index 0000000..1731d7e --- /dev/null +++ b/installer/backgrounds/theSlate.svg @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/installer/metadata.txt b/installer/metadata.txt index e69de29..dded0ca 100644 --- a/installer/metadata.txt +++ b/installer/metadata.txt @@ -0,0 +1 @@ +http://vicr123.com/theslate/theinstaller/installer.json diff --git a/installer/process/installworker.cpp b/installer/process/installworker.cpp index a297420..d4f5c5b 100644 --- a/installer/process/installworker.cpp +++ b/installer/process/installworker.cpp @@ -91,6 +91,10 @@ bool InstallWorker::startWork() { lastBytesReceived = 0; lastTimeUpdate = QDateTime::fromMSecsSinceEpoch(0); connect(reply, &QNetworkReply::finished, [=] { + if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() != 200) { + QApplication::exit(1); + return; + } packageFile.flush(); packageFile.seek(0); diff --git a/installer/translations/en_AU.ts b/installer/translations/en_AU.ts index 523097c..ad52e4f 100644 --- a/installer/translations/en_AU.ts +++ b/installer/translations/en_AU.ts @@ -5,27 +5,27 @@ InstallWorker - + Downloading %1... - + Unpacking %1... - + Configuring %1... - + %1 of %2 - + %n days remaining %n day remaining @@ -33,7 +33,7 @@ - + %n hours remaining %n hour remaining @@ -41,7 +41,7 @@ - + %n minutes remaining %n minute remaining @@ -49,7 +49,7 @@ - + %n seconds remaining %n second remaining diff --git a/installer/translations/en_GB.ts b/installer/translations/en_GB.ts index 0fea2cb..c5c91fa 100644 --- a/installer/translations/en_GB.ts +++ b/installer/translations/en_GB.ts @@ -5,27 +5,27 @@ InstallWorker - + Downloading %1... - + Unpacking %1... - + Configuring %1... - + %1 of %2 - + %n days remaining %n day remaining @@ -33,7 +33,7 @@ - + %n hours remaining %n hour remaining @@ -41,7 +41,7 @@ - + %n minutes remaining %n minute remaining @@ -49,7 +49,7 @@ - + %n seconds remaining %n second remaining diff --git a/installer/translations/en_NZ.ts b/installer/translations/en_NZ.ts index aa563f1..3ebdf8d 100644 --- a/installer/translations/en_NZ.ts +++ b/installer/translations/en_NZ.ts @@ -5,27 +5,27 @@ InstallWorker - + Downloading %1... - + Unpacking %1... - + Configuring %1... - + %1 of %2 - + %n days remaining %n day remaining @@ -33,7 +33,7 @@ - + %n hours remaining %n hour remaining @@ -41,7 +41,7 @@ - + %n minutes remaining %n minute remaining @@ -49,7 +49,7 @@ - + %n seconds remaining %n second remaining diff --git a/installer/translations/en_US.ts b/installer/translations/en_US.ts index 0a5b43a..318121f 100644 --- a/installer/translations/en_US.ts +++ b/installer/translations/en_US.ts @@ -5,27 +5,27 @@ InstallWorker - + Downloading %1... - + Unpacking %1... - + Configuring %1... - + %1 of %2 - + %n days remaining %n day remaining @@ -33,7 +33,7 @@ - + %n hours remaining %n hour remaining @@ -41,7 +41,7 @@ - + %n minutes remaining %n minute remaining @@ -49,7 +49,7 @@ - + %n seconds remaining %n second remaining diff --git a/installer/translations/pt_BR.ts b/installer/translations/pt_BR.ts index 9da94dd..7e66436 100644 --- a/installer/translations/pt_BR.ts +++ b/installer/translations/pt_BR.ts @@ -5,27 +5,27 @@ InstallWorker - + Downloading %1... Baixando %1… - + Unpacking %1... Descompactando %1… - + Configuring %1... Configurando %1… - + %1 of %2 %1 de %2 - + %n days remaining %n dia restante @@ -33,7 +33,7 @@ - + %n hours remaining %n hora restante @@ -41,7 +41,7 @@ - + %n minutes remaining %n minuto restante @@ -49,7 +49,7 @@ - + %n seconds remaining %n segundo restante diff --git a/installer/translations/vi_VN.ts b/installer/translations/vi_VN.ts index 30e0850..d785ade 100644 --- a/installer/translations/vi_VN.ts +++ b/installer/translations/vi_VN.ts @@ -5,48 +5,48 @@ InstallWorker - + Downloading %1... Đang tải xuống %1... - + Unpacking %1... Đang giải nén %1... - + Configuring %1... Đang cấu hình %1... - + %1 of %2 %1 trén %2 - + %n days remaining Còn %n ngày - + %n hours remaining Còn %n tiếng - + %n minutes remaining Còn %n phút - + %n seconds remaining Còn %n giay -- cgit v1.2.3