Vendored
+2
-2
@@ -21,7 +21,7 @@
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"name": "X256_PS (MSVC2022 x64)",
|
||||
"compileCommands": "${workspaceFolder}/build/X256_PS/compile_commands.json"
|
||||
"compileCommands": "${workspaceFolder}/build/X256_PS/Debug/REC_ON/compile_commands.json"
|
||||
},
|
||||
{
|
||||
"compilerPath": "D:\\APP\\VisualStudio2022\\VC\\Tools\\MSVC\\14.44.35207\\bin\\Hostx64\\x64\\cl.exe",
|
||||
@@ -43,7 +43,7 @@
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"name": "X256_MS (MSVC2022 x64)",
|
||||
"compileCommands": "${workspaceFolder}/build/X256_MS/compile_commands.json"
|
||||
"compileCommands": "${workspaceFolder}/build/X256_MS/Debug/REC_ON/compile_commands.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+23
-4
@@ -10,15 +10,34 @@ buildType:
|
||||
long: Debug (MSVC2022 x64, C++17)
|
||||
buildType: Debug
|
||||
|
||||
scanMode:
|
||||
default: ps
|
||||
recordMode:
|
||||
default: REC_OFF
|
||||
choices:
|
||||
ps:
|
||||
REC_AUTO:
|
||||
short: REC_AUTO
|
||||
long: REC_AUTO - RDP_DATA_RECORD=AUTO (Debug 启用 / Release 关闭)
|
||||
settings:
|
||||
RDP_DATA_RECORD: AUTO
|
||||
REC_OFF:
|
||||
short: REC_OFF
|
||||
long: REC_OFF - RDP_DATA_RECORD=OFF (不编译记录模块)
|
||||
settings:
|
||||
RDP_DATA_RECORD: OFF
|
||||
REC_ON:
|
||||
short: REC_ON
|
||||
long: REC_ON - RDP_DATA_RECORD=ON (强制启用记录模块)
|
||||
settings:
|
||||
RDP_DATA_RECORD: ON
|
||||
|
||||
scanMode:
|
||||
default: X256_PS
|
||||
choices:
|
||||
X256_PS:
|
||||
short: X256_PS
|
||||
long: X256_PS - PHASE_SCANNING
|
||||
settings:
|
||||
RADAR_SCAN_MODE: PHASE_SCANNING
|
||||
ms:
|
||||
X256_MS:
|
||||
short: X256_MS
|
||||
long: X256_MS - MECHANICAL_SCANNING
|
||||
settings:
|
||||
|
||||
Vendored
+4
-4
@@ -5,14 +5,14 @@
|
||||
"name": "调试 DLL",
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/X256_PS/bin/rdp_playback.exe",
|
||||
"args": ["-d", "E:/Demo/QT/simianzhen256-v1.5.5-ms-vscode/build/X256_PS/bin/2026-07-18/15-34-32", "-i", "E:/Demo/QT/simianzhen256-v1.5.5-ms-vscode/build/X256_PS/bin/RadarConfigParam.ini", "-c", "E:/Demo/QT/simianzhen256-v1.5.5-ms-vscode/build/X256_PS/bin/2026-07-18/15-34-32/track.csv"],
|
||||
"program": "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin/rdp_playback.exe",
|
||||
"args": ["-d", "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin/2026-07-18/15-34-32", "-i", "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin/RadarConfigParam.ini", "-c", "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin/2026-07-18/15-34-32/track.csv"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "CMake: 配置并构建 X256_PS (Debug)",
|
||||
"symbolSearchPath": "${workspaceFolder}/build/X256_PS/bin"
|
||||
"preLaunchTask": "配置并构建全部(Debug/REC_ON)",
|
||||
"symbolSearchPath": "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin"
|
||||
},
|
||||
{
|
||||
"name": "附加到宿主进程(调试 DLL)",
|
||||
|
||||
Vendored
+31
-9
@@ -2,21 +2,43 @@
|
||||
rem ===========================================================================
|
||||
rem CMake build script (MSVC 2022 / v143, C++17, x64)
|
||||
rem
|
||||
rem Usage: build.bat <build-dir>
|
||||
rem e.g. build.bat build\X256_PS
|
||||
rem Usage:
|
||||
rem build.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem Examples:
|
||||
rem build.bat PHASE_SCANNING Release OFF
|
||||
rem build.bat MECHANICAL_SCANNING Debug ON
|
||||
rem
|
||||
rem The build tree must have been configured by configure.bat first (same
|
||||
rem configuration tuple):
|
||||
rem build\<X256_PS^|X256_MS^>\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal
|
||||
set "BUILD_DIR=%~1"
|
||||
if "%BUILD_DIR%"=="" (
|
||||
echo Usage: build.bat ^<build-dir^>
|
||||
exit /b 1
|
||||
)
|
||||
if "%~1"=="" goto :usage
|
||||
if "%~2"=="" goto :usage
|
||||
|
||||
call "%~dp0config_paths.bat" "%~1" "%~2" "%~3"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
rem Load the MSVC 2022 environment (vcvarsall.bat + cl.exe existence check).
|
||||
call "%~dp0msvc_env.bat"
|
||||
if errorlevel 1 exit /b %errorlevel%
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
pushd "%~dp0..\.."
|
||||
if not exist "%BUILD_DIR%\CMakeCache.txt" (
|
||||
echo [ERROR] "%BUILD_DIR%" is not configured - run configure.bat first
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [build] %BUILD_DIR%
|
||||
cmake --build "%BUILD_DIR%"
|
||||
exit /b %errorlevel%
|
||||
set "CMAKE_EXIT=%errorlevel%"
|
||||
popd
|
||||
exit /b %CMAKE_EXIT%
|
||||
|
||||
:usage
|
||||
echo Usage: build.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem Configure and build both scan modes for one build type / record mode.
|
||||
rem
|
||||
rem Usage:
|
||||
rem build_all.bat ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem Examples:
|
||||
rem build_all.bat Release OFF
|
||||
rem build_all.bat Debug ON
|
||||
rem build_all.bat Release AUTO
|
||||
rem
|
||||
rem Runs configure.bat + build.bat for both scan modes:
|
||||
rem PHASE_SCANNING -^> build\X256_PS\<Debug^|Release^>\<REC_*>
|
||||
rem MECHANICAL_SCANNING -^> build\X256_MS\<Debug^|Release^>\<REC_*>
|
||||
rem The run stops at the first failing configuration and returns non-zero.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal EnableExtensions
|
||||
set "BUILD_TYPE=%~1"
|
||||
set "RECORD_MODE=%~2"
|
||||
if not defined BUILD_TYPE goto :usage
|
||||
if not defined RECORD_MODE set "RECORD_MODE=AUTO"
|
||||
|
||||
rem Validate + normalize the tuple once (also resolves the X256_* aliases).
|
||||
call "%~dp0config_paths.bat" PHASE_SCANNING "%BUILD_TYPE%" "%RECORD_MODE%"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
for %%S in (PHASE_SCANNING MECHANICAL_SCANNING) do (
|
||||
echo.
|
||||
echo [build_all] ==================== %%S / %BUILD_TYPE% / %RECORD_MODE% ====================
|
||||
call "%~dp0configure.bat" %%S "%BUILD_TYPE%" "%RECORD_MODE%"
|
||||
if errorlevel 1 goto :failed
|
||||
call "%~dp0build.bat" %%S "%BUILD_TYPE%" "%RECORD_MODE%"
|
||||
if errorlevel 1 goto :failed
|
||||
)
|
||||
echo.
|
||||
echo [build_all] all done: %BUILD_TYPE% / %RECORD_MODE%
|
||||
exit /b 0
|
||||
|
||||
:failed
|
||||
echo.
|
||||
echo [build_all] FAILED - stopped at the first failing configuration, see the log above
|
||||
exit /b 1
|
||||
|
||||
:usage
|
||||
echo Usage: build_all.bat ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
Vendored
+34
-12
@@ -1,22 +1,44 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem CMake clean script (MSVC 2022 / v143, C++17, x64)
|
||||
rem CMake clean script - remove the build output of one configuration.
|
||||
rem
|
||||
rem Usage: clean.bat <build-dir>
|
||||
rem e.g. clean.bat build\X256_PS
|
||||
rem Usage:
|
||||
rem clean.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem Examples:
|
||||
rem clean.bat PHASE_SCANNING Release OFF
|
||||
rem clean.bat MECHANICAL_SCANNING Debug ON
|
||||
rem
|
||||
rem The directory removed is the same one configure.bat/build.bat use:
|
||||
rem build\<X256_PS^|X256_MS^>\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
|
||||
rem Use clean_all.bat to clean every configuration at once.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal
|
||||
set "BUILD_DIR=%~1"
|
||||
if "%BUILD_DIR%"=="" (
|
||||
echo Usage: clean.bat ^<build-dir^>
|
||||
exit /b 1
|
||||
if "%~1"=="" goto :usage
|
||||
if "%~2"=="" goto :usage
|
||||
|
||||
call "%~dp0config_paths.bat" "%~1" "%~2" "%~3"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
pushd "%~dp0..\.."
|
||||
if not exist "%BUILD_DIR%" (
|
||||
echo [clean] "%BUILD_DIR%" does not exist - nothing to do
|
||||
popd
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
rem Load the MSVC 2022 environment (vcvarsall.bat + cl.exe existence check).
|
||||
call "%~dp0msvc_env.bat"
|
||||
if errorlevel 1 exit /b %errorlevel%
|
||||
echo [clean] remove "%BUILD_DIR%"
|
||||
rmdir /s /q "%BUILD_DIR%"
|
||||
if exist "%BUILD_DIR%" (
|
||||
echo [ERROR] cannot remove "%BUILD_DIR%", close open files and retry.
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
popd
|
||||
exit /b 0
|
||||
|
||||
cmake --build "%BUILD_DIR%" --target clean
|
||||
exit /b %errorlevel%
|
||||
:usage
|
||||
echo Usage: clean.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem Remove the build output of every build configuration.
|
||||
rem
|
||||
rem Usage:
|
||||
rem clean_all.bat
|
||||
rem
|
||||
rem Build layout (see config_paths.bat):
|
||||
rem build\<X256_PS^|X256_MS^>\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
|
||||
rem
|
||||
rem A legacy single-configuration build tree (build\X256_PS or build\X256_MS
|
||||
rem containing CMakeCache.txt directly) is removed as a whole as well.
|
||||
rem build\output (archived package export) is never touched.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal EnableExtensions
|
||||
pushd "%~dp0..\.."
|
||||
set "FAILED="
|
||||
for %%S in (X256_PS X256_MS) do (
|
||||
if exist "build\%%S\CMakeCache.txt" (
|
||||
call :remove "build\%%S"
|
||||
) else (
|
||||
for %%T in (Debug Release) do (
|
||||
for %%R in (REC_AUTO REC_OFF REC_ON) do (
|
||||
call :remove "build\%%S\%%T\%%R"
|
||||
)
|
||||
)
|
||||
rem drop the directory root when every configuration is gone
|
||||
rmdir "build\%%S" 2>nul
|
||||
)
|
||||
)
|
||||
echo.
|
||||
echo [clean_all] archived package export "build\output" left untouched
|
||||
if defined FAILED (
|
||||
echo [clean_all] FAILED - some directories could not be removed, close open files and retry
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
echo [clean_all] all build configurations removed
|
||||
popd
|
||||
exit /b 0
|
||||
|
||||
:remove
|
||||
if not exist "%~1" exit /b 0
|
||||
echo [clean_all] remove "%~1"
|
||||
rmdir /s /q "%~1"
|
||||
if exist "%~1" (
|
||||
echo [ERROR] cannot remove "%~1"
|
||||
set "FAILED=1"
|
||||
)
|
||||
exit /b 0
|
||||
Vendored
+72
@@ -0,0 +1,72 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem Derive the build directory of one build configuration.
|
||||
rem
|
||||
rem Internal helper, called by configure.bat / build.bat / clean.bat /
|
||||
rem build_all.bat as:
|
||||
rem call config_paths.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem Accepted aliases: X256_PS = PHASE_SCANNING, X256_MS = MECHANICAL_SCANNING.
|
||||
rem
|
||||
rem On success the following variables are exported into the caller scope:
|
||||
rem SCAN_MODE PHASE_SCANNING / MECHANICAL_SCANNING
|
||||
rem SCAN_TAG X256_PS / X256_MS
|
||||
rem BUILD_TYPE Debug / Release
|
||||
rem RECORD_MODE AUTO / ON / OFF
|
||||
rem REC_TAG REC_AUTO / REC_OFF / REC_ON
|
||||
rem BUILD_DIR build\<SCAN_TAG>\<BUILD_TYPE>\<REC_TAG>
|
||||
rem
|
||||
rem Exit code: 0 = ok, 1 = invalid configuration.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
set "SCAN_MODE="
|
||||
set "SCAN_TAG="
|
||||
set "BUILD_TYPE="
|
||||
set "RECORD_MODE="
|
||||
set "REC_TAG="
|
||||
set "BUILD_DIR="
|
||||
|
||||
if "%~1"=="" goto :usage
|
||||
if "%~2"=="" goto :usage
|
||||
|
||||
if /i "%~1"=="PHASE_SCANNING" set "SCAN_MODE=PHASE_SCANNING"
|
||||
if /i "%~1"=="X256_PS" set "SCAN_MODE=PHASE_SCANNING"
|
||||
if /i "%~1"=="MECHANICAL_SCANNING" set "SCAN_MODE=MECHANICAL_SCANNING"
|
||||
if /i "%~1"=="X256_MS" set "SCAN_MODE=MECHANICAL_SCANNING"
|
||||
if not defined SCAN_MODE (
|
||||
echo [ERROR] invalid scan mode: "%~1"
|
||||
echo expected PHASE_SCANNING / X256_PS or MECHANICAL_SCANNING / X256_MS
|
||||
exit /b 1
|
||||
)
|
||||
if "%SCAN_MODE%"=="PHASE_SCANNING" set "SCAN_TAG=X256_PS"
|
||||
if "%SCAN_MODE%"=="MECHANICAL_SCANNING" set "SCAN_TAG=X256_MS"
|
||||
|
||||
if /i "%~2"=="Debug" set "BUILD_TYPE=Debug"
|
||||
if /i "%~2"=="Release" set "BUILD_TYPE=Release"
|
||||
if not defined BUILD_TYPE (
|
||||
echo [ERROR] invalid build type: "%~2"
|
||||
echo expected Debug or Release
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not "%~3"=="" set "RECORD_MODE=%~3"
|
||||
if not defined RECORD_MODE set "RECORD_MODE=AUTO"
|
||||
if /i "%RECORD_MODE%"=="AUTO" set "RECORD_MODE=AUTO"
|
||||
if /i "%RECORD_MODE%"=="ON" set "RECORD_MODE=ON"
|
||||
if /i "%RECORD_MODE%"=="OFF" set "RECORD_MODE=OFF"
|
||||
if "%RECORD_MODE%"=="AUTO" set "REC_TAG=REC_AUTO"
|
||||
if "%RECORD_MODE%"=="ON" set "REC_TAG=REC_ON"
|
||||
if "%RECORD_MODE%"=="OFF" set "REC_TAG=REC_OFF"
|
||||
if not defined REC_TAG (
|
||||
echo [ERROR] invalid record mode: "%~3"
|
||||
echo expected AUTO or ON or OFF
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set "BUILD_DIR=build\%SCAN_TAG%\%BUILD_TYPE%\%REC_TAG%"
|
||||
exit /b 0
|
||||
|
||||
:usage
|
||||
echo Usage: config_paths.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
Vendored
+42
-40
@@ -1,73 +1,75 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem CMake configure script (MSVC 2022 / v143, C++17, x64)
|
||||
rem CMake configure script (MSVC 2022 / v143, C++17, x64, NMake Makefiles)
|
||||
rem
|
||||
rem Usage: configure.bat <build-dir> <PHASE_SCANNING^|MECHANICAL_SCANNING> [Debug^|Release] [AUTO^|ON^|OFF]
|
||||
rem e.g. configure.bat build\X256_PS PHASE_SCANNING Release
|
||||
rem configure.bat build\X256_PS Debug ON (Debug + data recording enabled)
|
||||
rem Usage:
|
||||
rem configure.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem The 4th argument selects the optional data-recording debug feature
|
||||
rem Examples:
|
||||
rem configure.bat PHASE_SCANNING Release OFF
|
||||
rem configure.bat MECHANICAL_SCANNING Debug ON
|
||||
rem
|
||||
rem The build directory is derived from the configuration tuple (see
|
||||
rem config_paths.bat), so every configuration has its own build tree:
|
||||
rem build\<X256_PS^|X256_MS^>\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
|
||||
rem
|
||||
rem The 3rd argument selects the optional data-recording debug feature
|
||||
rem (CMake cache variable RDP_DATA_RECORD). When it is omitted, CMake's AUTO
|
||||
rem default applies: Debug = enabled, Release = disabled. See
|
||||
rem docs/data_record_debug.md.
|
||||
rem default applies: Debug = enabled, Release = disabled.
|
||||
rem See docs/data_record_debug.md.
|
||||
rem
|
||||
rem The generator stays "NMake Makefiles" (the choice made during the VS Code
|
||||
rem migration); cl.exe is pinned to the MSVC 2022 x64 toolset.
|
||||
rem
|
||||
rem A build directory that was configured by an older compiler (for example the
|
||||
rem MSVC 2013 cache) is removed first: neither its CMake cache nor its object
|
||||
rem files can be reused across a compiler upgrade.
|
||||
rem A build directory that was configured by an older compiler (for example
|
||||
rem the MSVC 2013 cache) is removed first: neither its CMake cache nor its
|
||||
rem object files can be reused across a compiler upgrade.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal
|
||||
set "BUILD_DIR=%~1"
|
||||
set "SCAN_MODE=%~2"
|
||||
set "BUILD_TYPE=%~3"
|
||||
set "RECORD_MODE=%~4"
|
||||
if "%BUILD_DIR%"=="" (
|
||||
echo Usage: configure.bat ^<build-dir^> ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> [Debug^|Release] [AUTO^|ON^|OFF]
|
||||
exit /b 1
|
||||
)
|
||||
if "%SCAN_MODE%"=="" (
|
||||
echo Usage: configure.bat ^<build-dir^> ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> [Debug^|Release] [AUTO^|ON^|OFF]
|
||||
exit /b 1
|
||||
)
|
||||
if "%BUILD_TYPE%"=="" set "BUILD_TYPE=Release"
|
||||
if "%RECORD_MODE%"=="" set "RECORD_MODE=AUTO"
|
||||
if "%~1"=="" goto :usage
|
||||
if "%~2"=="" goto :usage
|
||||
|
||||
call "%~dp0config_paths.bat" "%~1" "%~2" "%~3"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
echo [configure] build dir : %BUILD_DIR%
|
||||
echo [configure] settings : %SCAN_MODE% / %BUILD_TYPE% / RDP_DATA_RECORD=%RECORD_MODE%
|
||||
|
||||
rem Load the MSVC 2022 environment (vcvarsall.bat + cl.exe existence check).
|
||||
call "%~dp0msvc_env.bat"
|
||||
if errorlevel 1 exit /b %errorlevel%
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
rem Drop a build tree left behind by another toolset.
|
||||
if not exist "%BUILD_DIR%\CMakeCache.txt" goto :configure
|
||||
pushd "%~dp0..\.."
|
||||
|
||||
if not exist "%BUILD_DIR%\CMakeCache.txt" goto :do_configure
|
||||
set "OLD_TOOLSET="
|
||||
if exist "%BUILD_DIR%\.msvc_toolset" set /p OLD_TOOLSET=<"%BUILD_DIR%\.msvc_toolset"
|
||||
if /i "%OLD_TOOLSET%"=="%MSVC_TOOLSET_VERSION%" goto :configure
|
||||
if /i "%OLD_TOOLSET%"=="%MSVC_TOOLSET_VERSION%" goto :do_configure
|
||||
echo [configure] "%BUILD_DIR%" was configured with MSVC toolset "%OLD_TOOLSET%" - rebuilding from scratch
|
||||
rmdir /s /q "%BUILD_DIR%"
|
||||
if exist "%BUILD_DIR%" (
|
||||
echo [ERROR] cannot remove "%BUILD_DIR%", please delete it manually and retry.
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:configure
|
||||
echo [configure] compiler : %MSVC_CXX_COMPILER%
|
||||
echo [configure] build dir: %BUILD_DIR%
|
||||
echo [configure] mode : %SCAN_MODE% / %BUILD_TYPE%
|
||||
echo [configure] record : %RECORD_MODE% (RDP_DATA_RECORD: AUTO/ON/OFF)
|
||||
|
||||
pushd "%~dp0..\.."
|
||||
:do_configure
|
||||
echo [configure] compiler : %MSVC_CXX_COMPILER%
|
||||
cmake -S . -B "%BUILD_DIR%" -G "NMake Makefiles" ^
|
||||
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
|
||||
-DRADAR_SCAN_MODE=%SCAN_MODE% ^
|
||||
-DRDP_DATA_RECORD=%RECORD_MODE% ^
|
||||
-DCMAKE_CXX_COMPILER="%MSVC_CXX_COMPILER%"
|
||||
set "CMAKE_EXIT=%errorlevel%"
|
||||
popd
|
||||
if not "%CMAKE_EXIT%"=="0" exit /b %CMAKE_EXIT%
|
||||
if not "%CMAKE_EXIT%"=="0" (
|
||||
popd
|
||||
exit /b %CMAKE_EXIT%
|
||||
)
|
||||
|
||||
rem Remember which toolset produced this build tree (checked on the next run).
|
||||
> "%BUILD_DIR%\.msvc_toolset" echo %MSVC_TOOLSET_VERSION%
|
||||
popd
|
||||
exit /b 0
|
||||
|
||||
:usage
|
||||
echo Usage: configure.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"cmake.configureOnOpen": false,
|
||||
"cmake.generator": "NMake Makefiles",
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/X256_PS",
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/${variant:scanMode}/${buildType}/${variant:recordMode}",
|
||||
"cmake.configureArgs": [
|
||||
"-DCMAKE_CXX_COMPILER=D:/APP/VisualStudio2022/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe"
|
||||
],
|
||||
@@ -12,5 +12,5 @@
|
||||
},
|
||||
"C_Cpp.default.cppStandard": "c++17",
|
||||
"C_Cpp.default.intelliSenseMode": "windows-msvc-x64",
|
||||
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/X256_PS/compile_commands.json"
|
||||
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/X256_PS/Debug/REC_ON/compile_commands.json"
|
||||
}
|
||||
|
||||
Vendored
+62
-137
@@ -5,166 +5,91 @@
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"label": "CMake: 配置 X256_PS (Release, MSVC2022 x64)",
|
||||
"label": "清理全部",
|
||||
"detail": "删除 build/<X256_PS|X256_MS>/<Debug|Release>/<REC_*> 下所有配置的构建输出(build/output 打包留档不动)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\configure.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS",
|
||||
"PHASE_SCANNING",
|
||||
"Release"
|
||||
],
|
||||
"problemMatcher": []
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\clean_all.bat",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared",
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置 X256_PS (Debug, MSVC2022 x64)",
|
||||
"label": "配置并构建全部(Release/REC_OFF)",
|
||||
"detail": "Release + RDP_DATA_RECORD=OFF:X256_PS 与 X256_MS 分别配置并构建",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\configure.bat",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build_all.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS",
|
||||
"PHASE_SCANNING",
|
||||
"Debug"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 构建 X256_PS (Release)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "CMake: 构建 X256_PS (Debug)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "CMake: 清理 X256_PS",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\clean.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置 X256_MS (Release, MSVC2022 x64)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\configure.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS",
|
||||
"MECHANICAL_SCANNING",
|
||||
"Release"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置 X256_MS (Debug, MSVC2022 x64)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\configure.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS",
|
||||
"MECHANICAL_SCANNING",
|
||||
"Debug"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 构建 X256_MS (Release)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "CMake: 构建 X256_MS (Debug)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "CMake: 清理 X256_MS",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\clean.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建 X256_PS (Release)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置 X256_PS (Release, MSVC2022 x64)",
|
||||
"CMake: 构建 X256_PS (Release)"
|
||||
"Release",
|
||||
"OFF"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建 X256_PS (Debug)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置 X256_PS (Debug, MSVC2022 x64)",
|
||||
"CMake: 构建 X256_PS (Debug)"
|
||||
"label": "配置并构建全部(Release/REC_ON)",
|
||||
"detail": "Release + RDP_DATA_RECORD=ON:X256_PS 与 X256_MS 分别配置并构建",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build_all.bat",
|
||||
"args": [
|
||||
"Release",
|
||||
"ON"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": []
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建 X256_MS (Release)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置 X256_MS (Release, MSVC2022 x64)",
|
||||
"CMake: 构建 X256_MS (Release)"
|
||||
"label": "配置并构建全部(Debug/REC_OFF)",
|
||||
"detail": "Debug + RDP_DATA_RECORD=OFF:X256_PS 与 X256_MS 分别配置并构建",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build_all.bat",
|
||||
"args": [
|
||||
"Debug",
|
||||
"OFF"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": []
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建 X256_MS (Debug)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置 X256_MS (Debug, MSVC2022 x64)",
|
||||
"CMake: 构建 X256_MS (Debug)"
|
||||
"label": "配置并构建全部(Debug/REC_ON)",
|
||||
"detail": "Debug + RDP_DATA_RECORD=ON:X256_PS 与 X256_MS 分别配置并构建",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build_all.bat",
|
||||
"args": [
|
||||
"Debug",
|
||||
"ON"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建全部 (X256_PS + X256_MS, Release)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置并构建 X256_PS (Release)",
|
||||
"CMake: 配置并构建 X256_MS (Release)"
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
],
|
||||
"problemMatcher": []
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -9,12 +9,27 @@
|
||||
|
||||
### Added
|
||||
|
||||
- 新增 `.vscode/scripts/config_paths.bat`:按「扫描体制 / 构建类型 / 记录模式」推导并校验构建目录 `build/<X256_PS|X256_MS>/<Debug|Release>/<REC_AUTO|REC_OFF|REC_ON>`(接受 `X256_PS`/`X256_MS` 别名),供所有构建脚本共用。
|
||||
- 新增 `.vscode/scripts/build_all.bat`:对 `PHASE_SCANNING` 与 `MECHANICAL_SCANNING` 依次「配置 + 构建」,任一配置失败即中止并返回非 0。
|
||||
- 新增 `.vscode/scripts/clean_all.bat`:删除全部配置的构建输出(含旧版单一构建目录;`build/output` 打包留档不动)。
|
||||
- `.vscode/tasks.json` 重建为 5 个任务:「清理全部」「配置并构建全部(Release/REC_OFF)」「配置并构建全部(Release/REC_ON)」「配置并构建全部(Debug/REC_OFF)」「配置并构建全部(Debug/REC_ON)」;后 4 个任务内部调用 `build_all.bat`,分别对两种扫描体制配置并构建,默认构建任务为「配置并构建全部(Release/REC_OFF)」。
|
||||
|
||||
### Changed
|
||||
|
||||
- 构建目录布局由「每个扫描体制一个目录(Release/Debug 共用、重新配置互相覆盖)」改为按完整配置隔离:`build/<X256_PS|X256_MS>/<Debug|Release>/<REC_AUTO|REC_OFF|REC_ON>`,关闭/开启记录模块的产物可并存、互不覆盖。
|
||||
- `configure.bat` / `build.bat` / `clean.bat` 参数由 `<build-dir> ...` 改为 `<PHASE_SCANNING|MECHANICAL_SCANNING> <Debug|Release> [AUTO|ON|OFF]`,构建目录自动推导;`clean.bat` 由 `cmake --build --target clean` 改为删除该配置的构建目录(因此放在配置目录 `bin/` 下、CMake 不会重建的 `rdp_playback.exe`/回放数据会一并删除,需放到 `build/output/` 或仓库外)。
|
||||
- VS Code 配置同步:`settings.json` 的 `cmake.buildDirectory` 改为 `${workspaceFolder}/build/${variant:scanMode}/${buildType}/${variant:recordMode}`、`compileCommands` 指向 `build/X256_PS/Debug/REC_ON/compile_commands.json`;`cmake-variants.yaml` 新增 `recordMode` 变体(REC_AUTO / REC_OFF / REC_ON,映射 `RDP_DATA_RECORD`);`c_cpp_properties.json` 的 `compileCommands` 更新到新目录;`launch.json` 的 `preLaunchTask` 改为「配置并构建全部(Debug/REC_ON)」,`program`/`symbolSearchPath` 指向 `build/X256_PS/Debug/REC_ON/bin`。
|
||||
- 更新 README(3 节目录结构、4.2~4.4 节构建说明、12 节版本历史、13 节参考文档)与 `docs/data_record_debug.md` 第 2 节构建示例,同步新的构建目录布局、脚本签名与 5 个任务;`requirements.md` 更新为本次构建脚本/VS Code 任务调整需求。
|
||||
- 本次改动的构建验证:5 个任务全部实际执行(清理全部 → Release/REC_OFF → Release/REC_ON → Debug/REC_OFF → Debug/REC_ON),退出码均为 0;8 种配置(PS/MS × Release/Debug × REC_OFF/REC_ON)构建日志均 0 warning、0 error;每个配置目录均生成 `bin/data_process_class_dll.dll`、`lib/`(REC_ON 另有 `lib/rdp_record.lib`)与 `compile_commands.json`;编译命令中的宏与配置对应(PS 为 `-DPHASE_SCANNING`、MS 为 `-DMECHANICAL_SCANNING`,REC_ON 含 `RDP_RECORD_ENABLE`);「清理全部」删除 8 个配置目录及旧版单一构建目录而 `build/output` 未被删除;错误扫描体制/构建类型/记录模式与未配置即构建等非法路径均返回非 0。补充验证:已构建配置再次执行 `build_all.bat` 为 0 个编译/链接步骤(增量幂等);模拟 MSVC 环境无效时 `build_all.bat` 在第一个配置即中止(未尝试第二个扫描体制,退出码 1);`clean.bat` 单配置清理后目录消失且可正常重建。
|
||||
|
||||
### Fixed
|
||||
|
||||
- 无。
|
||||
|
||||
### Removed
|
||||
|
||||
- 删除 `tasks.json` 中原有的 15 个任务(`CMake: 配置 X256_PS|X256_MS`、`CMake: 构建 ...`、`CMake: 清理 ...`、`CMake: 配置并构建 ...` 等),改为上述 5 个任务。
|
||||
|
||||
## [1.5.8] - 2026-10-20
|
||||
|
||||
> 本次发布把 [1.5.6] 之后、文档未及同步的全部改动一并归档(提交 5cb67cc … 3088ce4)。
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
├── CMakeLists.txt # CMake 构建脚本(扫描模式切换、导出宏、输出目录)
|
||||
├── CHANGELOG.md # 变更日志(Keep a Changelog 格式,按 git 提交记录维护)
|
||||
├── README.md # 本文件:项目说明(架构、接口、流程、算法、参数)
|
||||
├── requirements.md # 需求说明:数据记录调试功能修改要求(结构体经 ormpp 写入 SQLite、Release 可屏蔽、数据分类入不同表、宏记录点;原日志文件输出需求已实现)
|
||||
├── requirements.md # 需求说明:构建脚本与 VS Code 任务调整(Debug/Release × 扫描体制 × RDP_DATA_RECORD,5 个任务)
|
||||
├── archived_docs/ # 过期文档留档(仅作历史参考;接口与流程以本 README 与 docs/ 专项说明为准)
|
||||
│ ├── BUG_REPORT.md # 全量逻辑 BUG 分析报告(P0~P3,37 项)
|
||||
│ └── BUG_FIX_REPORT.md # BUG 修复报告(修复明细 + 编译验证结果)
|
||||
@@ -88,14 +88,17 @@
|
||||
│ └── data_record_debug.md # 数据记录调试功能说明(开关与构建、运行期行为、表结构约定、新增记录点四步配方、6 张在用记录表清单与字段、查询示例)
|
||||
├── design_docs/ # 设计与讨论资料留档(被 .gitignore 忽略、不入库;含设计讨论、产品介绍与 README/流程报告的导出、渲染版本)
|
||||
├── .vscode/ # VS Code 工程配置
|
||||
│ ├── settings.json # cmake.generator=NMake、MSVC2022 x64 环境变量、compile_commands
|
||||
│ ├── cmake-variants.yaml # X256_PS / X256_MS × Release / Debug 变体
|
||||
│ ├── tasks.json # 配置/构建/清理任务(MSVC2022 x64)
|
||||
│ ├── settings.json # cmake.generator=NMake、MSVC2022 x64 环境变量、构建目录=变体推导、compile_commands
|
||||
│ ├── cmake-variants.yaml # X256_PS / X256_MS × Release / Debug × REC_AUTO / REC_OFF / REC_ON 变体
|
||||
│ ├── tasks.json # 仅 5 个任务:清理全部 + 4 种组合的「配置并构建全部」(原有任务已删除)
|
||||
│ └── scripts/ # 构建脚本(纯 ASCII,避免 cmd 代码页问题)
|
||||
│ ├── msvc_env.bat # 共享环境设置:定位 VS2022/cl.exe 并调用 vcvarsall.bat(x64)
|
||||
│ ├── configure.bat # CMake 配置(含旧工具集构建树自动清理)
|
||||
│ ├── build.bat # CMake 构建
|
||||
│ └── clean.bat # CMake 清理
|
||||
│ ├── config_paths.bat # 按「扫描体制/构建类型/记录模式」推导构建目录并校验参数
|
||||
│ ├── configure.bat # 单配置 CMake 配置(含旧工具集构建树自动清理)
|
||||
│ ├── build.bat # 单配置 CMake 构建
|
||||
│ ├── clean.bat # 单配置清理(删除该配置的构建目录)
|
||||
│ ├── build_all.bat # 两种扫描体制依次「配置 + 构建」(4 个构建任务调用)
|
||||
│ └── clean_all.bat # 清理全部配置的构建输出(「清理全部」任务调用)
|
||||
├── backup/
|
||||
│ └── data_process_class_dll/
|
||||
│ ├── data_process_class_dll.pro # 迁移前的 Qt/qmake 工程文件(备份)
|
||||
@@ -127,8 +130,10 @@
|
||||
│ ├── track_index_mangement.h / .cpp # 航迹号 1~500 分配/复用
|
||||
│ └── Eigen/ # 内置 Eigen 3 头文件库(仅用 Eigen/Dense)
|
||||
├── build/ # 构建产物(被 .gitignore 忽略)
|
||||
│ ├── X256_PS/ # 相扫构建目录(含 bin/data_process_class_dll.dll、rdp_playback.exe 等)
|
||||
│ ├── X256_MS/ # 机扫构建目录
|
||||
│ ├── X256_PS/ # 相扫构建根目录(每个完整配置一个子目录)
|
||||
│ │ ├── Debug/ # Debug 配置根:REC_AUTO / REC_OFF / REC_ON
|
||||
│ │ └── Release/ # Release 配置根:REC_AUTO / REC_OFF / REC_ON
|
||||
│ ├── X256_MS/ # 机扫构建根目录(结构同 X256_PS)
|
||||
│ └── output/ # 早期打包导出(其中 data_process_class_dll.h 为旧版 32 位时间戳接口,勿作为当前 API 依据)
|
||||
├── rdp_logs/ # 日志输出目录(运行时自动创建于宿主进程当前工作目录下,被 .gitignore 忽略)
|
||||
├── rdp_records/ # 数据记录库输出目录(运行时自动创建于宿主进程当前工作目录下,被 .gitignore 忽略;仅记录功能启用时产生)
|
||||
@@ -153,59 +158,72 @@
|
||||
|
||||
### 4.2 扫描体制
|
||||
|
||||
通过 CMake 缓存变量 RADAR_SCAN_MODE 切换,对应 parameters.h 中的两组宏:
|
||||
通过 CMake 缓存变量 RADAR_SCAN_MODE 切换,对应 parameters.h 中的两组宏;每个「扫描体制 × 构建类型 × 记录模式」组合拥有独立构建目录(见 4.3):
|
||||
|
||||
| 变量值 | 对应宏 | 构建目录 |
|
||||
|---|---|---|
|
||||
| PHASE_SCANNING | 相扫(X256_PS,默认) | build/X256_PS |
|
||||
| MECHANICAL_SCANNING | 机扫(X256_MS) | build/X256_MS |
|
||||
| PHASE_SCANNING | 相扫(X256_PS,默认) | build/X256_PS/<Debug\|Release>/<REC_AUTO\|REC_OFF\|REC_ON> |
|
||||
| MECHANICAL_SCANNING | 机扫(X256_MS) | build/X256_MS/<Debug\|Release>/<REC_AUTO\|REC_OFF\|REC_ON> |
|
||||
|
||||
### 4.3 命令行构建
|
||||
|
||||
```bat
|
||||
:: 需在 MSVC 2022 x64 环境中执行(先运行 vcvarsall.bat x64)
|
||||
cmake -S . -B build/X256_PS -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DRADAR_SCAN_MODE=PHASE_SCANNING ^
|
||||
-DCMAKE_CXX_COMPILER="D:/APP/VisualStudio2022/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe"
|
||||
cmake --build build/X256_PS
|
||||
构建目录由「扫描体制 + 构建类型 + 记录模式」三元组唯一确定,构建脚本、VS Code 任务与 CMake Tools 变体使用同一布局:
|
||||
|
||||
```text
|
||||
build/<X256_PS|X256_MS>/<Debug|Release>/<REC_AUTO|REC_OFF|REC_ON>
|
||||
```
|
||||
|
||||
或直接使用仓库提供的脚本(内部已通过 msvc_env.bat 调用 vcvarsall.bat x64 并校验 cl.exe):
|
||||
|
||||
```bat
|
||||
.vscode\scripts\configure.bat build/X256_PS PHASE_SCANNING Release
|
||||
.vscode\scripts\build.bat build/X256_PS
|
||||
.vscode\scripts\clean.bat build/X256_PS
|
||||
:: 单配置操作(参数:<PHASE_SCANNING|MECHANICAL_SCANNING> <Debug|Release> [AUTO|ON|OFF])
|
||||
:: 构建目录自动推导,例如 build/X256_PS/Release/REC_OFF
|
||||
.vscode\scripts\configure.bat PHASE_SCANNING Release OFF
|
||||
.vscode\scripts\build.bat PHASE_SCANNING Release OFF
|
||||
.vscode\scripts\clean.bat PHASE_SCANNING Release OFF
|
||||
:: 扫描体制也接受 X256_PS / X256_MS 别名;记录模式缺省为 AUTO
|
||||
.vscode\scripts\configure.bat X256_MS Debug
|
||||
```
|
||||
|
||||
configure.bat 会在构建目录中写入 `.msvc_toolset` 标记;若该目录是用其它工具集(例如旧的 MSVC 2013 缓存)配置的,脚本会先整体删除该目录再重新配置,避免新旧目标文件混链。用 `set VS2022_DIR=...`、`set MSVC_TOOLSET_VERSION=...`、`set MSVC_TARGET_ARCH=x86` 可覆盖默认的 VS 安装路径、工具集版本与目标架构。
|
||||
|
||||
数据记录调试功能由缓存变量 `RDP_DATA_RECORD` 控制,`configure.bat` 的第 4 个参数即该变量(取值 `AUTO`/`ON`/`OFF`,缺省 `AUTO`):
|
||||
|
||||
```bat
|
||||
:: AUTO(默认):Debug 构建启用、Release 构建关闭——交付构建不做任何记录
|
||||
.vscode\scripts\configure.bat build/X256_PS PHASE_SCANNING Debug AUTO
|
||||
:: 显式关闭(Release 交付推荐)或显式开启(临时在 Release 中排查)
|
||||
.vscode\scripts\configure.bat build/X256_PS PHASE_SCANNING Release OFF
|
||||
.vscode\scripts\configure.bat build/X256_PS PHASE_SCANNING Debug ON
|
||||
:: 一次配置并构建两个扫描体制(VS Code 任务「配置并构建全部(...)」的内部实现)
|
||||
.vscode\scripts\build_all.bat Release OFF
|
||||
.vscode\scripts\build_all.bat Release ON
|
||||
.vscode\scripts\build_all.bat Debug OFF
|
||||
.vscode\scripts\build_all.bat Debug ON
|
||||
:: 清理全部配置的构建输出(VS Code 任务「清理全部」的内部实现)
|
||||
.vscode\scripts\clean_all.bat
|
||||
```
|
||||
|
||||
启用时配置阶段打印 `数据记录调试功能:启用(C++20 静态库 rdp_record + 内置 SQLite)`,并额外构建静态库 `rdp_record`(记录模块 + SQLite,链接进 DLL);关闭时打印 `...:关闭(不编译记录模块,RDP_RECORD 为空操作)`,记录模块源码完全不参与编译。开关语义、表结构约定与新增记录点配方见 docs/data_record_debug.md。
|
||||
脚本内部通过 msvc_env.bat 调用 vcvarsall.bat x64 并校验 cl.exe,无需手工进入 MSVC 环境。configure.bat 会在每个构建目录写入 `.msvc_toolset` 标记;若该目录是用其它工具集(例如旧的 MSVC 2013 缓存)配置的,脚本会先整体删除该目录再重新配置,避免新旧目标文件混链。用 `set VS2022_DIR=...`、`set MSVC_TOOLSET_VERSION=...`、`set MSVC_TARGET_ARCH=x86` 可覆盖默认的 VS 安装路径、工具集版本与目标架构。
|
||||
|
||||
在 VS Code 中可直接运行任务(tasks.json):「CMake: 配置并构建 X256_PS (Release)」等,默认任务为 X256_PS Release。
|
||||
数据记录调试功能由缓存变量 `RDP_DATA_RECORD` 控制(取值 `AUTO`/`ON`/`OFF`,缺省 `AUTO`:Debug 启用、Release 关闭)。显式取值时构建目录名随之不同(`REC_OFF`/`REC_ON`),因此关闭与开启记录模块的产物可以并存。启用时配置阶段打印 `数据记录调试功能:启用(C++20 静态库 rdp_record + 内置 SQLite)`,并额外构建静态库 `rdp_record`(记录模块 + SQLite,链接进 DLL);关闭时打印 `...:关闭(不编译记录模块,RDP_RECORD 为空操作)`,记录模块源码完全不参与编译。开关语义、表结构约定与新增记录点配方见 docs/data_record_debug.md。
|
||||
|
||||
VS Code 任务(`.vscode/tasks.json`)只保留以下 5 个(原有任务已全部删除),可在「终端 → 运行任务」中选择,或按 `Ctrl+Shift+B` 运行默认构建任务「配置并构建全部(Release/REC_OFF)」:
|
||||
|
||||
| 任务 | 配置 |
|
||||
|---|---|
|
||||
| 清理全部 | 删除 `build/X256_PS`、`build/X256_MS` 下所有配置的构建输出(`build/output` 留档不动) |
|
||||
| 配置并构建全部(Release/REC_OFF) | Release + `RDP_DATA_RECORD=OFF`,分别构建 PHASE_SCANNING(X256_PS)与 MECHANICAL_SCANNING(X256_MS) |
|
||||
| 配置并构建全部(Release/REC_ON) | Release + `RDP_DATA_RECORD=ON`,两个扫描体制同上 |
|
||||
| 配置并构建全部(Debug/REC_OFF) | Debug + `RDP_DATA_RECORD=OFF`,两个扫描体制同上 |
|
||||
| 配置并构建全部(Debug/REC_ON) | Debug + `RDP_DATA_RECORD=ON`,两个扫描体制同上 |
|
||||
|
||||
> 注意:`clean_all.bat` / `clean.bat` 会**整体删除**对应的配置目录(不再只做 `cmake --build --target clean`),因此自行放置到 `build/<X256_XX>/<Debug|Release>/<REC_*>/bin/` 的 rdp_playback.exe、Qt5Core.dll、sqlite3.dll 与回放数据也会被删除,清理后需重新放置——这类手工工具与样例数据建议放在 `build/output/` 或仓库之外。`settings.json`、`c_cpp_properties.json` 的默认 `compileCommands` 指向 `build/X256_PS|MS/Debug/REC_ON/compile_commands.json`(便于 IntelliSense 覆盖记录模块代码);未构建该配置时 C/C++ 插件回退到内置 `includePath`/`defines`。
|
||||
>
|
||||
> 若此前用 CMake Tools 选择过变体(旧版本的变体键名为 `ps`/`ms`),升级后请重新执行一次「CMake: Select Variant」——旧的变体选择会持久化在 workspaceStorage 中,重命名键后需要重新选择才能得到 `build/X256_PS/Release/REC_OFF` 这类与任务一致的目录。
|
||||
|
||||
### 4.4 产物
|
||||
|
||||
| 产物 | 位置 |
|
||||
|---|---|
|
||||
| data_process_class_dll.dll(+ .pdb) | build/<X256_XX>/bin/ |
|
||||
| 导入库 data_process_class_dll.lib | build/<X256_XX>/lib/ |
|
||||
| data_process_class_dll.dll(+ .pdb) | build/<X256_XX>/<Debug\|Release>/<REC_*>/bin/ |
|
||||
| 导入库 data_process_class_dll.lib | build/<X256_XX>/<Debug\|Release>/<REC_*>/lib/ |
|
||||
| 安装(cmake --install) | DLL/导入库 → bin、lib,公开头文件 → include |
|
||||
| compile_commands.json | 构建根目录(供 VS Code IntelliSense 使用) |
|
||||
| rdp_record.lib(仅记录功能启用时) | build/<X256_XX>/lib/ —— 记录模块静态库(含 SQLite),已链接进 DLL,**无需随 DLL 分发** |
|
||||
| compile_commands.json | 各配置的构建目录根(供 VS Code IntelliSense 使用) |
|
||||
| rdp_record.lib(仅记录功能启用时) | build/<X256_XX>/<Debug\|Release>/<REC_*>/lib/(仅 `REC_ON`,或 Debug 下的 `REC_AUTO` 才生成)—— 记录模块静态库(含 SQLite),已链接进 DLL,**无需随 DLL 分发** |
|
||||
|
||||
产物为 **x64(AMD64)** 目标。宿主程序必须是 64 位、且使用与本 DLL 同一版本头文件重新编译——MSVC 2013 → MSVC 2022 同时伴随 x86 → x64 的 ABI 变化,旧的 32 位宿主无法加载该 DLL。
|
||||
|
||||
仓库 build/X256_PS/bin/ 内原附带 **rdp_playback.exe**(回放测试工具,依赖 Qt5Core.dll、sqlite3.dll,配置样例 RadarConfigParam.ini,可回放 .db 记录的点迹数据验证 DLL 输出),该工具不在本仓库源码范围内、当前构建目录中亦不存在,需自行放置;由于 DLL 已改为 x64,配套的 rdp_playback.exe 必须是 **x64 版本**(同时其自带 Qt5Core.dll / sqlite3.dll 也需为 x64),32 位版本无法加载新版 DLL。
|
||||
仓库 `build/X256_PS/<Debug|Release>/<REC_*>/bin/` 内原附带 **rdp_playback.exe**(回放测试工具,依赖 Qt5Core.dll、sqlite3.dll,配置样例 RadarConfigParam.ini,可回放 .db 记录的点迹数据验证 DLL 输出),该工具不在本仓库源码范围内、当前构建目录中亦不存在,需自行放置;由于 DLL 已改为 x64,配套的 rdp_playback.exe 必须是 **x64 版本**(同时其自带 Qt5Core.dll / sqlite3.dll 也需为 x64),32 位版本无法加载新版 DLL。
|
||||
|
||||
### 4.5 编译警告处理
|
||||
|
||||
@@ -213,9 +231,9 @@ configure.bat 会在构建目录中写入 `.msvc_toolset` 标记;若该目录
|
||||
- `CMakeLists.txt` 显式指定 `/W3`:CMake 3.15(策略 CMP0092)起不再把 `/W3` 放进 `CMAKE_CXX_FLAGS`,本工程此前一直以 `/W3` 构建,故显式恢复以保持警告级别不变。
|
||||
- 修复了 `/W3` 下全部 C4819(源文件字符集)、C4018(signed/unsigned 不匹配)、C4244(类型转换可能丢失数据)警告:循环变量按需改为 `size_t`,窄化转换改为 `static_cast` 显式转换,不改变原有计算逻辑。
|
||||
- MSVC 2022 在 `/W3` 下新增报出的 C4267(`size_t` → `int` 窄化)共 17 处已按同一约定修复(`track_asso.cpp`、`track_asso_tas.cpp`、`track_init.cpp`、`track_init_direct_tracking.cpp`、`tas_ctrl.cpp` 中改为 `static_cast<int>(...)`),同样不改变计算逻辑。
|
||||
- 当前四种配置(X256_PS / X256_MS × Release / Debug)均以 **0 warning、0 error** 通过编译。
|
||||
- 当前 8 种显式配置(X256_PS / X256_MS × Release / Debug × REC_OFF / REC_ON)均以 **0 warning、0 error** 通过编译(REC_AUTO 与「Debug=ON / Release=OFF」等价,未重复单独验证)。
|
||||
- cl.exe 的诊断信息为中文(跟随 VS 安装语言,`VSLANG=1033` 对 VS2022 的 cl.exe 无效),构建日志中偶见 `注意: 包含文件:` 行泄漏,属 CMake 依赖扫描的显示噪声,头文件依赖(`CMakeFiles/*.dir/**/*.obj.d`)记录完整,不影响增量编译。
|
||||
- **第三方库告警例外(仅记录功能启用时)**:数据记录模块的第三方依赖按上游原样内置在 `third_party/ormpp`(保留上游字节,含换行符,不转 BOM/编码),其中 `third_party/ormpp/thirdparty/sqlite3/sqlite3.c` 以源文件级 `/w` 单独编译,`data_process_class_dll/rdp_record.cpp` 用 `#pragma warning(push, 0)` / `(pop)` 包裹第三方头;除此之外本工程源码仍按上一条的 `/W3` 零告警标准编译(X256_PS/X256_MS × Release/Debug 四种配置实测 0 warning、0 error)。
|
||||
- **第三方库告警例外(仅记录功能启用时)**:数据记录模块的第三方依赖按上游原样内置在 `third_party/ormpp`(保留上游字节,含换行符,不转 BOM/编码),其中 `third_party/ormpp/thirdparty/sqlite3/sqlite3.c` 以源文件级 `/w` 单独编译,`data_process_class_dll/rdp_record.cpp` 用 `#pragma warning(push, 0)` / `(pop)` 包裹第三方头;除此之外本工程源码仍按上一条的 `/W3` 零告警标准编译(X256_PS/X256_MS × Release/Debug × REC_OFF/REC_ON 八种配置实测 0 warning、0 error)。
|
||||
|
||||
### 4.6 编译器升级说明(MSVC 2013 → MSVC 2022)
|
||||
|
||||
@@ -1047,6 +1065,7 @@ $$
|
||||
|
||||
| 提交 | 内容 |
|
||||
|---|---|
|
||||
| 工作区(构建脚本与 VS Code 任务调整,未提交) | 构建目录改为按完整配置隔离 `build/<X256_PS\|X256_MS>/<Debug\|Release>/<REC_AUTO\|REC_OFF\|REC_ON>`;新增 `config_paths.bat`(目录推导与参数校验)、`build_all.bat`(两种扫描体制依次配置+构建)、`clean_all.bat`(清理全部配置);`configure.bat`/`build.bat`/`clean.bat` 参数改为「扫描体制 + 构建类型 + 记录模式」并自动推导目录;`tasks.json` 原有 15 个任务全部删除,仅保留 5 个任务(清理全部 + Release/Debug × REC_OFF/REC_ON 的「配置并构建全部」);`settings.json`/`cmake-variants.yaml`/`c_cpp_properties.json`/`launch.json` 同步;验证:5 个任务实际执行均返回 0,8 种配置(PS/MS × Release/Debug × REC_OFF/REC_ON)0 warning、0 error,产物位于各配置目录的 `bin/`、`lib/` |
|
||||
| 3088ce4(**V1.5.8** 版本号来源) | 更新版本号至 V1.5.8(`PATCH_VERSION` 7→8) |
|
||||
| 782bff5 | 调整航迹质量下降逻辑(改为按未更新时长的二次函数衰减,系数 −0.0008 / −0.0025);**普通 TWS 航迹消亡条件改为由航迹质量确定**(`Quality < TRACK_DIE_QUALITY` = 0.3),重点航迹与 TAS 仍按外推圈数 |
|
||||
| 4b70b24 | 航迹质量下降策略改为按点迹未更新时间计算:`Trust_Track` 新增 `Unupdated_time`,外推 ΔT 计算移到外推上限判断之外,超限后质量继续下降 |
|
||||
@@ -1106,7 +1125,7 @@ $$
|
||||
| third_party/ormpp/UPSTREAM.md | 内置第三方源码的来源说明:ormpp / iguana / frozen / SQLite 版本、许可证、复现与升级步骤(含 blob 校验值) |
|
||||
| archived_docs/BUG_REPORT.md | 全量逻辑 BUG 分析(P0~P3 共 37 项,含位置、说明、建议、处置结论)——过期留档,仅作历史参考 |
|
||||
| archived_docs/BUG_FIX_REPORT.md | 修复明细、修复状态汇总表与 MSVC 2013 x86 编译验证记录——过期留档(对应 01d28e0 时期) |
|
||||
| requirements.md | 修改需求说明:数据记录调试功能(结构体经 ormpp 映射写入 SQLite、Release 版可屏蔽、数据分类入不同表、宏记录点、便于快速新增结构体、不使用异步写入)——框架已按该说明实现,记录表已从 2 个示例扩展为 6 张在用表(7 个实体定义),详见 docs/data_record_debug.md(此前同名的日志文件输出需求亦已实现) |
|
||||
| requirements.md | 修改需求说明:构建脚本与 VS Code 任务调整(Debug/Release × PHASE_SCANNING/MECHANICAL_SCANNING × `RDP_DATA_RECORD`,原有任务删除后重建 5 个任务)——已按该说明实现(见 4.3);此前同名的数据记录调试功能与日志文件输出需求亦已实现,分别见 docs/data_record_debug.md 与 10.1 |
|
||||
| backup/data_process_class_dll/data_process_class_dll.pro | 迁移前的 Qt/qmake 工程文件(源文件清单参考) |
|
||||
| .vscode/tasks.json、.vscode/cmake-variants.yaml | VS Code 构建任务与变体定义 |
|
||||
| build/X256_PS/bin/RadarConfigParam.ini | 回放测试工具(rdp_playback.exe)配置样例 |
|
||||
| .vscode/tasks.json、.vscode/cmake-variants.yaml、.vscode/scripts/*.bat | VS Code 任务、构建变体与构建脚本(构建目录布局见 4.3) |
|
||||
| build/X256_PS/<Debug\|Release>/<REC_*>/bin/RadarConfigParam.ini | 回放测试工具(rdp_playback.exe)配置样例(需自行放置) |
|
||||
|
||||
@@ -25,19 +25,21 @@
|
||||
|
||||
```bat
|
||||
:: 交付/Release:关闭(AUTO 的默认结果,也可显式 OFF)
|
||||
.vscode\scripts\configure.bat build/X256_PS PHASE_SCANNING Release OFF
|
||||
.vscode\scripts\build.bat build/X256_PS
|
||||
.vscode\scripts\configure.bat PHASE_SCANNING Release OFF
|
||||
.vscode\scripts\build.bat PHASE_SCANNING Release OFF
|
||||
|
||||
:: Debug:启用(AUTO 的默认结果,也可显式 ON)
|
||||
.vscode\scripts\configure.bat build/X256_PS PHASE_SCANNING Debug ON
|
||||
.vscode\scripts\build.bat build/X256_PS
|
||||
.vscode\scripts\configure.bat PHASE_SCANNING Debug ON
|
||||
.vscode\scripts\build.bat PHASE_SCANNING Debug ON
|
||||
|
||||
:: 直接用 cmake(需先进入 MSVC 2022 x64 环境)
|
||||
cmake -S . -B build/debug_rec -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug ^
|
||||
cmake -S . -B build/X256_PS/Debug/REC_ON -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug ^
|
||||
-DRADAR_SCAN_MODE=PHASE_SCANNING -DRDP_DATA_RECORD=ON
|
||||
cmake --build build/debug_rec
|
||||
cmake --build build/X256_PS/Debug/REC_ON
|
||||
```
|
||||
|
||||
构建目录按「扫描体制 + 构建类型 + 记录模式」隔离:`build/<X256_PS|X256_MS>/<Debug|Release>/<REC_AUTO|REC_OFF|REC_ON>`,因此同一扫描体制下 REC_OFF 与 REC_ON 的产物可以并存;VS Code 任务「配置并构建全部(...)」与脚本 `build_all.bat`/`clean_all.bat` 均基于该布局(见 README 4.3)。
|
||||
|
||||
配置阶段会打印开关状态:`数据记录调试功能:启用(C++20 静态库 rdp_record + 内置 SQLite)` 或 `...:关闭(不编译记录模块,RDP_RECORD 为空操作)`。
|
||||
|
||||
**语言标准与依赖**:记录模块以 **C++20** 独立编译(ormpp 要求 `CMAKE_CXX_STANDARD 20`),并编译内置的 SQLite amalgamation(因此启用时需要 C 编译器,随 VS 2022 工具集提供);**雷达处理代码与内置 Eigen 仍为 C++17**,二者通过 `rdp_record.h` 的「仅声明 + 显式实例化」跨标准边界:调用方(C++17)只把记录实体按 `const` 引用递给 `rdp_record::Write<T>()`,实现在 `rdp_record.cpp`(C++20)中显式实例化。
|
||||
|
||||
+30
-12
@@ -1,19 +1,37 @@
|
||||
# 雷达数据处理项目修改说明
|
||||
|
||||
## 概述
|
||||
新增一个数据记录调试功能,将各类结构体数据写入到数据库中,供后续查询分析。
|
||||
修改该项目的构建脚本和VS code的task配置。
|
||||
|
||||
## 具体需求
|
||||
目前可选的构建配置包括:
|
||||
|
||||
* 本次只设计功能框架,具体存储哪些数据不在此次考虑范围内;
|
||||
* 数据库使用SQLite;
|
||||
* 使用ormpp库实现结构体到数据表的隐射,项目地址:https://github.com/qicosmos/ormpp;
|
||||
* 数据记录功能在release版可以屏蔽,不做任何记录,避免交付版本的性能损失;
|
||||
* 数据分类记录,所有数据存储到一个db文件中,不同的数据存储到不同的表中;
|
||||
* 使用宏或其他方式,在代码中添加记录点,将指定数据写入数据库;
|
||||
* 能够快速添加新的结构体数据,便于后续增加需要记录的数据;
|
||||
* 作为一个调试功能,不必使用异步写入;
|
||||
1、Debug / Release;
|
||||
2、PHASE_SCANNING(X256_PS) / MECHANICAL_SCANNING(X256_MS):两个配置决定不同的生成目录和宏定义;
|
||||
3、RDP_DATA_RECORD: AUTO/ON/OFF:AUTO配置在debug模式下为ON,在release模式下为OFF;
|
||||
|
||||
## 其他
|
||||
构建工具保持MSVC 2022不变,原有的Task都删除;
|
||||
|
||||
* 如果有任何不明确或者有问题的地方,可以直接向我提问;
|
||||
需要生成的新Task:
|
||||
|
||||
Task1: 清理全部
|
||||
* 清理所有配置的构建输出
|
||||
|
||||
Task2: 配置并构建全部(Release/REC_OFF)
|
||||
* 分别构建PHASE_SCANNING(X256_PS) / MECHANICAL_SCANNING(X256_MS)
|
||||
* 配置1:Release / PHASE_SCANNING / RDP_DATA_RECORD: OFF
|
||||
* 配置2:Release / MECHANICAL_SCANNING / RDP_DATA_RECORD: OFF
|
||||
|
||||
Task3: 配置并构建全部(Release/REC_ON)
|
||||
* 分别构建PHASE_SCANNING(X256_PS) / MECHANICAL_SCANNING(X256_MS)
|
||||
* 配置1:Release / PHASE_SCANNING / RDP_DATA_RECORD: ON
|
||||
* 配置2:Release / MECHANICAL_SCANNING / RDP_DATA_RECORD: ON
|
||||
|
||||
Task4: 配置并构建全部(Debug/REC_OFF)
|
||||
* 分别构建PHASE_SCANNING(X256_PS) / MECHANICAL_SCANNING(X256_MS)
|
||||
* 配置1:Debug / PHASE_SCANNING / RDP_DATA_RECORD: OFF
|
||||
* 配置2:Debug / MECHANICAL_SCANNING / RDP_DATA_RECORD: OFF
|
||||
|
||||
Task5: 配置并构建全部(Debug/REC_ON)
|
||||
* 分别构建PHASE_SCANNING(X256_PS) / MECHANICAL_SCANNING(X256_MS)
|
||||
* 配置1:Debug / PHASE_SCANNING / RDP_DATA_RECORD: ON
|
||||
* 配置2:Debug / MECHANICAL_SCANNING / RDP_DATA_RECORD: ON
|
||||
Reference in New Issue
Block a user