Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test build on windows #13

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions .github/workflows/build_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
run: |
conda install -c conda-forge poppler

- name: Install ocrmypdf dependencies (windows)
uses: MinoruSekine/[email protected]
if: matrix.os-target.os == 'windows-latest'
with:
apps: tesseract pdfquant ghostscript

- name: Setup brew (mac)
if: matrix.os-target.os == 'macos-latest'
uses: Homebrew/actions/setup-homebrew@master
Expand All @@ -60,23 +66,13 @@ jobs:
toolchain: stable
target: ${{ matrix.os-target.target }}

- name: Install Statement Sensei dependencies (ubuntu/macos)
if: matrix.os-target.os != 'windows-latest'
- name: Install Statement Sensei dependencies
uses: ./.github/actions/setup-python-poetry
with:
python-version: "3.11"
poetry-version: "1.8.3"
poetry-install-args: --with main --with build --without dev --extras ocrmypdf

# pngquant isn't supported on windows, so ocrmypdf can't be installed
- name: Install Statement Sensei dependencies (windows)
if: matrix.os-target.os == 'windows-latest'
uses: ./.github/actions/setup-python-poetry
with:
python-version: "3.11"
poetry-version: "1.8.3"
poetry-install-args: --with main --with build --without dev

# onedir mode doesn't work with ubuntu, build_appimage.sh fails
- name: Create executable for tauri (ubuntu)
if: matrix.os-target.os == 'ubuntu-latest'
Expand Down
10 changes: 10 additions & 0 deletions hooks/hook-ocrmypdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# pylint: disable=invalid-name
from PyInstaller.utils.hooks import (
collect_data_files,
collect_submodules,
copy_metadata,
)

datas = copy_metadata("pikepdf") + copy_metadata("ocrmypdf")
datas += collect_data_files("ocrmypdf")
hiddenimports = collect_submodules("ocrmypdf")
Loading