Skip to content

Commit

Permalink
libheif version 1.14.1(Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigcat88 committed Jan 4, 2023
1 parent 020de57 commit bf9b0f0
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 10 deletions.
60 changes: 56 additions & 4 deletions .github/workflows/test-src-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,45 @@ on:
workflow_call:
pull_request:
paths:
- '.github/workflows/test-src-build-windows.yml'
- 'libheif/windows/**'
- 'libheif/build.py'
- 'libheif/public_api.h'
- 'setup.*'
- 'pyproject.toml'
- 'pi-heif/libheif/windows/**'
- 'pi-heif/setup.cfg'
push:
branches: [master]
paths:
- '.github/workflows/test-src-build-windows.yml'
- 'libheif/windows/**'
- 'libheif/build.py'
- 'libheif/public_api.h'
- 'setup.*'
- 'pyproject.toml'
- 'pi-heif/libheif/windows/**'
- 'pi-heif/setup.cfg'

concurrency:
group: src_windows-${{ github.ref }}
cancel-in-progress: true

jobs:
windows_2019:
full_windows_2019:
name: Windows:2019-x86_64
runs-on: windows-2019
env:
MSYS2_PREFIX: "C:/temp/msys64/mingw64"
PH_FULL_ACTION: 1
EXP_PH_LIBHEIF_VERSION: ""

steps:
- uses: actions/checkout@v3

- uses: msys2/setup-msys2@v2
with:
location: C:/temp
update: true
install: >-
patch
mingw-w64-x86_64-binutils
- name: Build libheif and dependencies
Expand Down Expand Up @@ -66,3 +72,49 @@ jobs:

- name: Perform tests
run: python -m pytest -rs

lite_windows_2019:
name: Windows:2019-x86_64(Pi-Heif)
runs-on: windows-2019
env:
MSYS2_PREFIX: "C:/temp/msys64/mingw64"
PH_LIGHT_ACTION: 1
EXP_PH_LIBHEIF_VERSION: ""

steps:
- uses: actions/checkout@v3
- name: Transform to Pi-Heif
run: |
cp -r -v -force ./pi-heif/* .
python3 .github/transform_to-pi_heif.py
- uses: msys2/setup-msys2@v2
with:
location: C:/temp
install: >-
mingw-w64-x86_64-binutils
- name: Build libheif and dependencies
shell: msys2 {0}
run: |
cd libheif/windows/mingw-w64-libheif
makepkg-mingw --syncdeps --noconfirm -f
pacman -U mingw-w64-x86_64-libheif-*-any.pkg.tar.zst --noconfirm
- name: Installing Pi-Heif
run: python -m pip -v install ".[tests]"

- name: Copy DLLs from MSYS2
run: |
$site_packages=(python -c 'import sysconfig; print(sysconfig.get_paths()[\"platlib\"])')
cp ${{ env.MSYS2_PREFIX }}/bin/libheif.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libstdc++-6.dll $site_packages/
- name: LibHeif info
run: python -c "import pi_heif; print(pi_heif.libheif_info())"

- name: Perform tests
run: python -m pytest -rs
6 changes: 3 additions & 3 deletions libheif/windows/mingw-w64-libheif/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
_realname=libheif
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=03fb8f092248bd4f76fad5399f4e3a9d3db4dba2
pkgver=1.14.1
pkgrel=1
pkgdesc="HEIF image decoder/encoder library and tools (mingw-w64)"
arch=('any')
Expand All @@ -20,8 +20,8 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-aom"
"${MINGW_PACKAGE_PREFIX}-libde265"
"${MINGW_PACKAGE_PREFIX}-x265")
source=("https://github.com/strukturag/libheif/archive/03fb8f092248bd4f76fad5399f4e3a9d3db4dba2.tar.gz")
sha256sums=('decbea102e051e928073363621d7df822b6a2a68d60a3965a62e734daa731cf9')
source=("https://github.com/strukturag/libheif/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('0634646587454f95e9638ca472a37321aa519fca2ec7405d0e02a74d7ee581db')

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
Expand Down
6 changes: 3 additions & 3 deletions pi-heif/libheif/windows/mingw-w64-libheif/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
_realname=libheif
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=03fb8f092248bd4f76fad5399f4e3a9d3db4dba2
pkgver=1.14.1
pkgrel=1
pkgdesc="HEIF image decoder/encoder library and tools (mingw-w64)"
arch=('any')
Expand All @@ -18,8 +18,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-cc")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-libde265")
source=("https://github.com/strukturag/libheif/archive/03fb8f092248bd4f76fad5399f4e3a9d3db4dba2.tar.gz")
sha256sums=('decbea102e051e928073363621d7df822b6a2a68d60a3965a62e734daa731cf9')
source=("https://github.com/strukturag/libheif/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('0634646587454f95e9638ca472a37321aa519fca2ec7405d0e02a74d7ee581db')

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
Expand Down

0 comments on commit bf9b0f0

Please sign in to comment.