Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1233 from t-mat/fix-1232
Fix #1232 : lz4 command line utility sub-project for Visual Studio 2022 missing
- Loading branch information
Showing
14 changed files
with
487 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,10 @@ | |
ver*/ | ||
VS2010/bin/ | ||
VS2017/bin/ | ||
VS*/bin/ | ||
ipch | ||
|
||
# Fixup for lz4 project directories | ||
!VS2010/lz4 | ||
!VS2017/lz4 | ||
!VS*/lz4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
set /a errorno=1 | ||
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E" | ||
|
||
rem https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | ||
|
||
set "sln=lz4.sln" | ||
|
||
@rem set "Configuration=Debug" | ||
@rem set "Platform=Win32" | ||
|
||
set "BIN=.\bin\!Platform!_!Configuration!" | ||
rmdir /S /Q "!BIN!" 2>nul | ||
echo msbuild "%sln%" /p:Configuration=!Configuration! /p:Platform=!Platform! | ||
msbuild "%sln%" ^ | ||
/nologo ^ | ||
/v:minimal ^ | ||
/m ^ | ||
/p:Configuration=!Configuration! ^ | ||
/p:Platform=!Platform! ^ | ||
/t:Clean,Build ^ | ||
|| goto :ERROR | ||
|
||
if not exist "!BIN!\datagen.exe" ( echo FAIL: "!BIN!\datagen.exe" && goto :ERROR ) | ||
if not exist "!BIN!\frametest.exe" ( echo FAIL: "!BIN!\frametest.exe" && goto :ERROR ) | ||
if not exist "!BIN!\fullbench-dll.exe" ( echo FAIL: "!BIN!\fullbench-dll.exe" && goto :ERROR ) | ||
if not exist "!BIN!\fullbench.exe" ( echo FAIL: "!BIN!\fullbench.exe" && goto :ERROR ) | ||
if not exist "!BIN!\fuzzer.exe" ( echo FAIL: "!BIN!\fuzzer.exe" && goto :ERROR ) | ||
if not exist "!BIN!\liblz4.dll" ( echo FAIL: "!BIN!\liblz4.dll" && goto :ERROR ) | ||
if not exist "!BIN!\liblz4.lib" ( echo FAIL: "!BIN!\liblz4.lib" && goto :ERROR ) | ||
if not exist "!BIN!\liblz4_static.lib" ( echo FAIL: "!BIN!\liblz4_static.lib" && goto :ERROR ) | ||
if not exist "!BIN!\lz4.exe" ( echo FAIL: "!BIN!\lz4.exe" && goto :ERROR ) | ||
|
||
set /a errorno=0 | ||
goto :END | ||
|
||
:ERROR | ||
|
||
:END | ||
exit /B %errorno% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
set /a errorno=1 | ||
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E" | ||
|
||
rem https://github.com/Microsoft/vswhere | ||
rem https://github.com/microsoft/vswhere/wiki/Find-VC#batch | ||
|
||
set "vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | ||
if not exist "%vswhere%" ( | ||
echo Failed to find "vswhere.exe". Please install the latest version of Visual Studio. | ||
goto :ERROR | ||
) | ||
|
||
set "InstallDir=" | ||
for /f "usebackq tokens=*" %%i in ( | ||
`"%vswhere%" -latest ^ | ||
-products * ^ | ||
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ | ||
-property installationPath` | ||
) do ( | ||
set "InstallDir=%%i" | ||
) | ||
if "%InstallDir%" == "" ( | ||
echo Failed to find Visual C++. Please install the latest version of Visual C++. | ||
goto :ERROR | ||
) | ||
|
||
call "%InstallDir%\VC\Auxiliary\Build\vcvars64.bat" || goto :ERROR | ||
|
||
set /a errorno=0 | ||
goto :END | ||
|
||
:ERROR | ||
|
||
:END | ||
exit /B %errorno% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
set /a errorno=1 | ||
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E" | ||
|
||
@rem set "Configuration=Debug" | ||
@rem set "Platform=Win32" | ||
|
||
set "BIN=.\bin\!Platform!_!Configuration!" | ||
set "TEST_FILES=..\..\tests\COPYING" | ||
|
||
echo !BIN!\lz4 -h | ||
!BIN!\lz4 -h || goto :ERROR | ||
|
||
echo !BIN!\lz4 -i1b | ||
!BIN!\lz4 -i1b || goto :ERROR | ||
|
||
echo !BIN!\lz4 -i1b5 | ||
!BIN!\lz4 -i1b5 || goto :ERROR | ||
|
||
echo !BIN!\lz4 -i1b10 | ||
!BIN!\lz4 -i1b10 || goto :ERROR | ||
|
||
echo !BIN!\lz4 -i1b15 | ||
!BIN!\lz4 -i1b15 || goto :ERROR | ||
|
||
echo fullbench | ||
!BIN!\fullbench.exe --no-prompt -i1 %TEST_FILES% || goto :ERROR | ||
|
||
echo fuzzer | ||
!BIN!\fuzzer.exe -v -T30s || goto :ERROR | ||
|
||
|
||
set /a errorno=0 | ||
goto :END | ||
|
||
:ERROR | ||
|
||
:END | ||
exit /B %errorno% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@setlocal enabledelayedexpansion | ||
@echo off | ||
set /a errorno=1 | ||
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E" | ||
|
||
call _setup.bat || goto :ERROR | ||
|
||
set "Configuration=Debug" | ||
set "Platform=Win32" | ||
|
||
call _build.bat || goto :ERROR | ||
call _test.bat || goto :ERROR | ||
|
||
|
||
echo Build Status -%esc%[92m SUCCEEDED %esc%[0m | ||
set /a errorno=0 | ||
goto :END | ||
|
||
|
||
:ERROR | ||
echo Abort by error. | ||
echo Build Status -%esc%[91m ERROR %esc%[0m | ||
|
||
|
||
:END | ||
exit /B %errorno% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@setlocal enabledelayedexpansion | ||
@echo off | ||
set /a errorno=1 | ||
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E" | ||
|
||
set "Configuration=Release" | ||
set "Platform=Win32" | ||
|
||
call _setup.bat || goto :ERROR | ||
call _build.bat || goto :ERROR | ||
call _test.bat || goto :ERROR | ||
|
||
|
||
echo Build Status -%esc%[92m SUCCEEDED %esc%[0m | ||
set /a errorno=0 | ||
goto :END | ||
|
||
|
||
:ERROR | ||
echo Abort by error. | ||
echo Build Status -%esc%[91m ERROR %esc%[0m | ||
|
||
|
||
:END | ||
exit /B %errorno% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@setlocal enabledelayedexpansion | ||
@echo off | ||
set /a errorno=1 | ||
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E" | ||
|
||
set "Configuration=Debug" | ||
set "Platform=x64" | ||
|
||
call _setup.bat || goto :ERROR | ||
call _build.bat || goto :ERROR | ||
call _test.bat || goto :ERROR | ||
|
||
|
||
echo Build Status -%esc%[92m SUCCEEDED %esc%[0m | ||
set /a errorno=0 | ||
goto :END | ||
|
||
|
||
:ERROR | ||
echo Abort by error. | ||
echo Build Status -%esc%[91m ERROR %esc%[0m | ||
|
||
|
||
:END | ||
exit /B %errorno% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@setlocal enabledelayedexpansion | ||
@echo off | ||
set /a errorno=1 | ||
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E" | ||
|
||
set "Configuration=Release" | ||
set "Platform=x64" | ||
|
||
call _setup.bat || goto :ERROR | ||
call _build.bat || goto :ERROR | ||
call _test.bat || goto :ERROR | ||
|
||
|
||
echo Build Status -%esc%[92m SUCCEEDED %esc%[0m | ||
set /a errorno=0 | ||
goto :END | ||
|
||
|
||
:ERROR | ||
echo Abort by error. | ||
echo Build Status -%esc%[91m ERROR %esc%[0m | ||
|
||
|
||
:END | ||
exit /B %errorno% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Microsoft Visual C++ generated resource script. | ||
// | ||
|
||
#include "lz4.h" /* LZ4_VERSION_STRING */ | ||
#define APSTUDIO_READONLY_SYMBOLS | ||
#include "verrsrc.h" | ||
#undef APSTUDIO_READONLY_SYMBOLS | ||
|
||
|
||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||
LANGUAGE 9, 1 | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Version | ||
// | ||
|
||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 | ||
PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0 | ||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | ||
#ifdef _DEBUG | ||
FILEFLAGS VS_FF_DEBUG | ||
#else | ||
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS VOS_NT_WINDOWS32 | ||
FILETYPE VFT_DLL | ||
FILESUBTYPE VFT2_UNKNOWN | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904B0" | ||
BEGIN | ||
VALUE "CompanyName", "Yann Collet" | ||
VALUE "FileDescription", "Extremely fast compression" | ||
VALUE "FileVersion", LZ4_VERSION_STRING | ||
VALUE "InternalName", "lz4.exe" | ||
VALUE "LegalCopyright", "Copyright (C) 2013-2020, Yann Collet" | ||
VALUE "OriginalFilename", "lz4.exe" | ||
VALUE "ProductName", "LZ4" | ||
VALUE "ProductVersion", LZ4_VERSION_STRING | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x0409, 1200 | ||
END | ||
END | ||
|
||
#endif |
Oops, something went wrong.