mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2026-04-28 03:08:08 +00:00
Analyzer plug
This commit is contained in:
39
Analyzer/raw/IR_Fox/configure_msvc.bat
Normal file
39
Analyzer/raw/IR_Fox/configure_msvc.bat
Normal file
@ -0,0 +1,39 @@
|
||||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
cd /d "%~dp0"
|
||||
|
||||
echo === IrFoxAnalyzer: configure with MSVC ===
|
||||
echo.
|
||||
|
||||
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
if not exist "%VSWHERE%" (
|
||||
echo [ERROR] vswhere not found. Install one of:
|
||||
echo - Visual Studio 2022 with workload "Desktop development with C++"
|
||||
echo - Build Tools for Visual Studio 2022: https://visualstudio.microsoft.com/visual-cpp-build-tools/
|
||||
echo ^(select "Desktop development with C++" / MSVC, Windows SDK^)
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set "VSINSTALL=%%i"
|
||||
if not defined VSINSTALL (
|
||||
echo [ERROR] MSVC toolset not found. Add "Desktop development with C++" in Visual Studio Installer.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Found: !VSINSTALL!
|
||||
call "!VSINSTALL!\Common7\Tools\VsDevCmd.bat" -arch=x64 -host_arch=x64
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
if exist build rmdir /s /q build
|
||||
if exist build-nmake rmdir /s /q build-nmake
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
echo.
|
||||
echo Configure OK. Build: build_msvc.bat ^(or from same VS env: cd build ^& cmake --build .^)
|
||||
echo Output DLL: ..\dll\ ^(all analyzers share this folder^)
|
||||
pause
|
||||
exit /b 0
|
||||
Reference in New Issue
Block a user