mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-06-06 05:49:01 +08:00
CI win build enable all feature
This commit is contained in:
25
.github/workflows/CI.yml
vendored
25
.github/workflows/CI.yml
vendored
@@ -176,7 +176,7 @@ jobs:
|
||||
id: cache_key
|
||||
run: |
|
||||
cd scripts
|
||||
python get_cache_key.py --prefix=win zlib pkgconf expat exiv2 openssl || exit 1
|
||||
python get_cache_key.py --prefix=win zlib pkgconf expat exiv2 openssl libzip x264 ffmpeg || exit 1
|
||||
- name: Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
@@ -228,6 +228,27 @@ jobs:
|
||||
run: |
|
||||
COPY /Y scripts\build_win_openssl.bat || exit 1
|
||||
CALL build_win_openssl.bat || exit 1
|
||||
- name: Build libzip
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
COPY /Y scripts\build_win_libzip.bat || exit 1
|
||||
CALL build_win_libzip.bat || exit 1
|
||||
- name: Build x264
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
MSYS2_PATH_TYPE: inherit
|
||||
run: |
|
||||
cp scripts/build_win_x264.sh -v ./ || exit 1
|
||||
./build_win_x264.sh || exit 1
|
||||
- name: Build ffmpeg
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
MSYS2_PATH_TYPE: inherit
|
||||
run: |
|
||||
cp scripts/build_win_ffmpeg.sh -v ./ || exit 1
|
||||
./build_win_ffmpeg.sh || exit 1
|
||||
- name: Build
|
||||
run: |
|
||||
SET PKG_CONFIG_PATH=%CD%\clib\lib\pkgconfig
|
||||
@@ -235,4 +256,4 @@ jobs:
|
||||
SET PATH=%PATH%;%CD%\clib\bin
|
||||
SET OPENSSL_LIB_DIR=%CD%\clib\lib
|
||||
SET OPENSSL_INCLUDE_DIR=%CD%\clib\include
|
||||
cargo build --features exif -vv || exit 1
|
||||
cargo build --features all -vv || exit 1
|
||||
|
||||
27
scripts/build_win_ffmpeg.sh
Normal file
27
scripts/build_win_ffmpeg.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
export PREFIX=`pwd`/clib
|
||||
export PREFIX2=`cygpath -w $PREFIX`
|
||||
export "PATH=$PREFIX/bin:$PATH"
|
||||
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
|
||||
export "LIB=$LIB;$PREFIX2/lib"
|
||||
export "INCLUDE=$INCLUDE;$PREFIX2/include"
|
||||
mkdir -p cbuild && cd cbuild || exit 1
|
||||
git clone --depth 1 'https://git.ffmpeg.org/ffmpeg.git' && cd ffmpeg || exit 1
|
||||
./configure \
|
||||
--enable-gpl \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--enable-version3 \
|
||||
--prefix=${PREFIX2//\\//} \
|
||||
--disable-doc \
|
||||
--enable-libx264 \
|
||||
--disable-programs \
|
||||
--pkg-config-flags="--env-only" \
|
||||
--toolchain=msvc
|
||||
if [ $? != 0 ]; then
|
||||
cat ffbuild/config.log
|
||||
exit 1
|
||||
fi
|
||||
make -j8 || exit 1
|
||||
make -j8 install || exit 1
|
||||
mv -fv $PREFIX/bin/*.lib $PREFIX/lib || exit 1
|
||||
mv -fv */*.pdb $PREFIX/bin || exit 1
|
||||
35
scripts/build_win_libzip.bat
Normal file
35
scripts/build_win_libzip.bat
Normal file
@@ -0,0 +1,35 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL
|
||||
SET PREFIX=%CD%\clib
|
||||
SET PKG_CONFIG_DIR=%PREFIX%\lib\pkgconfig
|
||||
IF NOT EXIST cbuild (
|
||||
MD cbuild || EXIT /B 1
|
||||
)
|
||||
CD cbuild || EXIT /B 1
|
||||
git clone --depth 1 "https://github.com/nih-at/libzip" || EXIT /B %ERRORLEVEL%
|
||||
CD libzip || EXIT /B 1
|
||||
IF NOT EXIST build (
|
||||
MD build || EXIT /B 1
|
||||
)
|
||||
CD build || EXIT /B 1
|
||||
cmake ^
|
||||
-G Ninja ^
|
||||
-DCMAKE_PREFIX_PATH=%PREFIX% ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DCMAKE_INSTALL_PREFIX=%PREFIX% ^
|
||||
-DINSTALL_PKGCONFIG_DIR=%PKG_CONFIG_DIR% ^
|
||||
-DENABLE_COMMONCRYPTO=OFF ^
|
||||
-DENABLE_GNUTLS=OFF ^
|
||||
-DENABLE_MBEDTLS=OFF ^
|
||||
-DENABLE_OPENSSL=ON ^
|
||||
-DENABLE_WINDOWS_CRYPTO=ON ^
|
||||
-DENABLE_BZIP2=OFF ^
|
||||
-DENABLE_LZMA=OFF ^
|
||||
-DENABLE_ZSTD=OFF ^
|
||||
-DBUILD_REGRESS=OFF ^
|
||||
-DBUILD_EXAMPLES=OFF ^
|
||||
-DBUILD_DOC=OFF ^
|
||||
-DBUILD_TOOLS=OFF ^
|
||||
../ || EXIT /B %ERRORLEVEL%
|
||||
ninja && ninja install || ninja && ninja install || EXIT /B %ERRORLEVEL%
|
||||
ENDLOCAL
|
||||
18
scripts/build_win_x264.sh
Normal file
18
scripts/build_win_x264.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
export PREFIX=`pwd`/clib
|
||||
export PREFIX2=`cygpath -w $PREFIX`
|
||||
export "PATH=$PREFIX/bin:$PATH"
|
||||
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
|
||||
export "LIB=$LIB;$PREFIX2/lib"
|
||||
export "INCLUDE=$INCLUDE;$PREFIX2/include"
|
||||
mkdir -p cbuild && cd cbuild || exit 1
|
||||
git clone --depth 1 "https://code.videolan.org/videolan/x264.git" && cd x264 || exit 1
|
||||
export CC=cl
|
||||
export PKGCONFIG='pkg-config --msvc --env-only'
|
||||
./configure \
|
||||
--prefix=${PREFIX2//\\//} \
|
||||
--disable-cli \
|
||||
--enable-shared \
|
||||
|| exit 1
|
||||
make -j8 || exit 1
|
||||
make -j8 install || exit 1
|
||||
mv -v $PREFIX/lib/libx264.dll.lib $PREFIX/lib/x264.lib || exit 1
|
||||
Reference in New Issue
Block a user