From 5843332980de14778acf265901ed79aceecf8bcb Mon Sep 17 00:00:00 2001 From: taynpg Date: Tue, 24 Mar 2026 12:22:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=93=E5=8C=85=E6=97=B6im?= =?UTF-8?q?age=E7=9B=B8=E5=85=B3=E6=8F=92=E4=BB=B6=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 2 +- CMakeLists.txt | 8 +++++++- Script/qt6build-MinGW-Official.bat | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c8a92f4..70921b8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,7 +17,7 @@ "args": [] }, "cmake.configureSettings": { - "CMAKE_PREFIX_PATH": "C:/dev/qt6", + "CMAKE_PREFIX_PATH": "C:/local/qt6", }, "cmake.configureArgs": [ "-Wno-dev", diff --git a/CMakeLists.txt b/CMakeLists.txt index ecef0f4..b84d094 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,11 @@ set(QT_DEP_STYLES "${CMAKE_PREFIX_PATH}/plugins/styles/qmodernwindowsstyle.dll" "${CMAKE_PREFIX_PATH}/plugins/styles/qwindowsvistastyle.dll" ) +set(QT_IMG_DEP +"${CMAKE_PREFIX_PATH}/plugins/imageformats/qgif.dll" +"${CMAKE_PREFIX_PATH}/plugins/imageformats/qico.dll" +"${CMAKE_PREFIX_PATH}/plugins/imageformats/qjpeg.dll" +) endif() set(CMAKE_DEBUG_POSTFIX "d") @@ -109,7 +114,7 @@ function(safe_install_files files_list destination) if(EXISTS ${file}) list(APPEND existing_files ${file}) else() - message(STATUS "跳过: ${file}") + message(STATUS "Jump: ${file}") endif() endforeach() if(existing_files) @@ -129,6 +134,7 @@ if (WIN32) install(FILES ${QT_DEP_FILES} DESTINATION bin) safe_install_files("${QT_DEP_PLATFORM}" "bin/platforms") safe_install_files("${QT_DEP_STYLES}" "bin/styles") +safe_install_files("${QT_IMG_DEP}" "bin/imageformats") endif() execute_process( diff --git a/Script/qt6build-MinGW-Official.bat b/Script/qt6build-MinGW-Official.bat index 311586f..fee334b 100644 --- a/Script/qt6build-MinGW-Official.bat +++ b/Script/qt6build-MinGW-Official.bat @@ -1,6 +1,6 @@ @echo on -set QT_DIR=C:/Qt/6.8.3/mingw_64 +set QT_DIR=C:/local/qt6 cd .. cmake -G "MinGW Makefiles" -Bbuild-qt6 -S. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%QT_DIR% -DQT_DEFAULT_MAJOR_VERSION=6 -DCOMPILE_GUI=ON -DRELEASE_MARK=ON cmake --build build-qt6 --config Release