mirror of
https://github.com/MartinEesmaa/VVCEasy.git
synced 2025-02-27 00:38:01 +01:00
Integrated of building VVC into batch files
Both shell scripts of Linux and macOS were now merged into one for detect OS with simple command For Windows build script of Visual Studio is merged into VVCEasy.bat (batch file script). Both files of Windows batch file & Unix shell script were able to build Fraunhofer VVC binaries. - Martin Eesmaa
This commit is contained in:
parent
14e9dbee6d
commit
d31979f8f5
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,5 +19,7 @@ uvg266/BSD/uvg266
|
|||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
[Bb]in/
|
[Bb]in/
|
||||||
vvdecWebPlayer/
|
vvdecWebPlayer/
|
||||||
|
vvenc/
|
||||||
|
vvdec/
|
||||||
|
|
||||||
.vscode
|
.vscode
|
90
BuildVVC.sh
Normal file
90
BuildVVC.sh
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
OS=$(uname)
|
||||||
|
echo "Martin Eesmaa / VVC Compiler (vvenc and vvdec)"
|
||||||
|
echo "You're running on $OS of bash script version to compile VVC binaries"
|
||||||
|
|
||||||
|
setup_linux() {
|
||||||
|
echo "Checking and installing required packages..."
|
||||||
|
sudo apt update && sudo apt upgrade -y
|
||||||
|
sudo apt install build-essential cmake -y
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_macos() {
|
||||||
|
echo "Please make sure Xcode is installed in your Applications."
|
||||||
|
if ! command -v brew &> /dev/null; then
|
||||||
|
echo "Homebrew is not installed. Please install Homebrew and rerun the script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! brew list | grep -q cmake; then
|
||||||
|
echo "Installing cmake..."
|
||||||
|
brew install cmake
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_msys64() {
|
||||||
|
echo "Checking and installing required packages..."
|
||||||
|
pacman -Syu --noconfirm
|
||||||
|
pacman -S --noconfirm base-devel cmake git
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_freebsd() {
|
||||||
|
echo "Checking and installing required packages..."
|
||||||
|
pkg update && pkg upgrade -y
|
||||||
|
pkg install -y cmake git gmake
|
||||||
|
}
|
||||||
|
|
||||||
|
build_repos() {
|
||||||
|
echo "Cloning repositories..."
|
||||||
|
cd ~/Downloads
|
||||||
|
|
||||||
|
if [ ! -d vvenc ]; then
|
||||||
|
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc
|
||||||
|
else
|
||||||
|
git pull -C vvenc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d vvdec ]; then
|
||||||
|
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec
|
||||||
|
else
|
||||||
|
git pull -C vvdec
|
||||||
|
fi
|
||||||
|
|
||||||
|
for REPO in vvenc vvdec; do
|
||||||
|
cd $REPO
|
||||||
|
mkdir build && cd build
|
||||||
|
if [ "$OS" = "Darwin" ]; then
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
cmake --build . -j $(sysctl -n hw.ncpu)
|
||||||
|
else
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-static" ..
|
||||||
|
cmake --build . -j $(nproc)
|
||||||
|
fi
|
||||||
|
cd ../../
|
||||||
|
done
|
||||||
|
echo "Please see the build files starting with (vvenc/vvdec)/bin/release-static."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main script execution
|
||||||
|
case "$OS" in
|
||||||
|
Linux)
|
||||||
|
setup_linux
|
||||||
|
;;
|
||||||
|
Darwin)
|
||||||
|
setup_macos
|
||||||
|
;;
|
||||||
|
MSYS_NT*|MINGW64*)
|
||||||
|
setup_msys64
|
||||||
|
;;
|
||||||
|
FreeBSD)
|
||||||
|
setup_freebsd
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported OS: $OS"
|
||||||
|
echo "Supports Windows MSYS64, macOS, Linux & FreeBSD"
|
||||||
|
echo "May coming soon for some platforms..."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
build_repos
|
||||||
|
read -p "Finished building vvenc & vvdec. Press [Enter] to continue..."
|
52
VVCEasy.bat
52
VVCEasy.bat
@ -85,6 +85,7 @@ echo 9. Install/Update VLC VTM Plugins (Windows/Linux x64 of VLC plugins by Inte
|
|||||||
echo 10. Install FFmpeg VVC support.
|
echo 10. Install FFmpeg VVC support.
|
||||||
echo 11. Install MPV VVC support
|
echo 11. Install MPV VVC support
|
||||||
echo 12. Tests of VVC videos
|
echo 12. Tests of VVC videos
|
||||||
|
echo 13. Build vvenc & vvdec by yourself from sources
|
||||||
set /p VVCSTART=Number:
|
set /p VVCSTART=Number:
|
||||||
|
|
||||||
if "%VVCSTART%" == "1" goto encodestart
|
if "%VVCSTART%" == "1" goto encodestart
|
||||||
@ -99,6 +100,7 @@ if "%VVCSTART%" == "9" goto vlcvtmplugininstall
|
|||||||
if "%VVCSTART%" == "10" goto ffmpegvvdec
|
if "%VVCSTART%" == "10" goto ffmpegvvdec
|
||||||
if "%VVCSTART%" == "11" goto mpvandroidvvc
|
if "%VVCSTART%" == "11" goto mpvandroidvvc
|
||||||
if "%VVCSTART%" == "12" goto testsofvideo
|
if "%VVCSTART%" == "12" goto testsofvideo
|
||||||
|
if "%VVCSTART%" == "13" goto main123
|
||||||
echo Invalid input. Please enter a number between 1 and 13.
|
echo Invalid input. Please enter a number between 1 and 13.
|
||||||
pause
|
pause
|
||||||
goto start
|
goto start
|
||||||
@ -478,7 +480,7 @@ if "%vvcsampleyeah%" == n goto start
|
|||||||
:downloadvvcnowbit
|
:downloadvvcnowbit
|
||||||
title Downloading VVC sample files and Coffee Run JSON & Sprite Fright JSON... from Bitmovin
|
title Downloading VVC sample files and Coffee Run JSON & Sprite Fright JSON... from Bitmovin
|
||||||
echo Downloading VVC sample files and Coffee Run JSON & Sprite Fright JSON from Bitmovin...
|
echo Downloading VVC sample files and Coffee Run JSON & Sprite Fright JSON from Bitmovin...
|
||||||
wget "https://www.dropbox.com/s/qncefmnhw8hzr2k/vvcBlogPostDemo.7z" "https://www.dropbox.com/s/ogxw1pz9pr9bphi/CoffeeRun.json" "https://www.dropbox.com/s/6kpnoin4bwzb1ob/SpriteFright.json"
|
wget -q https://www.dropbox.com/s/qncefmnhw8hzr2k/vvcBlogPostDemo.7z https://www.dropbox.com/s/ogxw1pz9pr9bphi/CoffeeRun.json https://www.dropbox.com/s/6kpnoin4bwzb1ob/SpriteFright.json
|
||||||
echo Extracting from archived file...
|
echo Extracting from archived file...
|
||||||
7z x vvcBlogPostDemo.7z -aoa
|
7z x vvcBlogPostDemo.7z -aoa
|
||||||
echo Deleting archived file...
|
echo Deleting archived file...
|
||||||
@ -586,6 +588,54 @@ echo Press enter to go back menu.
|
|||||||
pause
|
pause
|
||||||
goto start
|
goto start
|
||||||
|
|
||||||
|
:main123
|
||||||
|
title Build vvenc & vvdec by yourself from sources
|
||||||
|
cls
|
||||||
|
echo Do you want build of vvenc and vvdec yourself on your computer?
|
||||||
|
echo Before you agree to build for Windows, you need Cmake and Visual Studio on your computer.
|
||||||
|
echo Requires build to Windows VVC by Cmake 3.13.0+ (need pathed environment) and Visual Studio 2017 and later (requires Desktop C++ and only one individual component ML.NET Model Builder).
|
||||||
|
echo Requires download VVEnc and VVDec for (Git for Windows).
|
||||||
|
echo Yes means build. No means will exit the program.
|
||||||
|
echo Y/N?
|
||||||
|
set /p main1234= Answer:
|
||||||
|
if %main1234% == Y goto installmain123
|
||||||
|
if %main1234% == y goto installmain123
|
||||||
|
if %main1234% == N goto exit
|
||||||
|
if %main1234% == n goto exit
|
||||||
|
|
||||||
|
:installmain123
|
||||||
|
title Building time...
|
||||||
|
echo Building time...
|
||||||
|
echo Downloading VVENC and VVDEC from Fraunhoferhhi GitHub...
|
||||||
|
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc
|
||||||
|
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec
|
||||||
|
cd vvenc
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Release
|
||||||
|
cd ../../
|
||||||
|
cd vvdec
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Release
|
||||||
|
cd ../../
|
||||||
|
goto successnow
|
||||||
|
|
||||||
|
:successnow
|
||||||
|
echo.
|
||||||
|
echo.
|
||||||
|
echo.
|
||||||
|
echo Successfully build of vvenc and vvdec on your Windows.
|
||||||
|
echo Copying executable files to build\%bit%
|
||||||
|
mkdir build\%bit%
|
||||||
|
copy vvenc\bin\release-static\*.exe build\%bit%
|
||||||
|
copy vvdec\bin\release-static\*.exe build\%bit%
|
||||||
|
echo Cleaning up of build, lib and bin folders of both dependencies...
|
||||||
|
rmdir /s /q vvenc\bin vvenc\lib vvenc\build vvdec\bin vvdec\bin vvdec\lib vvdec\build
|
||||||
|
echo Done! Press Enter to go back the menu.
|
||||||
|
pause
|
||||||
|
goto start
|
||||||
|
|
||||||
:error
|
:error
|
||||||
echo Your Windows version is not supported and outdated which may not work to run with VVC binaries and others too.
|
echo Your Windows version is not supported and outdated which may not work to run with VVC binaries and others too.
|
||||||
echo This requires for Windows XP and later to use this script.
|
echo This requires for Windows XP and later to use this script.
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
echo Martin Eesmaa / VVC Compiler (vvenc and vvdec)
|
|
||||||
echo We will check packages called: build-essential and cmake
|
|
||||||
echo It will check, if the build-essential and cmake packages are installed or not.
|
|
||||||
echo If it's already, it will update.
|
|
||||||
echo If it's not installed, we will install automatically for you.
|
|
||||||
echo.
|
|
||||||
sudo apt update && sudo apt upgrade -y
|
|
||||||
sudo apt install build-essential cmake -y
|
|
||||||
cd ~/Downloads
|
|
||||||
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc
|
|
||||||
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec
|
|
||||||
cd vvenc
|
|
||||||
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-static" .. && make
|
|
||||||
cd ../../
|
|
||||||
cd vvdec
|
|
||||||
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-static" .. && make
|
|
||||||
cd ../../
|
|
||||||
echo Please see the build files following starting with vvenc/bin/release-static
|
|
||||||
pause
|
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
echo Martin Eesmaa / VVC Compiler (vvenc and vvdec)
|
|
||||||
echo Please make sure your Xcode is installed on your Applications.
|
|
||||||
echo.
|
|
||||||
cd ~/Downloads
|
|
||||||
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc
|
|
||||||
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec
|
|
||||||
cd vvenc
|
|
||||||
mkdir build && cd build
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
||||||
cmake --build . -j $nproc
|
|
||||||
cd ../
|
|
||||||
cd vvdec
|
|
||||||
mkdir build && cd build
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
||||||
cmake --build . -j $nproc
|
|
||||||
cd ../
|
|
||||||
echo Please see the build files following starting with bin/release-static
|
|
||||||
pause
|
|
@ -1,93 +0,0 @@
|
|||||||
echo off
|
|
||||||
pushd "%~dp0"
|
|
||||||
cls
|
|
||||||
|
|
||||||
echo.
|
|
||||||
echo :: Checking For Administrator Elevation...
|
|
||||||
echo.
|
|
||||||
timeout /t 1 /nobreak > NUL
|
|
||||||
openfiles > NUL 2>&1
|
|
||||||
if %errorlevel%==0 (
|
|
||||||
echo Elevation found! Proceeding...
|
|
||||||
) else (
|
|
||||||
echo :: You are NOT running as Administrator
|
|
||||||
echo.
|
|
||||||
echo Right-click and select ^'Run as Administrator^' and try again.
|
|
||||||
echo Press any key to exit...
|
|
||||||
pause > NUL
|
|
||||||
exit
|
|
||||||
)
|
|
||||||
|
|
||||||
goto main123
|
|
||||||
|
|
||||||
:main123
|
|
||||||
title VVENC AND VVDEC (Build for Windows) (Script by Martin Eesmaa)
|
|
||||||
cls
|
|
||||||
echo Do you want build of vvenc and vvdec yourself on your computer?
|
|
||||||
echo Before you agree to build for Windows, you need Cmake and Visual Studio on your computer.
|
|
||||||
echo Requires build to Windows VVC by Cmake 3.13.0+ (need pathed environment) and Visual Studio 2017 and later (requires Desktop C++ and only one individual component ML.NET Model Builder).
|
|
||||||
echo Requires download VVEnc and VVDec for (Git for Windows).
|
|
||||||
echo Yes means build. No means will exit the program.
|
|
||||||
echo Y/N?
|
|
||||||
set /p main1234= Answer:
|
|
||||||
if %main1234% == Y goto installmain123
|
|
||||||
if %main1234% == y goto installmain123
|
|
||||||
if %main1234% == N goto exit
|
|
||||||
if %main1234% == n goto exit
|
|
||||||
|
|
||||||
:installmain123
|
|
||||||
title Building time...
|
|
||||||
echo Building time...
|
|
||||||
mkdir Windows && cd Windows
|
|
||||||
echo Download VVENC and VVDEC from Fraunhoferhhi GitHub...
|
|
||||||
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc
|
|
||||||
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec
|
|
||||||
cd vvenc
|
|
||||||
mkdir build && cd build
|
|
||||||
cmake ..
|
|
||||||
cmake --build . --config Release
|
|
||||||
cd ../bin/release-static
|
|
||||||
explorer .
|
|
||||||
cd ../../../
|
|
||||||
cd vvdec
|
|
||||||
mkdir build && cd build
|
|
||||||
cmake ..
|
|
||||||
cmake --build . --config Release
|
|
||||||
cd ..\bin\release-static
|
|
||||||
explorer .
|
|
||||||
cd ../../../../
|
|
||||||
goto successnow
|
|
||||||
|
|
||||||
:successnow
|
|
||||||
echo.
|
|
||||||
echo.
|
|
||||||
echo.
|
|
||||||
echo Successfully build of vvenc and vvdec on your Windows.
|
|
||||||
echo Do you want delete source of VVENC and VVDEC files? Y/N?
|
|
||||||
echo.
|
|
||||||
echo WARNING!!!: YOU HAVE TO COPY EXECUTABLE FILES BEFORE YOU DELETE SOURCE FILES
|
|
||||||
echo BUG: The syntax of the command is incorrect for unknown error.
|
|
||||||
echo To see .EXE files, go to Windows/vvenc/bin/release-static in Windows Explorer.
|
|
||||||
set /p installmain1234= Answer:
|
|
||||||
if %installmain1234% == Y goto deletesourcefiles
|
|
||||||
if %installmain1234% == y goto deletesourcefiles
|
|
||||||
if %installmain1234% == N goto otherwisenow
|
|
||||||
if %installmain1234% == n goto otherwisenow
|
|
||||||
|
|
||||||
:deletesourcefiles
|
|
||||||
title Cleaning up source files on VVENC and VVDEC on your computer...
|
|
||||||
echo Cleaning up source files on VVENC and VVDEC on your computer...
|
|
||||||
cd ../
|
|
||||||
rmdir /s Windows
|
|
||||||
goto otherwisenow
|
|
||||||
|
|
||||||
:otherwisenow
|
|
||||||
title Thank you for enjoying my script... (Martin Eesmaa)
|
|
||||||
echo Thank you for enjoying my script... (Martin Eesmaa)
|
|
||||||
echo Make sure go to Martin Eesmaa's GitHub: https://github.com/MartinEesmaa
|
|
||||||
echo Exiting...
|
|
||||||
timeout 3
|
|
||||||
exit
|
|
||||||
|
|
||||||
:exit
|
|
||||||
exit
|
|
Loading…
x
Reference in New Issue
Block a user