diff options
author | Niels Weber <niels.weber@digia.com> | 2013-02-22 14:30:18 +0100 |
---|---|---|
committer | Niels Weber <niels.weber@digia.com> | 2013-02-25 11:44:25 +0100 |
commit | 9561e4cd6185b461646d1910e80bc849b677711d (patch) | |
tree | b396cc10d3b55e57e52d240f3a0cd3fa7a2fde12 /tools/repogen | |
parent | 4af5c850bdb2111f170372c9b1433ed0b9cce2b3 (diff) |
remove configfile use for repogen
Change-Id: I54b9e59ad5d9d4092996fe5fd58157631c552f3f
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'tools/repogen')
-rw-r--r-- | tools/repogen/repogen.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/tools/repogen/repogen.cpp b/tools/repogen/repogen.cpp index 9c20234ac..1380e4ebf 100644 --- a/tools/repogen/repogen.cpp +++ b/tools/repogen/repogen.cpp @@ -53,6 +53,9 @@ #include <iostream> +#define QUOTE_(x) #x +#define QUOTE(x) QUOTE_(x) + using namespace Lib7z; using namespace QInstaller; @@ -76,7 +79,7 @@ static void printUsage() std::cout << std::endl; std::cout << "Example:" << std::endl; - std::cout << " " << appName << " -p ../examples/packages -c ../examples/config/config.xml -u " + std::cout << " " << appName << " -p ../examples/packages -u " "http://www.some-server.com:8080 repository/" << std::endl; } @@ -107,7 +110,6 @@ int main(int argc, char** argv) QStringList filteredPackages; bool updateExistingRepository = false; QString packagesDir; - QString configFile; QString redirectUpdateUrl; QInstallerTools::FilterType filterType = QInstallerTools::Exclude; bool remove = false; @@ -156,21 +158,8 @@ int main(int argc, char** argv) args.removeFirst(); if (args.isEmpty()) return printErrorAndUsageAndExit(QObject::tr("Error: Config parameter missing argument")); - const QFileInfo fi(args.first()); - if (!fi.exists()) { - return printErrorAndUsageAndExit(QObject::tr("Error: Config file %1 not found " - "at the specified location").arg(args.first())); - } - if (!fi.isFile()) { - return printErrorAndUsageAndExit(QObject::tr("Error: Configuration %1 is not a " - "file").arg(args.first())); - } - if (!fi.isReadable()) { - return printErrorAndUsageAndExit(QObject::tr("Error: Config file %1 is not " - "readable").arg(args.first())); - } - configFile = args.first(); args.removeFirst(); + std::cout << "Config file parameter is deprecated and ignored." << std::endl; } else if (args.first() == QLatin1String("-u") || args.first() == QLatin1String("--updateurl")) { args.removeFirst(); if (args.isEmpty()) @@ -189,7 +178,7 @@ int main(int argc, char** argv) } } - if ((packagesDir.isEmpty() || configFile.isEmpty() || args.count() != 1)) { + if (packagesDir.isEmpty() || (args.count() != 1)) { printUsage(); return 1; } @@ -224,10 +213,8 @@ int main(int argc, char** argv) const QString metaTmp = createTemporaryDirectory(); tmpDeleter.add(metaTmp); - QString configDir = QFileInfo(configFile).canonicalPath(); - const Settings &settings = Settings::fromFileAndPrefix(configFile, configDir); - generateMetaDataDirectory(metaTmp, repositoryDir, packages, settings.applicationName(), - settings.applicationVersion(), redirectUpdateUrl); + generateMetaDataDirectory(metaTmp, repositoryDir, packages, QLatin1String("{AnyApplication}"), + QLatin1String(QUOTE(IFW_REPOSITORY_FORMAT_VERSION)), redirectUpdateUrl); QInstallerTools::compressMetaDirectories(metaTmp, metaTmp, pathToVersionMapping); QDirIterator it(repositoryDir, QStringList(QLatin1String("Updates*.xml")), QDir::Files | QDir::CaseSensitive); |