Add basic kiwix-desktop build on AppVeyor.
This is somehow a side build system base on cmd scripts. We should merge it in kiwix-build but... no time for now :/
This commit is contained in:
parent
a17cdeba49
commit
2743f64ef8
|
@ -0,0 +1,55 @@
|
|||
image: Visual Studio 2017
|
||||
version: '0.1.{build}'
|
||||
environment:
|
||||
EXTRA_DIR: 'C:\extra'
|
||||
MINGW64_EXTRA_DIR: '/c/extra'
|
||||
PATH: '%PATH%;%EXTRA_DIR%\bin;C:\\Python36\\Scripts'
|
||||
PKG_CONFIG_PATH: '%EXTRA_DIR%\lib\pkgconfig'
|
||||
MSYS2_PATH_TYPE: 'inherit'
|
||||
MSYS2_ARG_CONV_EXCL: '-Tp'
|
||||
MINGW64_RUN: 'C:\msys64\usr\bin\bash.exe --login -c'
|
||||
MSYSTEM: 'MINGW64'
|
||||
|
||||
init:
|
||||
- cmd: |
|
||||
echo %TEST_VAR%
|
||||
REM Set VC 2017
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
mkdir C:\extra\bin
|
||||
|
||||
install:
|
||||
- cmd: |
|
||||
cd C:\projects
|
||||
REM Install meson
|
||||
C:\Python36\Scripts\pip install meson
|
||||
|
||||
REM Install ninja
|
||||
curl -o ninja-win.zip -L https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip
|
||||
7z e ninja-win.zip -o%EXTRA_DIR%\bin
|
||||
|
||||
REM Install pkg-config-lite
|
||||
curl -o pkg-config-lite-0.28-1.zip https://netix.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip
|
||||
7z e pkg-config-lite-0.28-1.zip -o%EXTRA_DIR%\bin pkg-config-lite-0.28-1/bin/pkg-config.exe
|
||||
cd kiwix-build
|
||||
|
||||
REM Install openssh (scp) for deployement
|
||||
choco install openssh openssl.light
|
||||
|
||||
build_script:
|
||||
- appveyor\install_zlib.cmd
|
||||
- appveyor\install_lzma.cmd
|
||||
- appveyor\install_pthread.cmd
|
||||
- appveyor\install_dirent.cmd
|
||||
- appveyor\install_xapian.cmd
|
||||
- appveyor\install_icu.cmd
|
||||
- appveyor\install_libzim.cmd
|
||||
- appveyor\install_pugixml.cmd
|
||||
- appveyor\install_kiwix-lib.cmd
|
||||
- appveyor\install_kiwix-desktop.cmd
|
||||
|
||||
before_deploy:
|
||||
- cmd: '%MINGW64_RUN% "cd /c/projects/kiwix-build && appveyor/package_kiwix-desktop.sh"'
|
||||
- cmd: openssl enc -d -aes-256-cbc -md sha256 -pass pass:%ENC_PASSWD% -in appveyor\nightlybot_id_key.enc -out appveyor\nightlybot_id_key
|
||||
|
||||
deploy_script:
|
||||
- cmd: '%MINGW64_RUN% "cd /c/projects/kiwix-build && appveyor/deploy.sh"'
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
XAPIAN_SOURCE=$(pwd)/..
|
||||
|
||||
$XAPIAN_SOURCE/configure \
|
||||
CC="cl -nologo" \
|
||||
CXX="$XAPIAN_SOURCE/compile cl -nologo" \
|
||||
CXXFLAGS="-EHsc -MD" AR=lib \
|
||||
CPPFLAGS="-I${MINGW64_EXTRA_DIR}/include" \
|
||||
LDFLAGS="-L${MINGW64_EXTRA_DIR}/lib" \
|
||||
--disable-backend-remote \
|
||||
--disable-documentation \
|
||||
--prefix=${MINGW64_EXTRA_DIR}
|
||||
|
||||
make -j2
|
||||
|
||||
make install
|
|
@ -0,0 +1,12 @@
|
|||
set -e
|
||||
|
||||
NIGHTLY_DATE=$(date +%Y-%m-%d)
|
||||
NIGHTLY_KIWIX_ARCHIVES_DIR=/c/projects/NIGHTLY_KIWIX_ARCHIVES/${NIGHTLY_DATE}
|
||||
SSH_KEY=C:\\projects\\kiwix-build\\appveyor\\nightlybot_id_key
|
||||
|
||||
#if [[ "$APPVEYOR_SCHEDULED_BUILD" = "True" ]]
|
||||
#then
|
||||
scp -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
|
||||
${NIGHTLY_KIWIX_ARCHIVES_DIR} \
|
||||
nightlybot@download.kiwix.org:/var/www/download.kiwix.org/nightly
|
||||
#fi
|
|
@ -0,0 +1,3 @@
|
|||
REM ========================================================
|
||||
REM Install dirent.h
|
||||
curl -fsSL -o%EXTRA_DIR%\include\dirent.h https://raw.githubusercontent.com/tronkko/dirent/master/include/dirent.h || exit /b 1
|
|
@ -0,0 +1,14 @@
|
|||
REM Set VC 2017
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
mkdir C:\extra\bin
|
||||
cd C:\projects
|
||||
C:\Python36\Scripts\pip install meson || exit /b 1
|
||||
|
||||
REM Set ninja
|
||||
curl -fsSL -o ninja-win.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip || exit /b 1
|
||||
7z e ninja-win.zip -o%EXTRA_DIR%\bin || exit /b 1
|
||||
|
||||
REM Set pkg-config-lit
|
||||
curl -fsSL -o pkg-config-lite-0.28-1.zip https://netix.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip || exit /b 1
|
||||
7z e pkg-config-lite-0.28-1.zip -o%EXTRA_DIR%\bin pkg-config-lite-0.28-1/bin/pkg-config.exe || exit /b 1
|
||||
cd kiwix-build
|
|
@ -0,0 +1,7 @@
|
|||
REM ========================================================
|
||||
REM Install icu
|
||||
curl -SL -O http://public.kymeria.fr/KIWIX/windows/icu4c-62_1-Win64-MSVC2017.zip || exit /b 1
|
||||
7z x icu4c-62_1-Win64-MSVC2017.zip -o%EXTRA_DIR% -r include || exit /b 1
|
||||
7z e icu4c-62_1-Win64-MSVC2017.zip -o%EXTRA_DIR%\lib lib64\* || exit /b 1
|
||||
7z e icu4c-62_1-Win64-MSVC2017.zip -o%EXTRA_DIR%\bin bin\*.dll || exit /b 1
|
||||
curl -fsSL -o%PKG_CONFIG_PATH%\icu-i18n.pc http://public.kymeria.fr/KIWIX/windows/icu-i18n.pc || exit /b 1
|
|
@ -0,0 +1,14 @@
|
|||
REM ========================================================
|
||||
REM Install kiwix-desktop
|
||||
git clone https://github.com/kiwix/kiwix-desktop || exit /b 1
|
||||
cd kiwix-desktop
|
||||
git checkout windows
|
||||
echo "Getting fix_desktop"
|
||||
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/fix_desktop_makefile.py_ || exit /b 1
|
||||
echo "Running qmake"
|
||||
C:\Qt\5.11\msvc2017_64\bin\qmake.exe || exit /b 1
|
||||
echo "Running fix_desktop"
|
||||
C:\Python36\Python fix_desktop_makefile.py_ Makefile.Release || exit /b 1
|
||||
echo "Running nmake"
|
||||
nmake || exit /b 1
|
||||
cd ..
|
|
@ -0,0 +1,10 @@
|
|||
REM ========================================================
|
||||
REM Install kiwix-lib
|
||||
git clone https://github.com/kiwix/kiwix-lib.git || exit /b 1
|
||||
cd kiwix-lib
|
||||
git checkout windows || exit /b 1
|
||||
meson.py . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
|
||||
cd build
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..
|
|
@ -0,0 +1,10 @@
|
|||
REM ========================================================
|
||||
REM Install libzim
|
||||
git clone https://github.com/openzim/libzim.git || exit /b 1
|
||||
cd libzim
|
||||
git checkout windows || exit /b 1
|
||||
meson.py . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
|
||||
cd build
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..
|
|
@ -0,0 +1,6 @@
|
|||
REM ========================================================
|
||||
REM Install lzma
|
||||
curl -fsSL -O https://tukaani.org/xz/xz-5.2.4-windows.zip || exit /b 1
|
||||
7z x xz-5.2.4-windows.zip -o%EXTRA_DIR% -r include || exit /b 1
|
||||
7z e xz-5.2.4-windows.zip -o%EXTRA_DIR%\lib bin_x86-64\liblzma.a || exit /b 1
|
||||
curl -fsSL -o%PKG_CONFIG_PATH%\liblzma.pc http://public.kymeria.fr/KIWIX/windows/liblzma.pc || exit /b 1
|
|
@ -0,0 +1,14 @@
|
|||
REM ========================================================
|
||||
REM Install pthread
|
||||
curl -fsSL -O ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip || exit /b 1
|
||||
7z x pthreads-w32-2-9-1-release.zip -r pthreads.2 || exit /b 1
|
||||
cd pthreads.2
|
||||
REM Patch is pthread_timespec.patch
|
||||
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/pthread.h || exit /b 1
|
||||
nmake clean VC-inlined || exit /b 1
|
||||
copy pthread.h %EXTRA_DIR%\include
|
||||
copy sched.h %EXTRA_DIR%\include
|
||||
copy pthreadVC2.lib %EXTRA_DIR%\lib
|
||||
copy pthreadVC2.dll %EXTRA_DIR%\bin
|
||||
curl -fsSL -o%PKG_CONFIG_PATH%\libpthreadVC2.pc http://public.kymeria.fr/KIWIX/windows/libpthreadVC2.pc || exit /b 1
|
||||
cd ..
|
|
@ -0,0 +1,10 @@
|
|||
REM ========================================================
|
||||
REM Install pugixml
|
||||
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/pugixml-1.2-meson.zip || exit /b 1
|
||||
7z x pugixml-1.2-meson.zip -o. || exit /b 1
|
||||
cd pugixml-1.2-meson
|
||||
meson.py . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
|
||||
cd build
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..
|
|
@ -0,0 +1,9 @@
|
|||
REM ========================================================
|
||||
REM Install xapian
|
||||
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/xapian-core-1.5.0.zip || exit /b 1
|
||||
7z x xapian-core-1.5.0.zip || exit /b 1
|
||||
cd xapian-core-1.5.0
|
||||
mkdir build
|
||||
cd build
|
||||
%MINGW64_RUN% "cd /c/Projects/kiwix-build/xapian-core-1.5.0/build && /c/Projects/kiwix-build/appveyor/build_xapian.sh" > build_xapian.log || exit /b 1
|
||||
cd ..\..
|
|
@ -0,0 +1,10 @@
|
|||
REM ========================================================
|
||||
REM Install zlib
|
||||
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/zlib-1.2.11.meson.zip || exit /b 1
|
||||
7z x zlib-1.2.11.meson.zip || exit /b 1
|
||||
cd zlib-1.2.11
|
||||
meson.py . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
|
||||
cd build
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..
|
Binary file not shown.
|
@ -0,0 +1,17 @@
|
|||
|
||||
set -e
|
||||
|
||||
NIGHTLY_DATE=$(date +%Y-%m-%d)
|
||||
NIGHTLY_KIWIX_ARCHIVES_DIR=/c/projects/NIGHTLY_KIWIX_ARCHIVES/${NIGHTLY_DATE}
|
||||
KIWIX_ARCH_NAME=kiwix-desktop_$NIGHTLY_DATE.zip
|
||||
KIWIX_DIR=kiwix-desktop_$NIGHTLY_DATE
|
||||
|
||||
mkdir $KIWIX_DIR
|
||||
mkdir -p NIGHTLY_KIWIX_ARCHIVES_DIR
|
||||
|
||||
cp /c/projects/kiwix-build/kiwix-desktop/Release/kiwix-desktop.exe $KIWIX_DIR
|
||||
/c/Qt/5.11.0/msvc2017_64/bin/windeployqt --compiler-runtime $KIWIX_DIR
|
||||
|
||||
cp $MINGW64_EXTRA_DIR/bin/*.dll $KIWIX_DIR
|
||||
|
||||
7z a -tzip $NIGHTLY_KIWIX_ARCHIVES_DIR/$KIWIX_ARCH_NAME $KIWIX_DIR
|
Loading…
Reference in New Issue