From 991814b9f43d6d36f417e55a6c4c101ee41430db Mon Sep 17 00:00:00 2001 From: BankaiNoJutsu Date: Thu, 8 Feb 2024 19:27:49 +0100 Subject: [PATCH 1/4] added build with dependencies, added .gitignore --- .gitignore | 18 ++++++++++ install.bat | 14 +++++++- scripts/av1an-batch/av1an.bat | 26 +++++++++++++++ scripts/av1an-batch/build.bat | 62 +++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 scripts/av1an-batch/av1an.bat create mode 100644 scripts/av1an-batch/build.bat diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04fd2b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +SVT-AV1-1.8.zip +SvtAv1ApiTests.exe +SvtAv1Dec.dll +SvtAv1DecApp.exe +SvtAv1E2ETests.exe +SvtAv1Enc.dll +SvtAv1EncApp.exe +SvtAv1UnitTests.exe +av1an.exe +dependencies/ +gtest.dll +gtest_all.dll +gtest_main.dll +params - Copie - Copie.txt +params - Copie.txt +params_.txt +readme.txt +source/ \ No newline at end of file diff --git a/install.bat b/install.bat index 98eb63b..2fb3392 100644 --- a/install.bat +++ b/install.bat @@ -33,6 +33,8 @@ for %%d in ( ".\dependencies\rav1e" ".\dependencies\x264" ".\dependencies\x265" + ".\dependencies\nasm" + ".\dependencies\git" ".\scripts\ffmpeg\input" ".\scripts\ffmpeg\input\completed-inputs" ".\scripts\ffmpeg\output" @@ -160,7 +162,17 @@ del .\python-3.11.2-embed-amd64.zip :: Download VapourSynth64 Portable ~R63 %Download-->% https://github.com/vapoursynth/vapoursynth/releases/download/R63/VapourSynth64-Portable-R63.7z %Extract-->% .\VapourSynth64-Portable-R63.7z > nul -del .\VapourSynth64-Portable-R63.7z +del .\VapourSynth64-Portable-R63.7z > nul + +cd ..\ + +:: Download nasm from https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip +%Download-->% https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip +tar -xf .\nasm-2.16.01-win64.zip --strip-components 1 -C nasm + +:: Download git from https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe +%Download-->% https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe +%Extract-->% PortableGit-2.43.0-64-bit.7z.exe -ogit > nul :: Download plugins [These plugins used can spit out errors and is known to be broken on VapourSynth64-R62] .\python.exe .\vsrepo.py update -p > nul diff --git a/scripts/av1an-batch/av1an.bat b/scripts/av1an-batch/av1an.bat new file mode 100644 index 0000000..4ab7002 --- /dev/null +++ b/scripts/av1an-batch/av1an.bat @@ -0,0 +1,26 @@ +@echo off +TITLE Av1an Run + +cls + +setlocal enabledelayedexpansion + +:: Set path +set "AV1=%~dp0" + +:: Correct path +cd "%AV1%" + +:: Set the base path variable +set PATH=%AV1%\..\..\dependencies + +:: Append paths +for /D %%G in ("%AV1%\..\..\dependencies\*") do ( + set PATH=!PATH!;%%G +) + +cd .. +cd .. + +:: run av1an.exe --version +start cmd.exe /k av1an.exe --version \ No newline at end of file diff --git a/scripts/av1an-batch/build.bat b/scripts/av1an-batch/build.bat new file mode 100644 index 0000000..2cf603a --- /dev/null +++ b/scripts/av1an-batch/build.bat @@ -0,0 +1,62 @@ +@echo off +TITLE Av1an Build + +cls + +setlocal enabledelayedexpansion + +:: Set path +set "AV1=%~dp0" + +:: Correct path +cd "%AV1%" + +:: Set the base path variable +set PATH=%AV1%\..\..\dependencies + +:: Append paths +for /D %%G in ("%AV1%\..\..\dependencies\*") do ( + set PATH=!PATH!;%%G +) + +:: install git from https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe +set PATH=!PATH!;%AV1%\..\..\dependencies\git\bin +git clone https://github.com/microsoft/vcpkg ..\..\dependencies\vcpkg 2>nul + +set PATH=!PATH!;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ + +::LLVM +:: powershell.exe Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser +:: powershell.exe Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression +:: scoop install main/llvm + +cd ..\..\dependencies\vcpkg\scripts +powershell.exe -NoProfile -ExecutionPolicy Bypass -File bootstrap.ps1 --quiet --no-verbose >$null 2>&1 +::vcpkg install +cd .. +:: make it build release only +cd triplets +del x64-windows-rel.cmake +ECHO set(VCPKG_TARGET_ARCHITECTURE x64) >> x64-windows-rel.cmake +ECHO set(VCPKG_CRT_LINKAGE dynamic) >> x64-windows-rel.cmake +ECHO set(VCPKG_LIBRARY_LINKAGE dynamic) >> x64-windows-rel.cmake +ECHO set(VCPKG_BUILD_TYPE release) >> x64-windows-rel.cmake +cd .. +vcpkg install ffmpeg:x64-windows-rel --vcpkg-root=..\..\dependencies\vcpkg + +:: Clone av1an repo +git clone https://github.com/master-of-zen/Av1an ..\..\source 2>nul + +::Copy vs libs +cd "%AV1%" +copy ..\..\dependencies\vapoursynth64\sdk\lib64\VapourSynth.lib ..\..\source > NUL +copy ..\..\dependencies\vapoursynth64\sdk\lib64\VSScript.lib ..\..\source > NUL + +:: assuming rust is installed +set PATH=!PATH!;C:\Users\%username%\.cargo\bin +cd ..\..\source +cargo build -r + +copy target\release\av1an.exe .. > NUL + +pause \ No newline at end of file From 7dc02220a4334898a2206ed79bf8cd6be2d66b36 Mon Sep 17 00:00:00 2001 From: BankaiNoJutsu Date: Fri, 9 Feb 2024 23:59:33 +0100 Subject: [PATCH 2/4] add more build dependencies, fix build --- install.bat | 17 ++++++++++++++++- scripts/av1an-batch/build.bat | 14 ++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/install.bat b/install.bat index 2fb3392..d50db71 100644 --- a/install.bat +++ b/install.bat @@ -34,7 +34,8 @@ for %%d in ( ".\dependencies\x264" ".\dependencies\x265" ".\dependencies\nasm" - ".\dependencies\git" + ".\dependencies\git" + ".\dependencies\clang" ".\scripts\ffmpeg\input" ".\scripts\ffmpeg\input\completed-inputs" ".\scripts\ffmpeg\output" @@ -174,6 +175,20 @@ tar -xf .\nasm-2.16.01-win64.zip --strip-components 1 -C nasm %Download-->% https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe %Extract-->% PortableGit-2.43.0-64-bit.7z.exe -ogit > nul +:: Download clang from https://github.com/vovkos/llvm-package-windows/releases/download/clang-master/clang-13.0.0-windows-amd64-msvc15-msvcrt.7z +%Download-->% https://github.com/vovkos/llvm-package-windows/releases/download/clang-master/clang-13.0.0-windows-amd64-msvc15-msvcrt.7z +tar -xf clang-13.0.0-windows-amd64-msvc15-msvcrt.7z --strip-components=1 -C clang > nul + +:: Download vs build tools +%Download-->% https://aka.ms/vs/17/release/vs_BuildTools.exe +vs_BuildTools.exe --wait --passive --quiet --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 +::--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows11SDK.22000 +::winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000" + +:: Download Rustup +%Download-->% https://win.rustup.rs/x86_64 -O rustup-init.exe +rustup-init.exe -qy + :: Download plugins [These plugins used can spit out errors and is known to be broken on VapourSynth64-R62] .\python.exe .\vsrepo.py update -p > nul .\python.exe .\vsrepo.py install lsmas ffms2 -p > nul diff --git a/scripts/av1an-batch/build.bat b/scripts/av1an-batch/build.bat index 2cf603a..2f41811 100644 --- a/scripts/av1an-batch/build.bat +++ b/scripts/av1an-batch/build.bat @@ -24,16 +24,22 @@ set PATH=!PATH!;%AV1%\..\..\dependencies\git\bin git clone https://github.com/microsoft/vcpkg ..\..\dependencies\vcpkg 2>nul set PATH=!PATH!;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ - +set PATH=!PATH!;%SYSTEMROOT%\System32 +:: TODO make this dynamic +set PATH=!PATH!;"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64" ::LLVM :: powershell.exe Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser :: powershell.exe Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression :: scoop install main/llvm cd ..\..\dependencies\vcpkg\scripts -powershell.exe -NoProfile -ExecutionPolicy Bypass -File bootstrap.ps1 --quiet --no-verbose >$null 2>&1 +powershell.exe -NoProfile -ExecutionPolicy Bypass -File bootstrap.ps1 >$null 2>&1 + ::vcpkg install cd .. +::vcpkg update +git pull +vcpkg update :: make it build release only cd triplets del x64-windows-rel.cmake @@ -44,6 +50,9 @@ ECHO set(VCPKG_BUILD_TYPE release) >> x64-windows-rel.cmake cd .. vcpkg install ffmpeg:x64-windows-rel --vcpkg-root=..\..\dependencies\vcpkg +:: Clang +setx LIBCLANG_PATH %AV1%\..\..\dependencies\clang\bin + :: Clone av1an repo git clone https://github.com/master-of-zen/Av1an ..\..\source 2>nul @@ -55,6 +64,7 @@ copy ..\..\dependencies\vapoursynth64\sdk\lib64\VSScript.lib ..\..\source > NUL :: assuming rust is installed set PATH=!PATH!;C:\Users\%username%\.cargo\bin cd ..\..\source +git pull cargo build -r copy target\release\av1an.exe .. > NUL From 108f560ed54e86049009ceeefe053e2d8aea372f Mon Sep 17 00:00:00 2001 From: BankaiNoJutsu Date: Sat, 10 Feb 2024 19:56:53 +0100 Subject: [PATCH 3/4] fix build, add launch bat --- scripts/av1an-batch/av1an.bat => av1an.bat | 7 +- build.bat | 100 +++++++++++++++++++++ install.bat | 28 +++--- scripts/av1an-batch/build.bat | 72 --------------- 4 files changed, 115 insertions(+), 92 deletions(-) rename scripts/av1an-batch/av1an.bat => av1an.bat (69%) create mode 100644 build.bat delete mode 100644 scripts/av1an-batch/build.bat diff --git a/scripts/av1an-batch/av1an.bat b/av1an.bat similarity index 69% rename from scripts/av1an-batch/av1an.bat rename to av1an.bat index 4ab7002..178fbb2 100644 --- a/scripts/av1an-batch/av1an.bat +++ b/av1an.bat @@ -12,15 +12,14 @@ set "AV1=%~dp0" cd "%AV1%" :: Set the base path variable -set PATH=%AV1%\..\..\dependencies +set PATH=%AV1%\dependencies :: Append paths -for /D %%G in ("%AV1%\..\..\dependencies\*") do ( +for /D %%G in ("%AV1%\dependencies\*") do ( set PATH=!PATH!;%%G ) -cd .. -cd .. +copy dependencies\ffmpeg-6.1.1\bin\*.dll . :: run av1an.exe --version start cmd.exe /k av1an.exe --version \ No newline at end of file diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..9a4401f --- /dev/null +++ b/build.bat @@ -0,0 +1,100 @@ +@echo off +TITLE Av1an Build + +cls + +setlocal enabledelayedexpansion + +:: Set path +set "AV1=%~dp0" + +:: Correct path +cd "%AV1%" + +:: Set the base path variable +set PATH=%AV1%\dependencies + +:: Append paths +for /D %%G in ("%AV1%\dependencies\*") do ( + set PATH=!PATH!;%%G +) + +:: install git from https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe +set PATH=!PATH!;%AV1%\dependencies\git\bin +git clone https://github.com/microsoft/vcpkg dependencies\vcpkg 2>nul +:: Clone av1an repo +git clone https://github.com/master-of-zen/Av1an source 2>nul +cd source +git pull +cd .. + +set PATH=!PATH!;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ +set PATH=!PATH!;%SYSTEMROOT%\System32 + +:: TODO make this dynamic +set PATH=!PATH!;"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64" + +::LLVM +:: powershell.exe Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser +:: powershell.exe Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression +:: scoop install main/llvm + +cd dependencies\vcpkg\scripts +powershell.exe -NoProfile -ExecutionPolicy Bypass -File bootstrap.ps1 >$null 2>&1 + +cd .. + +::vcpkg update +git pull +vcpkg update +::vcpkg install +::vcpkg install ffmpeg +::setx VCPKG_ROOT %AV1%\dependencies\vcpkg + +REM :: make it build debug only +REM cd triplets +REM del x64-windows-dbg.cmake +REM ECHO set(VCPKG_TARGET_ARCHITECTURE x64) >> x64-windows-dbg.cmake +REM ECHO set(VCPKG_CRT_LINKAGE dynamic) >> x64-windows-dbg.cmake +REM ECHO set(VCPKG_LIBRARY_LINKAGE dynamic) >> x64-windows-dbg.cmake +REM ECHO set(VCPKG_BUILD_TYPE debug) >> x64-windows-dbg.cmake +REM cd .. +REM vcpkg install ffmpeg:x64-windows-dbg + +REM :: make it build release only +REM cd triplets +REM del x64-windows-rel.cmake +REM ECHO set(VCPKG_TARGET_ARCHITECTURE x64) >> x64-windows-rel.cmake +REM ECHO set(VCPKG_CRT_LINKAGE dynamic) >> x64-windows-rel.cmake +REM ECHO set(VCPKG_LIBRARY_LINKAGE dynamic) >> x64-windows-rel.cmake +REM ECHO set(VCPKG_BUILD_TYPE release) >> x64-windows-rel.cmake +REM cd .. +REM vcpkg install ffmpeg:x64-windows-rel + +::TOFIX +:: Install pkgconfig (pkgconf) +vcpkg install pkgconf --triplet x64-windows +copy dependencies\ffmpeg-6.1.1\lib\*.lib source > NUL +copy dependencies\vcpkg\packages\pkgconf_x64-windows\lib\pkgconf.lib source > NUL + +:: FFMPEG_DIR +setx FFMPEG_DIR %AV1%\dependencies\ffmpeg-6.1.1 + +:: Clang +setx LIBCLANG_PATH %AV1%\dependencies\clang\bin + +::Copy vs libs +cd "%AV1%" +copy dependencies\vapoursynth64\sdk\lib64\VapourSynth.lib source +copy dependencies\vapoursynth64\sdk\lib64\VSScript.lib source + +:: assuming rust is installed +set PATH=!PATH!;C:\Users\%username%\.cargo\bin +cd source +git pull +::cargo build +cargo build -r + +copy target\release\av1an.exe .. > NUL + +pause \ No newline at end of file diff --git a/install.bat b/install.bat index d50db71..df3c891 100644 --- a/install.bat +++ b/install.bat @@ -73,14 +73,8 @@ cd .\ffmpeg-6.1.1 :: Download ffmpeg with shared libaries ~6.1.1 %Download-->% https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z -O ffmpeg-release-full-shared.7z -%Extract-->% .\ffmpeg-release-full-shared.7z ffmpeg-6.1.1-full_build-shared\bin > nul - -:: Move contents of bin -for /R "ffmpeg-6.1.1-full_build-shared\bin" %%f in (*) do ( - move "%%f" "%destination%" > nul -) - -rmdir /s /q .\ffmpeg-6.1.1-full_build-shared +tar -xf ffmpeg-release-full-shared.7z --strip-components=1 +del ffmpeg-release-full-shared.7z cd ..\ cd .\ffmpeg-latest @@ -165,6 +159,10 @@ del .\python-3.11.2-embed-amd64.zip %Extract-->% .\VapourSynth64-Portable-R63.7z > nul del .\VapourSynth64-Portable-R63.7z > nul +:: Download plugins [These plugins used can spit out errors and is known to be broken on VapourSynth64-R62] + .\python.exe .\vsrepo.py update -p > nul + .\python.exe .\vsrepo.py install lsmas ffms2 -p > nul + cd ..\ :: Download nasm from https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip @@ -181,18 +179,16 @@ tar -xf clang-13.0.0-windows-amd64-msvc15-msvcrt.7z --strip-components=1 -C clan :: Download vs build tools %Download-->% https://aka.ms/vs/17/release/vs_BuildTools.exe -vs_BuildTools.exe --wait --passive --quiet --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -::--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows11SDK.22000 +::vs_BuildTools.exe --add Microsoft.VisualStudio.Workload.VCTools --wait --quiet +::vs_BuildTools.exe --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --wait --quiet +::vs_BuildTools.exe --add Microsoft.VisualStudio.Component.Windows11SDK.22000 --wait --quiet ::winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000" +vs_BuildTools.exe --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000 --wait --quiet :: Download Rustup %Download-->% https://win.rustup.rs/x86_64 -O rustup-init.exe rustup-init.exe -qy -:: Download plugins [These plugins used can spit out errors and is known to be broken on VapourSynth64-R62] - .\python.exe .\vsrepo.py update -p > nul - .\python.exe .\vsrepo.py install lsmas ffms2 -p > nul - cd ..\ cd .\svt-av1 @@ -208,14 +204,14 @@ curl -sLf "https://gitlab.com/AOMediaCodec/SVT-AV1/-/jobs/5763507189/artifacts/d %Download-->% -i .\downloadlink.txt -O SVT-AV1-1.8.zip +tar -xf .\SVT-AV1-1.8.zip --strip-components 2 > nul +del SVT-AV1-1.8.zip :: Clean up del download > nul 2>&1 del downloadlink.txt > nul del raw.txt > nul -tar -xf .\SVT-AV1-1.8.zip --strip-components 2 > nul - :: Add reminder about using diffrent builds, forks, branches of encoders. echo 'If you want to use a diffrent build or version of an encoder, Just replace it using the same executable name.' > readme.txt diff --git a/scripts/av1an-batch/build.bat b/scripts/av1an-batch/build.bat deleted file mode 100644 index 2f41811..0000000 --- a/scripts/av1an-batch/build.bat +++ /dev/null @@ -1,72 +0,0 @@ -@echo off -TITLE Av1an Build - -cls - -setlocal enabledelayedexpansion - -:: Set path -set "AV1=%~dp0" - -:: Correct path -cd "%AV1%" - -:: Set the base path variable -set PATH=%AV1%\..\..\dependencies - -:: Append paths -for /D %%G in ("%AV1%\..\..\dependencies\*") do ( - set PATH=!PATH!;%%G -) - -:: install git from https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe -set PATH=!PATH!;%AV1%\..\..\dependencies\git\bin -git clone https://github.com/microsoft/vcpkg ..\..\dependencies\vcpkg 2>nul - -set PATH=!PATH!;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ -set PATH=!PATH!;%SYSTEMROOT%\System32 -:: TODO make this dynamic -set PATH=!PATH!;"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64" -::LLVM -:: powershell.exe Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -:: powershell.exe Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression -:: scoop install main/llvm - -cd ..\..\dependencies\vcpkg\scripts -powershell.exe -NoProfile -ExecutionPolicy Bypass -File bootstrap.ps1 >$null 2>&1 - -::vcpkg install -cd .. -::vcpkg update -git pull -vcpkg update -:: make it build release only -cd triplets -del x64-windows-rel.cmake -ECHO set(VCPKG_TARGET_ARCHITECTURE x64) >> x64-windows-rel.cmake -ECHO set(VCPKG_CRT_LINKAGE dynamic) >> x64-windows-rel.cmake -ECHO set(VCPKG_LIBRARY_LINKAGE dynamic) >> x64-windows-rel.cmake -ECHO set(VCPKG_BUILD_TYPE release) >> x64-windows-rel.cmake -cd .. -vcpkg install ffmpeg:x64-windows-rel --vcpkg-root=..\..\dependencies\vcpkg - -:: Clang -setx LIBCLANG_PATH %AV1%\..\..\dependencies\clang\bin - -:: Clone av1an repo -git clone https://github.com/master-of-zen/Av1an ..\..\source 2>nul - -::Copy vs libs -cd "%AV1%" -copy ..\..\dependencies\vapoursynth64\sdk\lib64\VapourSynth.lib ..\..\source > NUL -copy ..\..\dependencies\vapoursynth64\sdk\lib64\VSScript.lib ..\..\source > NUL - -:: assuming rust is installed -set PATH=!PATH!;C:\Users\%username%\.cargo\bin -cd ..\..\source -git pull -cargo build -r - -copy target\release\av1an.exe .. > NUL - -pause \ No newline at end of file From cafbbda347662e3e29ac066bf3d81aac08195adf Mon Sep 17 00:00:00 2001 From: BankaiNoJutsu Date: Sat, 10 Feb 2024 20:55:40 +0100 Subject: [PATCH 4/4] renamed bat's --- install.bat => !1_install.bat | 31 ++-------------- av1an.bat => !2_av1an.bat | 0 (1.2)_install_build_deps.bat | 68 +++++++++++++++++++++++++++++++++++ build.bat => (1.3)_build.bat | 2 +- .gitignore | 6 ++-- 5 files changed, 74 insertions(+), 33 deletions(-) rename install.bat => !1_install.bat (76%) rename av1an.bat => !2_av1an.bat (100%) create mode 100644 (1.2)_install_build_deps.bat rename build.bat => (1.3)_build.bat (97%) diff --git a/install.bat b/!1_install.bat similarity index 76% rename from install.bat rename to !1_install.bat index df3c891..8546bf6 100644 --- a/install.bat +++ b/!1_install.bat @@ -17,8 +17,9 @@ set "Extract-->=%AV1%\7zr.exe -y x" :: Correct path cd "%AV1%" -echo Installing -echo ──────────── +echo ---------- +echo Installing +echo ---------- :: Create directories if they don't exist for %%d in ( ".\dependencies\av1an" @@ -163,32 +164,6 @@ del .\VapourSynth64-Portable-R63.7z > nul .\python.exe .\vsrepo.py update -p > nul .\python.exe .\vsrepo.py install lsmas ffms2 -p > nul -cd ..\ - -:: Download nasm from https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip -%Download-->% https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip -tar -xf .\nasm-2.16.01-win64.zip --strip-components 1 -C nasm - -:: Download git from https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe -%Download-->% https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe -%Extract-->% PortableGit-2.43.0-64-bit.7z.exe -ogit > nul - -:: Download clang from https://github.com/vovkos/llvm-package-windows/releases/download/clang-master/clang-13.0.0-windows-amd64-msvc15-msvcrt.7z -%Download-->% https://github.com/vovkos/llvm-package-windows/releases/download/clang-master/clang-13.0.0-windows-amd64-msvc15-msvcrt.7z -tar -xf clang-13.0.0-windows-amd64-msvc15-msvcrt.7z --strip-components=1 -C clang > nul - -:: Download vs build tools -%Download-->% https://aka.ms/vs/17/release/vs_BuildTools.exe -::vs_BuildTools.exe --add Microsoft.VisualStudio.Workload.VCTools --wait --quiet -::vs_BuildTools.exe --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --wait --quiet -::vs_BuildTools.exe --add Microsoft.VisualStudio.Component.Windows11SDK.22000 --wait --quiet -::winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000" -vs_BuildTools.exe --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000 --wait --quiet - -:: Download Rustup -%Download-->% https://win.rustup.rs/x86_64 -O rustup-init.exe -rustup-init.exe -qy - cd ..\ cd .\svt-av1 diff --git a/av1an.bat b/!2_av1an.bat similarity index 100% rename from av1an.bat rename to !2_av1an.bat diff --git a/(1.2)_install_build_deps.bat b/(1.2)_install_build_deps.bat new file mode 100644 index 0000000..a317a1f --- /dev/null +++ b/(1.2)_install_build_deps.bat @@ -0,0 +1,68 @@ +@echo off +TITLE Av1an Win Build Script 🐦 + +cls + +setlocal enabledelayedexpansion + +:: Set path +set "AV1=%~dp0" + +:: Set Wget command +set "Download-->=%AV1%\wget.exe -q -N --no-check-certificate --show-progress" + +:: Set 7zr command +set "Extract-->=%AV1%\7zr.exe -y x" + +:: Correct path +cd "%AV1%" + +echo --------------------- +echo Installing Build deps +echo --------------------- + +:: Download portable Wget +curl -O -C - --progress-bar https://web.archive.org/web/20230511215002/https://eternallybored.org/misc/wget/1.21.4/64/wget.exe + +:: Download portable 7zip +%Download-->% https://www.7-zip.org/a/7zr.exe + +:: Download nasm from https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip +%Download-->% https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip +tar -xf .\nasm-2.16.01-win64.zip --strip-components 1 -C dependencies\nasm + +:: Download git from https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe +%Download-->% https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe +%Extract-->% PortableGit-2.43.0-64-bit.7z.exe -odependencies\git > nul + +:: Download clang from https://github.com/vovkos/llvm-package-windows/releases/download/clang-master/clang-13.0.0-windows-amd64-msvc15-msvcrt.7z +%Download-->% https://github.com/vovkos/llvm-package-windows/releases/download/clang-master/clang-13.0.0-windows-amd64-msvc15-msvcrt.7z +tar -xf clang-13.0.0-windows-amd64-msvc15-msvcrt.7z --strip-components=1 -C dependencies\clang > nul + +:: Download vs build tools +%Download-->% https://aka.ms/vs/17/release/vs_BuildTools.exe +::vs_BuildTools.exe --add Microsoft.VisualStudio.Workload.VCTools --wait --quiet +::vs_BuildTools.exe --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --wait --quiet +::vs_BuildTools.exe --add Microsoft.VisualStudio.Component.Windows11SDK.22000 --wait --quiet +::winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000" +vs_BuildTools.exe --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000 --wait --quiet + +:: Download Rustup +%Download-->% https://win.rustup.rs/x86_64 -O rustup-init.exe +rustup-init.exe -qy + +:: Clean up +del .wget-hsts > nul +del wget.exe > nul +del 7zr.exe > nul +del nasm-2.16.01-win64.zip > nul +del PortableGit-2.43.0-64-bit.7z.exe > nul +del clang-13.0.0-windows-amd64-msvc15-msvcrt.7z > nul +del vs_BuildTools.exe > nul +del rustup-init.exe > nul + +echo --------------------------------- +echo Build deps Installation Finished! +echo Exiting... +echo --------------------------------- +PAUSE diff --git a/build.bat b/(1.3)_build.bat similarity index 97% rename from build.bat rename to (1.3)_build.bat index 9a4401f..f7d56ae 100644 --- a/build.bat +++ b/(1.3)_build.bat @@ -95,6 +95,6 @@ git pull ::cargo build cargo build -r -copy target\release\av1an.exe .. > NUL +copy target\release\av1an.exe ..\dependencies\av1an > NUL pause \ No newline at end of file diff --git a/.gitignore b/.gitignore index 04fd2b7..182f4eb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,6 @@ dependencies/ gtest.dll gtest_all.dll gtest_main.dll -params - Copie - Copie.txt -params - Copie.txt -params_.txt readme.txt -source/ \ No newline at end of file +source/ +*.dll \ No newline at end of file