feat: 支持 Linux 客户端打包与跨平台运行

This commit is contained in:
2026-07-14 08:39:41 +00:00
parent c960d3b04d
commit f703ab0302
27 changed files with 1249 additions and 417 deletions
+19 -6
View File
@@ -1,6 +1,19 @@
project(Bootstrap LANGUAGES CXX)
add_executable(Bootstrap WIN32 main.cpp)
target_compile_features(Bootstrap PRIVATE cxx_std_17)
target_compile_definitions(Bootstrap PRIVATE UNICODE _UNICODE)
target_link_libraries(Bootstrap PRIVATE shell32)
project(Bootstrap LANGUAGES CXX)
add_executable(Bootstrap
main.cpp
${CMAKE_SOURCE_DIR}/i18n/update-client.qrc
)
target_compile_features(Bootstrap PRIVATE cxx_std_17)
target_link_libraries(Bootstrap PRIVATE Qt5::Core Qt5::Widgets)
if(WIN32)
set_target_properties(Bootstrap PROPERTIES WIN32_EXECUTABLE TRUE)
get_target_property(QT_WINDEPLOYQT_EXE Qt5::qmake IMPORTED_LOCATION)
get_filename_component(QT_BIN_PATH "${QT_WINDEPLOYQT_EXE}" DIRECTORY)
set(WINDEPLOYQT "${QT_BIN_PATH}/windeployqt.exe")
add_custom_command(TARGET Bootstrap POST_BUILD
COMMAND ${WINDEPLOYQT} $<IF:$<CONFIG:Debug>,--debug,--release> $<TARGET_FILE:Bootstrap>
COMMENT "Deploy Qt runtime for Bootstrap"
)
endif()