初始化版本控制:TS660 DLL 源码、构建脚本与 SDK(Release) 产物

This commit is contained in:
roxin
2026-11-21 12:00:13 +08:00
commit e832938129
42 changed files with 4201 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
$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]
}
}
Set-Location "g:\project\dllTest\TS660_DLL\TS660_DLL_SDK"
# 编译示例
& cl /nologo /EHsc /W3 /utf-8 /I. example\example.c /link /OUT:example.exe TS660_DLL.lib 2>&1 | Select-Object -Last 3
Remove-Item example.obj -ErrorAction SilentlyContinue
if (Test-Path example.exe) {
Write-Host "示例编译成功"
(Get-Item example.exe) | Select-Object Name, @{N='Size(KB)';E={[math]::Round($_.Length/1KB,1)}}
Remove-Item example.exe -ErrorAction SilentlyContinue
} else {
Write-Host "示例编译失败"
}