Skip to content

updated version number: 0.2.5 #18

updated version number: 0.2.5

updated version number: 0.2.5 #18

name: "Package for Ubuntu 22.04"
on:
push:
tags:
- "v*"
workflow_dispatch:
env:
MUPDF_VERSION: 1.24.9
MUPDF_SHA256SUM: d87da097ae943ad0113003190ed370d39bde817383c59dc753dce23c7ba2b710
jobs:
package:
name: Package
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Dependencies
run: >
sudo apt-get update -y;
sudo apt-get install -y --no-install-recommends
cmake
lunzip
zlib1g-dev
libmupdf-dev
libmujs-dev
libgumbo-dev
libfreetype-dev
freeglut3-dev
libharfbuzz-dev
libjpeg-dev
libopenjp2-7-dev
libjbig2dec0-dev
libqt6svg6-dev
qt6-multimedia-dev
libqt6opengl6-dev
libgl1-mesa-dev
qt6-tools-dev
qt6-tools-dev-tools
qt6-l10n-tools
libqt5svg5-dev
qtmultimedia5-dev
qttools5-dev
libpoppler-qt5-dev
- name: Configure with Qt5 + Poppler
run: >
cmake
-B build_qt5_poppler
-DUBUNTU_VERSION=22.04
-DUSE_MUPDF=OFF
-DUSE_POPPLER=ON
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=ON
-DLINK_GUMBO=ON
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=15
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt5 + Poppler
run: cmake --build build_qt5_poppler
- name: Package with Qt5 + Poppler
run: |
cpack --config build_qt5_poppler/CPackConfig.cmake
mv beamerpresenter-poppler-qt5-x86_64.deb beamerpresenter-poppler-qt5-jammy-x86_64.deb
- name: Archive package with Qt5 + Poppler
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-poppler-qt5-jammy-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-poppler-qt5-jammy-x86_64.deb
- name: Configure with Qt5 + MuPDF
run: >
cmake
-B build_qt5_mupdf
-DUBUNTU_VERSION=22.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=ON
-DLINK_GUMBO=ON
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=15
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt5 + MuPDF
run: cmake --build build_qt5_mupdf
- name: Package with Qt5 + MuPDF
run: |
cpack --config build_qt5_mupdf/CPackConfig.cmake
mv beamerpresenter-mupdf-qt5-x86_64.deb beamerpresenter-mupdf-qt5-jammy-x86_64.deb
- name: Archive package with Qt5 + MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-qt5-jammy-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-qt5-jammy-x86_64.deb
- name: Configure with Qt6 + MuPDF
run: >
cmake
-B build_qt6_mupdf
-DUBUNTU_VERSION=22.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=ON
-DLINK_GUMBO=ON
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=6
-DQT_VERSION_MINOR=2
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt6 + MuPDF
run: cmake --build build_qt6_mupdf
- name: Package with Qt6 + MuPDF
run: |
cpack --config build_qt6_mupdf/CPackConfig.cmake
mv beamerpresenter-mupdf-qt6-x86_64.deb beamerpresenter-mupdf-qt6-jammy-x86_64.deb
- name: Archive package with Qt6 + MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-qt6-jammy-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-qt6-jammy-x86_64.deb
- name: Download and unpack MuPDF
run: |
wget -q https://mupdf.com/downloads/archive/mupdf-${{ env.MUPDF_VERSION }}-source.tar.lz
sha256sum -c - <<< "${{ env.MUPDF_SHA256SUM }} mupdf-${{ env.MUPDF_VERSION }}-source.tar.lz"
tar -xf "mupdf-${{ env.MUPDF_VERSION }}-source.tar.lz"
- name: Build MuPDF
run : |
cd "mupdf-${{ env.MUPDF_VERSION }}-source"
rm -rf thirdparty/{freeglut,freetype,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib}
CFLAGS+=' -fPIC -ffat-lto-objects'
CXXFLAGS+=' -fPIC'
USE_SYSTEM_LIBS='yes'
XCFLAGS+=' -DTOFU -DTOFU_CJK -DTOFU_SIL -DFZ_ENABLE_JS=0'
export CFLAGS CXXFLAGS USE_SYSTEM_LIBS XCFLAGS
make build=release libs
- name: Configure with Qt5 + small MuPDF
run: >
cmake
-B build_qt5_mupdf_small
-DUBUNTU_VERSION=22.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=OFF
-DLINK_GUMBO=ON
-DMUPDF_LIB_PATH="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/build/release/libmupdf.a"
-DMUPDF_THIRD_LIB_PATH="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/build/release/libmupdf-third.a"
-DMUPDF_INCLUDE_DIR="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/include"
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=15
-DMARK_AS_SMALL=ON
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt5 + small MuPDF
run: cmake --build build_qt5_mupdf_small
- name: Package with Qt5 + small MuPDF
run: |
cpack --config build_qt5_mupdf_small/CPackConfig.cmake
mv beamerpresenter-mupdf-small-qt5-x86_64.deb beamerpresenter-mupdf-small-qt5-jammy-x86_64.deb
- name: Archive package with Qt5 + small MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-small-qt5-jammy-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-small-qt5-jammy-x86_64.deb
- name: Configure with Qt6 + small MuPDF
run: >
cmake
-B build_qt6_mupdf_small
-DUBUNTU_VERSION=22.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=OFF
-DLINK_GUMBO=ON
-DMUPDF_LIB_PATH="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/build/release/libmupdf.a"
-DMUPDF_THIRD_LIB_PATH="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/build/release/libmupdf-third.a"
-DMUPDF_INCLUDE_DIR="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/include"
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=6
-DQT_VERSION_MINOR=2
-DMARK_AS_SMALL=ON
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt6 + small MuPDF
run: cmake --build build_qt6_mupdf_small
- name: Package with Qt6 + small MuPDF
run: |
cpack --config build_qt6_mupdf_small/CPackConfig.cmake
mv beamerpresenter-mupdf-small-qt6-x86_64.deb beamerpresenter-mupdf-small-qt6-jammy-x86_64.deb
- name: Archive package with Qt6 + small MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-small-qt6-jammy-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-small-qt6-jammy-x86_64.deb
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
beamerpresenter-mupdf-small-qt5-jammy-x86_64.deb
beamerpresenter-mupdf-small-qt6-jammy-x86_64.deb
beamerpresenter-mupdf-qt5-jammy-x86_64.deb
beamerpresenter-mupdf-qt6-jammy-x86_64.deb
beamerpresenter-poppler-qt5-jammy-x86_64.deb
draft: true
token: ${{ secrets.GITHUB_TOKEN }}