-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split backend into a lib and frontend into a thin exec. off static lib
This allows for different frontends (i.e. console-based) to be added easily, and also advances towards unit testing being easier (though at this moment its still very impractical).
- Loading branch information
1 parent
9f3046a
commit b3e76f9
Showing
106 changed files
with
1,112 additions
and
894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,176 +1,2 @@ | ||
#================= Common Build ========================= | ||
|
||
# Pre-configure target | ||
set(CLIFP_SOURCE | ||
kernel/buildinfo.h | ||
kernel/core.h | ||
kernel/core.cpp | ||
kernel/directive.h | ||
kernel/director.h | ||
kernel/director.cpp | ||
kernel/directorate.h | ||
kernel/directorate.cpp | ||
kernel/driver.h | ||
kernel/driver.cpp | ||
kernel/errorstatus.h | ||
kernel/errorstatus.cpp | ||
command/command.h | ||
command/command.cpp | ||
command/c-download.h | ||
command/c-download.cpp | ||
command/c-link.h | ||
command/c-link.cpp | ||
command/c-play.h | ||
command/c-play.cpp | ||
command/c-prepare.h | ||
command/c-prepare.cpp | ||
command/c-run.h | ||
command/c-run.cpp | ||
command/c-share.h | ||
command/c-share.cpp | ||
command/c-show.cpp | ||
command/c-show.h | ||
command/c-update.h | ||
command/c-update.cpp | ||
command/title-command.h | ||
command/title-command.cpp | ||
task/task.h | ||
task/task.cpp | ||
task/t-download.h | ||
task/t-download.cpp | ||
task/t-exec.h | ||
task/t-exec.cpp | ||
task/t-extra.h | ||
task/t-extra.cpp | ||
task/t-extract.h | ||
task/t-extract.cpp | ||
task/t-generic.h | ||
task/t-generic.cpp | ||
task/t-message.h | ||
task/t-message.cpp | ||
task/t-mount.h | ||
task/t-mount.cpp | ||
task/t-sleep.h | ||
task/t-sleep.cpp | ||
tools/blockingprocessmanager.h | ||
tools/blockingprocessmanager.cpp | ||
tools/deferredprocessmanager.h | ||
tools/deferredprocessmanager.cpp | ||
tools/mounter_game_server.h | ||
tools/mounter_game_server.cpp | ||
tools/mounter_qmp.h | ||
tools/mounter_qmp.cpp | ||
tools/mounter_router.h | ||
tools/mounter_router.cpp | ||
frontend/statusrelay.h | ||
frontend/statusrelay.cpp | ||
controller.h | ||
controller.cpp | ||
utility.h | ||
utility.cpp | ||
main.cpp | ||
) | ||
|
||
set(CLIFP_LINKS | ||
PRIVATE | ||
Qt6::Core | ||
Qt6::Gui | ||
Qt6::Widgets | ||
Qt6::Sql | ||
Qt6::Network | ||
Qx::Core | ||
Qx::Io | ||
Qx::Network | ||
Qx::Widgets | ||
Fp::Fp | ||
QuaZip::QuaZip | ||
magic_enum::magic_enum | ||
QI-QMP::Qmpi | ||
) | ||
|
||
if(CMAKE_SYSTEM_NAME STREQUAL Windows) | ||
list(APPEND CLIFP_SOURCE | ||
command/c-link_win.cpp | ||
task/t-exec_win.cpp | ||
task/t-bideprocess.h | ||
task/t-bideprocess.cpp | ||
) | ||
|
||
list(APPEND CLIFP_LINKS | ||
PRIVATE | ||
Qx::Windows | ||
) | ||
endif() | ||
|
||
if(CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
list(APPEND CLIFP_SOURCE | ||
command/c-link_linux.cpp | ||
task/t-awaitdocker.h | ||
task/t-awaitdocker.cpp | ||
task/t-exec_linux.cpp | ||
) | ||
list(APPEND CLIFP_LINKS | ||
PRIVATE | ||
Qx::Linux | ||
) | ||
endif() | ||
|
||
# Add via ob standard executable | ||
include(OB/Executable) | ||
ob_add_standard_executable(${APP_TARGET_NAME} | ||
NAMESPACE "${PROJECT_NAMESPACE}" | ||
ALIAS "${APP_ALIAS_NAME}" | ||
SOURCE ${CLIFP_SOURCE} | ||
RESOURCE "resources.qrc" | ||
LINKS ${CLIFP_LINKS} | ||
CONFIG STANDARD | ||
WIN32 | ||
) | ||
|
||
## Forward select project variables to C++ code | ||
include(OB/CppVars) | ||
ob_add_cpp_vars(${APP_TARGET_NAME} | ||
NAME "project_vars" | ||
PREFIX "PROJECT_" | ||
VARS | ||
VERSION_STR "\"${PROJECT_VERSION_VERBOSE}\"" | ||
SHORT_NAME "\"${APP_ALIAS_NAME}\"" | ||
TARGET_FP_VER_PFX_STR "\"${TARGET_FP_VERSION_PREFIX}\"" | ||
APP_NAME "\"${PROJECT_FORMAL_NAME}\"" | ||
) | ||
|
||
## Add build info | ||
if(BUILD_SHARED_LIBS) | ||
set(link_str "Shared") | ||
else() | ||
set(link_str "Static") | ||
endif() | ||
|
||
ob_add_cpp_vars(${APP_TARGET_NAME} | ||
NAME "_buildinfo" | ||
PREFIX "BUILDINFO_" | ||
VARS | ||
SYSTEM "\"${CMAKE_SYSTEM_NAME}\"" | ||
LINKAGE "\"${link_str}\"" | ||
COMPILER "u\"${CMAKE_CXX_COMPILER_ID}\"_s" | ||
COMPILER_VER_STR "u\"${CMAKE_CXX_COMPILER_VERSION}\"_s" | ||
) | ||
|
||
## Add exe details on Windows | ||
if(CMAKE_SYSTEM_NAME STREQUAL Windows) | ||
# Set target exe details | ||
include(OB/WinExecutableDetails) | ||
ob_set_win_executable_details(${APP_TARGET_NAME} | ||
ICON "${CMAKE_CURRENT_SOURCE_DIR}/res/app/CLIFp.ico" | ||
FILE_VER ${PROJECT_VERSION} | ||
PRODUCT_VER ${TARGET_FP_VERSION_PREFIX} | ||
COMPANY_NAME "oblivioncth" | ||
FILE_DESC "CLI for Flashpoint Archive" | ||
INTERNAL_NAME "CLIFp" | ||
COPYRIGHT "Open Source @ 2022 oblivioncth" | ||
TRADEMARKS_ONE "All Rights Reserved" | ||
TRADEMARKS_TWO "GNU AGPL V3" | ||
ORIG_FILENAME "CLIFp.exe" | ||
PRODUCT_NAME "${PROJECT_FORMAL_NAME}" | ||
) | ||
endif() | ||
add_subdirectory(gui) | ||
add_subdirectory(console) |
Empty file.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file not shown.
File renamed without changes.
File renamed without changes
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#================= Common Build ========================= | ||
|
||
# Add via ob standard executable | ||
include(OB/Executable) | ||
ob_add_standard_executable(${APP_GUI_TARGET_NAME} | ||
NAMESPACE "${PROJECT_NAMESPACE}" | ||
ALIAS "${APP_GUI_ALIAS_NAME}" | ||
SOURCE | ||
frontend/gui.h | ||
frontend/gui.cpp | ||
main.cpp | ||
RESOURCE "resources.qrc" | ||
LINKS | ||
PRIVATE | ||
CLIFp::FrontendFramework | ||
${Qt}::Widgets | ||
Qx::Widgets | ||
magic_enum::magic_enum | ||
CONFIG STANDARD | ||
WIN32 | ||
) | ||
|
||
# Add exe details on Windows | ||
if(CMAKE_SYSTEM_NAME STREQUAL Windows) | ||
include(FrontendFramework) | ||
set_clip_exe_details(${APP_GUI_TARGET_NAME} ${APP_GUI_ALIAS_NAME}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<RCC> | ||
<qresource prefix="/frontend"> | ||
<file>tray/Exit.png</file> | ||
</qresource> | ||
</RCC> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.