aboutsummaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
Diffstat (limited to 'installer')
-rw-r--r--installer/main.cpp22
-rw-r--r--installer/mainwindow.cpp18
-rw-r--r--installer/mainwindow.h4
-rw-r--r--installer/translations/en_AU.ts12
-rw-r--r--installer/translations/en_GB.ts12
-rw-r--r--installer/translations/en_NZ.ts12
-rw-r--r--installer/translations/en_US.ts12
-rw-r--r--installer/translations/pt_BR.qmbin111 -> 5885 bytes
-rw-r--r--installer/translations/pt_BR.ts44
-rw-r--r--installer/translations/vi_VN.qmbin4905 -> 5921 bytes
-rw-r--r--installer/translations/vi_VN.ts12
11 files changed, 91 insertions, 57 deletions
diff --git a/installer/main.cpp b/installer/main.cpp
index e1ebadf..a36d8a5 100644
--- a/installer/main.cpp
+++ b/installer/main.cpp
@@ -26,7 +26,15 @@ int main(int argc, char *argv[])
qsrand(QDateTime::currentMSecsSinceEpoch());
qDebug() << a.arguments();
- if (a.arguments().contains("--install")) {
+ if (a.arguments().contains("--update-from-app")) {
+ //Install UI mode (triggered from update action inside app)
+
+ MainWindow w;
+ w.setAutoProgress(true);
+ w.show();
+
+ return a.exec();
+ } else if (a.arguments().contains("--install")) {
//Installer mode
InstallWorker worker;
if (!worker.startWork()) return 1;
@@ -86,13 +94,13 @@ int main(int argc, char *argv[])
box.exec();
return 1;
}
- }
-
- //Install UI mode
- MainWindow w;
- w.show();
+ } else {
+ //Install UI mode
+ MainWindow w;
+ w.show();
- return a.exec();
+ return a.exec();
+ }
}
QString calculateSize(quint64 size) {
diff --git a/installer/mainwindow.cpp b/installer/mainwindow.cpp
index a739455..e66e273 100644
--- a/installer/mainwindow.cpp
+++ b/installer/mainwindow.cpp
@@ -152,7 +152,11 @@ void MainWindow::getInstallerMetadata() {
ui->licenseLabel->setVisible(false);
}
- ui->stack->setCurrentIndex(2);
+ if (autoProgress) {
+ ui->installButton->click();
+ } else {
+ ui->stack->setCurrentIndex(2);
+ }
});
connect(reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error), [=](QNetworkReply::NetworkError code) {
ui->metadataErrorLabel->setText(tr("Couldn't retrieve metadata"));
@@ -288,7 +292,13 @@ void MainWindow::on_installButton_clicked()
installDone = true;
this->setWindowFlag(Qt::WindowCloseButtonHint, true);
this->show();
- ui->stack->setCurrentIndex(5);
+
+ if (autoProgress) {
+ ui->openCheckbox->setChecked(true);
+ ui->finishButton->click();
+ } else {
+ ui->stack->setCurrentIndex(5);
+ }
taskbarButton->progress()->setVisible(false);
} else if (parts.at(0) == "ALERT") {
@@ -440,3 +450,7 @@ void MainWindow::on_licenseLabel_linkActivated(const QString &link)
{
licenseWidget->show(link, this->licenses.value(link));
}
+
+void MainWindow::setAutoProgress(bool autoProgress) {
+ this->autoProgress = autoProgress;
+}
diff --git a/installer/mainwindow.h b/installer/mainwindow.h
index fbbeb8b..dec5600 100644
--- a/installer/mainwindow.h
+++ b/installer/mainwindow.h
@@ -38,6 +38,9 @@ class MainWindow : public QMainWindow
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
+ public slots:
+ void setAutoProgress(bool autoProgress);
+
private slots:
void on_installOptions_clicked();
@@ -79,6 +82,7 @@ class MainWindow : public QMainWindow
QWinTaskbarButton* taskbarButton;
QLocalSocket* sock = nullptr;
bool installDone = false;
+ bool autoProgress = false;
LicenseWidget* licenseWidget;
QMap<QString, QString> licenses;
diff --git a/installer/translations/en_AU.ts b/installer/translations/en_AU.ts
index 5f44930..523097c 100644
--- a/installer/translations/en_AU.ts
+++ b/installer/translations/en_AU.ts
@@ -215,32 +215,32 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="158"/>
+ <location filename="../mainwindow.cpp" line="162"/>
<source>Couldn&apos;t retrieve metadata</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="162"/>
+ <location filename="../mainwindow.cpp" line="166"/>
<source>Couldn&apos;t connect securely to the server</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>%1 currently running</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>Before we continue, you&apos;ll need to close %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="256"/>
+ <location filename="../mainwindow.cpp" line="260"/>
<source>Getting ready to install %1...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="296"/>
+ <location filename="../mainwindow.cpp" line="306"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
diff --git a/installer/translations/en_GB.ts b/installer/translations/en_GB.ts
index 1532ccc..0fea2cb 100644
--- a/installer/translations/en_GB.ts
+++ b/installer/translations/en_GB.ts
@@ -215,32 +215,32 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="158"/>
+ <location filename="../mainwindow.cpp" line="162"/>
<source>Couldn&apos;t retrieve metadata</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="162"/>
+ <location filename="../mainwindow.cpp" line="166"/>
<source>Couldn&apos;t connect securely to the server</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>%1 currently running</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>Before we continue, you&apos;ll need to close %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="256"/>
+ <location filename="../mainwindow.cpp" line="260"/>
<source>Getting ready to install %1...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="296"/>
+ <location filename="../mainwindow.cpp" line="306"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
diff --git a/installer/translations/en_NZ.ts b/installer/translations/en_NZ.ts
index 4974953..aa563f1 100644
--- a/installer/translations/en_NZ.ts
+++ b/installer/translations/en_NZ.ts
@@ -215,32 +215,32 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="158"/>
+ <location filename="../mainwindow.cpp" line="162"/>
<source>Couldn&apos;t retrieve metadata</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="162"/>
+ <location filename="../mainwindow.cpp" line="166"/>
<source>Couldn&apos;t connect securely to the server</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>%1 currently running</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>Before we continue, you&apos;ll need to close %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="256"/>
+ <location filename="../mainwindow.cpp" line="260"/>
<source>Getting ready to install %1...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="296"/>
+ <location filename="../mainwindow.cpp" line="306"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
diff --git a/installer/translations/en_US.ts b/installer/translations/en_US.ts
index 78c941c..0a5b43a 100644
--- a/installer/translations/en_US.ts
+++ b/installer/translations/en_US.ts
@@ -215,32 +215,32 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="158"/>
+ <location filename="../mainwindow.cpp" line="162"/>
<source>Couldn&apos;t retrieve metadata</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="162"/>
+ <location filename="../mainwindow.cpp" line="166"/>
<source>Couldn&apos;t connect securely to the server</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>%1 currently running</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>Before we continue, you&apos;ll need to close %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="256"/>
+ <location filename="../mainwindow.cpp" line="260"/>
<source>Getting ready to install %1...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="296"/>
+ <location filename="../mainwindow.cpp" line="306"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
diff --git a/installer/translations/pt_BR.qm b/installer/translations/pt_BR.qm
index c2e08c5..9472a44 100644
--- a/installer/translations/pt_BR.qm
+++ b/installer/translations/pt_BR.qm
Binary files differ
diff --git a/installer/translations/pt_BR.ts b/installer/translations/pt_BR.ts
index 7207494..9da94dd 100644
--- a/installer/translations/pt_BR.ts
+++ b/installer/translations/pt_BR.ts
@@ -27,27 +27,35 @@
<message numerus="yes">
<location filename="../process/installworker.cpp" line="204"/>
<source>%n days remaining</source>
- <translation><numerusform>%n dia restante</numerusform>
- <numerusform>%n dias restantes</numerusform>
- </translation></message>
+ <translation>
+ <numerusform>%n dia restante</numerusform>
+ <numerusform>%n dias restantes</numerusform>
+ </translation>
+ </message>
<message numerus="yes">
<location filename="../process/installworker.cpp" line="206"/>
<source>%n hours remaining</source>
- <translation><numerusform>%n hora restante</numerusform>
- <numerusform>%n horas restantes</numerusform>
- </translation></message>
+ <translation>
+ <numerusform>%n hora restante</numerusform>
+ <numerusform>%n horas restantes</numerusform>
+ </translation>
+ </message>
<message numerus="yes">
<location filename="../process/installworker.cpp" line="208"/>
<source>%n minutes remaining</source>
- <translation><numerusform>%n minuto restante</numerusform>
- <numerusform>%n minutos restantes</numerusform>
- </translation></message>
+ <translation>
+ <numerusform>%n minuto restante</numerusform>
+ <numerusform>%n minutos restantes</numerusform>
+ </translation>
+ </message>
<message numerus="yes">
<location filename="../process/installworker.cpp" line="210"/>
<source>%n seconds remaining</source>
- <translation><numerusform>%n segundo restante</numerusform>
- <numerusform>%n segundos restantes</numerusform>
- </translation></message>
+ <translation>
+ <numerusform>%n segundo restante</numerusform>
+ <numerusform>%n segundos restantes</numerusform>
+ </translation>
+ </message>
</context>
<context>
<name>MainWindow</name>
@@ -207,32 +215,32 @@
<translation>Instalando %1, você está concordando com os termos da %2.</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="158"/>
+ <location filename="../mainwindow.cpp" line="162"/>
<source>Couldn&apos;t retrieve metadata</source>
<translation>Não pode receber metadata</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="162"/>
+ <location filename="../mainwindow.cpp" line="166"/>
<source>Couldn&apos;t connect securely to the server</source>
<translation>Não pode estabelecer uma conexão segura com o servidor</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>%1 currently running</source>
<translation>%1 rodando</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>Before we continue, you&apos;ll need to close %1.</source>
<translation>Antes de continuar, você precisará fechar %1.</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="256"/>
+ <location filename="../mainwindow.cpp" line="260"/>
<source>Getting ready to install %1...</source>
<translation>Preparando para instalar %1…</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="296"/>
+ <location filename="../mainwindow.cpp" line="306"/>
<source>Warning</source>
<translation>Atenção</translation>
</message>
diff --git a/installer/translations/vi_VN.qm b/installer/translations/vi_VN.qm
index f35e2e7..597cb58 100644
--- a/installer/translations/vi_VN.qm
+++ b/installer/translations/vi_VN.qm
Binary files differ
diff --git a/installer/translations/vi_VN.ts b/installer/translations/vi_VN.ts
index ca1c596..30e0850 100644
--- a/installer/translations/vi_VN.ts
+++ b/installer/translations/vi_VN.ts
@@ -211,32 +211,32 @@
<translation>Khi bạn cài đặt %1, bạn sẽ đồng ý với các điều khoản của cái %2.</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="158"/>
+ <location filename="../mainwindow.cpp" line="162"/>
<source>Couldn&apos;t retrieve metadata</source>
<translation>Không nhận siêu dữ liệu được</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="162"/>
+ <location filename="../mainwindow.cpp" line="166"/>
<source>Couldn&apos;t connect securely to the server</source>
<translation>Không kết nối an toàn đến máy chủ được</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>%1 currently running</source>
<translation>%1 đang chạy</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="244"/>
+ <location filename="../mainwindow.cpp" line="248"/>
<source>Before we continue, you&apos;ll need to close %1.</source>
<translation>Trước khi chúng tôi tiếp tục được, bạn sẽ cần đóng %1.</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="256"/>
+ <location filename="../mainwindow.cpp" line="260"/>
<source>Getting ready to install %1...</source>
<translation>Đang chuẩn bị cài đặt %1...</translation>
</message>
<message>
- <location filename="../mainwindow.cpp" line="296"/>
+ <location filename="../mainwindow.cpp" line="306"/>
<source>Warning</source>
<translation>Cảnh báo</translation>
</message>