summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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/main.cpp6
-rw-r--r--src/mainwindow.cpp6
-rw-r--r--src/qt.conf5
-rw-r--r--src/settingsdialoggeneral.cpp2
-rw-r--r--src/tutorials/TutorialOverlay.qml4
7 files changed, 49 insertions, 42 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index eec33460..f2c31d37 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -230,15 +230,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/main.cpp b/src/main.cpp
index e56197c9..a905df5d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -562,10 +562,8 @@ int runApplication(
}
log::debug("initializing tutorials");
- TutorialManager::init(
- qApp->applicationDirPath() + "/"
- + QString::fromStdWString(AppConfig::tutorialsPath()) + "/",
- &organizer);
+ QString tutorialsPath = QCoreApplication::applicationDirPath() + "/resources/tutorials/";
+ TutorialManager::init(tutorialsPath, &organizer);
if (!application.setStyleFile(settings.interface().styleName().value_or(""))) {
// disable invalid stylesheet
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index ea8a0efe..25a1314e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1204,7 +1204,7 @@ void MainWindow::createHelpMenu()
ActionList tutorials;
- QDirIterator dirIter(QApplication::applicationDirPath() + "/tutorials", QStringList("*.js"), QDir::Files);
+ QDirIterator dirIter(QApplication::applicationDirPath() + "/resources/tutorials", QStringList("*.js"), QDir::Files);
while (dirIter.hasNext()) {
dirIter.next();
QString fileName = dirIter.fileName();
@@ -1316,7 +1316,7 @@ bool MainWindow::addProfile()
void MainWindow::hookUpWindowTutorials()
{
- QDirIterator dirIter(QApplication::applicationDirPath() + "/tutorials", QStringList("*.js"), QDir::Files);
+ QDirIterator dirIter(QApplication::applicationDirPath() + "/resources/tutorials", QStringList("*.js"), QDir::Files);
while (dirIter.hasNext()) {
dirIter.next();
QString fileName = dirIter.fileName();
@@ -5206,7 +5206,7 @@ void MainWindow::installTranslator(const QString &name)
{
QTranslator *translator = new QTranslator(this);
QString fileName = name + "_" + m_CurrentLanguage;
- if (!translator->load(fileName, qApp->applicationDirPath() + "/translations")) {
+ if (!translator->load(fileName, qApp->applicationDirPath() + "/resources/translations")) {
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..2b659e87 100644
--- a/src/qt.conf
+++ b/src/qt.conf
@@ -1,3 +1,8 @@
[Paths]
Prefix=.
+Libraries=dlls
+LibraryExecutables=dlls
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..87489ab4 100644
--- a/src/settingsdialoggeneral.cpp
+++ b/src/settingsdialoggeneral.cpp
@@ -82,7 +82,7 @@ void GeneralSettingsTab::addLanguages()
const QRegExp exp(pattern);
QDirIterator iter(
- QCoreApplication::applicationDirPath() + "/translations",
+ QCoreApplication::applicationDirPath() + "/resources/translations",
QDir::Files);
std::vector<std::pair<QString, QString>> languages;
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 {