Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Qt-based config editor #3982

Merged
merged 36 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
47f0fec
Add Qt-based config editor
neobrain Aug 20, 2024
a6f9c51
FEXQonfig: Load config from default location on startup
neobrain Aug 21, 2024
9500842
FEXQonfig: Strip file:// prefixes when displaying file paths
neobrain Aug 21, 2024
3077fec
FEXQonfig: Add status bar
neobrain Aug 21, 2024
d585063
FEXQonfig: Save CacheObjectCodeCompilation on modification
neobrain Aug 21, 2024
ed0c045
FEXQonfig: Add Qt 6 support
neobrain Aug 21, 2024
6a7914a
FEXQonfig: Fix double-save due to Qt 5 bug
neobrain Aug 21, 2024
f553782
FEXQonfig: Delay saving until after the user selects a filename
neobrain Aug 21, 2024
29fd62e
FEXQonfig: Drop leftover debug log
neobrain Aug 22, 2024
8b6fe0c
FEXQonfig: Make pages scrollable
neobrain Aug 22, 2024
3077add
FEXQonfig: Unindent after refactor
neobrain Aug 22, 2024
5f5a06f
FEXQonfig: Fix formatting
neobrain Aug 22, 2024
5d5b411
FEXQonfig: Tune window size constraints
neobrain Aug 22, 2024
aa4205c
FEXQonfig: Implement "Save As"
neobrain Aug 22, 2024
3fcfd2c
FEXQonfig: Enable file creation on save
neobrain Aug 22, 2024
8232be6
FEXQonfig: Implement RootFS selection from file dialog
neobrain Aug 22, 2024
1e0273d
FEXQonfig: Improve UI responsiveness
neobrain Aug 22, 2024
3a05b76
FEXQonfig: Further improve UI responsiveness
neobrain Aug 22, 2024
7176c71
FEXQonfig: Handle load failure
neobrain Aug 22, 2024
15fef17
FEXQonfig: Create config and RootFS folders on startup if needed
neobrain Aug 23, 2024
86d1ce7
FEXQonfig: Implement RootFS monitoring via inotify
neobrain Aug 23, 2024
f4fca44
FEXQonfig: Implement environment variable editing
neobrain Aug 23, 2024
fd1f564
FEXQonfig: Rename header to Main.h
neobrain Aug 23, 2024
58cff72
FEXQonfig: Use FolderDialog when selecting library forwarding paths
neobrain Aug 23, 2024
df86d80
FEXQonfig: Clean up object ownership
neobrain Aug 23, 2024
68abe40
FEXQonfig: Use better icon for RootFS file selection
neobrain Aug 23, 2024
bebf420
FEXQonfig: Fix Qt 6 build
neobrain Aug 24, 2024
6c92f94
FEXQonfig: Remove unused code from CMakeLists.txt
neobrain Aug 24, 2024
ca9a94d
CMake: Build only one FEXConfig and make Qt/ImGui exclusive choices
neobrain Aug 27, 2024
e88c57b
FEXQonfig: Move fallback RootFS entry to the top of the list
neobrain Aug 28, 2024
72d74ae
FEXQonfig: Set a maximum height for RootFS list and make it scrollable
neobrain Aug 28, 2024
cc9ccf8
FEXQonfig: Use Unicode/locale-aware sorting for RootFS list
neobrain Aug 28, 2024
539d5ed
FEXQonfig: Fix Qt6 runtime-warnings caused by unannotated return types
neobrain Aug 29, 2024
74da2eb
FEXQonfig: Fix unnecessary prompts for file selection on save
neobrain Aug 29, 2024
a444db7
FEXQonfig: Use consistent orthography
neobrain Aug 29, 2024
8a5388f
CMake: Build Dear ImGui only if needed
neobrain Aug 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CHECK_INCLUDE_FILES ("gdb/jit-reader.h" HAVE_GDB_JIT_READER_H)
option(BUILD_TESTS "Build unit tests to ensure sanity" TRUE)
option(BUILD_FEX_LINUX_TESTS "Build FEXLinuxTests, requires x86 compiler" FALSE)
option(BUILD_THUNKS "Build thunks" FALSE)
option(BUILD_FEXCONFIG "Build FEXConfig, requires SDL2 and X11" TRUE)
set(USE_FEXCONFIG_TOOLKIT "imgui" CACHE STRING "If set, build FEXConfig (qt or imgui)")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to make qt the default before merging it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to update our CI machines before it can be switched to default. Setting the cmake option until then should be fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also probably doesn't hurt to ship this as opt-in for one release, just in case edge case bugs come up :)

option(ENABLE_CLANG_THUNKS "Build thunks with clang" FALSE)
option(ENABLE_IWYU "Enables include what you use program" FALSE)
option(ENABLE_LTO "Enable LTO with compilation" TRUE)
Expand Down
10 changes: 8 additions & 2 deletions Source/Tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
add_subdirectory(CommonTools)

if (NOT MINGW_BUILD)
if (BUILD_FEXCONFIG)
if (USE_FEXCONFIG_TOOLKIT STREQUAL "imgui")
add_subdirectory(FEXConfig/)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a conditional so that we can only build this variant and not the other?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable. BUILD_FEXCONFIG is now called USE_FEXCONFIG_TOOLKIT and can be set to either ""/"qt"/"imgui". Since it's an exclusive choice, FEXQonfig has been renamed to FEXConfig.

endif()
elseif (USE_FEXCONFIG_TOOLKIT STREQUAL "qt")
find_package(Qt6 COMPONENTS Qml Quick Widgets)
if (NOT Qt6_FOUND)
find_package(Qt5 COMPONENTS Qml Quick Widgets REQUIRED)
endif()

add_subdirectory(FEXQonfig/)
endif()

if (ENABLE_GDB_SYMBOLS)
add_subdirectory(FEXGDBReader/)
Expand Down
28 changes: 28 additions & 0 deletions Source/Tools/FEXQonfig/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
set(CMAKE_AUTOMOC ON)

add_executable(FEXConfig)
target_sources(FEXConfig PRIVATE Main.cpp Main.h)
target_include_directories(FEXConfig PRIVATE ${CMAKE_SOURCE_DIR}/Source/)
target_link_libraries(FEXConfig PRIVATE Common)
if (Qt6_FOUND)
qt_add_resources(QT_RESOURCES qml6.qrc)
target_link_libraries(FEXConfig PRIVATE Qt6::Qml Qt6::Quick Qt6::Widgets)
else()
qt_add_resources(QT_RESOURCES qml5.qrc)
target_link_libraries(FEXConfig PRIVATE Qt5::Qml Qt5::Quick Qt5::Widgets)
endif()
target_sources(FEXConfig PRIVATE ${QT_RESOURCES})

if (CMAKE_BUILD_TYPE MATCHES "RELEASE")
target_link_options(FEXConfig
PRIVATE
"LINKER:--gc-sections"
"LINKER:--strip-all"
"LINKER:--as-needed"
)
endif()

install(TARGETS FEXConfig
RUNTIME
DESTINATION bin
COMPONENT runtime)
Loading
Loading