mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
b88d32ff5b
1 with the data directories 2 with the BSA archives 3 with the content selector When user select a directory to be added, first we walk the directory hierarchy to make a list of all potential data= entries. If we find none, the selected directory is added. If more than one data directory is found, user is presented with a directory list to check which one(s) are to be added. Directories containing one or more content file are marked with an icon. data= and fallback-archive= lines are handled like content= lines: - they are part of the profile in launcher.cfg, prefixed by the profile name - they are updated in openmw.cfg when profile is selected / created Directories can be moved in the list by drag and drop or by buttons. Insertion is possible anywhere in the list. Global data path and data local are shown but are greyed out, as they are always included. No attempt is made to ensure that the user choice are valid (dependencies, overwrite of content). After a profile is loaded, any added content is highlighted in green.
99 lines
2.2 KiB
CMake
99 lines
2.2 KiB
CMake
set(LAUNCHER
|
|
datafilespage.cpp
|
|
graphicspage.cpp
|
|
sdlinit.cpp
|
|
main.cpp
|
|
maindialog.cpp
|
|
playpage.cpp
|
|
textslotmsgbox.cpp
|
|
settingspage.cpp
|
|
advancedpage.cpp
|
|
|
|
utils/cellnameloader.cpp
|
|
utils/profilescombobox.cpp
|
|
utils/textinputdialog.cpp
|
|
utils/lineedit.cpp
|
|
utils/openalutil.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/files/windows/launcher.rc
|
|
)
|
|
|
|
set(LAUNCHER_HEADER
|
|
datafilespage.hpp
|
|
graphicspage.hpp
|
|
sdlinit.hpp
|
|
maindialog.hpp
|
|
playpage.hpp
|
|
textslotmsgbox.hpp
|
|
settingspage.hpp
|
|
advancedpage.hpp
|
|
|
|
utils/cellnameloader.hpp
|
|
utils/profilescombobox.hpp
|
|
utils/textinputdialog.hpp
|
|
utils/lineedit.hpp
|
|
utils/openalutil.hpp
|
|
)
|
|
|
|
# Headers that must be pre-processed
|
|
set(LAUNCHER_UI
|
|
${CMAKE_SOURCE_DIR}/files/ui/datafilespage.ui
|
|
${CMAKE_SOURCE_DIR}/files/ui/graphicspage.ui
|
|
${CMAKE_SOURCE_DIR}/files/ui/mainwindow.ui
|
|
${CMAKE_SOURCE_DIR}/files/ui/playpage.ui
|
|
${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
|
${CMAKE_SOURCE_DIR}/files/ui/settingspage.ui
|
|
${CMAKE_SOURCE_DIR}/files/ui/advancedpage.ui
|
|
${CMAKE_SOURCE_DIR}/files/ui/directorypicker.ui
|
|
)
|
|
|
|
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})
|
|
|
|
set(QT_USE_QTGUI 1)
|
|
|
|
# Set some platform specific settings
|
|
if(WIN32)
|
|
set(GUI_TYPE WIN32)
|
|
set(QT_USE_QTMAIN TRUE)
|
|
endif(WIN32)
|
|
|
|
QT5_ADD_RESOURCES(RCC_SRCS ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc)
|
|
QT5_WRAP_UI(UI_HDRS ${LAUNCHER_UI})
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
if(NOT WIN32)
|
|
include_directories(${LIBUNSHIELD_INCLUDE_DIR})
|
|
endif(NOT WIN32)
|
|
|
|
# Main executable
|
|
openmw_add_executable(openmw-launcher
|
|
${GUI_TYPE}
|
|
${LAUNCHER}
|
|
${LAUNCHER_HEADER}
|
|
${RCC_SRCS}
|
|
${MOC_SRCS}
|
|
${UI_HDRS}
|
|
)
|
|
|
|
if (WIN32)
|
|
INSTALL(TARGETS openmw-launcher RUNTIME DESTINATION ".")
|
|
endif (WIN32)
|
|
|
|
target_link_libraries(openmw-launcher
|
|
${SDL2_LIBRARY_ONLY}
|
|
${OPENAL_LIBRARY}
|
|
components_qt
|
|
)
|
|
|
|
target_link_libraries(openmw-launcher Qt5::Widgets Qt5::Core)
|
|
|
|
if (BUILD_WITH_CODE_COVERAGE)
|
|
add_definitions (--coverage)
|
|
target_link_libraries(openmw-launcher gcov)
|
|
endif()
|
|
|
|
if(USE_QT)
|
|
set_property(TARGET openmw-launcher PROPERTY AUTOMOC ON)
|
|
endif(USE_QT)
|
|
|