pineapple-pictures/appveyor.yml

203 lines
8.5 KiB
YAML
Raw Normal View History

image:
- Visual Studio 2022
2019-09-30 23:08:12 +08:00
environment:
CMAKE_INSTALL_PREFIX: C:\projects\cmake
2021-03-21 00:14:17 +08:00
LIBZ: C:\projects\zlib
LIBEXPAT: C:\projects\libexpat
LIBAVIF: C:\projects\libavif
LIBEXIV2: C:\projects\exiv2
PPKG: C:\projects\ppkg
2019-09-30 23:08:12 +08:00
matrix:
- job_name: mingw_64_qt6_5
QTDIR: C:\Qt\6.5\mingw_64
MINGW64: C:\Qt\Tools\mingw1120_64
KF_BRANCH: master
EXIV2_VERSION: "0.28.0"
EXIV2_CMAKE_OPTIONS: "-DEXIV2_ENABLE_BROTLI=OFF -DEXIV2_ENABLE_INIH=OFF -DEXIV2_BUILD_EXIV2_COMMAND=OFF"
PPIC_CMAKE_OPTIONS: "-DPREFER_QT_5=OFF"
WINDEPLOYQT_ARGS: "--verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler"
- job_name: mingw81_64_qt5_15_2
QTDIR: C:\Qt\5.15.2\mingw81_64
2021-03-21 00:14:17 +08:00
MINGW64: C:\Qt\Tools\mingw810_64
KF_BRANCH: kf5
EXIV2_VERSION: "0.27.7"
EXIV2_CMAKE_OPTIONS: "-DEXIV2_BUILD_SAMPLES=OFF -DEXIV2_ENABLE_WIN_UNICODE=ON -DEXIV2_BUILD_EXIV2_COMMAND=OFF"
PPIC_CMAKE_OPTIONS: ""
WINDEPLOYQT_ARGS: "--verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-angle --no-system-d3d-compiler"
2019-09-30 23:08:12 +08:00
install:
- mkdir %CMAKE_INSTALL_PREFIX%
2021-03-21 00:14:17 +08:00
- mkdir %LIBZ%
- mkdir %LIBEXPAT%
- mkdir %LIBAVIF%
- mkdir %LIBEXIV2%
- mkdir %PPKG%
2019-09-30 23:08:12 +08:00
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
- set PATH=%PATH%;%CMAKE_INSTALL_PREFIX%;%QTDIR%\bin;%MINGW64%\bin;%PPKG%
2021-03-21 00:14:17 +08:00
- set CC=%MINGW64%\bin\gcc.exe
- set CXX=%MINGW64%\bin\g++.exe
2019-09-30 23:08:12 +08:00
build_script:
# prepare
- mkdir 3rdparty
- cinst ninja
- cd %PPKG%
- curl -fsSL -o ppkg.exe https://github.com/BLumia/pineapple-package-manager/releases/latest/download/ppkg.exe
- cd %APPVEYOR_BUILD_FOLDER%
2021-03-21 00:14:17 +08:00
# download and install zlib for KArchive
- cd %LIBZ%
2023-08-22 20:34:33 +08:00
- curl -fsSL -o zlib13.zip https://zlib.net/zlib13.zip
- 7z x zlib13.zip -y
- cd zlib-1.3
2021-03-21 00:14:17 +08:00
- mkdir build
- cd build
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
2021-03-21 00:14:17 +08:00
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
2021-03-21 00:14:17 +08:00
- cd %APPVEYOR_BUILD_FOLDER%
2022-01-27 17:15:00 +08:00
# QtApng for APNG
- cd 3rdparty
- mkdir QtApng
- cd QtApng
- curl -fsSL -o ppkg-QtApng.zip https://sourceforge.net/projects/pineapple-package-manager/files/packages/mingw-w64-x86_64-windows/QtApng-qt5.15.2-gea53d73-1.zip
- ppkg ppkg-QtApng.zip
- 7z x ppkg-QtApng.zip LICENSE -y
# - git clone --branch detect-format-from-content --depth 1 https://github.com/BLumia/QtApng.git
# - cd QtApng
# - mkdir build
# - cd build
# - qmake "CONFIG+=libpng_static" ../
# - mingw32-make
# - mingw32-make install
- cd %APPVEYOR_BUILD_FOLDER%
# install ECM so we can build KImageFormats
- cd 3rdparty
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/extra-cmake-modules.git
2021-03-21 00:14:17 +08:00
- git rev-parse HEAD
- cd extra-cmake-modules
- cmake -G "Ninja" . -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DBUILD_TESTING=OFF
- cmake --build .
- cmake --build . --target install
- cd %APPVEYOR_BUILD_FOLDER%
2022-01-27 17:15:00 +08:00
# install openexr for EXR format plugin from KImageFormats
- cd 3rdparty
- mkdir openexr
- cd openexr
# - git clone -b v3.1.3 --depth 1 https://github.com/AcademySoftwareFoundation/openexr.git
# - cd openexr
# - mkdir build
# - cd build
# - cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-D__STDC_FORMAT_MACROS=1 -DOPENEXR_INSTALL_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
# - cmake --build . --config Release
# - cmake --build . --config Release --target install/strip
- curl -fsSL -o ppkg-openexr.zip https://sourceforge.net/projects/pineapple-package-manager/files/packages/mingw-w64-x86_64-windows/openexr-3.1.3-1.zip
- ppkg ppkg-openexr.zip
- 7z x ppkg-openexr.zip LICENSE.md -y
- cd %APPVEYOR_BUILD_FOLDER%
# install AOM for libavif AV1 decoding support...
- cd 3rdparty
2023-03-18 14:33:44 +08:00
#- git clone -b v3.6.0 --depth 1 https://aomedia.googlesource.com/aom
#- cd aom
2023-03-18 14:33:44 +08:00
#- mkdir build.aom
#- cd build.aom
#- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DAOM_TARGET_CPU=generic -DENABLE_TESTS=OFF -DENABLE_TESTDATA=OFF -DENABLE_TOOLS=OFF -DENABLE_EXAMPLES=0
#- cmake --build . --config Release
#- cmake --build . --config Release --target install/strip
- mkdir aom
- cd aom
2023-03-18 14:33:44 +08:00
- curl -fsSL -o ppkg-aom.zip https://sourceforge.net/projects/pineapple-package-manager/files/packages/mingw-w64-x86_64-windows/aom-3.6.0-1.zip
- ppkg ppkg-aom.zip
- 7z x ppkg-aom.zip LICENSE -y
- cd %APPVEYOR_BUILD_FOLDER%
# install libavif for avif format support of KImageFormats
- cd %LIBAVIF%
2023-03-18 14:33:44 +08:00
- curl -fsSL -o libavif-v0_11_1.zip https://github.com/AOMediaCodec/libavif/archive/v0.11.1.zip
- 7z x libavif-v0_11_1.zip -y
- cd libavif-0.11.1
- mkdir build
- cd build
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DAVIF_CODEC_AOM=ON
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# install KArchive for kra format support of KImageFormats
- cd 3rdparty
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/karchive.git
2021-03-21 00:14:17 +08:00
- git rev-parse HEAD
- cd karchive
- mkdir build
- cd build
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# build libexpat for libexiv2
- cd %LIBEXPAT%
2023-03-18 14:33:44 +08:00
- curl -fsSL -o R_2_5_0.zip https://github.com/libexpat/libexpat/archive/R_2_5_0.zip
- 7z x R_2_5_0.zip -y
- cd libexpat-R_2_5_0/expat/
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF
- cmake --build . --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# build libexiv2
- cd %LIBEXIV2%
- curl -fsSL -o v%EXIV2_VERSION%.zip https://github.com/Exiv2/exiv2/archive/v%EXIV2_VERSION%.zip
- 7z x v%EXIV2_VERSION%.zip -y
- cd exiv2-%EXIV2_VERSION%
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% %EXIV2_CMAKE_OPTIONS%
- cmake --build . --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# install KImageFormats
- cd 3rdparty
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/kimageformats.git
2021-03-21 00:14:17 +08:00
- git rev-parse HEAD
- cd kimageformats
- mkdir build
- cd build
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_QTPLUGINDIR=%QTDIR%\plugins
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# finally...
2019-09-30 23:08:12 +08:00
- mkdir build
- cd build
- cmake .. -G "Unix Makefiles" %PPIC_CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_INSTALL_PREFIX='%cd%'
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
2020-01-03 23:01:12 +08:00
# fixme: I don't know how to NOT make the binary installed to the ./bin/ folder...
- cd bin
- copy %APPVEYOR_BUILD_FOLDER%\LICENSE
- copy %CMAKE_INSTALL_PREFIX%\bin\libaom.dll
2023-03-18 14:33:44 +08:00
- copy %CMAKE_INSTALL_PREFIX%\bin\libexpat-1.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libexiv2.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libavif.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libzlib.dll
2022-01-27 17:15:00 +08:00
- copy %CMAKE_INSTALL_PREFIX%\bin\libIex-3_1.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libImath-3_1.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libIlmThread-3_1.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libOpenEXR-3_1.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libKF?Archive.dll
- windeployqt %WINDEPLOYQT_ARGS% .\ppic.exe
# copy 3rdparty licenses for the libs we vendored for windows...
- mkdir licenses
- cd licenses
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\aom\LICENSE License.aom.txt
2022-01-27 17:15:00 +08:00
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\openexr\LICENSE.md License.openexr.txt
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\karchive\LICENSES\LGPL-2.0-or-later.txt License.KArchive.txt
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\kimageformats\LICENSES\LGPL-2.1-or-later.txt License.kimageformats.txt
2022-01-27 17:15:00 +08:00
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\QtApng\LICENSE License.QtApng.txt
2023-03-18 14:33:44 +08:00
- copy %LIBEXPAT%\libexpat-R_2_5_0\expat\COPYING License.expat.txt
- copy %LIBAVIF%\libavif-0.11.1\LICENSE License.libavif.txt
- copy %LIBEXIV2%\exiv2-%EXIV2_VERSION%\COPYING License.exiv2.txt
# TODO: Qt, zlib
- cd ..
# for debug..
- tree /f
2023-03-18 14:33:44 +08:00
- cd %APPVEYOR_BUILD_FOLDER%
- xcopy %CMAKE_INSTALL_PREFIX% .\cmake-prefix-copy /E /H /C /I
2019-09-30 23:08:12 +08:00
artifacts:
2020-01-03 23:01:12 +08:00
- path: build\bin
2023-03-18 14:33:44 +08:00
- path: cmake-prefix-copy