head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.1
	zstd-1-5-7:1.1.1.2
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	perseant-exfatfs-base-20250801:1.1.1.1
	netbsd-11:1.1.1.1.0.2
	netbsd-11-base:1.1.1.1
	zstd-1-5-6:1.1.1.1
	META:1.1.1;
locks; strict;
comment	@:: @;


1.1
date	2024.10.27.22.44.09;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	IUZDrqSXcnIYVlvF;

1.1.1.1
date	2024.10.27.22.44.09;	author christos;	state Exp;
branches;
next	1.1.1.2;
commitid	IUZDrqSXcnIYVlvF;

1.1.1.2
date	2026.05.01.14.27.17;	author christos;	state Exp;
branches;
next	;
commitid	LjoDikzDsAzrt7EG;


desc
@@


1.1
log
@Initial revision
@
text
@@@echo off

IF "%1%" == "" GOTO display_help

SETLOCAL

SET msbuild_version=%1

SET msbuild_platform=%2
IF "%msbuild_platform%" == "" SET msbuild_platform=x64

SET msbuild_configuration=%3
IF "%msbuild_configuration%" == "" SET msbuild_configuration=Release

SET msbuild_toolset=%4

GOTO build

:display_help

echo Syntax: build.generic.cmd msbuild_version msbuild_platform msbuild_configuration msbuild_toolset
echo   msbuild_version:          VS installed version (VS2012, VS2013, VS2015, VS2017, VS2019, ...)
echo   msbuild_platform:         Platform (x64 or Win32)
echo   msbuild_configuration:    VS configuration (Release or Debug)
echo   msbuild_toolset:          Platform Toolset (v100, v110, v120, v140, v141, v142, ...)

EXIT /B 1

:build

SET msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
SET msbuild_vs2017community="%programfiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
SET msbuild_vs2017professional="%programfiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
SET msbuild_vs2017enterprise="%programfiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
IF %msbuild_version% == VS2013 SET msbuild="%programfiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
IF %msbuild_version% == VS2015 SET msbuild="%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
IF %msbuild_version% == VS2017Community SET msbuild=%msbuild_vs2017community%
IF %msbuild_version% == VS2017Professional SET msbuild=%msbuild_vs2017professional%
IF %msbuild_version% == VS2017Enterprise SET msbuild=%msbuild_vs2017enterprise%
IF %msbuild_version% == VS2017 (
	IF EXIST %msbuild_vs2017community% SET msbuild=%msbuild_vs2017community%
	IF EXIST %msbuild_vs2017professional% SET msbuild=%msbuild_vs2017professional%
	IF EXIST %msbuild_vs2017enterprise% SET msbuild=%msbuild_vs2017enterprise%
)

:: VS2019
SET msbuild_vs2019community="%programfiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
SET msbuild_vs2019professional="%programfiles(x86)%\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe"
SET msbuild_vs2019enterprise="%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe"
IF %msbuild_version% == VS2019 (
	IF EXIST %msbuild_vs2019community% SET msbuild=%msbuild_vs2019community%
	IF EXIST %msbuild_vs2019professional% SET msbuild=%msbuild_vs2019professional%
	IF EXIST %msbuild_vs2019enterprise% SET msbuild=%msbuild_vs2019enterprise%
)

SET project="%~p0\..\VS2010\zstd.sln"

SET msbuild_params=/verbosity:minimal /nologo /t:Clean,Build /p:Platform=%msbuild_platform% /p:Configuration=%msbuild_configuration%
IF NOT "%msbuild_toolset%" == "" SET msbuild_params=%msbuild_params% /p:PlatformToolset=%msbuild_toolset%

SET output=%~p0%bin
SET output="%output%/%msbuild_configuration%/%msbuild_platform%/"
SET msbuild_params=%msbuild_params% /p:OutDir=%output%

echo ### Building %msbuild_version% project for %msbuild_configuration% %msbuild_platform% (%msbuild_toolset%)...
echo ### Build Params: %msbuild_params%

%msbuild% %project% %msbuild_params%
IF ERRORLEVEL 1 EXIT /B 1
echo # Success
echo # OutDir: %output%
echo #
@


1.1.1.1
log
@Import zstd-1.5.6 from:
    https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz
@
text
@@


1.1.1.2
log
@Import zstd-1.5.7 (previous was 1.5.6)

V1.5.7 (Feb 2025)
fix: compression bug in 32-bit mode associated with long-lasting sessions
api: new method `ZSTD_compressSequencesAndLiterals()` (#4217, #4232)
api: `ZSTD_getFrameHeader()` works on skippable frames (#4228)
perf: substantial compression speed improvements (up to +30%) on small data, by @@TocarIP (#4144) and @@cyan4973 (#4165)
perf: improved compression speed (~+5%) for dictionary compression at low levels (#4170)
perf: much faster speed for `--patch-from` at high compression levels (#4276)
perf: higher `--patch-from` compression ratios, notably at high levels (#4288)
perf: better speed for binaries on Windows (@@pps83) and when compiled with Visual Studio (@@MessyHack)
perf: slight compression ratio improvement thanks to better block boundaries (#4136, #4176, #4178)
perf: slight compression ratio improvement for `dfast`, aka levels 3 and 4 (#4171)
perf: runtime bmi2 detection enabled on x86 32-bit mode (#4251)
cli: multi-threading as default CLI setting, by @@daniellerozenblit
cli: new `--max` command (#4290)
build: improve `msbuild` version autodetection, support VS2022, by @@ManuelBlanc
build: fix `meson` build by @@artem and @@Victor-C-Zhang, and on Windows by @@bgilbert
build: compatibility with Apple Framework, by @@Treata11
build: improve icc/icx compatibility, by @@josepho0918 and @@luau-project
build: improve compatibility with Android NDK, by Adenilson Cavalcanti
portability: linux kernel branch, with improved support for Sequence producers (@@embg, @@gcabiddu, @@cyan4973)
portability: improved qnx compatibility, suggested by @@rainbowball
portability: improved install script for FreeBSD, by @@sunpoet
portability: fixed test suite compatibility with gnu hurd, by @@diegonc
doc: clarify specification, by @@elasota
misc: improved tests/decodecorpus validation tool (#4102), by antmicro
@
text
@d5 1
a5 1
SETLOCAL ENABLEDELAYEDEXPANSION
d22 1
a22 1
echo   msbuild_version:          VS installed version (latest, VS2012, VS2013, VS2015, VS2017, VS2019, VS2022, ...)
d25 1
a25 1
echo   msbuild_toolset:          Platform Toolset (v100, v110, v120, v140, v141, v142, v143, ...)
d32 3
d37 17
a53 14
IF %msbuild_version% == VS2017 SET vswhere_params=-version [15,16) -products *
IF %msbuild_version% == VS2017Community SET vswhere_params=-version [15,16) -products Community
IF %msbuild_version% == VS2017Enterprise SET vswhere_params=-version [15,16) -products Enterprise
IF %msbuild_version% == VS2017Professional SET vswhere_params=-version [15,16) -products Professional
IF %msbuild_version% == VS2019 SET vswhere_params=-version [16,17) -products *
IF %msbuild_version% == VS2022 SET vswhere_params=-version [17,18) -products *
REM Add the next Visual Studio version here.
IF %msbuild_version% == latest SET vswhere_params=-latest -products *
IF %msbuild_version% == preview SET vswhere_params=-prerelease -products *

IF NOT DEFINED vswhere_params GOTO skip_vswhere
SET vswhere="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
FOR /F "USEBACKQ TOKENS=*" %%F IN (`%vswhere% !vswhere_params! -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) DO (
	SET msbuild="%%F"
a54 1
:skip_vswhere
@

