aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/src
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-14 15:40:33 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-14 15:40:33 -0600
commit6410929e17d642618f284d5c97d457f1ac653e6e (patch)
tree5c0ee09e04f38a2dd70f1734d25c74e0b8ae5d43 /libs/plugin_python/src
parent817e8f5cd26739c69d930d21cd9dc4c0b6e4984e (diff)
Migrate data paths to ~/.local/share/fluorine/, add native build, fix %command% and system Proton scanning
- All data paths migrated from ~/.var/app/com.fluorine.manager/ to ~/.local/share/fluorine/ so native and Flatpak builds share the same instances, plugins, and configs - New fluorinepaths.h/.cpp with fluorineDataDir() helper and one-time migration from old path (writes MOVED.txt breadcrumb) - New libs/nak/src/paths.rs as Rust equivalent (data_dir()) - Strip %command% tokens from launch wrapper in protonlauncher.cpp - Always scan /usr/share/steam/compatibilitytools.d/ for system Proton packages (Arch installs Proton there); add Flatpak filesystem permission - Native build (build-native.sh) installs to ~/.local/share/fluorine/ with desktop entry and ~/.local/bin symlink instead of portable zip - build-flatpak.sh wrapper for Flatpak builds - Fix container locale (LANG=C.UTF-8) for AutoUic warnings - Fix prefixExists() to handle both compatdata and pfx directory layouts - Fix globalInstancesRootPath() to use fluorineDataDir() on Linux - Fix umu-run Flatpak lookup to use fluorineDataDir() - Update README with build instructions and Arch dependency list Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/plugin_python/src')
-rw-r--r--libs/plugin_python/src/mobase/CMakeLists.txt7
-rw-r--r--libs/plugin_python/src/mobase/wrappers/basic_classes.cpp5
-rw-r--r--libs/plugin_python/src/pybind11-qt/CMakeLists.txt3
-rw-r--r--libs/plugin_python/src/pybind11-utils/CMakeLists.txt5
-rw-r--r--libs/plugin_python/src/runner/CMakeLists.txt3
5 files changed, 18 insertions, 5 deletions
diff --git a/libs/plugin_python/src/mobase/CMakeLists.txt b/libs/plugin_python/src/mobase/CMakeLists.txt
index 2fac52f..3e765dd 100644
--- a/libs/plugin_python/src/mobase/CMakeLists.txt
+++ b/libs/plugin_python/src/mobase/CMakeLists.txt
@@ -5,7 +5,7 @@ if(NOT TARGET mo2::uibase)
find_package(mo2-uibase CONFIG REQUIRED)
endif()
-pybind11_add_module(mobase MODULE)
+pybind11_add_module(mobase MODULE NO_EXTRAS)
mo2_default_source_group()
mo2_configure_target(mobase
NO_SOURCES
@@ -38,3 +38,8 @@ mo2_target_sources(mobase
./wrappers/wrappers.h
)
target_link_libraries(mobase PRIVATE pybind11::qt pybind11::utils mo2::uibase Qt6::Core)
+set_target_properties(mobase PROPERTIES INTERPROCEDURAL_OPTIMIZATION OFF)
+if(NOT MSVC)
+ target_compile_options(mobase PRIVATE -fno-lto)
+ target_link_options(mobase PRIVATE -fno-lto)
+endif()
diff --git a/libs/plugin_python/src/mobase/wrappers/basic_classes.cpp b/libs/plugin_python/src/mobase/wrappers/basic_classes.cpp
index ea69a46..f782099 100644
--- a/libs/plugin_python/src/mobase/wrappers/basic_classes.cpp
+++ b/libs/plugin_python/src/mobase/wrappers/basic_classes.cpp
@@ -575,10 +575,7 @@ namespace mo2::python {
mo2::python::show_deprecation_warning(
"appVersion", "IOrganizer::appVersion() is deprecated, use "
"IOrganizer::version() instead.");
-#pragma warning(push)
-#pragma warning(disable : 4996)
- return o.appVersion();
-#pragma warning(pop)
+ return o.version();
})
.def("version", &IOrganizer::version)
.def("createMod", &IOrganizer::createMod,
diff --git a/libs/plugin_python/src/pybind11-qt/CMakeLists.txt b/libs/plugin_python/src/pybind11-qt/CMakeLists.txt
index cb742ad..82793cb 100644
--- a/libs/plugin_python/src/pybind11-qt/CMakeLists.txt
+++ b/libs/plugin_python/src/pybind11-qt/CMakeLists.txt
@@ -56,5 +56,8 @@ add_custom_command(
add_dependencies(pybind11-qt PyQt6-siph)
target_include_directories(pybind11-qt PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+if(NOT MSVC)
+ target_compile_options(pybind11-qt PRIVATE -Wno-attributes)
+endif()
add_library(pybind11::qt ALIAS pybind11-qt)
diff --git a/libs/plugin_python/src/pybind11-utils/CMakeLists.txt b/libs/plugin_python/src/pybind11-utils/CMakeLists.txt
index 77895b6..72b0707 100644
--- a/libs/plugin_python/src/pybind11-utils/CMakeLists.txt
+++ b/libs/plugin_python/src/pybind11-utils/CMakeLists.txt
@@ -17,6 +17,11 @@ mo2_configure_target(pybind11-utils
TRANSLATIONS OFF
)
mo2_default_source_group()
+set_target_properties(pybind11-utils PROPERTIES
+ AUTOMOC OFF
+ AUTOUIC OFF
+ AUTORCC OFF
+)
target_link_libraries(pybind11-utils PUBLIC pybind11::pybind11)
target_include_directories(pybind11-utils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
diff --git a/libs/plugin_python/src/runner/CMakeLists.txt b/libs/plugin_python/src/runner/CMakeLists.txt
index d164460..9c90314 100644
--- a/libs/plugin_python/src/runner/CMakeLists.txt
+++ b/libs/plugin_python/src/runner/CMakeLists.txt
@@ -22,6 +22,9 @@ mo2_default_source_group()
target_link_libraries(runner PUBLIC mo2::uibase PRIVATE pybind11::embed pybind11::qt)
target_include_directories(runner PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(runner PRIVATE RUNNER_BUILD)
+if(NOT MSVC)
+ target_compile_options(runner PRIVATE -Wno-attributes)
+endif()
if(NOT WIN32 AND Python_SHARED_LIBRARY)
get_filename_component(_pylib_name "${Python_SHARED_LIBRARY}" NAME)
target_compile_definitions(runner PRIVATE