Explorar el Código

Add islzma compilation batch file + update its gitignore.

Martijn Laan hace 1 semana
padre
commit
ee85c2e9b0

+ 2 - 0
Projects/Src/Compression.LZMACompressor/islzma/.gitignore

@@ -1,5 +1,7 @@
+compilesettings.bat
 *.user
 islzma/
 islzma_exe/
 Win32/
 x64/
+Arm64EC/

+ 67 - 0
Projects/Src/Compression.LZMACompressor/islzma/compile.bat

@@ -0,0 +1,67 @@
+@echo off
+
+rem  Inno Setup
+rem  Copyright (C) 1997-2025 Jordan Russell
+rem  Portions by Martijn Laan
+rem  For conditions of distribution and use, see LICENSE.TXT.
+rem
+rem  Batch file to compile islzma
+
+setlocal
+
+cd /d %~dp0
+
+if "%1"=="x86" goto archfound
+if "%1"=="x64" goto archfound
+if "%1"=="arm64" goto archfound
+echo Architecture parameter is missing or invalid. Must be "x86" or "x64" or "arm64".
+goto failed2
+:archfound
+
+if exist compilesettings.bat goto compilesettingsfound
+:compilesettingserror
+echo compilesettings.bat is missing or incomplete. It needs to be created
+echo with the following line, adjusted for your system:
+echo.
+echo   set VSBUILDROOT=c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build
+goto failed2
+
+:compilesettingsfound
+set VSBUILDROOT=
+call .\compilesettings.bat
+if "%VSBUILDROOT%"=="" goto compilesettingserror
+
+rem -------------------------------------------------------------------------
+
+set vsarch=%1
+if "%1"=="x86" set vsarch=amd64_x86
+if "%1"=="arm64" set vsarch=amd64_arm64
+
+set __VSCMD_ARG_NO_LOGO=1
+set VSCMD_SKIP_SENDTELEMETRY=1
+
+echo - Calling vcvarsall.bat %vsarch%
+call "%VSBUILDROOT%\vcvarsall.bat" %vsarch%
+if errorlevel 1 goto exit
+echo.
+
+@REM echo - Compiling LzmaDecodeInno.c
+@REM cl.exe /c /O2 /D_LZMA_OUT_READ /D_LZMA_IN_CB LzmaDecodeInno.c /FoLzmaDecodeInno-%1.obj
+@REM if errorlevel 1 goto failed
+
+set platform=%1
+if "%1"=="x86" set platform=Win32
+if "%1"=="arm64" set platform=Arm64EC
+
+echo - Compiling Islzma
+msbuild islzma.sln /t:Clean;Build /p:Configuration=Release;Platform=%platform%
+
+echo Success!
+goto exit
+
+:failed
+echo *** FAILED ***
+:failed2
+exit /b 1
+
+:exit