From 31f16b6abc71911ced04d38bcdf14dafb5719c93 Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Sat, 11 Feb 2017 21:35:05 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20launching=20of=20Open-Sankor=C3=A9=20impo?= =?UTF-8?q?rter=20on=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also install the importer executable to OpenBoard root install folder --- release_scripts/windows/OpenBoard.iss | 2 +- src/core/UBOpenSankoreImporter.cpp | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/release_scripts/windows/OpenBoard.iss b/release_scripts/windows/OpenBoard.iss index 35003f86..51656008 100644 --- a/release_scripts/windows/OpenBoard.iss +++ b/release_scripts/windows/OpenBoard.iss @@ -119,7 +119,7 @@ Source: "{#QtDir}\plugins\mediaservice\wmfengine.dll"; DestDir: "{app}\mediaserv Source: "{#QtDir}\plugins\mediaservice\wmfengined.dll"; DestDir: "{app}\mediaservice"; Flags: ignoreversion ;OpenBoardImporter -Source: "{#ProjectRoot}\..\OpenBoard-Importer\release\OpenBoardImporter.exe"; DestDir: "{app}\Importer"; Flags: ignoreversion +Source: "{#ProjectRoot}\..\OpenBoard-Importer\release\OpenBoardImporter.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "{#QtLibs}\Qt5Core.dll"; DestDir: "{app}" Source: "{#QtLibs}\Qt5Gui.dll"; DestDir: "{app}" diff --git a/src/core/UBOpenSankoreImporter.cpp b/src/core/UBOpenSankoreImporter.cpp index 955f3f71..2d22b37a 100644 --- a/src/core/UBOpenSankoreImporter.cpp +++ b/src/core/UBOpenSankoreImporter.cpp @@ -56,11 +56,9 @@ void UBOpenSankoreImporter::onProceedClicked() newProcess.startDetached(qApp->applicationDirPath()+"/importer/OpenBoardImporter"); #elif defined Q_OS_OSX newProcess.startDetached(qApp->applicationDirPath()+"/../Resources/OpenBoardImporter.app/Contents/MacOS/OpenBoardImporter"); -#else - // Windows does not allows to run easily an exe located in a subdirectory when the main - // directory is placed into programs files. - //newProcess.startDetached(qApp->applicationDirPath()+"\\Importer\\OpenBoardImporter.exe"); - newProcess.startDetached("C:/OpenBoard/Importer/OpenBoardImporter.exe"); +#elif defined Q_OS_WIN + QString importerPath = QDir::toNativeSeparators(qApp->applicationDirPath())+"\\OpenBoardImporter.exe"; + newProcess.startDetached("explorer.exe", QStringList() << importerPath); #endif qApp->exit(0);