Skip to content

Commit

Permalink
fix: 修复在 Win 下编译不通过的问题;优化处理逻辑;修复多语言的支持;修补遗漏的功能;
Browse files Browse the repository at this point in the history
  • Loading branch information
Wing-summer committed Oct 19, 2024
1 parent e355043 commit fc64c20
Show file tree
Hide file tree
Showing 21 changed files with 360 additions and 159 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/qt-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest]
os: [windows-latest, ubuntu-latest]
qt_version: [5.15.2, 6.6.2]
arch: [gcc_64]
arch: [win64_msvc2019_64, gcc_64]
exclude:
- os: windows-latest
arch: gcc_64
- os: ubuntu-latest
arch: win64_msvc2019_64

steps:
- uses: actions/checkout@v3
Expand Down
20 changes: 17 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,15 @@ else()
endif()

if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(WingGifEditor2 MANUAL_FINALIZATION ${PROJECT_SOURCES}
${QM_FILES})
if(WIN32)
set(app_icon_resource_windows "${CMAKE_CURRENT_SOURCE_DIR}/favicon.rc")
qt_add_executable(WingGifEditor2 MANUAL_FINALIZATION ${PROJECT_SOURCES}
${QM_FILES} ${app_icon_resource_windows})
else()
qt_add_executable(WingGifEditor2 MANUAL_FINALIZATION ${PROJECT_SOURCES}
${QM_FILES})
endif()

# Define target properties for Android with Qt 6 as: set_property(TARGET
# WingGifEditor2 APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android) For more information, see
Expand All @@ -210,7 +217,14 @@ else()
if(ANDROID)
message(FATAL_ERROR "Not supported for Android!")
else()
add_executable(WingGifEditor2 ${PROJECT_SOURCES} ${QM_FILES})
if(WIN32)
set(app_icon_resource_windows
"${CMAKE_CURRENT_SOURCE_DIR}/favicon.rc")
add_executable(WingGifEditor2 ${PROJECT_SOURCES} ${QM_FILES}
${app_icon_resource_windows})
else()
add_executable(WingGifEditor2 ${PROJECT_SOURCES} ${QM_FILES})
endif()
endif()
endif()

Expand Down
Binary file added appicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions favicon.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "appicon.ico"
Loading

0 comments on commit fc64c20

Please sign in to comment.