初始化版本控制:TS660 DLL 源码、构建脚本与 SDK(Release) 产物
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
$env:VCVARS = "D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
# 加载 VS 环境
|
||||
$vcvarsOutput = & cmd /c "`"$env:VCVARS`" >nul 2>&1 && set" 2>$null
|
||||
foreach ($line in $vcvarsOutput) {
|
||||
if ($line -match '^([^=]+)=(.*)$') {
|
||||
Set-Item -Path "env:$($matches[1])" -Value $matches[2]
|
||||
}
|
||||
}
|
||||
Write-Host "INCLUDE: $($env:INCLUDE.Substring(0, [Math]::Min(80, $env:INCLUDE.Length)))..."
|
||||
|
||||
Set-Location "g:\project\dllTest\TS660_DLL"
|
||||
|
||||
# 编译
|
||||
cl /nologo /EHsc /W3 /std:c++17 /utf-8 /DTS660_DLL_EXPORTS /I. TS660_Debug.cpp SerialPort.cpp TS660DDG.cpp /link /OUT:TS660_Debug.exe user32.lib 2>&1 | Select-Object -Last 8
|
||||
|
||||
Remove-Item TS660_Debug.obj, SerialPort.obj, TS660DDG.obj -ErrorAction SilentlyContinue
|
||||
Write-Host "=== Build complete ==="
|
||||
Reference in New Issue
Block a user