1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-06 14:10:53 +00:00
openmw/apps/launcher
AnyOldName3 c2b383ea92 Store original representation of paths in content lists
Also compare against existing content lists in a more forgiving way.

The first improvement makes it possible to use relative paths in openmw.cfg without the launcher canonicalising them.
This was really annoying if you used a relative path on purpose.
It also stops the launcher converting all paths to Qt's convention, where forward slashes are used on Windows even though they're not native.
The engine doesn't care, so you could always put either in the config file, but the launcher wouldn't stand for that, and would make them match.

To make this work, we need to store a path's originalRepresentation in the content list, compare paths loaded from openmw.cfg based on their originalRepresentation, and convert paths from originalRepresentation to absolute value when loading them from a content list.

The second improvement means that paths that are equivalent, but expressed differently (e.g. mismatched case on Windows, mismatched separators on Windows, or mild differences like unnecessary `./`es and doubled separators) don't trigger the creation of a new effectively-identical content list.

To make this work, we had to switch the comparison to lexicaly normalise the path first.
It could only be lexical normalisation as originalRepresentation might be absolute, relative, or absolute-but-based-on-a-path-slug, and we didn't want slugs to break things or relative paths to count as equivalent to absolute ones that refer to the same file.
The comparison is case-insensitive on Windows, and case-sensitive elsewhere.
This isn't strictly right, as you can have case-sensitive things mounted on Windows or tell a Linux directory to be case-insensitive, but we can't tell when that might happen based on a lexical path as it depends on real directory properties (and might differ for different parts of the path, which is too much hassle to support).
2024-10-25 00:49:59 +01:00
..
ui Tooltip for 'Factor Strength into Hand-to-Hand Combat' 2024-09-21 00:08:59 +02:00
utils Use an auto raise mode to disable the border 2024-05-12 17:26:14 +04:00
CMakeLists.txt Support dark mode on Windows (feature 7985) 2024-05-20 16:50:24 +04:00
datafilespage.cpp Store original representation of paths in content lists 2024-10-25 00:49:59 +01:00
datafilespage.hpp Launcher: Support extended selection for directories 2024-08-29 04:18:07 +03:00
graphicspage.cpp Rework launcher tabs 2024-01-14 14:05:14 +04:00
graphicspage.hpp Rework launcher tabs 2024-01-14 14:05:14 +04:00
importpage.cpp Track source of settings 2024-03-06 00:36:13 +00:00
importpage.hpp Setup launcher configuration manager and logging before initializing UI 2023-03-21 21:29:57 +01:00
main.cpp Move "debugging" function into Debug namespace 2024-07-13 11:15:33 +02:00
maindialog.cpp Set minimum width for Launch OpenMW button 2024-06-08 17:20:54 +04:00
maindialog.hpp Update toolbar style sheet when theme changed 2024-05-12 17:26:14 +04:00
sdlinit.cpp Merge branch 'useuless_launcher' into 'master' 2021-05-04 21:09:39 +00:00
sdlinit.hpp Init SDL2 before Qt4 to avoid crash on Linux (bug #4529) 2018-08-07 22:57:16 +04:00
settingspage.cpp Launcher checkbox 2024-07-19 00:04:15 +01:00
settingspage.hpp Remove launcher lighting settings that support runtime changes 2024-06-12 22:44:12 +03:00
textslotmsgbox.cpp Implemented Launcher namespace 2013-10-25 11:17:26 -05:00
textslotmsgbox.hpp Apply clang-format to code base 2022-09-22 21:35:26 +03:00