Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/branches/issue189_REBASED'
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubMelka committed Jun 30, 2024
2 parents b6fda40 + 9e98454 commit b381e84
Show file tree
Hide file tree
Showing 22 changed files with 237 additions and 70 deletions.
99 changes: 70 additions & 29 deletions .github/workflows/LinuxInstall.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: LinuxInstall
name: Linux_AppImage

on:
create:
Expand All @@ -17,7 +17,43 @@ jobs:
sudo apt-get update
sudo apt-get install -y libxcb-cursor0
sudo apt-get install -y libspeechd2
sudo apt-get install -y gnupg2 wget
wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool-x86_64.AppImage
sudo mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
- name: Configure GPG
run: |
mkdir -p ~/.gnupg
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf
gpgconf --kill gpg-agent
echo "GPG configuration complete."
chmod 700 ~/.gnupg
- name: Import PGP private key
run: |
echo "${{ secrets.PGP_PRIVATE_KEY }}" | gpg --batch --import
for keygrip in $(gpg --list-secret-keys --with-keygrip "${{ secrets.PGP_KEY_ID }}" | grep Keygrip | awk '{print $3}'); do
echo "${{ secrets.PGP_PASSPHRASE }}" | "$(gpgconf --list-dirs libexecdir)"/gpg-preset-passphrase --preset $keygrip
done
env:
GNUPGHOME: /home/runner/.gnupg

- name: Create Test signature
run: |
echo "TEST" >> ~/test_with_passphrase.txt
echo "TEST" >> ~/test_without_passphrase.txt
gpg --batch --yes --verbose --passphrase "${{ secrets.PGP_PASSPHRASE }}" --pinentry-mode loopback --detach-sign --local-user "${{ secrets.PGP_KEY_ID }}" --output ~/test_with_passphrase.txt.sig ~/test_with_passphrase.txt
gpg --batch --yes --verbose --pinentry-mode loopback --detach-sign --local-user "${{ secrets.PGP_KEY_ID }}" --output ~/test_without_passphrase.txt.sig ~/test_without_passphrase.txt
- name: Verify Test signature
run: |
gpg --batch --yes --verbose --verify ~/test_with_passphrase.txt.sig ~/test_with_passphrase.txt
gpg --batch --yes --verbose --verify ~/test_without_passphrase.txt.sig ~/test_without_passphrase.txt
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand All @@ -37,7 +73,7 @@ jobs:
./vcpkg integrate install
- name: 'VCPKG: Cache vcpkg dependencies'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
./vcpkg/downloads
Expand All @@ -46,60 +82,65 @@ jobs:
restore-keys: |
${{ runner.os }}-vcpkg-v2-
- name: 'VCPKG: Install project dependencies'
- name: 'VCPKG: Install Project Dependencies'
run: |
./vcpkg install tbb openssl lcms zlib openjpeg freetype ijg-libjpeg libpng blend2d
./vcpkg install tbb openssl lcms zlib openjpeg freetype ijg-libjpeg libpng blend2d brotli bzip2 --triplet x64-linux-release
working-directory: vcpkg

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.6.0'
version: '6.7.2'
host: 'linux'
target: 'desktop'
dir: '${{ github.workspace }}/qt/'
install-deps: 'true'
modules: 'qtspeech qtmultimedia'
cache: 'true'
cache-key-prefix: ${{ runner.os }}-qt-660
cache-key-prefix: ${{ runner.os }}-qt-672

- name: Build project
- name: Build Project
working-directory: pdf4qt
run: |
cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DVCPKG_OVERLAY_PORTS=vcpkg/overlays -DPDF4QT_INSTALL_TO_USR=ON
cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VCPKG_BUILD_TYPE=Release -DVCPKG_OVERLAY_PORTS=vcpkg/overlays -DPDF4QT_INSTALL_TO_USR=ON
cmake --build build -j6
cmake --install build
cp -rp build/install build/install_appimage
- name: 'Linux Deploy Qt'
working-directory: pdf4qt/build
run: |
cp install/usr/share/icons/hicolor/scalable/apps/io.github.JakubMelka.Pdf4qt.svg install/io.github.JakubMelka.Pdf4qt.svg
wget -O deploy.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod +x deploy.AppImage
./deploy.AppImage install/usr/share/applications/io.github.JakubMelka.Pdf4qt.desktop -executable-dir=install/usr/bin -extra-plugins=iconengines,imageformats,texttospeech
- name: Make DEB package
working-directory: pdf4qt/build
run: |
sh make-package.sh
- name: Upload DEB package
uses: actions/upload-artifact@v3
with:
name: ubuntu-deb-package
path: ./pdf4qt/build/*.deb
retention-days: 30
- name: 'Make AppImage'
- name: Sign and Repack AppImage
working-directory: pdf4qt/build
run: |
cp install_appimage/usr/share/icons/hicolor/scalable/apps/io.github.JakubMelka.Pdf4qt.svg install_appimage/io.github.JakubMelka.Pdf4qt.svg
./deploy.AppImage install_appimage/usr/share/applications/io.github.JakubMelka.Pdf4qt.desktop -appimage -executable-dir=install_appimage/usr/bin -always-overwrite -extra-plugins=iconengines,imageformats,texttospeech
export GPG_TTY=$(tty)
echo "${{ secrets.PGP_PASSPHRASE }}" | appimagetool -s --sign-key "${{ secrets.PGP_KEY_ID }}" install/ io.github.JakubMelka.Pdf4qt.AppImage
- name: Upload AppImage package
uses: actions/upload-artifact@v3
- name: Manual signature
run: |
gpg --batch --yes --verbose --pinentry-mode loopback --detach-sign --passphrase "${{ secrets.PGP_PASSPHRASE }}" --local-user "${{ secrets.PGP_KEY_ID }}" --output pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage.sig pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage
- name: Verify AppImage Detached Signature
run: |
echo "${{ secrets.PGP_PUBLIC_KEY }}" | gpg --batch --import
gpg --verify pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage.sig pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage
- name: Upload AppImage Package
uses: actions/upload-artifact@v4
with:
name: ubuntu-appimage
path: ./pdf4qt/build/*.AppImage
path: ./pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage
retention-days: 30

- name: Upload AppImage Signature File
uses: actions/upload-artifact@v4
with:
name: ubuntu-appimage-sig
path: ./pdf4qt/build/io.github.JakubMelka.Pdf4qt.AppImage.sig
retention-days: 30

if-no-files-found: warn
compression-level: 0
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
./vcpkg integrate install
- name: 'VCPKG: Cache vcpkg dependencies'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
./vcpkg/downloads
Expand All @@ -42,19 +42,19 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.6.0'
version: '6.7.2'
host: 'linux'
target: 'desktop'
dir: '${{ github.workspace }}/qt/'
install-deps: 'true'
modules: 'qtspeech qtmultimedia'
cache: 'true'
cache-key-prefix: ${{ runner.os }}-qt-660
cache-key-prefix: ${{ runner.os }}-qt-672

- name: Build project
working-directory: pdf4qt
run: |
cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VCPKG_BUILD_TYPE=Release
cmake --build build -j6
cmake --install build
Expand All @@ -64,7 +64,7 @@ jobs:
sh make-package.sh
- name: Upload DEB package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ubuntu-deb-package
path: ./pdf4qt/build/*.deb
Expand All @@ -89,7 +89,7 @@ jobs:
set "VCPKG_BINARY_SOURCES=clear;files,${env:GITHUB_WORKSPACE}\vcpkg\archives,readwrite"
- name: 'VCPKG: Cache vcpkg dependencies'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
./vcpkg/downloads
Expand All @@ -107,25 +107,25 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.6.0'
version: '6.7.2'
host: 'windows'
target: 'desktop'
dir: '${{ github.workspace }}/qt/'
install-deps: 'true'
modules: 'qtspeech qtmultimedia'
cache: 'true'
cache-key-prefix: ${{ runner.os }}-qt-660
cache-key-prefix: ${{ runner.os }}-qt-672

- name: Build project
working-directory: pdf4qt
shell: pwsh
run: |
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DPDF4QT_INSTALL_QT_DEPENDENCIES=ON -DPDF4QT_INSTALL_DEPENDENCIES=ON -DCMAKE_TOOLCHAIN_FILE="${env:GITHUB_WORKSPACE}\vcpkg\scripts\buildsystems\vcpkg.cmake" -DPDF4QT_QT_ROOT="${env:Qt6_DIR}" -DPDF4QT_INSTALL_MSVC_REDISTRIBUTABLE=ON -DPDF4QT_INSTALL_PREPARE_WIX_INSTALLER=ON -DPDF4QT_INSTALL_TO_USR=ON
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_VCPKG_BUILD_TYPE=Release -DPDF4QT_INSTALL_QT_DEPENDENCIES=ON -DPDF4QT_INSTALL_DEPENDENCIES=ON -DCMAKE_TOOLCHAIN_FILE="${env:GITHUB_WORKSPACE}\vcpkg\scripts\buildsystems\vcpkg.cmake" -DPDF4QT_QT_ROOT="${env:Qt6_DIR}" -DPDF4QT_INSTALL_MSVC_REDISTRIBUTABLE=ON -DPDF4QT_INSTALL_PREPARE_WIX_INSTALLER=ON -DPDF4QT_INSTALL_TO_USR=ON
cmake --build build --config Release -j6
cmake --install build
- name: Upload Windows package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'pdf4qt-${{ runner.os }}.zip'
path: .\pdf4qt\build\install\usr\bin
Expand Down
61 changes: 61 additions & 0 deletions AppxManifest.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="io.github.JakubMelka.PDF4QT" Publisher="CN=JakubMelka" Version="${PDF4QT_VERSION}.0" />
<Properties>
<DisplayName>PDF4QT</DisplayName>
<PublisherDisplayName>Jakub Melka</PublisherDisplayName>
<Logo>assets\logo.png</Logo>
<Description>Discover the power and versatility of PDF4QTs suite of applications. These tools are designed to transform the way you interact with PDF documents, offering a comprehensive set of features for viewing, editing, manipulating, and comparing PDFs.</Description>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Applications>
<Application Id="Pdf4QtEditor" Executable="Pdf4QtEditor.exe" EntryPoint="windows.fullTrustApplication">
<uap:VisualElements DisplayName="PDF4QT Editor"
Description="This program enhances PDF interactions with encryption, document reading, digital signatures, annotation editing, regex text search, PDF editing, page-to-image conversion, and plugins."
BackgroundColor="transparent"
Square150x150Logo="assets\150x150\io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.png"
Square44x44Logo="assets\44x44\io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.png">
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name=".pdf">
<uap:SupportedFileTypes>
<uap:FileType>.pdf</uap:FileType>
</uap:SupportedFileTypes>
<uap:Logo>assets\logo.png</uap:Logo>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
</Application>
<Application Id="Pdf4QtViewer" Executable="Pdf4QtViewer.exe" EntryPoint="windows.fullTrustApplication">
<uap:VisualElements DisplayName="PDF4QT Viewer"
Description="Simplify your viewing experience. This lightweight viewer offers essential viewing functions in a clean, user-friendly interface."
BackgroundColor="transparent"
Square150x150Logo="assets\150x150\io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.png"
Square44x44Logo="assets\44x44\io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.png">
</uap:VisualElements>
</Application>
<Application Id="Pdf4QtPageMaster" Executable="Pdf4QtPageMaster.exe" EntryPoint="windows.fullTrustApplication">
<uap:VisualElements DisplayName="PDF4QT PageMaster"
Description="Take control of your documents. Manage whole documents or individual pages with ease. Merge documents into a single file, or split them into multiple ones. You can also move, clone, or add pages with a few clicks, all within an intuitive user interface."
BackgroundColor="transparent"
Square150x150Logo="assets\150x150\io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.png"
Square44x44Logo="assets\44x44\io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.png">
</uap:VisualElements>
</Application>
<Application Id="Pdf4QtDiff" Executable="Pdf4QtDiff.exe" EntryPoint="windows.fullTrustApplication">
<uap:VisualElements DisplayName="PDF4QT PageMaster"
Description="Spot differences effortlessly. This tool allows users to open two documents and receive a detailed list of differences. View these differences in a page-to-page window where they are clearly marked."
BackgroundColor="transparent"
Square150x150Logo="assets\150x150\io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.png"
Square44x44Logo="assets\44x44\io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.png">
</uap:VisualElements>
</Application>
</Applications>

<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19045.0" />
</Dependencies>
</Package>
Loading

0 comments on commit b381e84

Please sign in to comment.