mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
Stylesheet location changed in CMakeLists and some minor fixes to the launcher
This commit is contained in:
parent
b320733e45
commit
11ec5cf2e2
@ -329,7 +329,6 @@ if(WIN32)
|
||||
FILE(GLOB files "${OpenMW_BINARY_DIR}/Release/*.*")
|
||||
INSTALL(FILES ${files} DESTINATION ".")
|
||||
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 ".")
|
||||
|
||||
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}/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_PACKAGE_VERSION ${OPENMW_VERSION})
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
|
||||
|
@ -72,10 +72,14 @@ endif()
|
||||
|
||||
if (APPLE)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.qss
|
||||
"${APP_BUNDLE_DIR}/../launcher.qss")
|
||||
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.qss
|
||||
"${APP_BUNDLE_DIR}/../resources/launcher.qss")
|
||||
configure_file(${CMAKE_SOURCE_DIR}/files/launcher.cfg
|
||||
"${APP_BUNDLE_DIR}/../launcher.cfg")
|
||||
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
|
||||
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/launcher.qss")
|
||||
|
||||
|
@ -987,8 +987,8 @@ void DataFilesPage::readConfig()
|
||||
|
||||
void DataFilesPage::writeConfig(QString profile)
|
||||
{
|
||||
// Don't overwrite the config if no plugins are found
|
||||
if (mPluginsModel->rowCount() < 1) {
|
||||
// Don't overwrite the config if no masters are found
|
||||
if (mMastersWidget->rowCount() < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1001,9 +1001,15 @@ void DataFilesPage::writeConfig(QString profile)
|
||||
}
|
||||
|
||||
// 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
|
||||
QFile file(QString::fromStdString((mCfgMgr.getUserPath()/"openmw.cfg").string()));
|
||||
file.setFileName(config);
|
||||
|
||||
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
||||
// File cannot be opened or created
|
||||
@ -1086,5 +1092,5 @@ void DataFilesPage::writeConfig(QString profile)
|
||||
file.close();
|
||||
mLauncherConfig->endGroup();
|
||||
mLauncherConfig->endGroup();
|
||||
|
||||
mLauncherConfig->sync();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user