From 4a0d28dd698d3d6104f78232de27571c26e5f44b Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Mon, 16 May 2022 18:08:45 +0900 Subject: [PATCH 01/15] =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=96=E3=83=A9?= =?UTF-8?q?=E3=83=AA=E3=81=AE=E5=8F=96=E5=BE=97=E3=82=92conan=E3=83=99?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ライブラリの取得をconanベースに変更 --- cui/CMakeLists.txt | 20 ++++++++++++++------ cui/conanfile.txt | 21 +++++++++++++++++++++ scripts/build_win_cui.bat | 8 ++++++-- scripts/prepare_win.bat | 14 -------------- 4 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 cui/conanfile.txt diff --git a/cui/CMakeLists.txt b/cui/CMakeLists.txt index adb8ee3..5a702ac 100644 --- a/cui/CMakeLists.txt +++ b/cui/CMakeLists.txt @@ -1,11 +1,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE) if((NOT CMAKE_PROJECT_NAME)) - message(FATAL_ERROR "CMAKE_PROJECT_NAME must be specified!") + set(CMAKE_PROJECT_NAME "PSDtoSS6") + #message(FATAL_ERROR "CMAKE_PROJECT_NAME must be specified!") +else() endif() -project(${CMAKE_PROJECT_NAME}) +project(${CMAKE_PROJECT_NAME} CXX) IF(WIN32) ELSEIF(APPLE) @@ -15,10 +18,14 @@ ELSEIF(CMAKE_COMPILER_IS_GNUCXX) ADD_DEFINITIONS(-std=gnu++14) ENDIF() +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + + find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) find_package(JPEG REQUIRED) -find_package(tinyxml2 CONFIG REQUIRED) +find_package(tinyxml2 ) find_path(SYSTEM_INCLUDE_DIR picojson.h) find_package(ICU COMPONENTS UC IO REQUIRED) @@ -65,8 +72,8 @@ ADD_EXECUTABLE(${CMAKE_PROJECT_NAME} IF(WIN32) ADD_DEFINITIONS(/D_WIN64) - set(CMAKE_CXX_FLAGS_RELEASE "/MT ") - set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Zi /Od") +# set(CMAKE_CXX_FLAGS_RELEASE "/MT ") +# set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Zi /Od") set(CMAKE_EXE_LINKER_FLAGS "/OPT:REF /OPT:ICF ") ADD_DEFINITIONS(-DUNICODE -D_UNICODE) @@ -86,7 +93,8 @@ ENDIF() include_directories( ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${tinyxml2_include_dir} ${jpeg_include_dir} libpsd-0.9/include ${ICU_UC_INCLUDE_DIR}) -target_link_libraries( ${CMAKE_PROJECT_NAME} PRIVATE ${PNG_LIBRARY} ${libpsd-0.9} ${OPENIMAGEIO_LIBRARIES} libpsd tinyxml2::tinyxml2 ZLIB::ZLIB ${ICU_UC_LIBRARY} ${ICU_IO_LIBRARY} ${ICU_DATA_LIBRARY}) +#target_link_libraries( ${CMAKE_PROJECT_NAME} PRIVATE ${PNG_LIBRARY} ${libpsd-0.9} ${OPENIMAGEIO_LIBRARIES} libpsd tinyxml2::tinyxml2 ZLIB::ZLIB ${ICU_LIBRARIES} ${ICU_UC_LIBRARY} ${ICU_IO_LIBRARY} ${ICU_DATA_LIBRARY}) +target_link_libraries( ${CMAKE_PROJECT_NAME} libpsd ${CONAN_LIBS} ) #target_link_libraries( ${CMAKE_PROJECT_NAME} PRIVATE libpng_static ${libpsd-0.9} ${OPENIMAGEIO_LIBRARIES} libpsd tinyxml2::tinyxml2 ZLIB::ZLIB ${ICU_UC_LIBRARY} ${ICU_IO_LIBRARY} ${ICU_DATA_LIBRARY}) diff --git a/cui/conanfile.txt b/cui/conanfile.txt new file mode 100644 index 0000000..3539bef --- /dev/null +++ b/cui/conanfile.txt @@ -0,0 +1,21 @@ +[requires] +zlib/1.2.12 +libpng/1.6.37 +libjpeg/9d +tinyxml2/9.0.0 +icu/71.1 + + +[generators] +cmake +visual_studio + +[options] +zlib/1.2.12:shared=False +libpng/1.6.37:shared=False +libjpeg/9d:shared=False +tinyxml2/9.0.0:shared=False +icu/71.1:shared=False + + +[imports] diff --git a/scripts/build_win_cui.bat b/scripts/build_win_cui.bat index f23b64c..9916dfd 100755 --- a/scripts/build_win_cui.bat +++ b/scripts/build_win_cui.bat @@ -19,10 +19,14 @@ if exist build rd /s /q build mkdir build pushd build -cmake -DCMAKE_TOOLCHAIN_FILE="%VCPKG_PREFIX%\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PROJECT_NAME="PSDtoSS6" .. || exit /b 1 +conan install .. -s build_type=Release + +rem cmake -DCMAKE_TOOLCHAIN_FILE="%VCPKG_PREFIX%\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PROJECT_NAME="PSDtoSS6" .. || exit /b 1 +cmake -DCMAKE_PROJECT_NAME="PSDtoSS6" .. || exit /b 1 cmake --build . -- /t:clean;rebuild /p:configuration=release /clp:ErrorsOnly /m:4 || exit /b 1 -xcopy /y Release\*.exe %DSTDIR% +rem xcopy /y Release\*.exe %DSTDIR% +xcopy /y bin\*.exe %DSTDIR% rem pause exit /b diff --git a/scripts/prepare_win.bat b/scripts/prepare_win.bat index 1b09d4d..897f668 100644 --- a/scripts/prepare_win.bat +++ b/scripts/prepare_win.bat @@ -6,19 +6,5 @@ if not ""%1""=="""" ( ) pushd %DSTDIR% -rem rd /s /q vcpkg -rem git clone https://github.com/microsoft/vcpkg.git -pushd vcpkg -call bootstrap-vcpkg.bat - -set VCPKG_DEFAULT_TRIPLET=x64-windows-static -vcpkg install tinyxml2 -vcpkg install zlib -vcpkg install libpng -vcpkg install libjpeg-turbo -vcpkg install icu - -vcpkg integrate install -popd popd From 73474d2c1286ef40e41ba20d39add1f649b6abed Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Mon, 16 May 2022 18:36:15 +0900 Subject: [PATCH 02/15] =?UTF-8?q?conan=E3=81=AEaction=E3=82=92main.yml?= =?UTF-8?q?=E3=81=B8=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit conanのactionをmain.ymlへ追加 --- .github/workflows/main.yml | 24 ++++++++++++++---------- vcpkg | 1 - 2 files changed, 14 insertions(+), 11 deletions(-) delete mode 160000 vcpkg diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca11c52..38adfed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,16 +21,20 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' # Restore from cache the previously built ports. If cache-miss, download, build vcpkg. - - name: Restore from cache and install vcpkg - # Download and build vcpkg, without installing any port. If content is cached already, it is a no-op. - uses: lukka/run-vcpkg@v3 - with: - vcpkgArguments: '@${{ env.vcpkgResponseFile }}' - vcpkgDirectory: '${{ github.workspace }}/vcpkg' - appendedCacheKey: ${{ hashFiles(env.vcpkgResponseFile) }} - env: - vcpkgResponseFile: '${{ github.workspace }}/response_file_mac.txt' - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + #- name: Restore from cache and install vcpkg + # # Download and build vcpkg, without installing any port. If content is cached already, it is a no-op. + # uses: lukka/run-vcpkg@v3 + # with: + # vcpkgArguments: '@${{ env.vcpkgResponseFile }}' + # vcpkgDirectory: '${{ github.workspace }}/vcpkg' + # appendedCacheKey: ${{ hashFiles(env.vcpkgResponseFile) }} + # env: + # vcpkgResponseFile: '${{ github.workspace }}/response_file_mac.txt' + # ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + - name: Get Conan + uses: turtlebrowser/get-conan@v1.0 + - name: Create default profile + run: conan profile new default --detect - name: install qt run: | brew install qt5 diff --git a/vcpkg b/vcpkg deleted file mode 160000 index 0cbc579..0000000 --- a/vcpkg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0cbc579e1ee21fa4ad0974a9ed926f60c6ed1a4a From 4a9348fefb613d16950020f63ad1b7fa27542815 Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Mon, 16 May 2022 18:38:47 +0900 Subject: [PATCH 03/15] =?UTF-8?q?main=E3=81=8B=E3=82=89=E5=8F=96=E5=BE=97?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mainから取得に変更 --- .github/workflows/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38adfed..7799be1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,8 +31,11 @@ jobs: # env: # vcpkgResponseFile: '${{ github.workspace }}/response_file_mac.txt' # ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - - name: Get Conan - uses: turtlebrowser/get-conan@v1.0 + - name: Install Conan + id: conan + uses: turtlebrowser/get-conan@main + - name: Conan version + run: echo "${{ steps.conan.outputs.version }}" - name: Create default profile run: conan profile new default --detect - name: install qt From 0f3432cd14df3fbe0b5c436b9c152a822857194f Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Mon, 16 May 2022 18:43:02 +0900 Subject: [PATCH 04/15] =?UTF-8?q?Windows=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=8C=E5=A4=89=E3=82=8F=E3=81=A3=E3=81=A6=E3=81=84=E3=81=AA?= =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windowsの設定が変わっていなかったので修正 --- .github/workflows/main.yml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7799be1..6cc3e6b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,19 +69,26 @@ jobs: uses: lukka/get-cmake@latest env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - - name: Restore from cache and install vcpkg - # Download and build vcpkg, without installing any port. If content is cached already, it is a no-op. - uses: lukka/run-vcpkg@v6 - with: - vcpkgArguments: '@${{ env.vcpkgResponseFile }}' - vcpkgDirectory: '${{ github.workspace }}/vcpkg' - appendedCacheKey: ${{ hashFiles(env.vcpkgResponseFile) }} - # Just install vcpkg for now, do not install any ports in this step yet. - #setupOnly: false - #additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - vcpkgResponseFile: '${{ github.workspace }}/response_file_win.txt' + #- name: Restore from cache and install vcpkg + # # Download and build vcpkg, without installing any port. If content is cached already, it is a no-op. + # uses: lukka/run-vcpkg@v6 + # with: + # vcpkgArguments: '@${{ env.vcpkgResponseFile }}' + # vcpkgDirectory: '${{ github.workspace }}/vcpkg' + # appendedCacheKey: ${{ hashFiles(env.vcpkgResponseFile) }} + # # Just install vcpkg for now, do not install any ports in this step yet. + # #setupOnly: false + # #additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed + # env: + # ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + # vcpkgResponseFile: '${{ github.workspace }}/response_file_win.txt' + - name: Install Conan + id: conan + uses: turtlebrowser/get-conan@main + - name: Conan version + run: echo "${{ steps.conan.outputs.version }}" + - name: Create default profile + run: conan profile new default --detect - name: Cache Qt id: cache-qt uses: actions/cache@v1 From 870788a16a4e2eec274aa97c21707a7d681f3701 Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Mon, 16 May 2022 18:48:39 +0900 Subject: [PATCH 05/15] =?UTF-8?q?Mac=E3=81=AE=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=82=B9=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Macのビルドスクリプトの修正 --- scripts/build_mac_cui.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build_mac_cui.sh b/scripts/build_mac_cui.sh index f1075ba..ac1ce8a 100755 --- a/scripts/build_mac_cui.sh +++ b/scripts/build_mac_cui.sh @@ -29,7 +29,10 @@ BUILDDIR=${SRCDIR}/build BUILDDIR=`cd ${BUILDDIR} && pwd -P` pushd ${BUILDDIR} -cmake -DCMAKE_TOOLCHAIN_FILE="${VCPKG_PREFIX}/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PROJECT_NAME=${PROJECT_NAME} .. || exit 1 + +conan install .. +cmake -DCMAKE_PROJECT_NAME=${PROJECT_NAME} .. || exit 1 + cmake --build . || exit 1 popd > /dev/null # build From 718fe9c2d7b5237bd3fa2e180cff07f7d3c8c694 Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Mon, 16 May 2022 18:52:35 +0900 Subject: [PATCH 06/15] settings.compiler.version=16 settings.compiler.version=16 --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6cc3e6b..dd66b77 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,9 @@ jobs: - name: Conan version run: echo "${{ steps.conan.outputs.version }}" - name: Create default profile - run: conan profile new default --detect + run: | + conan profile new default --detect + conan profile update settings.compiler.version=16 default - name: install qt run: | brew install qt5 From 5c272215f4841fc9534762ae488a43c92467297d Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Mon, 16 May 2022 18:56:11 +0900 Subject: [PATCH 07/15] =?UTF-8?q?=E9=96=93=E9=81=95=E3=81=A3=E3=81=A6Mac?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=81=ABWindows=E8=A8=AD=E5=AE=9A=E3=82=92?= =?UTF-8?q?=E6=9B=B8=E3=81=84=E3=81=A6=E3=81=84=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 間違ってMac設定にWindows設定を書いていた --- .github/workflows/main.yml | 7 +++++-- scripts/build_mac_cui.sh | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd66b77..8eee889 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,8 @@ jobs: - name: Create default profile run: | conan profile new default --detect - conan profile update settings.compiler.version=16 default + conan profile update settings.arch=x86_64 default + conan profile update settings.arch_build=x86_64 default - name: install qt run: | brew install qt5 @@ -90,7 +91,9 @@ jobs: - name: Conan version run: echo "${{ steps.conan.outputs.version }}" - name: Create default profile - run: conan profile new default --detect + run: | + conan profile new default --detect + conan profile update settings.compiler.version=16 default - name: Cache Qt id: cache-qt uses: actions/cache@v1 diff --git a/scripts/build_mac_cui.sh b/scripts/build_mac_cui.sh index ac1ce8a..f0b52c2 100755 --- a/scripts/build_mac_cui.sh +++ b/scripts/build_mac_cui.sh @@ -30,7 +30,7 @@ BUILDDIR=`cd ${BUILDDIR} && pwd -P` pushd ${BUILDDIR} -conan install .. +conan install .. --build=missing cmake -DCMAKE_PROJECT_NAME=${PROJECT_NAME} .. || exit 1 cmake --build . || exit 1 From a55abf665bc9f7ecacfab45430de5df0483dc29c Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Mon, 16 May 2022 19:17:42 +0900 Subject: [PATCH 08/15] =?UTF-8?q?=E3=83=84=E3=83=BC=E3=83=AB=E3=83=81?= =?UTF-8?q?=E3=82=A7=E3=82=A4=E3=83=B3=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ツールチェインの設定を削除 --- cui/CMakeLists.txt | 6 +++--- scripts/build_mac_cui.sh | 2 +- scripts/build_win_gui.bat | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cui/CMakeLists.txt b/cui/CMakeLists.txt index 5a702ac..f0eb378 100644 --- a/cui/CMakeLists.txt +++ b/cui/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +CMAKE_MINIMUM_REQUIRED(VERSION 3.0) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE) @@ -6,14 +6,14 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE) if((NOT CMAKE_PROJECT_NAME)) set(CMAKE_PROJECT_NAME "PSDtoSS6") #message(FATAL_ERROR "CMAKE_PROJECT_NAME must be specified!") -else() endif() + + project(${CMAKE_PROJECT_NAME} CXX) IF(WIN32) ELSEIF(APPLE) set(CMAKE_CXX_STANDARD 11) - ELSEIF(CMAKE_COMPILER_IS_GNUCXX) ADD_DEFINITIONS(-std=gnu++14) ENDIF() diff --git a/scripts/build_mac_cui.sh b/scripts/build_mac_cui.sh index f0b52c2..367ff4e 100755 --- a/scripts/build_mac_cui.sh +++ b/scripts/build_mac_cui.sh @@ -39,6 +39,6 @@ popd > /dev/null # build popd > /dev/null # SRCDIR /bin/mkdir -p ${DSTDIR} -/bin/cp -rf ${BUILDDIR}/${PROJECT_NAME} ${DSTDIR} +/bin/cp -rf ${BUILDDIR}/bin/${PROJECT_NAME} ${DSTDIR} popd > /dev/null # BASEDIR \ No newline at end of file diff --git a/scripts/build_win_gui.bat b/scripts/build_win_gui.bat index f8452e3..3f971b7 100755 --- a/scripts/build_win_gui.bat +++ b/scripts/build_win_gui.bat @@ -13,7 +13,9 @@ if "%VCPKG_PREFIX%" == "" ( ) ) -set DEFAULT_QT_PATH=C:\Qt\Qt5.9.7\5.9.7\msvc2017_64 +rem set DEFAULT_QT_PATH=C:\Qt\Qt5.9.7\5.9.7\msvc2017_64 +set DEFAULT_QT_PATH=C:\Qt\5.15.8\msvc2019_64 + if "%QT_PATH%" == "" ( set QT_PATH=%DEFAULT_QT_PATH% ) @@ -33,7 +35,8 @@ if exist build rd /s /q build mkdir build pushd build -cmake -DCMAKE_TOOLCHAIN_FILE="%VCPKG_PREFIX%\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PROJECT_NAME="PSDtoSS6GUI" .. || exit /b 1 +rem cmake -DCMAKE_TOOLCHAIN_FILE="%VCPKG_PREFIX%\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PROJECT_NAME="PSDtoSS6GUI" .. || exit /b 1 +cmake -DCMAKE_PROJECT_NAME="PSDtoSS6GUI" .. || exit /b 1 cmake --build . -- /t:clean;rebuild /p:configuration=release /clp:ErrorsOnly /m:4 || exit /b 1 xcopy /y Release\*.exe %DSTDIR% From f9f6398f6f7059ad5d46fefcbf9709b2cce9d1cb Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Tue, 17 May 2022 10:40:35 +0900 Subject: [PATCH 09/15] =?UTF-8?q?Windows=E3=81=AEconan=E3=83=97=E3=83=AD?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windowsのconanプロファイルを変更 --- .github/workflows/main.yml | 4 +--- scripts/build_win_cui.bat | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8eee889..6d6cf32 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -91,9 +91,7 @@ jobs: - name: Conan version run: echo "${{ steps.conan.outputs.version }}" - name: Create default profile - run: | - conan profile new default --detect - conan profile update settings.compiler.version=16 default + run: conan profile new default --detect - name: Cache Qt id: cache-qt uses: actions/cache@v1 diff --git a/scripts/build_win_cui.bat b/scripts/build_win_cui.bat index 9916dfd..a4dd040 100755 --- a/scripts/build_win_cui.bat +++ b/scripts/build_win_cui.bat @@ -19,6 +19,8 @@ if exist build rd /s /q build mkdir build pushd build +conan profile update settings.compiler.version=16 default +conan profile show default conan install .. -s build_type=Release rem cmake -DCMAKE_TOOLCHAIN_FILE="%VCPKG_PREFIX%\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PROJECT_NAME="PSDtoSS6" .. || exit /b 1 From 2d7e8b84d5aa75e26699cf3d8c89c7bebda96fe7 Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Tue, 17 May 2022 10:59:00 +0900 Subject: [PATCH 10/15] =?UTF-8?q?conan=E3=82=B3=E3=83=B3=E3=83=91=E3=82=A4?= =?UTF-8?q?=E3=83=A9=E3=83=81=E3=82=A7=E3=83=83=E3=82=AFOFF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit conanコンパイラチェックOFF --- cui/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cui/CMakeLists.txt b/cui/CMakeLists.txt index f0eb378..677689a 100644 --- a/cui/CMakeLists.txt +++ b/cui/CMakeLists.txt @@ -18,6 +18,7 @@ ELSEIF(CMAKE_COMPILER_IS_GNUCXX) ADD_DEFINITIONS(-std=gnu++14) ENDIF() +set(CONAN_DISABLE_CHECK_COMPILER False CACHE BOOL "" FORCE ) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() From a0cfa08b05a4717c0405b5b751be589ecae3602b Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Tue, 17 May 2022 11:13:07 +0900 Subject: [PATCH 11/15] =?UTF-8?q?msvc-dev-cmd=E3=82=92=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit msvc-dev-cmdをセット --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6d6cf32..5d05373 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,6 +68,10 @@ jobs: submodules: true env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + toolset: 16.0 - name: Get latest CMake uses: lukka/get-cmake@latest env: From 23a664cb8281fbe49a8c2360845d874047ad0a30 Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Tue, 17 May 2022 11:56:45 +0900 Subject: [PATCH 12/15] CONAN_DISABLE_CHECK_COMPILER True CONAN_DISABLE_CHECK_COMPILER True --- .github/workflows/main.yml | 4 +++- cui/CMakeLists.txt | 2 +- scripts/build_win_cui.bat | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d05373..cea1bf0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,7 +95,9 @@ jobs: - name: Conan version run: echo "${{ steps.conan.outputs.version }}" - name: Create default profile - run: conan profile new default --detect + run: | + conan profile new default --detect + conan profile show default - name: Cache Qt id: cache-qt uses: actions/cache@v1 diff --git a/cui/CMakeLists.txt b/cui/CMakeLists.txt index 677689a..377bf7a 100644 --- a/cui/CMakeLists.txt +++ b/cui/CMakeLists.txt @@ -18,7 +18,7 @@ ELSEIF(CMAKE_COMPILER_IS_GNUCXX) ADD_DEFINITIONS(-std=gnu++14) ENDIF() -set(CONAN_DISABLE_CHECK_COMPILER False CACHE BOOL "" FORCE ) +set(CONAN_DISABLE_CHECK_COMPILER True CACHE BOOL "" FORCE ) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() diff --git a/scripts/build_win_cui.bat b/scripts/build_win_cui.bat index a4dd040..b0f2826 100755 --- a/scripts/build_win_cui.bat +++ b/scripts/build_win_cui.bat @@ -19,7 +19,7 @@ if exist build rd /s /q build mkdir build pushd build -conan profile update settings.compiler.version=16 default +rem conan profile update settings.compiler.version=16 default conan profile show default conan install .. -s build_type=Release From 7054e6062961dccf45dfe53118146355f9cb83d1 Mon Sep 17 00:00:00 2001 From: SpriteStudio Date: Tue, 17 May 2022 12:39:06 +0900 Subject: [PATCH 13/15] --build=missing --build=missing --- scripts/build_win_cui.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_win_cui.bat b/scripts/build_win_cui.bat index b0f2826..3af5f98 100755 --- a/scripts/build_win_cui.bat +++ b/scripts/build_win_cui.bat @@ -21,7 +21,7 @@ pushd build rem conan profile update settings.compiler.version=16 default conan profile show default -conan install .. -s build_type=Release +conan install .. -s build_type=Release --build=missing rem cmake -DCMAKE_TOOLCHAIN_FILE="%VCPKG_PREFIX%\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PROJECT_NAME="PSDtoSS6" .. || exit /b 1 cmake -DCMAKE_PROJECT_NAME="PSDtoSS6" .. || exit /b 1 From 774d7b3e3aca74e1a2968bee00e158082b9278d3 Mon Sep 17 00:00:00 2001 From: "MOGIKODAINOTE\\MogiKodai" Date: Wed, 18 May 2022 13:33:27 +0900 Subject: [PATCH 14/15] fix: set output path when you push canncel button. --- gui/mainwindow.cpp | 11 +++++------ scripts/build_win_gui.bat | 4 +++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 8c9ebb0..36badf9 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -561,20 +561,19 @@ void MainWindow::on_pushButton_output_clicked() QString str; str = QFileDialog::getExistingDirectory(this, tr("_outputDirectoryText"), Outputpath); - if ( str != "" ){//選択されたフォルダ名 + if ( str != "" ){// フォルダの選択を押したとき Outputpath = str; - } - else{//未指定ならドキュメントの位置 - Outputpath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); - } #if Q_WS_WIN Outputpath += "\\"; #else Outputpath += "/"; #endif + ui->textBrowser_output->setText(Outputpath); - ui->textBrowser_output->setText(Outputpath); + } + else{//cancellをおしたとき + } } //リストファイルの読み込み diff --git a/scripts/build_win_gui.bat b/scripts/build_win_gui.bat index 3f971b7..973e4d2 100755 --- a/scripts/build_win_gui.bat +++ b/scripts/build_win_gui.bat @@ -7,6 +7,8 @@ if not defined DSTDIR set DSTDIR=%BASEDIR%\out\ echo SRCDIR : %SRCDIR% echo DSTDIR : %DSTDIR% +rem set CMAKE_PREFIX_PATH=C:\Qt\5.15.2\msvc2019_64\lib\ +rem set QT_PATH=C:\Qt\5.15.2\msvc2019_64\ if "%VCPKG_PREFIX%" == "" ( if exist %BASEDIR%\vcpkg ( set VCPKG_PREFIX=%BASEDIR%\vcpkg @@ -14,7 +16,7 @@ if "%VCPKG_PREFIX%" == "" ( ) rem set DEFAULT_QT_PATH=C:\Qt\Qt5.9.7\5.9.7\msvc2017_64 -set DEFAULT_QT_PATH=C:\Qt\5.15.8\msvc2019_64 +set DEFAULT_QT_PATH=C:\Qt\5.15.2\msvc2019_64 if "%QT_PATH%" == "" ( set QT_PATH=%DEFAULT_QT_PATH% From 3af7d843101c8e80b5fd0a3fda90beaac0ceece4 Mon Sep 17 00:00:00 2001 From: "MOGIKODAINOTE\\MogiKodai" Date: Fri, 20 May 2022 13:44:59 +0900 Subject: [PATCH 15/15] fix: display default output file path --- gui/mainwindow.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 36badf9..a14197c 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -82,7 +82,7 @@ MainWindow::MainWindow(QWidget *parent) : setFixedWidth(this->width()); setFixedHeight(this->height()); - + //初期化 convert_exec = false; cnvOutputStr.clear(); @@ -112,6 +112,8 @@ MainWindow::MainWindow(QWidget *parent) : ui->comboBox_canvasSize->addItem(map_canvasSize[0] = "Default"); ui->comboBox_canvasSize->addItem(map_canvasSize[1] = "PSD Size"); + ui->textBrowser_output->setText(cp.outputpath.c_str()); + pushButton_enableset(); //スタイルシートを読み込む @@ -283,8 +285,16 @@ void MainWindow::setText_to_List(QStringList list) } } loadConfig(data_path + "/config.json"); - templistload(); - + templistload();//コンバートするpsdのリスト + //出力フォルダのパスを確認 + if(ui->textBrowser_output->toPlainText() == "")//初回起動時 + { + Outputpath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); + Outputpath += "/SpriteStudio/PSDtoSS6";//デフォルトの出力フォルダをDocument直下にするならここを削除 + ui->textBrowser_output->setText(Outputpath); + } + else{//既にconfig.jsonがあるとき + } } void MainWindow::on_pushButton_exit_clicked()