Compare commits
5 Commits
c38a9010c3
...
v0.9.0
| Author | SHA1 | Date | |
|---|---|---|---|
| aa6ae9d69d | |||
| 9ad11c4280 | |||
| 58a3b8c4fb | |||
| bd5d52949c | |||
| 9f0ce782e4 |
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@@ -3,8 +3,6 @@ name: windows-build
|
||||
on:
|
||||
# 在设置git tag时触发执行
|
||||
push:
|
||||
branches:
|
||||
- 'gui'
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
@@ -41,7 +39,7 @@ jobs:
|
||||
|
||||
- name: Deploy Qt
|
||||
# 寻找需要的dll
|
||||
run: windeployqt ${{github.workspace}}/build/auto_bus_gui.exe
|
||||
run: windeployqt ${{github.workspace}}/build/Release/auto_bus_gui.exe
|
||||
|
||||
- name: Upload Release
|
||||
# 上传发布
|
||||
@@ -50,10 +48,15 @@ jobs:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
prerelease: false
|
||||
files: |
|
||||
${{github.workspace}}/build/auto_bus_gui.exe
|
||||
${{github.workspace}}/build/*.dll
|
||||
${{github.workspace}}/build/iconengines/*.dll
|
||||
${{github.workspace}}/build/imageformats/*.dll
|
||||
${{github.workspace}}/build/platforms/*.dll
|
||||
${{github.workspace}}/build/styles/*.dll
|
||||
${{github.workspace}}/build/translations/*.qm
|
||||
build/Release/auto_bus_gui.exe
|
||||
build/Release/*.dll
|
||||
build/Release/iconengines/*.dll
|
||||
build/Release/imageformats/*.dll
|
||||
build/Release/platforms/*.dll
|
||||
build/Release/styles/*.dll
|
||||
build/Release/translations/*.qm
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,32 +38,3 @@ target_link_libraries(auto_bus_gui
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
set(DEBUG_SUFFIX)
|
||||
if (MSVC AND CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
set(DEBUG_SUFFIX "d")
|
||||
endif ()
|
||||
set(QT_INSTALL_PATH "${CMAKE_PREFIX_PATH}")
|
||||
if (NOT EXISTS "${QT_INSTALL_PATH}/bin")
|
||||
set(QT_INSTALL_PATH "${QT_INSTALL_PATH}/..")
|
||||
if (NOT EXISTS "${QT_INSTALL_PATH}/bin")
|
||||
set(QT_INSTALL_PATH "${QT_INSTALL_PATH}/..")
|
||||
endif ()
|
||||
endif ()
|
||||
if (EXISTS "${QT_INSTALL_PATH}/plugins/platforms/qwindows${DEBUG_SUFFIX}.dll")
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory
|
||||
"$<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins/platforms/")
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${QT_INSTALL_PATH}/plugins/platforms/qwindows${DEBUG_SUFFIX}.dll"
|
||||
"$<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins/platforms/")
|
||||
endif ()
|
||||
foreach (QT_LIB Core)
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${QT_INSTALL_PATH}/bin/Qt6${QT_LIB}${DEBUG_SUFFIX}.dll"
|
||||
"$<TARGET_FILE_DIR:${PROJECT_NAME}>")
|
||||
endforeach (QT_LIB)
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user