summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/productinstaller.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-01-07 15:48:45 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-01-22 12:21:38 +0100
commit5cdf94de300e72987dfbe5c0fec5b86317ad6280 (patch)
treee484cd9ccd2faae387dd3978b6eb7783c99b84b3 /src/lib/buildgraph/productinstaller.h
parent49060f9b1e2881a5e7801f59f6d237fd85da1ae1 (diff)
downloadqbs-5cdf94de300e72987dfbe5c0fec5b86317ad6280.tar.gz
Introduce the "install" command.
This decouples building and installing, e.g. allowing the latter to be executed by a privileged user to a system-wide directory. In addition, the ability to install build artifacts (typically executables or libraries) has been added. Change-Id: I28e725e4c1168eebe88e12c75e3d3e9f5fe28ca5 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/productinstaller.h')
-rw-r--r--src/lib/buildgraph/productinstaller.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/lib/buildgraph/productinstaller.h b/src/lib/buildgraph/productinstaller.h
new file mode 100644
index 000000000..e5fecbb12
--- /dev/null
+++ b/src/lib/buildgraph/productinstaller.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Build Suite.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+#ifndef QBS_PRODUCT_INSTALLER_H
+#define QBS_PRODUCT_INSTALLER_H
+
+#include "forward_decls.h"
+#include <tools/installoptions.h>
+
+#include <QList>
+
+namespace qbs {
+namespace Internal {
+class ProgressObserver;
+
+class ProductInstaller
+{
+public:
+ ProductInstaller(const QList<BuildProductPtr> &products, const InstallOptions &options,
+ ProgressObserver *observer);
+ void install();
+
+private:
+ void removeInstallRoot();
+ void copyFile(const Artifact *artifact);
+ void handleError(const QString &message);
+
+ const QList<BuildProductPtr> m_products;
+ InstallOptions m_options;
+ ProgressObserver * const m_observer;
+};
+
+} // namespace Internal
+} // namespace qbs
+
+#endif // Header guard