Skip to content

Feature: add migration cmd option #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/libs/installer/commandlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ CommandLineParser::CommandLineParser()
cleanupUpdateOnly.setFlags(QCommandLineOption::HiddenFromHelp);
addOption(cleanupUpdateOnly);

//Migratiton option
addOption(QCommandLineOption(QStringList()
<< CommandLineOptions::scMigration,
QLatin1String("Use migration option.")));

// Deprecated options
QCommandLineOption deprecatedUpdater(CommandLineOptions::scDeprecatedUpdater);
deprecatedUpdater.setFlags(QCommandLineOption::HiddenFromHelp);
Expand Down
4 changes: 4 additions & 0 deletions src/libs/installer/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ static const QLatin1String scLogo("Logo");
static const QLatin1String scBackground("Background");
static const QLatin1String scPageListPixmap("PageListPixmap");
static const QLatin1String scAliasDefinitionsFile("AliasDefinitionsFile");
static const QLatin1String scMigrationFlag("Migration");
const char scRelocatable[] = "@RELOCATABLE_PATH@";

static const QStringList scMetaElements = {
Expand Down Expand Up @@ -312,6 +313,9 @@ static const QLatin1String scMaxConcurrentOperationsLong("max-concurrent-operati
static const QLatin1String scCleanupUpdate("cleanup-update");
static const QLatin1String scCleanupUpdateOnly("cleanup-update-only");

//Migratiton option
static const QLatin1String scMigration("migration");

// Deprecated options, provided only for backward compatibility
static const QLatin1String scDeprecatedUpdater("updater");
static const QLatin1String scDeprecatedCheckUpdates("checkupdates");
Expand Down
5 changes: 5 additions & 0 deletions src/sdk/sdkapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@ class SDKApp : public T

}

//migration mode
if (m_parser.isSet(CommandLineOptions::scMigration)) {
m_core->setValue(QInstaller::scMigrationFlag, QLatin1String("true"));
}

if (m_parser.isSet(CommandLineOptions::scLocalCachePathLong)) {
const QString cachePath = m_parser.value(CommandLineOptions::scLocalCachePathLong);
if (cachePath.isEmpty()) {
Expand Down