2022-04-01 13:26:35 +02:00
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.
2022-04-06 09:26:49 +02:00
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).
2022-04-01 13:26:35 +02:00
echo Requires download VVEnc and VVDec for (Git for Windows).
2022-09-10 02:06:21 +02:00
echo Yes means build. No means will exit the program.
2022-04-01 13:26:35 +02:00
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...
2022-09-10 02:06:21 +02:00
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec
2022-04-01 13:26:35 +02:00
cd vvenc
mkdir build && cd build
cmake ..
cmake --build . --config Release
2022-09-10 02:06:21 +02:00
cd ../bin/release-static
2022-04-01 13:26:35 +02:00
explorer .
cd ../../../
cd vvdec
mkdir build && cd build
cmake ..
cmake --build . --config Release
2022-04-22 12:44:48 +02:00
cd ..\bin\release-static
2022-04-01 13:26:35 +02:00
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.
2022-04-22 12:44:48 +02:00
echo To see .EXE files, go to Windows/vvenc/bin/release-static in Windows Explorer.
2022-04-01 13:26:35 +02:00
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)
2022-04-22 12:44:48 +02:00
echo Make sure go to Martin Eesmaa's GitHub: https://github.com/MartinEesmaa
2022-04-01 13:26:35 +02:00
echo Exiting...
timeout 3
exit
: exit
2022-04-06 09:26:49 +02:00
exit