2011-02-21 16:30:31 +01:00
|
|
|
/**************************************************************************
|
|
|
|
**
|
2017-01-26 09:30:45 +02:00
|
|
|
** Copyright (C) 2017 The Qt Company Ltd.
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2011-02-21 16:30:31 +01:00
|
|
|
**
|
2012-12-21 10:31:17 +01:00
|
|
|
** This file is part of the Qt Installer Framework.
|
2011-02-21 16:30:31 +01:00
|
|
|
**
|
2017-01-26 09:30:45 +02:00
|
|
|
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
|
2012-12-21 10:31:17 +01:00
|
|
|
** 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
|
2015-02-17 11:18:57 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
2017-01-26 09:30:45 +02:00
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2011-02-21 16:30:31 +01:00
|
|
|
**
|
2017-01-26 09:30:45 +02:00
|
|
|
** GNU General Public License Usage
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2012-02-06 09:23:20 +01:00
|
|
|
**
|
2012-12-21 10:31:17 +01:00
|
|
|
** $QT_END_LICENSE$
|
2011-02-21 16:30:31 +01:00
|
|
|
**
|
|
|
|
**************************************************************************/
|
2012-02-06 09:23:20 +01:00
|
|
|
|
2011-02-21 16:30:31 +01:00
|
|
|
#ifndef QINSTALLER_REPOSITORYGEN_H
|
|
|
|
#define QINSTALLER_REPOSITORYGEN_H
|
|
|
|
|
2015-04-13 14:52:38 +02:00
|
|
|
#include <QHash>
|
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
#include <QVector>
|
2011-02-21 16:30:31 +01:00
|
|
|
|
2012-03-13 17:53:03 +01:00
|
|
|
namespace QInstallerTools {
|
2011-02-21 16:30:31 +01:00
|
|
|
|
2012-03-07 16:47:08 +01:00
|
|
|
|
2011-11-17 22:44:56 +01:00
|
|
|
struct PackageInfo
|
|
|
|
{
|
|
|
|
QString name;
|
|
|
|
QString version;
|
|
|
|
QString directory;
|
|
|
|
QStringList dependencies;
|
2013-07-29 14:09:48 +02:00
|
|
|
QStringList copiedFiles;
|
2017-02-03 16:56:37 +03:00
|
|
|
QString metaFile;
|
|
|
|
QString metaNode;
|
2011-11-17 22:44:56 +01:00
|
|
|
};
|
2012-02-28 15:05:51 +01:00
|
|
|
typedef QVector<PackageInfo> PackageInfoVector;
|
2011-02-21 16:30:31 +01:00
|
|
|
|
2012-03-09 12:06:05 +01:00
|
|
|
enum FilterType {
|
|
|
|
Include,
|
|
|
|
Exclude
|
|
|
|
};
|
|
|
|
|
2013-03-25 14:18:18 +01:00
|
|
|
void printRepositoryGenOptions();
|
2013-03-25 13:36:54 +01:00
|
|
|
QString makePathAbsolute(const QString &path);
|
2013-03-25 14:18:18 +01:00
|
|
|
void copyWithException(const QString &source, const QString &target, const QString &kind = QString());
|
|
|
|
|
2013-06-27 11:20:29 +02:00
|
|
|
PackageInfoVector createListOfPackages(const QStringList &packagesDirectories, QStringList *packagesToFilter,
|
2013-03-25 14:18:18 +01:00
|
|
|
FilterType ftype);
|
2017-02-03 16:56:37 +03:00
|
|
|
|
|
|
|
PackageInfoVector createListOfRepositoryPackages(const QStringList &repositoryDirectories, QStringList *packagesToFilter,
|
|
|
|
FilterType filterType);
|
|
|
|
|
2012-05-03 13:15:26 +02:00
|
|
|
QHash<QString, QString> buildPathToVersionMapping(const PackageInfoVector &info);
|
2012-02-28 15:51:19 +01:00
|
|
|
|
2012-02-28 16:11:44 +01:00
|
|
|
void compressMetaDirectories(const QString &repoDir, const QString &baseDir,
|
2012-05-03 13:15:26 +02:00
|
|
|
const QHash<QString, QString> &versionMapping);
|
2012-02-28 15:51:19 +01:00
|
|
|
|
2013-03-25 09:50:05 +01:00
|
|
|
void copyMetaData(const QString &outDir, const QString &dataDir, const PackageInfoVector &packages,
|
2013-06-06 09:49:46 +02:00
|
|
|
const QString &appName, const QString& appVersion);
|
2013-06-11 15:16:49 +02:00
|
|
|
void copyComponentData(const QStringList &packageDir, const QString &repoDir, PackageInfoVector *const infos);
|
2012-02-28 15:51:19 +01:00
|
|
|
|
2012-03-07 16:47:08 +01:00
|
|
|
|
2012-03-13 17:53:03 +01:00
|
|
|
} // namespace QInstallerTools
|
2011-02-21 16:30:31 +01:00
|
|
|
|
|
|
|
#endif // QINSTALLER_REPOSITORYGEN_H
|