annotate ui/createinstallerdialog.cpp @ 541:1cddf87f8f83

ix variable path seperator
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 29 Apr 2014 18:08:51 +0000
parents 81d6657757f3
children 421b69eeffe3
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 361
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 361
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 361
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 361
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 361
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 361
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 361
diff changeset
7 */
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8 #include "createinstallerdialog.h"
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 #include <QDebug>
526
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
10 #include <QTextEdit>
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11 #include <QDir>
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 #include <QPushButton>
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 #include <QGroupBox>
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 #include <QHBoxLayout>
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 #include <QVBoxLayout>
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 #include <QLabel>
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 #include <QFileDialog>
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
18 #include <QSettings>
526
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
19 #include <QStyle>
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
20 #include <QApplication>
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
21 #include <QMessageBox>
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 CreateInstallerDialog::CreateInstallerDialog(QMainWindow *parent) :
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
24 QDialog(parent),
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
25 mProgress(this)
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 {
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
27 QSettings settings;
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
28 setWindowTitle(tr("Create binary installer"));
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29 setupGUI();
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
30 resize(500, 250);
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
31 mCertFile->setText(settings.value("CodeSignCert", QString()).toString());
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
32 mBinaryFolder->setText(settings.value("LastBinaryFolder", QString()).toString());
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
33 mSaveFile->setText(settings.value("LastBinOutputFolder", QString()).toString());
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
34
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
35 connect(&mNSISProc, SIGNAL(finished(int, QProcess::ExitStatus)),
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
36 this, SLOT(processFinished(int, QProcess::ExitStatus)));
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
37 connect(&mNSISProc, SIGNAL(error(QProcess::ProcessError)),
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
38 this, SLOT(processError(QProcess::ProcessError)));
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
39 }
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
40
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
41 void CreateInstallerDialog::setupGUI()
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
42 {
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
43 /* Top level layout / widgets */
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
44 QVBoxLayout *topLayout = new QVBoxLayout;
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
45 QVBoxLayout *headerLayout = new QVBoxLayout;
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
46 QHBoxLayout *headerSubLayout = new QHBoxLayout;
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
47 QHBoxLayout *centerLayout = new QHBoxLayout;
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
48 QHBoxLayout *bottomLayout = new QHBoxLayout;
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
49 QVBoxLayout *labelLayout = new QVBoxLayout;
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
50 QVBoxLayout *fieldLayout = new QVBoxLayout;
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
51 QVBoxLayout *buttonLayout = new QVBoxLayout;
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
52
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
53 QLabel *header = new QLabel("<h3>" + tr("Create binary installer") + "</h3>");
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
54 QLabel *description = new QLabel(
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
55 tr("Create and sign a TrustBridge binary installer."));
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
56 headerSubLayout->insertSpacing(0, 40);
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
57 headerSubLayout->addWidget(description);
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
58 QFrame *headerSeparator = new QFrame();
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
59 headerSeparator->setFrameShape(QFrame::HLine);
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
60 headerSeparator->setFrameShadow(QFrame::Sunken);
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
61 headerLayout->addWidget(header);
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
62 headerLayout->addLayout(headerSubLayout);
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
63 headerLayout->addWidget(headerSeparator);
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
64 headerLayout->insertSpacing(4, 10);
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
65
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
66 QLabel *archiveLabel = new QLabel(tr("Select binary folder:"));
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
67 QLabel *certLabel = new QLabel(tr("Select code signing certificate:"));
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
68 QLabel *saveLabel = new QLabel(tr("Select output folder:"));
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
69 labelLayout->addWidget(archiveLabel);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
70 labelLayout->addWidget(certLabel);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
71 labelLayout->addWidget(saveLabel);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
72
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
73 mBinaryFolder = new QLineEdit();
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
74 mCertFile = new QLineEdit();
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
75 mSaveFile = new QLineEdit();
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
76 fieldLayout->addWidget(mBinaryFolder);
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
77 fieldLayout->addWidget(mCertFile);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
78 fieldLayout->addWidget(mSaveFile);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
79
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
80 QPushButton *archiveSelect = new QPushButton("...");
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
81 connect(archiveSelect, SIGNAL(clicked()), this, SLOT(openFolderSelect()));
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
82 archiveSelect->setFixedWidth(30);
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
83 QPushButton *certSelect = new QPushButton("...");
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
84 connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect()));
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
85 certSelect->setFixedWidth(30);
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
86 QPushButton *saveSelect = new QPushButton("...");
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
87 connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation()));
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
88 saveSelect->setFixedWidth(30);
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
89 buttonLayout->addWidget(archiveSelect);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
90 buttonLayout->addWidget(certSelect);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
91 buttonLayout->addWidget(saveSelect);
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
92
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
93 centerLayout->addLayout(labelLayout);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
94 centerLayout->addLayout(fieldLayout);
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
95 centerLayout->addLayout(buttonLayout);
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
96
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
97 QPushButton *create = new QPushButton(tr("Create installer"));
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
98 connect(create, SIGNAL(clicked()), this, SLOT(createInstaller()));
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
99 QPushButton *cancel = new QPushButton(tr("Cancel"));
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
100 connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
101 bottomLayout->insertStretch(0, 10);
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
102 bottomLayout->addWidget(create);
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
103 bottomLayout->addWidget(cancel);
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
104
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
105 QFrame *bottomSeparator = new QFrame();
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
106 bottomSeparator->setFrameShape(QFrame::HLine);
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
107 bottomSeparator->setFrameShadow(QFrame::Sunken);
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
108
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
109 topLayout->addLayout(headerLayout);
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
110 topLayout->addLayout(centerLayout);
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
111 topLayout->insertStretch(2, 10);
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 426
diff changeset
112 centerLayout->insertSpacing(3, 10);
414
3d803d383b41 Wording and layout in TrustBridge administration create binary dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
113 topLayout->addWidget(bottomSeparator);
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
114 topLayout->addLayout(bottomLayout);
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
115
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
116 setLayout(topLayout);
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
117
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
118 mProgress.setWindowModality(Qt::WindowModal);
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
119 mProgress.setLabelText(tr("Creating installer package..."));
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
120 mProgress.setCancelButton(0);
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
121 mProgress.setRange(0,0);
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
122 mProgress.setMinimumDuration(0);
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
123
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
124 return;
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
125 }
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
126
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
127 void CreateInstallerDialog::openCertificateSelect()
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
128 {
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
129 QSettings settings;
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
130 QString certFile = QFileDialog::getOpenFileName(
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
131 this, tr("Select certificate"),
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
132 mCertFile->text().isEmpty() ? QDir::homePath() : mCertFile->text(),
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
133 "*.pem *.der *.crt");
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
134 settings.setValue("CodeSignCert", certFile);
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
135 mCertFile->setText(certFile);
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
136 }
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
137
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
138 void CreateInstallerDialog::openFolderSelect()
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
139 {
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
140 QSettings settings;
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
141 QString archiveFolder = QFileDialog::getExistingDirectory(
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
142 this, tr("Select binary folder"),
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
143 mBinaryFolder->text().isEmpty() ? QDir::homePath() : mBinaryFolder->text());
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
144 mBinaryFolder->setText(archiveFolder);
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
145 settings.setValue("LastBinaryFolder", archiveFolder);
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
146 }
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
147
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
148 void CreateInstallerDialog::openSaveLocation()
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
149 {
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
150 QSettings settings;
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
151 QString saveFile = QFileDialog::getExistingDirectory(
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
152 this, tr("Select target location"),
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
153 mSaveFile->text().isEmpty() ? QDir::homePath() : mSaveFile->text());
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
154 mSaveFile->setText(saveFile);
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
155 settings.setValue("LastBinOutputFolder", saveFile);
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
156 }
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
157
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
158 void CreateInstallerDialog::showErrorMessage(const QString &msg)
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
159 {
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
160 QMessageBox::warning(this, tr("Error!"), msg);
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
161 }
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
162
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
163 void CreateInstallerDialog::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
164 {
526
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
165 FinishedDialog *fin = new FinishedDialog(0, tr("Created installer in %1.")
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
166 .arg(mBinaryFolder->text()), mNSISProc.readAll(), false);
518
31e0a86f5a35 Actually set the arguments for makensis process. Fix escaping
Andre Heinecke <aheinecke@intevation.de>
parents: 516
diff changeset
167 qDebug() << "Finished: " << mNSISProc.readAll();
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
168 mProgress.cancel();
526
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
169 fin->show();
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
170 close();
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
171 }
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
172
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
173 void CreateInstallerDialog::processError(QProcess::ProcessError error)
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
174 {
518
31e0a86f5a35 Actually set the arguments for makensis process. Fix escaping
Andre Heinecke <aheinecke@intevation.de>
parents: 516
diff changeset
175 qDebug() << "Error: " << mNSISProc.readAll();
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
176 mProgress.cancel();
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
177 }
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
178
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
179 void CreateInstallerDialog::createInstaller()
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
180 {
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
181 QDir binDir(mBinaryFolder->text());
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
182 QDir outDir(mSaveFile->text());
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
183 if (mBinaryFolder->text().isEmpty() || !binDir.exists()) {
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
184 showErrorMessage(tr("Please select an existing input folder."));
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
185 return;
515
9d3880db6ba7 Improve error handlig and persist user decisions
Andre Heinecke <aheinecke@intevation.de>
parents: 428
diff changeset
186 }
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
187 if (mCertFile->text().isEmpty()) {
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
188 showErrorMessage(tr("Please select a codesigning certificate."));
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
189 return;
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
190 }
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
191 if (mSaveFile->text().isEmpty() || !outDir.exists()) {
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
192 showErrorMessage(tr("Please select a output folder."));
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
193 return;
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
194 }
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
195 QSettings options(binDir.filePath("meta.ini"), QSettings::IniFormat);
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
196 options.sync();
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
197 QStringList keys = options.allKeys();
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
198 if (options.status() != QSettings::NoError || keys.size() < 1) {
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
199 showErrorMessage(tr("Folder %1 does not appear to contain a meta.ini")
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
200 .arg(binDir.path()));
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
201 return;
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
202 }
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
203
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
204 /* Copy windows directory contents to tmpdir */
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
205 QStringList arguments;
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
206 mNSISProc.setProgram("makensis");
518
31e0a86f5a35 Actually set the arguments for makensis process. Fix escaping
Andre Heinecke <aheinecke@intevation.de>
parents: 516
diff changeset
207 mNSISProc.setProcessChannelMode(QProcess::MergedChannels);
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
208 mNSISProc.setWorkingDirectory(outDir.path());
537
522b4e28c073 Use windows argument format for nsis on windows
Andre Heinecke <aheinecke@intevation.de>
parents: 526
diff changeset
209 #ifdef Q_OS_WIN
538
0290adbdc380 Use backslashes on Windows for filesdir
Andre Heinecke <aheinecke@intevation.de>
parents: 537
diff changeset
210 arguments << QString::fromLatin1("/Dfiles_dir=") + binDir.path().replace("/", "\\") + "\\windows";
541
1cddf87f8f83 ix variable path seperator
Andre Heinecke <aheinecke@intevation.de>
parents: 539
diff changeset
211 arguments << "/Dpath_sep=\\";
537
522b4e28c073 Use windows argument format for nsis on windows
Andre Heinecke <aheinecke@intevation.de>
parents: 526
diff changeset
212 foreach (const QString &key, keys) {
522b4e28c073 Use windows argument format for nsis on windows
Andre Heinecke <aheinecke@intevation.de>
parents: 526
diff changeset
213 arguments << QString::fromLatin1("/D%1=%2").arg(key,
522b4e28c073 Use windows argument format for nsis on windows
Andre Heinecke <aheinecke@intevation.de>
parents: 526
diff changeset
214 options.value(key, QString()).toString());
522b4e28c073 Use windows argument format for nsis on windows
Andre Heinecke <aheinecke@intevation.de>
parents: 526
diff changeset
215 }
522b4e28c073 Use windows argument format for nsis on windows
Andre Heinecke <aheinecke@intevation.de>
parents: 526
diff changeset
216 #else
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
217 arguments << QString::fromLatin1("-Dfiles_dir=") + binDir.path() + "/windows";
541
1cddf87f8f83 ix variable path seperator
Andre Heinecke <aheinecke@intevation.de>
parents: 539
diff changeset
218 arguments << "-Dpath_sep=/";
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
219 foreach (const QString &key, keys) {
518
31e0a86f5a35 Actually set the arguments for makensis process. Fix escaping
Andre Heinecke <aheinecke@intevation.de>
parents: 516
diff changeset
220 arguments << QString::fromLatin1("-D%1=%2").arg(key,
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
221 options.value(key, QString()).toString());
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
222 }
537
522b4e28c073 Use windows argument format for nsis on windows
Andre Heinecke <aheinecke@intevation.de>
parents: 526
diff changeset
223 #endif
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
224
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
225 arguments << binDir.path() + "/trustbridge.nsi";
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
226
518
31e0a86f5a35 Actually set the arguments for makensis process. Fix escaping
Andre Heinecke <aheinecke@intevation.de>
parents: 516
diff changeset
227 qDebug() << "Starting makensis with arguments: " << arguments;
31e0a86f5a35 Actually set the arguments for makensis process. Fix escaping
Andre Heinecke <aheinecke@intevation.de>
parents: 516
diff changeset
228 mNSISProc.setArguments(arguments);
516
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
229 mNSISProc.start();
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
230 mProgress.show();
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
231
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
232 if (!mNSISProc.waitForStarted() ||
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
233 mNSISProc.state() == QProcess::NotRunning) {
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
234 showErrorMessage(tr("Failed to start makensis.\n"
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
235 "Please ensure that makensis is installed and in your PATH variable."));
3332db04c77d Call makensis in create installer dialog
Andre Heinecke <aheinecke@intevation.de>
parents: 515
diff changeset
236 }
361
b67dd46cd4a9 Added dialog to create a new, signed installer binary.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
237 }
526
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
238
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
239 FinishedDialog::FinishedDialog(QDialog *parent,
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
240 QString msg, QString details, bool isErr):
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
241 QDialog(parent)
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
242 {
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
243 QVBoxLayout *topLayout = new QVBoxLayout;
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
244 QHBoxLayout *buttonLayout = new QHBoxLayout;
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
245 QLabel *msgLabel = new QLabel;
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
246 QTextEdit *detailsWindow = new QTextEdit;
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
247
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
248 detailsWindow->insertPlainText(details);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
249 detailsWindow->setReadOnly(true);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
250 detailsWindow->hide();
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
251
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
252 if (!isErr) {
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
253 setWindowTitle(tr("Success!"));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
254 msgLabel->setPixmap(QApplication::style()->standardIcon(
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
255 QStyle::SP_MessageBoxInformation).pixmap(16, 16));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
256 } else {
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
257 setWindowTitle(tr("Error!"));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
258 msgLabel->setPixmap(QApplication::style()->standardIcon(
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
259 QStyle::SP_MessageBoxCritical).pixmap(16, 16));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
260 }
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
261 msgLabel->setText(msg);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
262
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
263 topLayout->addWidget(msgLabel);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
264 topLayout->addWidget(detailsWindow);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
265 QPushButton *detailsBtn = new QPushButton(tr("Details"));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
266 connect(detailsBtn, SIGNAL(clicked()), detailsWindow, SLOT(show()));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
267 buttonLayout->addWidget(detailsBtn);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
268
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
269 QPushButton *okBtn = new QPushButton(tr("OK"));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
270 okBtn->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
271 connect(okBtn, SIGNAL(clicked()), this, SLOT(close()));
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
272 buttonLayout->insertStretch(0, 100);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
273 buttonLayout->addWidget(okBtn);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
274
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
275 topLayout->addLayout(buttonLayout);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
276 setLayout(topLayout);
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
277 }
f6371e9c959a Add a dialog when installer creation is done
Andre Heinecke <aheinecke@intevation.de>
parents: 518
diff changeset
278

http://wald.intevation.org/projects/trustbridge/