2019-09-30 23:08:12 +08:00
|
|
|
environment:
|
2020-03-02 20:55:58 +08:00
|
|
|
CMAKE_INSTALL_ROOT: C:\projects\cmake
|
2020-07-22 13:46:21 +08:00
|
|
|
ZLIB_ROOT: C:\projects\zlib
|
2020-11-16 13:19:15 +08:00
|
|
|
LIBEXPAT: C:\projects\libexpat
|
2020-11-15 20:53:33 +08:00
|
|
|
LIBEXIV2_ROOT: C:\projects\exiv2
|
2019-09-30 23:08:12 +08:00
|
|
|
matrix:
|
2020-01-30 11:35:15 +08:00
|
|
|
- build_name: mingw73_32_qt5_12_6
|
|
|
|
QTPATH: C:\Qt\5.12.6\mingw73_32
|
2019-10-05 14:58:09 +08:00
|
|
|
MINGW32: C:\Qt\Tools\mingw730_32
|
2019-09-30 23:08:12 +08:00
|
|
|
|
|
|
|
install:
|
2020-03-02 20:55:58 +08:00
|
|
|
- mkdir %CMAKE_INSTALL_ROOT%
|
2020-07-22 13:46:21 +08:00
|
|
|
- mkdir %ZLIB_ROOT%
|
2020-11-16 13:19:15 +08:00
|
|
|
- mkdir %LIBEXPAT%
|
2020-11-15 20:53:33 +08:00
|
|
|
- mkdir %LIBEXIV2_ROOT%
|
2019-09-30 23:08:12 +08:00
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
|
|
- git submodule update --init --recursive
|
2020-03-02 20:55:58 +08:00
|
|
|
- set PATH=%PATH%;%CMAKE_INSTALL_ROOT%;%QTPATH%\bin;%MINGW32%\bin
|
2019-09-30 23:08:12 +08:00
|
|
|
|
|
|
|
build_script:
|
2020-03-02 20:55:58 +08:00
|
|
|
# prepare
|
|
|
|
- mkdir 3rdparty
|
|
|
|
- cinst ninja
|
|
|
|
# install ECM so we can build KImageFormats
|
|
|
|
- cd 3rdparty
|
2020-06-18 23:13:29 +08:00
|
|
|
- git clone -q https://invent.kde.org/frameworks/extra-cmake-modules.git
|
2020-03-02 20:55:58 +08:00
|
|
|
- cd extra-cmake-modules
|
2020-11-16 13:19:15 +08:00
|
|
|
- cmake -G "Ninja" . -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT% -DBUILD_TESTING=OFF
|
2020-03-02 20:55:58 +08:00
|
|
|
- cmake --build .
|
|
|
|
- cmake --build . --target install
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
2020-07-22 13:46:21 +08:00
|
|
|
# download and install zlib for KArchive
|
|
|
|
- cd %ZLIB_ROOT%
|
|
|
|
- curl -fsS -o zlib128-dll.zip http://zlib.net/zlib128-dll.zip
|
2020-11-16 13:19:15 +08:00
|
|
|
- 7z x zlib128-dll.zip
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
|
|
# build libexpat for libexiv2
|
|
|
|
- cd %LIBEXPAT_ROOT%
|
|
|
|
- curl -fsSL -o R_2_2_10.zip https://github.com/libexpat/libexpat/archive/R_2_2_10.zip
|
|
|
|
- 7z x R_2_2_10.zip -y
|
|
|
|
- cd libexpat-R_2_2_10/expat/
|
2020-11-17 00:11:01 +08:00
|
|
|
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT% -DCMAKE_CXX_FLAGS_RELEASE="-s"
|
2020-11-16 13:19:15 +08:00
|
|
|
- cmake --build . --target install
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
|
|
# build libexiv2
|
|
|
|
- cd %LIBEXIV2_ROOT%
|
|
|
|
- curl -fsSL -o v0.27.3.zip https://github.com/Exiv2/exiv2/archive/v0.27.3.zip
|
|
|
|
- 7z x v0.27.3.zip -y
|
|
|
|
- cd exiv2-0.27.3
|
2020-11-17 00:11:01 +08:00
|
|
|
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT% -DEXIV2_BUILD_SAMPLES=OFF -DCMAKE_CXX_FLAGS_RELEASE="-s" -DZLIB_ROOT=%ZLIB_ROOT%
|
2020-11-16 13:19:15 +08:00
|
|
|
- cmake --build . --target install
|
2020-07-22 13:46:21 +08:00
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
|
|
# install KArchive for kra format support of KImageFormats
|
|
|
|
- cd 3rdparty
|
|
|
|
- git clone -q https://invent.kde.org/frameworks/karchive.git
|
|
|
|
- cd karchive
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2020-11-16 13:19:15 +08:00
|
|
|
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT% -DCMAKE_CXX_FLAGS_RELEASE="-s" -DZLIB_ROOT=%ZLIB_ROOT%
|
2020-07-22 13:46:21 +08:00
|
|
|
# -DCMAKE_PREFIX_PATH=%CMAKE_INSTALL_ROOT%
|
|
|
|
- cmake --build . --config Release
|
|
|
|
- cmake --build . --config Release --target install
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
2020-03-02 20:55:58 +08:00
|
|
|
# install KImageFormats
|
|
|
|
- cd 3rdparty
|
2020-06-18 23:13:29 +08:00
|
|
|
- git clone -q https://invent.kde.org/frameworks/kimageformats.git
|
2020-03-02 20:55:58 +08:00
|
|
|
- cd kimageformats
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2020-11-16 13:19:15 +08:00
|
|
|
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-s" -DQT_PLUGIN_INSTALL_DIR=%QTPATH%\plugins
|
2020-03-02 20:55:58 +08:00
|
|
|
- cmake --build . --config Release
|
|
|
|
- cmake --build . --config Release --target install
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
|
|
# finally...
|
2019-09-30 23:08:12 +08:00
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2020-11-16 13:19:15 +08:00
|
|
|
- cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-s" -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_INSTALL_PREFIX='%cd%'
|
2019-09-30 23:08:12 +08:00
|
|
|
- mingw32-make
|
2020-01-03 23:01:12 +08:00
|
|
|
- mingw32-make install
|
|
|
|
# fixme: I don't know how to NOT make the binary installed to the ./bin/ folder...
|
|
|
|
- cd bin
|
2020-08-04 19:15:10 +08:00
|
|
|
- copy %APPVEYOR_BUILD_FOLDER%\LICENSE .
|
2020-11-16 13:19:15 +08:00
|
|
|
- copy %CMAKE_INSTALL_ROOT%\bin\libexpat.dll
|
|
|
|
- copy %CMAKE_INSTALL_ROOT%\bin\libexiv2.dll
|
2020-11-15 20:53:33 +08:00
|
|
|
- copy %ZLIB_ROOT%\zlib1.dll .
|
2020-07-22 13:46:21 +08:00
|
|
|
- copy C:\projects\cmake\bin\libKF5Archive.dll .
|
2020-03-02 20:55:58 +08:00
|
|
|
- windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-angle --no-system-d3d-compiler --release .\ppic.exe
|
|
|
|
# for debug..
|
|
|
|
- tree /f
|
2019-09-30 23:08:12 +08:00
|
|
|
|
|
|
|
artifacts:
|
2020-01-03 23:01:12 +08:00
|
|
|
- path: build\bin
|