mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 13:36:40 +00:00
Stylesheet location changed in CMakeLists and some minor fixes to the launcher
This commit is contained in:
parent
b320733e45
commit
11ec5cf2e2
3 changed files with 16 additions and 8 deletions
|
@ -329,7 +329,6 @@ if(WIN32)
|
||||||
FILE(GLOB files "${OpenMW_BINARY_DIR}/Release/*.*")
|
FILE(GLOB files "${OpenMW_BINARY_DIR}/Release/*.*")
|
||||||
INSTALL(FILES ${files} DESTINATION ".")
|
INSTALL(FILES ${files} DESTINATION ".")
|
||||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
|
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
|
||||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/launcher.qss" "${OpenMW_BINARY_DIR}/launcher.qss" DESTINATION ".")
|
|
||||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".")
|
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".")
|
||||||
|
|
||||||
SET(CPACK_GENERATOR "NSIS")
|
SET(CPACK_GENERATOR "NSIS")
|
||||||
|
@ -428,7 +427,6 @@ if (APPLE)
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
||||||
|
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/plugins.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
install(FILES "${OpenMW_BINARY_DIR}/plugins.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/launcher.qss" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
|
||||||
set(CPACK_GENERATOR "DragNDrop")
|
set(CPACK_GENERATOR "DragNDrop")
|
||||||
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
|
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
|
set(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
|
||||||
|
|
|
@ -72,10 +72,14 @@ endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.qss
|
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.qss
|
||||||
"${APP_BUNDLE_DIR}/../launcher.qss")
|
"${APP_BUNDLE_DIR}/../resources/launcher.qss")
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.qss
|
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.cfg
|
||||||
"${APP_BUNDLE_DIR}/../launcher.cfg")
|
"${APP_BUNDLE_DIR}/../launcher.cfg")
|
||||||
else()
|
else()
|
||||||
|
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.qss
|
||||||
|
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/resources/launcher.qss")
|
||||||
|
|
||||||
|
# Fallback in case getGlobalDataPath does not point to resources
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.qss
|
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.qss
|
||||||
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/launcher.qss")
|
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/launcher.qss")
|
||||||
|
|
||||||
|
|
|
@ -987,8 +987,8 @@ void DataFilesPage::readConfig()
|
||||||
|
|
||||||
void DataFilesPage::writeConfig(QString profile)
|
void DataFilesPage::writeConfig(QString profile)
|
||||||
{
|
{
|
||||||
// Don't overwrite the config if no plugins are found
|
// Don't overwrite the config if no masters are found
|
||||||
if (mPluginsModel->rowCount() < 1) {
|
if (mMastersWidget->rowCount() < 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1001,9 +1001,15 @@ void DataFilesPage::writeConfig(QString profile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare the OpenMW config
|
// Prepare the OpenMW config
|
||||||
|
QString config = QString::fromStdString((mCfgMgr.getLocalPath() / "openmw.cfg").string());
|
||||||
|
QFile file(config);
|
||||||
|
|
||||||
|
if (!file.exists()) {
|
||||||
|
config = QString::fromStdString((mCfgMgr.getUserPath() / "openmw.cfg").string());
|
||||||
|
}
|
||||||
|
|
||||||
// Open the config as a QFile
|
// Open the config as a QFile
|
||||||
QFile file(QString::fromStdString((mCfgMgr.getUserPath()/"openmw.cfg").string()));
|
file.setFileName(config);
|
||||||
|
|
||||||
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
||||||
// File cannot be opened or created
|
// File cannot be opened or created
|
||||||
|
@ -1086,5 +1092,5 @@ void DataFilesPage::writeConfig(QString profile)
|
||||||
file.close();
|
file.close();
|
||||||
mLauncherConfig->endGroup();
|
mLauncherConfig->endGroup();
|
||||||
mLauncherConfig->endGroup();
|
mLauncherConfig->endGroup();
|
||||||
|
mLauncherConfig->sync();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue