From 4fc7dcf3395bfe31bd5098dcbd20cfcaf6b75f43 Mon Sep 17 00:00:00 2001 From: Matt Oliver Date: Tue, 4 Apr 2017 04:28:21 +1000 Subject: [PATCH] project: Convert to using custom yasm build customization. --- SMP/appveyor.yml | 7 +- SMP/libxvidcore.vcxproj | 198 +++++++++++--------------------- SMP/libxvidcore.vcxproj.filters | 12 +- SMP/readme.txt | 24 +--- 4 files changed, 77 insertions(+), 164 deletions(-) diff --git a/SMP/appveyor.yml b/SMP/appveyor.yml index 7692cb62..9a5e5fe0 100644 --- a/SMP/appveyor.yml +++ b/SMP/appveyor.yml @@ -96,12 +96,9 @@ before_build: } # Download and install yasm integration -- ps: (New-Object Net.WebClient).DownloadFile('http://www.tortall.net/projects/yasm/releases/vsyasm-1.3.0-win64.zip', "$pwd\yasm.zip") +- ps: (New-Object Net.WebClient).DownloadFile('https://github.com/ShiftMediaProject/VSYASM/releases/download/0.1/VSYASM.zip', "$pwd\yasm.zip") - ps: Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory("$pwd\yasm.zip", "$pwd\TempYASMUnpack") -- ps: New-Item -ItemType Directory -Force -Path "$env:VCINSTALLDIR\bin\" -- ps: Move-Item -Force "TempYASMUnpack\*.exe" "$env:VCINSTALLDIR\bin\" -- ps: (Get-Content "$pwd\TempYASMUnpack\vsyasm.props") -replace '\$\(Platform\)', 'win$(PlatformArchitecture)' | Set-Content "$pwd\TempYASMUnpack\vsyasm.props" -- ps: Copy-Item -Force "TempYASMUnpack\*.*" "$env:VCTargetsPath\BuildCustomizations" +- cmd: call ".\TempYASMUnpack\install_script.bat" # Additional yasm location in order to fix gitlink error - ps: if ($env:MSVC_VER -ne 15) { Copy-Item -Force "TempYASMUnpack\*.*" "$env:VCTargetsPath\..\BuildCustomizations" } diff --git a/SMP/libxvidcore.vcxproj b/SMP/libxvidcore.vcxproj index a288d519..87d2f395 100644 --- a/SMP/libxvidcore.vcxproj +++ b/SMP/libxvidcore.vcxproj @@ -131,7 +131,7 @@ - + @@ -252,8 +252,9 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;%(Defines) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;%(PreprocessorDefinitions) + true if exist $(OutDir)\include\xvid.h ( @@ -299,9 +300,9 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(Defines) - -DNO_PREFIX %(AdditionalOptions) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(PreprocessorDefinitions) + true if exist $(OutDir)\include\xvid.h ( @@ -352,10 +353,9 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - - - $(ProjectDir)\..\src - WINDOWS;%(Defines) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;%(PreprocessorDefinitions) + true if exist $(OutDir)\include\xvid.h ( @@ -405,9 +405,9 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(Defines) - -DNO_PREFIX %(AdditionalOptions) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(PreprocessorDefinitions) + true if exist $(OutDir)\include\xvid.h ( @@ -466,8 +466,8 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;%(Defines) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;%(PreprocessorDefinitions) if exist $(OutDir)\include\xvid.h ( @@ -526,8 +526,8 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;%(Defines) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;%(PreprocessorDefinitions) if exist $(OutDir)\include\xvid.h ( @@ -586,9 +586,8 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(Defines) - -DNO_PREFIX %(AdditionalOptions) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(PreprocessorDefinitions) if exist $(OutDir)\include\xvid.h ( @@ -647,9 +646,8 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(Defines) - -DNO_PREFIX %(AdditionalOptions) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(PreprocessorDefinitions) if exist $(OutDir)\include\xvid.h ( @@ -712,8 +710,8 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;%(Defines) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;%(PreprocessorDefinitions) if exist $(OutDir)\include\xvid.h ( @@ -775,8 +773,8 @@ mkdir $(OutDir)\licenses copy ..\LICENSE $(OutDir)\licenses\xvid.txt - $(ProjectDir)\..\src - WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(Defines) + $(ProjectDir)\..\src;%(IncludePaths) + WINDOWS;ARCH_IS_X86_64;NO_PREFIX;%(PreprocessorDefinitions) if exist $(OutDir)\include\xvid.h ( @@ -879,120 +877,54 @@ del /f /q $(OutDir)\licenses\xvid.txt - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - + + + + + + + + + + + + + + - Document $(ProjectDir)\..\src\image\x86_asm;%(IncludePaths) - - Document - + - Document $(ProjectDir)\..\src\image\x86_asm;%(IncludePaths) - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/SMP/libxvidcore.vcxproj.filters b/SMP/libxvidcore.vcxproj.filters index df7a066c..24e644d8 100644 --- a/SMP/libxvidcore.vcxproj.filters +++ b/SMP/libxvidcore.vcxproj.filters @@ -316,13 +316,13 @@ - - Source Files\image\x86_asm - Resource Files + + + Source Files\bitstream\x86_asm @@ -348,6 +348,9 @@ Source Files\dct\x86_asm + + Source Files\image\x86_asm + Source Files\image\x86_asm @@ -430,7 +433,4 @@ Source Files\utils\x86_asm - - - \ No newline at end of file diff --git a/SMP/readme.txt b/SMP/readme.txt index 9547d4df..175104bf 100644 --- a/SMP/readme.txt +++ b/SMP/readme.txt @@ -7,25 +7,9 @@ Choose whichever project configuration meets your requirements. *** Building with YASM *** -In order to build xvid using msvc you must first download and install YASM. -YASM is required to compile all xvid assembly files. +In order to build gmp using msvc you must first download and install YASM. +YASM is required to compile all gmp assembly files. -1) Download yasm for Visual Studio from here: -http://yasm.tortall.net/Download.html +1) Visual Studio YASM integration can be downloaded from https://github.com/ShiftMediaProject/VSYASM/releases/latest -Currently only up to VS2010 in supported on the web page so just download that. - -2) Follow the instructions found within the downloaded archive for installing YASM - Note: With newer version of VS the BuildCustomization path should be the version specific to the VS version you are using. - so for instance the path for Visual Studio 2013 is: - C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations - and the path for Visual Studio 2015 would be: - C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations - and the path for Visual Studio 2017 would be: - C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations - - The exact location can vary based on installation paths and can be found within Visual Studio in $(VCTargetsPath) macro - -3) In order to use version 1.3.0 of vsyasm you will also have to fix a error in the distributed build customizations - a) Open vsyasm.props - b) Replace the 1 occurrence of $(Platform) with win$(PlatformArchitecture) \ No newline at end of file +2) Once downloaded simply follow the install instructions included in the download. \ No newline at end of file