From 62199c2dadb494ce60f7847798c45e60f0707d45 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 14 Oct 2024 23:05:52 +0100 Subject: [PATCH 1/2] Install the local openmw.cfg template on Windows The Windows global config path is really really dumb and the whole concept of having a global path on an OS where it's so easy to have different incompatible versions installed side-by-side (instead of a single canonical OS-wide OpenMW install from the system package manager) is really dumb, too. We've therefore only used local `openmw.cfg`s on Windows for a very long time. However, it appears that we were installing the global `openmw.cfg` template instead of the local template. That's wrong and we shouldn't do it, so I've stopped it. I've left the separate `openmw.cfg` and `openmw.cfg.install` in the build directory as that makes doing development for portable installs with the same build system as doing the development for the installer easier. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8975a5f9af..1b09ea8ef2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -542,11 +542,16 @@ pack_resource_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.appdata.xml "${OpenMW_BINARY_DIR}" "openmw.appdata.xml") -if (NOT APPLE) +if (NOT WIN32 AND NOT APPLE) configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local "${OpenMW_BINARY_DIR}" "openmw.cfg") configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg "${OpenMW_BINARY_DIR}" "openmw.cfg.install") +elseif (WIN32) + configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local + "${OpenMW_BINARY_DIR}" "openmw.cfg") + configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local + "${OpenMW_BINARY_DIR}" "openmw.cfg.install") else () configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg "${OpenMW_BINARY_DIR}/openmw.cfg") From 06bf80cc3b6e9ebd4907f192b30a54766f334b98 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 27 Oct 2024 23:42:48 +0000 Subject: [PATCH 2/2] Rearrange conditionals to be prettier --- CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b09ea8ef2..80a50297ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -542,19 +542,19 @@ pack_resource_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.appdata.xml "${OpenMW_BINARY_DIR}" "openmw.appdata.xml") -if (NOT WIN32 AND NOT APPLE) - configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local - "${OpenMW_BINARY_DIR}" "openmw.cfg") - configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg - "${OpenMW_BINARY_DIR}" "openmw.cfg.install") +if (APPLE) + configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg + "${OpenMW_BINARY_DIR}/openmw.cfg") elseif (WIN32) configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local "${OpenMW_BINARY_DIR}" "openmw.cfg") configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local "${OpenMW_BINARY_DIR}" "openmw.cfg.install") else () - configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg - "${OpenMW_BINARY_DIR}/openmw.cfg") + configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local + "${OpenMW_BINARY_DIR}" "openmw.cfg") + configure_resource_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg + "${OpenMW_BINARY_DIR}" "openmw.cfg.install") endif () pack_resource_file(${OpenMW_SOURCE_DIR}/files/openmw-cs.cfg