2023-08-05 22:14:05 -04:00
|
|
|
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
2023-10-04 11:09:50 -04:00
|
|
|
add_library(astra_static STATIC)
|
|
|
|
|
2023-10-08 18:02:02 -04:00
|
|
|
ecm_qt_declare_logging_category(astra_static
|
|
|
|
HEADER astra_log.h
|
|
|
|
IDENTIFIER ASTRA_LOG
|
|
|
|
CATEGORY_NAME zone.xiv.astra
|
|
|
|
DESCRIPTION "Astra logs"
|
|
|
|
EXPORT ASTRA
|
|
|
|
)
|
|
|
|
|
|
|
|
ecm_qt_declare_logging_category(astra_static
|
|
|
|
HEADER astra_http_log.h
|
|
|
|
IDENTIFIER ASTRA_HTTP
|
|
|
|
CATEGORY_NAME zone.xiv.astra.http
|
|
|
|
DESCRIPTION "Astra HTTP requests"
|
|
|
|
EXPORT ASTRA
|
|
|
|
)
|
|
|
|
|
|
|
|
ecm_qt_declare_logging_category(astra_static
|
|
|
|
HEADER astra_patcher_log.h
|
|
|
|
IDENTIFIER ASTRA_PATCHER
|
|
|
|
CATEGORY_NAME zone.xiv.astra.patcher
|
|
|
|
DESCRIPTION "Astra patcher"
|
|
|
|
EXPORT ASTRA
|
|
|
|
)
|
|
|
|
|
2023-10-04 11:09:50 -04:00
|
|
|
target_sources(astra_static PRIVATE
|
|
|
|
include/patchlist.h
|
|
|
|
src/patchlist.cpp)
|
|
|
|
target_include_directories(astra_static PUBLIC include)
|
|
|
|
target_link_libraries(astra_static PUBLIC
|
|
|
|
Qt6::Core)
|
|
|
|
|
2023-07-30 08:49:34 -04:00
|
|
|
add_executable(astra)
|
2023-09-16 17:41:51 -04:00
|
|
|
|
|
|
|
qt_add_qml_module(astra
|
|
|
|
URI zone.xiv.astra
|
|
|
|
VERSION 1.0)
|
|
|
|
|
2023-07-30 08:49:34 -04:00
|
|
|
target_sources(astra PRIVATE
|
|
|
|
include/account.h
|
|
|
|
include/accountmanager.h
|
|
|
|
include/assetupdater.h
|
2024-04-19 20:29:28 -04:00
|
|
|
include/benchmarkinstaller.h
|
2024-07-28 11:17:30 -04:00
|
|
|
include/charactersync.h
|
2023-08-18 23:27:29 -04:00
|
|
|
include/compatibilitytoolinstaller.h
|
2023-07-30 08:49:34 -04:00
|
|
|
include/encryptedarg.h
|
2024-05-26 08:02:56 -04:00
|
|
|
include/existinginstallmodel.h
|
2023-10-11 14:30:21 -04:00
|
|
|
include/gamerunner.h
|
2023-07-30 08:49:34 -04:00
|
|
|
include/gameinstaller.h
|
|
|
|
include/headline.h
|
|
|
|
include/launchercore.h
|
2023-10-11 13:25:24 -04:00
|
|
|
include/launchersettings.h
|
2023-10-08 18:02:02 -04:00
|
|
|
include/logger.h
|
2023-07-30 08:49:34 -04:00
|
|
|
include/patcher.h
|
2023-10-08 18:02:02 -04:00
|
|
|
include/processlogger.h
|
2024-07-30 19:15:37 -04:00
|
|
|
include/processwatcher.h
|
2023-07-30 08:49:34 -04:00
|
|
|
include/profile.h
|
|
|
|
include/profilemanager.h
|
2023-10-11 14:13:42 -04:00
|
|
|
include/sapphirelogin.h
|
|
|
|
include/squareenixlogin.h
|
2023-07-30 08:49:34 -04:00
|
|
|
include/steamapi.h
|
2024-07-28 11:17:30 -04:00
|
|
|
include/syncmanager.h
|
2023-08-18 14:52:06 -04:00
|
|
|
include/utility.h
|
2022-06-08 12:45:12 -04:00
|
|
|
|
2023-07-30 08:49:34 -04:00
|
|
|
src/account.cpp
|
|
|
|
src/accountmanager.cpp
|
|
|
|
src/assetupdater.cpp
|
2024-04-19 20:29:28 -04:00
|
|
|
src/benchmarkinstaller.cpp
|
2024-07-28 11:17:30 -04:00
|
|
|
src/charactersync.cpp
|
2023-08-18 23:27:29 -04:00
|
|
|
src/compatibilitytoolinstaller.cpp
|
2023-07-30 08:49:34 -04:00
|
|
|
src/encryptedarg.cpp
|
2024-05-26 08:02:56 -04:00
|
|
|
src/existinginstallmodel.cpp
|
2023-10-11 14:30:21 -04:00
|
|
|
src/gamerunner.cpp
|
2023-12-17 11:12:13 -05:00
|
|
|
src/headline.cpp
|
2023-07-30 08:49:34 -04:00
|
|
|
src/gameinstaller.cpp
|
|
|
|
src/launchercore.cpp
|
2023-10-11 13:25:24 -04:00
|
|
|
src/launchersettings.cpp
|
2023-10-08 18:02:02 -04:00
|
|
|
src/logger.cpp
|
2023-07-30 08:49:34 -04:00
|
|
|
src/main.cpp
|
|
|
|
src/patcher.cpp
|
2023-10-08 18:02:02 -04:00
|
|
|
src/processlogger.cpp
|
2024-07-30 19:15:37 -04:00
|
|
|
src/processwatcher.cpp
|
2023-07-30 08:49:34 -04:00
|
|
|
src/profile.cpp
|
|
|
|
src/profilemanager.cpp
|
2023-10-11 14:13:42 -04:00
|
|
|
src/sapphirelogin.cpp
|
|
|
|
src/squareenixlogin.cpp
|
2023-07-30 08:49:34 -04:00
|
|
|
src/steamapi.cpp
|
2024-07-28 11:17:30 -04:00
|
|
|
src/syncmanager.cpp
|
2023-09-17 09:31:25 -04:00
|
|
|
src/utility.cpp
|
|
|
|
)
|
|
|
|
|
2023-09-16 17:41:51 -04:00
|
|
|
qt_target_qml_sources(astra
|
|
|
|
QML_FILES
|
|
|
|
ui/Components/FormFileDelegate.qml
|
|
|
|
ui/Components/FormFolderDelegate.qml
|
2023-09-17 19:20:41 -04:00
|
|
|
ui/Pages/AutoLoginPage.qml
|
2023-09-16 17:41:51 -04:00
|
|
|
ui/Pages/BrowserPage.qml
|
|
|
|
ui/Pages/LoginPage.qml
|
|
|
|
ui/Pages/MainPage.qml
|
|
|
|
ui/Pages/NewsPage.qml
|
|
|
|
ui/Pages/StatusPage.qml
|
|
|
|
ui/Settings/AboutPage.qml
|
|
|
|
ui/Settings/AccountSettings.qml
|
|
|
|
ui/Settings/AccountsPage.qml
|
|
|
|
ui/Settings/CompatibilityToolSetup.qml
|
|
|
|
ui/Settings/DeveloperSettings.qml
|
|
|
|
ui/Settings/GeneralSettings.qml
|
|
|
|
ui/Settings/ProfileSettings.qml
|
|
|
|
ui/Settings/ProfilesPage.qml
|
|
|
|
ui/Settings/SettingsPage.qml
|
2024-07-28 11:17:30 -04:00
|
|
|
ui/Settings/SyncSettings.qml
|
2023-09-16 17:41:51 -04:00
|
|
|
ui/Setup/AccountSetup.qml
|
|
|
|
ui/Setup/AddSapphire.qml
|
|
|
|
ui/Setup/AddSquareEnix.qml
|
2024-04-19 20:29:28 -04:00
|
|
|
ui/Setup/BenchmarkInstallProgress.qml
|
2023-09-16 17:41:51 -04:00
|
|
|
ui/Setup/ExistingSetup.qml
|
|
|
|
ui/Setup/InstallProgress.qml
|
|
|
|
ui/Setup/SetupPage.qml
|
|
|
|
ui/Main.qml
|
|
|
|
)
|
2023-09-17 09:31:25 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
set_source_files_properties(../zone.xiv.astra.svg PROPERTIES
|
|
|
|
QT_RESOURCE_ALIAS /zone.xiv.astra.svg
|
|
|
|
)
|
|
|
|
|
|
|
|
qt_target_qml_sources(astra
|
|
|
|
PREFIX /
|
|
|
|
RESOURCES
|
|
|
|
../zone.xiv.astra.svg
|
|
|
|
)
|
|
|
|
|
2023-07-30 08:49:34 -04:00
|
|
|
kconfig_add_kcfg_files(astra GENERATE_MOC config.kcfgc accountconfig.kcfgc profileconfig.kcfgc)
|
2023-07-30 10:33:07 -04:00
|
|
|
target_include_directories(astra PRIVATE include ${CMAKE_BINARY_DIR})
|
2023-07-30 08:49:34 -04:00
|
|
|
target_link_libraries(astra PRIVATE
|
2023-10-04 11:09:50 -04:00
|
|
|
astra_static
|
2023-07-30 08:49:34 -04:00
|
|
|
physis
|
2023-10-10 16:47:26 -04:00
|
|
|
physis-logger
|
2023-07-30 08:49:34 -04:00
|
|
|
cotp
|
2023-12-31 17:48:39 -05:00
|
|
|
KDAB::kdsingleapplication
|
2023-09-16 17:32:38 -04:00
|
|
|
Qt6Keychain::Qt6Keychain
|
|
|
|
Qt6::Core
|
|
|
|
Qt6::Network
|
|
|
|
Qt6::Widgets
|
|
|
|
Qt6::Quick
|
|
|
|
Qt6::QuickControls2
|
2023-09-16 20:12:42 -04:00
|
|
|
Qt6::Concurrent
|
2023-12-17 10:09:01 -05:00
|
|
|
KF6::Kirigami
|
2023-09-16 17:32:38 -04:00
|
|
|
KF6::I18n
|
|
|
|
KF6::ConfigCore
|
|
|
|
KF6::ConfigGui
|
2023-09-16 18:37:42 -04:00
|
|
|
KF6::CoreAddons
|
2023-12-20 18:00:40 -05:00
|
|
|
KF6::Archive
|
2023-09-16 18:37:42 -04:00
|
|
|
QCoro::Core
|
|
|
|
QCoro::Network
|
2024-07-28 11:17:30 -04:00
|
|
|
QCoro::Qml
|
|
|
|
QuotientQt6)
|
2024-04-27 16:38:22 +00:00
|
|
|
if (BUILD_WEBVIEW)
|
|
|
|
target_link_libraries(astra PRIVATE
|
|
|
|
Qt6::WebView
|
|
|
|
)
|
|
|
|
target_compile_definitions(astra PRIVATE HAVE_WEBVIEW)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (WIN32)
|
|
|
|
target_link_libraries(astra PRIVATE
|
|
|
|
KF6::BreezeIcons
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (NOT MSVC)
|
|
|
|
target_compile_options(astra PRIVATE -fexceptions)
|
|
|
|
endif ()
|
2022-06-08 12:45:12 -04:00
|
|
|
|
2022-08-15 11:14:37 -04:00
|
|
|
if (BUILD_FLATPAK)
|
2022-06-08 12:45:12 -04:00
|
|
|
target_compile_definitions(astra PRIVATE FLATPAK)
|
2022-08-15 11:14:37 -04:00
|
|
|
endif ()
|
2022-06-08 12:45:12 -04:00
|
|
|
|
2023-07-30 08:49:34 -04:00
|
|
|
if (ENABLE_GAMEMODE)
|
|
|
|
target_link_libraries(astra PRIVATE ${GAMEMODE_LIBRARIES})
|
|
|
|
target_compile_definitions(astra PRIVATE ENABLE_GAMEMODE)
|
|
|
|
endif ()
|
|
|
|
|
2024-04-27 16:38:22 +00:00
|
|
|
if (WIN32)
|
|
|
|
set_target_properties(astra PROPERTIES
|
|
|
|
WIN32_EXECUTABLE TRUE
|
|
|
|
OUTPUT_NAME "Astra")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
install(TARGETS astra ${KF6_INSTALL_TARGETS_DEFAULT_ARGS})
|
|
|
|
|
|
|
|
ecm_add_app_icon(astra
|
|
|
|
ICONS
|
|
|
|
${CMAKE_SOURCE_DIR}/zone.xiv.astra.svg
|
|
|
|
${CMAKE_SOURCE_DIR}/resources/16-astra.png
|
|
|
|
${CMAKE_SOURCE_DIR}/resources/32-astra.png
|
|
|
|
${CMAKE_SOURCE_DIR}/resources/48-astra.png
|
|
|
|
${CMAKE_SOURCE_DIR}/resources/256-astra.png
|
|
|
|
)
|
|
|
|
|
|
|
|
qt_finalize_target(astra)
|
|
|
|
|
2024-05-26 09:44:38 -04:00
|
|
|
# the current tooling completely breaks in Flatpak, and is unnecessary there anyway
|
2024-06-27 23:32:26 -04:00
|
|
|
if (WIN32)
|
2024-05-26 09:44:38 -04:00
|
|
|
qt_generate_deploy_qml_app_script(
|
|
|
|
TARGET astra
|
|
|
|
OUTPUT_SCRIPT deploy_script
|
|
|
|
NO_UNSUPPORTED_PLATFORM_ERROR
|
|
|
|
)
|
|
|
|
install(SCRIPT ${deploy_script})
|
|
|
|
endif()
|