From cb9acedb72fb981e5a7d63a723338d47dc9ba6c7 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 19 Jun 2016 21:06:49 +0200 Subject: [PATCH] Changed: Create shortcut in menu for Installer --HG-- branch : develop --- .../ryzom_installer/src/operationdialog.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index 7b535a221..69ea6bdc2 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -724,6 +724,26 @@ void COperationDialog::copyInstaller() QFile::rename(oldInstallerFullPath, newInstallerFullPath); } } + + // create menu directory if defined + QString path = config->getMenuDirectory(); + + if (!path.isEmpty()) + { + QDir dir; + + if (!dir.mkpath(path)) + { + qDebug() << "Unable to create directory" << path; + } + } + + // create installer link in menu + QString executable = newInstallerFullPath; + QString shortcut = config->getInstallerMenuLinkFullPath(); + QString desc = "Ryzom Installer"; + + createLink(executable, shortcut, "", "", desc); } // TODO: create shortcuts for installer