Package kiwix-serve within kiwix-desktop.

Now that kiwix-desktop use kiwix-serve to serve the content, we need to
compile and package kiwix-serve (kiwix-tools).
This commit is contained in:
Matthieu Gautier 2019-06-26 10:18:48 +02:00
parent 2cc58360f0
commit e87c429555
7 changed files with 31 additions and 1 deletions

View File

@ -51,9 +51,11 @@ build_script:
- IF "%USE_CACHE%" NEQ "1" appveyor\install_pugixml.cmd
- IF "%USE_CACHE%" NEQ "1" appveyor\install_aria2.cmd
- IF "%USE_CACHE%" NEQ "1" appveyor\install_mustache.cmd
- IF "%USE_CACHE%" NEQ "1" appveyor\install_libmicrohttpd.cmd
- IF "%USE_CACHE%" NEQ "1" %MINGW64_RUN% "cd /c/projects/kiwix-build && appveyor/create_cache.sh"
- appveyor\install_libzim.cmd
- appveyor\install_kiwix-lib.cmd
- appveyor\install_kiwix-tools.cmd
- appveyor\install_kiwix-desktop.cmd
before_deploy:

View File

@ -0,0 +1,11 @@
REM ========================================================
REM Install kiwix-lib
git clone https://github.com/kiwix/kiwix-tools.git || exit /b 1
cd kiwix-tools
set "CPPFLAGS=-I%EXTRA_DIR%/include"
set "LDFLAGS=-lshlwapi -lwinmm"
meson . build --prefix %EXTRA_DIR% -Dstatic-linkage=true --buildtype release || exit /b 1
cd build
ninja || exit /b 1
ninja install || exit /b 1
cd ..\..

View File

@ -0,0 +1,10 @@
REM ========================================================
REM Install libmicrohttpd
curl -fsSL -O https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-latest-w32-bin.zip || exit /b 1
7z e libmicrohttpd-latest-w32-bin.zip -o%EXTRA_DIR%/include libmicrohttpd-*-w32-bin/x86_64/VS2019/Release-static/microhttpd.h || exit /b 1
7z e libmicrohttpd-latest-w32-bin.zip -o%EXTRA_DIR%/lib libmicrohttpd-*-w32-bin/x86_64/VS2019/Release-static/libmicrohttpd.lib || exit /b 1
7z e libmicrohttpd-latest-w32-bin.zip -o%EXTRA_DIR%/lib/pkgconfig libmicrohttpd-*-w32-bin/x86_64/MinGW/static/mingw64/lib/pkgconfig/* || exit /b 1
dir %EXTRA_DIR%
dir %EXTRA_DIR%\lib
dir %EXTRA_DIR%\lib\pkgconfig

View File

@ -22,6 +22,7 @@ cp /c/projects/kiwix-build/kiwix-desktop/Release/kiwix-desktop.exe $KIWIX_DIR
cp $MINGW64_EXTRA_DIR/aria2c.exe $KIWIX_DIR
cp $MINGW64_EXTRA_DIR/bin/*.dll $KIWIX_DIR
cp $MINGW64_EXTRA_DIR/bin/kiwix-serve.exe $KIWIX_DIR
/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/x64/signtool.exe sign -f appveyor/kiwix.pfx -p $win_certificate_password -t http://timestamp.verisign.com/scripts/timestamp.dll -d "Kiwix-desktop application" $KIWIX_DIR/kiwix-desktop.exe

View File

@ -11,7 +11,7 @@ class KiwixDesktop(Dependency):
git_dir = "kiwix-desktop"
class Builder(QMakeBuilder):
dependencies = ["qt", "qtwebengine", "kiwix-lib", "aria2"]
dependencies = ["qt", "qtwebengine", "kiwix-lib", "aria2", "kiwix-tools"]
make_install_target = 'install'
@property

View File

@ -52,6 +52,9 @@ MANIFEST = {
'/bin/curl',
'/bin/copydatabase',
'/bin/kiwix-compile-resources',
'/bin/kiwix-manage',
'/bin/kiwix-read',
'/bin/kiwix-search',
'/bin/quest',
'/bin/simple*',
'/bin/xapian-*',

View File

@ -31,6 +31,9 @@ wget https://github.com/q3aql/aria2-static-builds/releases/download/v1.34.0/aria
mkdir -p $APPDIR/usr/bin/ && tar -C $APPDIR/usr/bin/ -xf aria2-1.34.0-linux-gnu-64bit-build1.tar.bz2 aria2-1.34.0-linux-gnu-64bit-build1/aria2c --strip-components=1
mkdir -p $APPDIR/etc/ssl/certs/ && tar -C $APPDIR/etc/ssl/certs/ -xf aria2-1.34.0-linux-gnu-64bit-build1.tar.bz2 aria2-1.34.0-linux-gnu-64bit-build1/ca-certificates.crt --strip-components=1
# copy kiwix-serve
cp $INSTALLDIR/bin/kiwix-serve $APPDIR/usr/bin
# Get linuxdeployqt
wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x linuxdeployqt-continuous-x86_64.AppImage