summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-11-14 06:54:51 -0500
committerGitHub <noreply@github.com>2020-11-14 06:54:51 -0500
commit4833e494d56b351e52423f2835a7a91ab8c284b6 (patch)
tree49a9444ae24e25263ebee6ea601e4c5bb239447a /src
parent579f94b5b6014ad4a97b23eb2a26ab69f007aa6a (diff)
parent24991bf5fb1dcf4ccee1090285bec10b3a20bf81 (diff)
Merge pull request #1277 from Qudix/master
Changing the location of several directories
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--src/dlls.manifest (renamed from src/dlls.manifest.qt5)58
-rw-r--r--src/mainwindow.cpp11
-rw-r--r--src/qt.conf6
-rw-r--r--src/settingsdialoggeneral.cpp6
-rw-r--r--src/shared/appconfig.inc3
-rw-r--r--src/tutorials/TutorialOverlay.qml4
7 files changed, 56 insertions, 42 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bb4b151f..50ce4178 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -231,15 +231,17 @@ target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.qt5
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest
DESTINATION bin/dlls
RENAME dlls.manifest)
-install(FILES ${qm_files} DESTINATION bin/translations)
+install(FILES ${qm_files} DESTINATION bin/resources/translations)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/stylesheets
- ${CMAKE_CURRENT_SOURCE_DIR}/tutorials
- DESTINATION bin)
+ DESTINATION bin)
+
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tutorials
+ DESTINATION bin/resources)
deploy_qt(BINARIES ModOrganizer.exe uibase.dll plugins/bsa_packer.dll)
diff --git a/src/dlls.manifest.qt5 b/src/dlls.manifest
index cae74df1..846a02ae 100644
--- a/src/dlls.manifest.qt5
+++ b/src/dlls.manifest
@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity type="win32" name="dlls" version="1.0.0.0" processorArchitecture="x86"/>
- <file name="7z.dll"/>
- <file name="archive.dll"/>
- <file name="d3dcompiler_47.dll"/>
- <file name="libEGL.dll"/>
- <file name="libGLESV2.dll"/>
- <file name="liblz4.dll"/>
- <file name="opengl32sw.dll"/>
- <file name="Qt5Core.dll"/>
- <file name="Qt5Gui.dll"/>
- <file name="Qt5Network.dll"/>
- <file name="Qt5Positioning.dll"/>
- <file name="Qt5PrintSupport.dll"/>
- <file name="Qt5Qml.dll"/>
- <file name="Qt5QmlModels.dll"/>
- <file name="Qt5QmlWorkerScript.dll"/>
- <file name="Qt5Quick.dll"/>
- <file name="Qt5QuickWidgets.dll"/>
- <file name="Qt5SerialPort.dll"/>
- <file name="Qt5Svg.dll"/>
- <file name="Qt5WebChannel.dll"/>
- <file name="Qt5WebEngineCore.dll"/>
- <file name="Qt5WebEngineWidgets.dll"/>
- <file name="Qt5WebSockets.dll"/>
- <file name="Qt5Widgets.dll"/>
- <file name="Qt5WinExtras.dll"/>
-</assembly>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <assemblyIdentity type="win32" name="dlls" version="1.0.0.0" processorArchitecture="x86"/>
+ <file name="7z.dll"/>
+ <file name="archive.dll"/>
+ <file name="d3dcompiler_47.dll"/>
+ <file name="libEGL.dll"/>
+ <file name="libGLESV2.dll"/>
+ <file name="liblz4.dll"/>
+ <file name="opengl32sw.dll"/>
+ <file name="Qt5Core.dll"/>
+ <file name="Qt5Gui.dll"/>
+ <file name="Qt5Network.dll"/>
+ <file name="Qt5Positioning.dll"/>
+ <file name="Qt5PrintSupport.dll"/>
+ <file name="Qt5Qml.dll"/>
+ <file name="Qt5QmlModels.dll"/>
+ <file name="Qt5QmlWorkerScript.dll"/>
+ <file name="Qt5Quick.dll"/>
+ <file name="Qt5QuickWidgets.dll"/>
+ <file name="Qt5SerialPort.dll"/>
+ <file name="Qt5Svg.dll"/>
+ <file name="Qt5WebChannel.dll"/>
+ <file name="Qt5WebEngineCore.dll"/>
+ <file name="Qt5WebEngineWidgets.dll"/>
+ <file name="Qt5WebSockets.dll"/>
+ <file name="Qt5Widgets.dll"/>
+ <file name="Qt5WinExtras.dll"/>
+</assembly>
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f7714392..b09e3dcc 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1204,7 +1204,9 @@ void MainWindow::createHelpMenu()
ActionList tutorials;
- QDirIterator dirIter(QApplication::applicationDirPath() + "/tutorials", QStringList("*.js"), QDir::Files);
+ QString tutorialPath = QApplication::applicationDirPath()
+ + "/" + QString::fromStdWString(AppConfig::tutorialsPath()) + "/";
+ QDirIterator dirIter(tutorialPath, QStringList("*.js"), QDir::Files);
while (dirIter.hasNext()) {
dirIter.next();
QString fileName = dirIter.fileName();
@@ -1316,7 +1318,8 @@ bool MainWindow::addProfile()
void MainWindow::hookUpWindowTutorials()
{
- QDirIterator dirIter(QApplication::applicationDirPath() + "/tutorials", QStringList("*.js"), QDir::Files);
+ QString tutorialPath = QApplication::applicationDirPath() + "/" + QString::fromStdWString(AppConfig::tutorialsPath()) + "/";
+ QDirIterator dirIter(tutorialPath, QStringList("*.js"), QDir::Files);
while (dirIter.hasNext()) {
dirIter.next();
QString fileName = dirIter.fileName();
@@ -5209,7 +5212,9 @@ void MainWindow::installTranslator(const QString &name)
{
QTranslator *translator = new QTranslator(this);
QString fileName = name + "_" + m_CurrentLanguage;
- if (!translator->load(fileName, qApp->applicationDirPath() + "/translations")) {
+ QString translationsPath = qApp->applicationDirPath()
+ + "/" + QString::fromStdWString(AppConfig::translationsPath());
+ if (!translator->load(fileName, translationsPath)) {
if (m_CurrentLanguage.contains(QRegularExpression("^.*_(EN|en)(-.*)?$"))) {
log::debug("localization file %s not found", fileName);
} // we don't actually expect localization files for English (en, en-us, en-uk, and any variation thereof)
diff --git a/src/qt.conf b/src/qt.conf
index f834a22a..5e070fa3 100644
--- a/src/qt.conf
+++ b/src/qt.conf
@@ -1,3 +1,7 @@
[Paths]
-Prefix=.
+Libraries=dlls
+LibraryExecutables=resources
Plugins=dlls
+Imports=dlls
+Qml2Imports=dlls
+Translations=resources/translations \ No newline at end of file
diff --git a/src/settingsdialoggeneral.cpp b/src/settingsdialoggeneral.cpp
index f29e1d24..9eae2ba1 100644
--- a/src/settingsdialoggeneral.cpp
+++ b/src/settingsdialoggeneral.cpp
@@ -81,9 +81,9 @@ void GeneralSettingsTab::addLanguages()
const QRegExp exp(pattern);
- QDirIterator iter(
- QCoreApplication::applicationDirPath() + "/translations",
- QDir::Files);
+ QString translationsPath = qApp->applicationDirPath()
+ + "/" + QString::fromStdWString(AppConfig::translationsPath());
+ QDirIterator iter(translationsPath, QDir::Files);
std::vector<std::pair<QString, QString>> languages;
diff --git a/src/shared/appconfig.inc b/src/shared/appconfig.inc
index 5839c2f4..8d4125cf 100644
--- a/src/shared/appconfig.inc
+++ b/src/shared/appconfig.inc
@@ -6,7 +6,8 @@ APPPARAM(std::wstring, downloadPath, L"downloads")
APPPARAM(std::wstring, overwritePath, L"overwrite")
APPPARAM(std::wstring, stylesheetsPath, L"stylesheets")
APPPARAM(std::wstring, cachePath, L"webcache")
-APPPARAM(std::wstring, tutorialsPath, L"tutorials")
+APPPARAM(std::wstring, tutorialsPath, L"resources/tutorials")
+APPPARAM(std::wstring, translationsPath, L"resources/translations")
APPPARAM(std::wstring, logPath, L"logs")
APPPARAM(std::wstring, dumpsDir, L"crashDumps")
APPPARAM(std::wstring, defaultProfileName, L"Default")
diff --git a/src/tutorials/TutorialOverlay.qml b/src/tutorials/TutorialOverlay.qml
index 47e5065d..0a31ef0e 100644
--- a/src/tutorials/TutorialOverlay.qml
+++ b/src/tutorials/TutorialOverlay.qml
@@ -55,7 +55,9 @@ Rectangle {
Connections {
target: manager
- onTabChanged: tabChanged(index)
+ function onTabChanged() {
+ tabChanged(index)
+ }
}
Tooltip {