Skip to content

plugin_infoについて、コメントを追記 #55

plugin_infoについて、コメントを追記

plugin_infoについて、コメントを追記 #55

Workflow file for this run

name: Build ifheif
on:
push:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install depend lib
run: sudo apt install nasm mingw-w64 meson ninja-build pkg-config
- name: Create symbolic link
run: sudo ln -s /usr/bin/pkg-config /usr/bin/i686-w64-mingw32-pkg-config
- name: Posix thread
run: |
cd /etc/alternatives
sudo ln -s -f /usr/bin/i686-w64-mingw32-cpp-posix i686-w64-mingw32-cpp
sudo ln -s -f /usr/bin/i686-w64-mingw32-g++-posix i686-w64-mingw32-g++
sudo ln -s -f /usr/bin/i686-w64-mingw32-gcc-posix i686-w64-mingw32-gcc
sudo ln -s -f /usr/bin/i686-w64-mingw32-gcc-10-posix i686-w64-mingw32-gcc-10
sudo ln -s -f /usr/bin/i686-w64-mingw32-gcc-ar-posix i686-w64-mingw32-gcc-ar
sudo ln -s -f /usr/bin/i686-w64-mingw32-gcc-nm-posix i686-w64-mingw32-gcc-nm
sudo ln -s -f /usr/bin/i686-w64-mingw32-gcc-ranlib-posix i686-w64-mingw32-gcc-ranlib
sudo ln -s -f /usr/bin/i686-w64-mingw32-gcov-posix i686-w64-mingw32-gcov
- name: Install dav1d
run: |
cd ${{ github.workspace }}
git clone https://code.videolan.org/videolan/dav1d.git -b 1.4.0 --depth 1
cd dav1d
mkdir build && cd build
meson --cross-file=../package/crossfiles/i686-w64-mingw32.meson --prefix=${HOME}/dec --buildtype release --default-library=static ..
ninja
sudo ninja install
- name: Install libde265
run: |
cd ${{ github.workspace }}
git clone https://github.com/strukturag/libde265.git -b v1.0.15 --depth 1
cd libde265
sed -e 's/ -static-libstdc++//g' ./dec265/Makefile.am > ./Mf.am
mv -f ./Mf.am ./dec265/Makefile.am
./autogen.sh
PKG_CONFIG_PATH=${HOME}/dec/lib/pkgconfig ./configure --host=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=${HOME}/dec --disable-encoder --disable-arm --enable-static --disable-shared
make -j$(nproc)
sudo make install -j$(nproc)
- name: Install libheif
run: |
cd ${{ github.workspace }}
sudo apt remove libpng-dev
git clone https://github.com/strukturag/libheif.git -b v1.15.2 --depth 1
cd libheif
./autogen.sh
PKG_CONFIG_PATH=${HOME}/dec/lib/pkgconfig LDFLAGS="-std=gnu++11" ./configure --host=i686-w64-mingw32 --prefix=${HOME}/dec --target=i686-w64-mingw32 --enable-static --disable-shared --disable-gdk-pixbuf --disable-go --disable-examples
make -j$(nproc)
sudo make install -j$(nproc)
- name: Build ifheif
run: |
cd ${{ github.workspace }}
i686-w64-mingw32-g++ src/ifheif.cpp src/ifheif.def "-Wl,--dll,--enable-stdcall-fixup" -o ifheif.spi `PKG_CONFIG_PATH=${HOME}/dec/lib/pkgconfig i686-w64-mingw32-pkg-config --libs --cflags libheif libde265 dav1d` -static -shared
- name: Add License Files
run: |
mkdir ${{ github.workspace }}/Licenses
cd ${{ github.workspace }}/Licenses
cp ${{ github.workspace }}/dav1d/COPYING dav1d.txt
cp ${{ github.workspace }}/libde265/COPYING libde265.txt
cp ${{ github.workspace }}/libheif/COPYING libheif.txt
- name: Create archive
run: |
cd ${{ github.workspace }}
zip ifheif -r src LICENSE Readme.md Licenses ifheif.spi
# https://gist.github.com/superbrothers/af84a2f8af394a62352e06537a640746
- name: Create a Release
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REVCOUNT=`git rev-list --count HEAD`
RELEASE_NAME=r${REVCOUNT}
TAG_NAME=r${REVCOUNT}
gh release create "${TAG_NAME}" ${{ github.workspace }}/*.zip -t "${RELEASE_NAME}"