Skip to content

Instantly share code, notes, and snippets.

@shinchiro
Last active March 25, 2017 15:21
Show Gist options
  • Save shinchiro/ca922df21b75b8942892ff5c192c898c to your computer and use it in GitHub Desktop.
Save shinchiro/ca922df21b75b8942892ff5c192c898c to your computer and use it in GitHub Desktop.
x265 Compilation with Visual Studio 2017
@echo OFF
set PATH=%~dp0\win_tools;%~dp0\win_tools\cmake\bin;%~dp0\win_tools\mercurial;%PATH%
cd "%~dp0\x265"
patch -p1 < %~dp0\patches\watermark.diff
patch -p1 < %~dp0\patches\optimization.diff
mkdir "%~dp0\x265\build\vc14-x86_64"
cd "%~dp0\x265\build\vc14-x86_64"
cmake -G "Visual Studio 15 Win64" ../../source -DHIGH_BIT_DEPTH=ON -DENABLE_SHARED=OFF -DSTATIC_LINK_CRT=1
::call "%VS140COMNTOOLS%/../../../Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build/vcvarsall.bat" x86
call "%VS140COMNTOOLS%\..\..\..\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat"
MSBuild /property:Configuration="Release" x265.sln
hg update -C
move /Y "Release\x265.exe" "%~dp0\x265.exe"
cd ..\
rmdir /S /Q "vc14-x86_64"
hg update -C
@pause
::::::::::::::::::::::::
::./x265_compile
::├── patches (dir)
::├── win_tools (dir)
::├── x265 (hg dir)
::└── make_x265_vc.bat
::::::::::::::::::::::::
::::::::::::::::::::::::
::./win_tools
::├── cmake (dir)
::├── mercurial (dir)
::├── msys-2.0.dll
::├── patch.exe
::└── yasm.exe
::::::::::::::::::::::::
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment