系列索引:AFSIM入门教程索引

上一篇中更新了tiff库版本,本文将更新所有使用到的依赖库版本。

失败了

依赖库

首先获取哪些库被使用了。打开源码目录,搜索# Configure the 3rd_party,可以看到调用第三方库的代码。

官方提供的依赖库名称、版本;vcpkg对应名称、版本;库使用情况如下表所示。

2025.06.21检测

名称版本vcpkg名称vcpkg版本使用
curl7.79.1curl8.14.1
freetype2.9.1freetype2.13.3
ffmpeg4.2.4ffmpeg7.1.1
gdal3.3.2gdal3.11.0
geos3.5.1geos3.13.0
gsl2.1gsl2.8
gtest1.8.0gtest1.17.0
jpeg9dlibjpeg-turbo3.1.0
libpng1.6.37libpng1.6.48
osg3.6.3osg3.6.5
osgEarth2.10.1osgEarth3.7.2
proj8.1.1proj9.6.2
protobuf3.6.1/3.7.1/3.9.1protobuf5.29.3
pybind112.6.2pybind112.13.6
qt5.12.11qt55.15.16
sdl2.0.16sdl22.32.8
sqlite3.32.3sqlite33.49.2
tiff4.3.0tiff4.7.0
tinyxml27.1.0tinyxml211.0.0
yasm1.3.0yasm1.3.0#7
zlib1.2.11zlib1.3.1
zmq4.3.1/4.3.2cppzmq4.10.0

流程

  • 使用vcpkg+vs2022编译依赖库
  • 使用脚本整理和打包依赖库
  • 使用新版本依赖库替换官方源码中旧版本依赖库
  • 修改源码中依赖库版本
  • 编译源码

编译

为了简化编译过程,Windows下使用vcpkg工具,基于VS2022编译。

编译与安装

vcpkg install tiff[cxx] tinyxml2 sqlite3 sdl2 proj geos gdal gtest:x64-windows-static-md ffmpeg osg osgearth qt5-base qt5-winextras

整理、压缩

使用vcpkg编译软件依赖库后,使用脚本根据依赖库的结构进行整理、打包,批量操作ps脚本如下:

ffmpeg

Linux限定

gdal

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "gdal-3.11.1-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\gdald.dll -Destination $outputRoot$archiveFile\debug -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\gdald.lib -Destination $outputRoot$archiveFile\debug -Force# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\gdal.dll -Destination $outputRoot$archiveFile\release -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\gdal.lib -Destination $outputRoot$archiveFile\release -Force# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\cpl*.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\gdal*.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\memdataset.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\ogr*.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\ogrsf_frmts.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\spatialite.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\vrtdataset.h -Destination $outputRoot$archiveFile\include -Force# 复制授权文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release license includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

geos

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "geos-3.13.1-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\geos.dll -Destination $outputRoot$archiveFile\debug\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\geos_c.dll -Destination $outputRoot$archiveFile\debug\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\geos.lib -Destination $outputRoot$archiveFile\debug\lib -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\geos_c.lib -Destination $outputRoot$archiveFile\debug\lib -Force# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\geos.dll -Destination $outputRoot$archiveFile\release\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\geos_c.dll -Destination $outputRoot$archiveFile\release\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\geos.lib -Destination $outputRoot$archiveFile\release\lib -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\geos_c.lib -Destination $outputRoot$archiveFile\release\lib -Force# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\geos.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\geos_c.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\geos -Destination $outputRoot$archiveFile\include -Force -Recurse# 复制授权文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release license includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

gtest

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "gtest-1.17.0-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\gmock.dll -Destination $outputRoot$archiveFile\debug\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\gmock_main.dll -Destination $outputRoot$archiveFile\debug\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\gtest.dll -Destination $outputRoot$archiveFile\debug\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\gtest_main.dll -Destination $outputRoot$archiveFile\debug\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\gmock.lib -Destination $outputRoot$archiveFile\debug\lib -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\gtest.lib -Destination $outputRoot$archiveFile\debug\lib -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib\pkgconfig -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\pkgconfig\gmock.pc -Destination $outputRoot$archiveFile\debug\lib\pkgconfig -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\pkgconfig\gmock_main.pc -Destination $outputRoot$archiveFile\debug\lib\pkgconfig -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\pkgconfig\gtest.pc -Destination $outputRoot$archiveFile\debug\lib\pkgconfig -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\pkgconfig\gtest_main.pc -Destination $outputRoot$archiveFile\debug\lib\pkgconfig -Force
# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\gmock.dll -Destination $outputRoot$archiveFile\release\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\gmock_main.dll -Destination $outputRoot$archiveFile\release\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\gtest.dll -Destination $outputRoot$archiveFile\release\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\gtest_main.dll -Destination $outputRoot$archiveFile\release\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\gmock.lib -Destination $outputRoot$archiveFile\release\lib -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\gtest.lib -Destination $outputRoot$archiveFile\release\lib -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib\pkgconfig -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\pkgconfig\gmock.pc -Destination $outputRoot$archiveFile\release\lib\pkgconfig -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\pkgconfig\gmock_main.pc -Destination $outputRoot$archiveFile\release\lib\pkgconfig -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\pkgconfig\gtest.pc -Destination $outputRoot$archiveFile\release\lib\pkgconfig -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\pkgconfig\gtest_main.pc -Destination $outputRoot$archiveFile\release\lib\pkgconfig -Force# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\gmock -Destination $outputRoot$archiveFile\include -Force -Recurse
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\gtest -Destination $outputRoot$archiveFile\include -Force -Recurse# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

osg

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "osg-3.6.5-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\osg*.dll -Destination $outputRoot$archiveFile\debug\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\OpenThreadsd.dll -Destination $outputRoot$archiveFile\debug\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\plugins\osgPlugins-3.6.5\*.dll -Destination $outputRoot$archiveFile\debug\bin -Force -Recurse# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\osg*.dll -Destination $outputRoot$archiveFile\release\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\OpenThreads.dll -Destination $outputRoot$archiveFile\release\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\plugins\osgPlugins-3.6.5\*.dll -Destination $outputRoot$archiveFile\release\bin -Force -Recurse# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\OpenThreads -Destination $outputRoot$archiveFile\include -Force -Recurse
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\osg* -Destination $outputRoot$archiveFile\include -Force -Recurse# 复制授权文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release license includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

osgearth

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "osgEarth-3.7.2-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\osgEarth*.dll -Destination $outputRoot$archiveFile\debug\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\plugins\osgPlugins-3.6.5\*.dll -Destination $outputRoot$archiveFile\debug\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\osgEarth*.dll -Destination $outputRoot$archiveFile\debug\lib -Force# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\osgEarth*.dll -Destination $outputRoot$archiveFile\release\bin -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\plugins\osgPlugins-3.6.5\*.dll -Destination $outputRoot$archiveFile\release\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\osgEarth*.dll -Destination $outputRoot$archiveFile\release\lib -Force# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\osgEarth* -Destination $outputRoot$archiveFile\include -Force -Recurse# 复制授权文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release license includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

proj

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "proj-9.6.2-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\proj_9_d.dll -Destination $outputRoot$archiveFile\debug\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\proj_d.lib -Destination $outputRoot$archiveFile\debug\lib -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib\cmake -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib\cmake\proj -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj4-targets.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj4-targets-debug.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj-config.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj-config-version.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj-targets.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj-targets-debug.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib\cmake\proj4 -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj4-targets.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj4 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj4-targets-debug.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj4 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj4-config.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj4-config-version.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj4 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj-targets.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj4 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj-targets-debug.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\proj4 -Force# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\proj_9.dll -Destination $outputRoot$archiveFile\release\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\proj.lib -Destination $outputRoot$archiveFile\release\lib -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib\cmake -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib\cmake\proj -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj4-targets.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj4-targets-release.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj-config.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj-config-version.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj-targets.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj\proj-targets-release.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib\cmake\proj4 -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj4-targets.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj4 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj4-targets-release.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj4 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj4-config.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj4-config-version.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj4 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj-targets.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj4 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\proj4\proj-targets-release.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\proj4 -Force# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\geodesic.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\proj.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\proj_constants.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\proj_experimental.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\proj -Destination $outputRoot$archiveFile\include -Force -Recurse# 复制授权文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null# 复制参考手册文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share\man -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share\man\man1 -Force | Out-Null# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release share license includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

qt

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "qt-5.15.16-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# bin
New-Item -ItemType Directory -Path $outputRoot$archiveFile\bin -Force | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\bin\Qt5*.dll $outputRoot$archiveFile\bin -Force -Recurse | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\debug\bin\Qt5*.dll $outputRoot$archiveFile\bin -Force -Recurse | Out-Null# doc
New-Item -ItemType Directory -Path $outputRoot$archiveFile\doc -Force | Out-Null# include
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\include\qt5 $outputRoot$archiveFile\include -Force -Recurse | Out-Null# lib
New-Item -ItemType Directory -Path $outputRoot$archiveFile\lib -Force | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\lib\Qt5*.lib $outputRoot$archiveFile\lib -Force -Recurse | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\lib\Qt5*.prl $outputRoot$archiveFile\lib -Force -Recurse | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\debug\lib\Qt5*.lib $outputRoot$archiveFile\lib -Force -Recurse | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\debug\lib\Qt5*.prl $outputRoot$archiveFile\lib -Force -Recurse | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\lib\cmake -Force | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\share\cmake $outputRoot$archiveFile\lib -Force -Recurse | Out-Null# license
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null# mkspecs
New-Item -ItemType Directory -Path $outputRoot$archiveFile\mkspecs -Force | Out-Null# phrasebooks
New-Item -ItemType Directory -Path $outputRoot$archiveFile\phrasebooks -Force | Out-Null# plugins
New-Item -ItemType Directory -Path $outputRoot$archiveFile\plugins -Force | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\plugins\*.dll $outputRoot$archiveFile\plugins -Force -Recurse | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\debug\plugins\*.dll $outputRoot$archiveFile\plugins -Force -Recurse | Out-Null# translations
New-Item -ItemType Directory -Path $outputRoot$archiveFile\translations -Force | Out-Null# tools
New-Item -ItemType Directory -Path $outputRoot$archiveFile\tools -Force | Out-Null
Copy-Item $vcpkgRoot\installed\x64-windows\tools\qt5 $outputRoot$archiveFile\tools -Force -Recurse | Out-Null# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt bin doc include lib license mkspecs phrasebooks plugins translations toolsWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

sdl

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "sdl-2.32.8-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# cmake目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile\cmake -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\sdl2\SDL2Config.cmake -Destination $outputRoot$archiveFile\cmake -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\sdl2\SDL2ConfigVersion.cmake -Destination $outputRoot$archiveFile\cmake -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\sdl2\SDL2Targets.cmake -Destination $outputRoot$archiveFile\cmake -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\sdl2\SDL2Targets-debug.cmake -Destination $outputRoot$archiveFile\cmake -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\sdl2\SDL2Targets-release.cmake -Destination $outputRoot$archiveFile\cmake -Force# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\SDL2d.dll -Destination $outputRoot$archiveFile\debug\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\SDL2d.lib -Destination $outputRoot$archiveFile\debug\lib -Force# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\SDL2.dll -Destination $outputRoot$archiveFile\release\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\SDL2.lib -Destination $outputRoot$archiveFile\release\lib -Force# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include\SDL2 -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\SDL2 -Destination $outputRoot$archiveFile\include -Force -Recurse# 复制授权文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null
$copyParams = @{Path = "$vcpkgRoot\installed\x64-windows\licenses\SDL2\LICENSE.txt"Destination = "$outputRoot$archiveFile\license\sdl-2.32.8.txt"
}
Copy-Item @copyParams# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt cmake debug release license includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

sqlite3

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "sqlite-3.50.2-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\sqlite3.dll -Destination $outputRoot$archiveFile\debug -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\sqlite3.lib -Destination $outputRoot$archiveFile\debug -Force# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\sqlite3.dll -Destination $outputRoot$archiveFile\release -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\sqlite3.lib -Destination $outputRoot$archiveFile\release -Force# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\sqlite3.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\sqlite3ext.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\sqlite3-vcpkg-config.h -Destination $outputRoot$archiveFile\include -Force# 复制授权文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release license includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

tiff

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "tiff-4.7.0-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# 复制debug文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\bin\tiffd.dll -Destination $outputRoot$archiveFile\debug\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\tiffd.lib -Destination $outputRoot$archiveFile\debug\lib -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib\pkgconfig -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\pkgconfig/libtiff-4.pc -Destination $outputRoot$archiveFile\debug\lib\pkgconfig -Force# 复制release文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\tiff.dll -Destination $outputRoot$archiveFile\release\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\tiff.lib -Destination $outputRoot$archiveFile\release\lib -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib\pkgconfig -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\pkgconfig/libtiff-4.pc -Destination $outputRoot$archiveFile\release\lib\pkgconfig -Force# 复制头文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\tiff.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\tiffconf.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\tiffio.h -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\tiffio.hxx -Destination $outputRoot$archiveFile\include -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\tiffvers.h -Destination $outputRoot$archiveFile\include -Force# 复制授权文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\license -Force | Out-Null# 复制参考手册文件
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share\man -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share\man\man1 -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share\man\man3 -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share\doc -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\share\doc\tiff -Force | Out-Null# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release share license includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

tinyxml2

# 变量
$vcpkgRoot = "C:\vcpkg"
$outputRoot = "D:\"
$archiveFile = "tinyxml2-11.0.0-x64-vs2022"
$fmt = ".tar.gz"# 清理已有文件
if(Test-Path $outputRoot$archiveFile){Remove-Item $outputRoot$archiveFile -Recurse -ForceRemove-Item $outputRoot$archiveFile$fmt -Force
}# 创建目录
New-Item -ItemType Directory -Path $outputRoot$archiveFile -Force | Out-Null# debug
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\bin -Force | Out-Null
$copyParams = @{Path = "$vcpkgRoot\installed\x64-windows\debug\bin\tinyxml2.dll"Destination = "$outputRoot$archiveFile\debug\bin\tinyxml2d.dll"
}
Copy-Item @copyParams
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\tinyxml2.lib -Destination $outputRoot$archiveFile\debug\lib\tinyxml2d.lib -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib\cmake -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib\cmake\tinyxml2 -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\tinyxml2\tinyxml2-config.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\tinyxml2 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\tinyxml2\tinyxml2-config-version.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\tinyxml2 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\tinyxml2\tinyxml2-shared-targets.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\tinyxml2 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\tinyxml2\tinyxml2-shared-targets-debug.cmake -Destination $outputRoot$archiveFile\debug\lib\cmake\tinyxml2 -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\debug\lib\pkgconfig -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\debug\lib\pkgconfig\tinyxml2.pc -Destination $outputRoot$archiveFile\debug\lib\pkgconfig -Force# release
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\bin -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\bin\tinyxml2.dll -Destination $outputRoot$archiveFile\release\bin -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\tinyxml2.lib -Destination $outputRoot$archiveFile\release\lib -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib\cmake -Force | Out-Null
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib\cmake\tinyxml2 -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\tinyxml2\tinyxml2-config.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\tinyxml2 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\tinyxml2\tinyxml2-config-version.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\tinyxml2 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\tinyxml2\tinyxml2-shared-targets.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\tinyxml2 -Force
Copy-Item -Path $vcpkgRoot\installed\x64-windows\share\tinyxml2\tinyxml2-shared-targets-release.cmake -Destination $outputRoot$archiveFile\release\lib\cmake\tinyxml2 -Force
New-Item -ItemType Directory -Path $outputRoot$archiveFile\release\lib\pkgconfig -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\lib\pkgconfig\tinyxml2.pc -Destination $outputRoot$archiveFile\release\lib\pkgconfig -Force# include
New-Item -ItemType Directory -Path $outputRoot$archiveFile\include -Force | Out-Null
Copy-Item -Path $vcpkgRoot\installed\x64-windows\include\tinyxml2.h -Destination $outputRoot$archiveFile\include -Force# 压缩文件
if(Get-Command tar -ErrorAction SilentlyContinue){$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"Set-Location $outputRoot$archiveFiletar -cvzf $outputRoot$archiveFile$fmt debug release includeWrite-Host "已创建压缩包: $outputRoot$archiveFile$fmt"
}
else {Write-Error "未找到tar命令,请确保:"Write-Error "1. Windows版本 >= 1709 (Windows 10 Fall Creators Update)"Write-Error "2. 在'程序和功能'中启用了'Tar'功能"exit 1
}

使用脚本自动打包,vcpkg库版本更新后可以快速更新。同时可以作为Linux下依赖库更新的参考。

替换

将压缩包文件复制到源码对应位置,如果名称相同就替换。

修改源码

更新源码中各个依赖库的版本字符串。

  • 各目录中的CMakeLists.txt文件中的SWDEV_XXX_PACKAGE对应版本。
  • swdev/src/tools/3rd_parth-cmake/目录下的文件名版本。

编译

按照AFSIM入门教程03.01:Windows下编译中的步骤,编译源码。

编译时解决编译过程中出现的所有问题。

我这里遇到一个大问题,osgEarth的API变化很大,而我又是刚接触,不敢更新API接口。编译到此结束,等我熟悉了以后再继续。

尽量不要更新官方依赖库版本。

本文首发于:AFSIM入门教程03.03:更新所有依赖库版本

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/news/917856.shtml
繁体地址,请注明出处:http://hk.pswp.cn/news/917856.shtml
英文地址,请注明出处:http://en.pswp.cn/news/917856.shtml

如若内容造成侵权/违法违规/事实不符,请联系英文站点网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

完美解决hive external表中csv字段内容含“,“逗号的问题

为解决hive表中csv字段内容含","逗号的问题,网上几乎都是说要用org.apache.hadoop.hive.serde2.OpenCSVSerde。 使用方法为: 1、mysql导出时,加一个ENCLOSED BY ‘"’, 示例: mysql -h 10.16.0.10 -P …

【Git】修改本地和远程的分支名称

其原理是: 对于本地:可直接修改分支名称;对于远程:不可直接重命名分支,所以应该将修改好名称的分支以新分支的形式推送上远程仓库,之后将新分支与远程新分支关联,之后可选择删除旧分支# 例子&am…

ubuntu24.04安装selenium、chrome、chromedriver

实验环境:kaggle notebook、colab notebook1、安装chrome!wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb!sudo dpkg -i google-chrome-stable_current_amd64.deb!sudo apt-get install -f!export QT_QPA_PLATFORMoffscreen!sudo…

西门子PLC基础指令6:读取时钟指令、设置时钟指令、使能含义与注意

读/写指令 1. 读取时钟 指令 READ_RTCREAD_RTC (RTC 全称是 Real - Time Clock,即实时时钟 )指令的主要作用是将 CPU 内部实时时钟(RTC)的当前日期和时间信息读取出来,并存储到以指定字节地址(图…

GeoTools 结合 OpenLayers 实现缓冲区分析

前言❝ 缓冲区分析是地理信息系统(GIS)空间分析的核心功能之一。它通过围绕点、线或面等地理实体,自动生成指定距离(或宽度)的等距区域(缓冲区)。该功能为量化空间邻近度、评估影响范围、识别潜…

SpringBoot 接入SSE实现消息实时推送的优点,原理以及实现

SpringBoot 接入SSE实现消息实时推送的优点,原理以及实现 前言 上一篇文章 我写的关于SpringBoot整合t-io是websocket实时通信的文章中我们可以了解到 websocket是双向通信的,而且需要TCP连接的支持,今天在这里我要说的SSE(Server-Sent Events) 是一个单项通信的消息实时推…

创建型设计模式:对象诞生的艺术与智慧

🎭 创建型设计模式:对象诞生的艺术与智慧 💡 温馨提示:本文将以轻松有趣的方式带你探索设计模式的世界,就像在听一个关于"如何优雅地生孩子"的故事一样! 🚪 传送门:在开始…

如何解决pip安装报错ModuleNotFoundError: No module named ‘gensim’问题

【Python系列Bug修复PyCharm控制台pip install报错】如何解决pip安装报错ModuleNotFoundError: No module named ‘gensim’问题 摘要 在使用 PyCharm 2025 进行 Python 开发时,常常需要通过 pip install 安装第三方包以丰富项目功能。但在安装 gensim 等包时&…

【嵌入式电机控制#26】BLDC:三相模拟采集

之前有些网友试着用有刷的平均电流法采集三相,还搞了个闭环控制。求!结果直接把驱动板给干没了......做过仿真的朋友们都知道,无刷电机的相电流波形是介于方波和正弦波的。如果拿平均电流去测量,很不靠谱。这节内容为大家分享采集…

ref存储对象和reactive深度响应式递归地对对象的嵌套属性进行响应式处理

ref 不会递归地对 对象 或 数组 中的每个属性或元素进行深度响应式处理。如果你需要递归处理嵌套属性,reactive 是更适合的选择。让我通过具体的例子来展示这一点。 例子:ref 存储对象和嵌套对象 1. 使用 ref 存储嵌套对象: import { createA…

小鹏汽车前端面经

前端基础与浏览器机制 (Front-End Fundamentals & Browser Mechanics) 这些问题涵盖了Web工作的基本原理,包括网络、渲染和浏览器特性。 1. 浏览器渲染与性能 (Browser Rendering & Performance) URL输入发生什么?(What happens when you type a…

利用DeepSeek编写go语言按行排序程序

听说google出品的go语言也是系统开发中常用的,性能到底怎么样,还是老办法,让DeepSeek写个程序跑一下,基于以往的经验,直接让它同时编写有缓冲和无缓冲版本。 package mainimport ("bufio""fmt"&qu…

《解构Angular组件变化检测:从自动到手 动的效能突破》

为何有时数据更新后视图却无动于衷?为何看似简单的操作会引发连锁式的性能损耗?要解开这些疑问,需要穿透表层的API调用,深入到框架设计的底层逻辑中去。变化检测的核心使命,是确保视图层能够准确反映数据层的当前状态。这种"数据-视图"的同步关系,是所有前端框…

书单 | AI编程+Python+Go三大核心领域书单

这份书单聚焦AI编程、Python开发、Go语言三大核心领域,精选6本本月 最具前瞻性的技术图书,为你构建"工具链业务层系统层"的全栈能力。 1、人人皆可Vibe编程:玩转氛围编程 作者:池志炜,薛志荣 本书围绕Vibe编程这一AI驱…

Kali Linux 2025.2基于MITRE ATTCK框架

从彻底革新的菜单结构到新增的13款尖端工具,再到首次支持智能手表Wi-Fi注入,Kali Linux 2025.2为红队、蓝队以及安全研究人员提供了更高效、更直观的工具生态。菜单结构大变革:基于MITRE ATT&CK框架Kali Linux 2025.2最引人注目的变化之一…

javacc实现简单SQL解析器

文章目录前言本章节源码需求1:实现一个最简单的select sql要求实现jj文件编译测试需求2:理解Token及其他属性说明javajj文件需求3:实现解析得到SQL语法树 & 精确点位资料获取前言 博主介绍:✌目前全网粉丝4W,csdn…

Odoo OWL前端框架全面学习指南 (后端开发者视角)

核心理念: 将您熟悉的Odoo后端MVCORM架构思想,完整映射到前端OWL组件化开发中,让您在熟悉的概念体系下,快速掌握新的技术栈。第一部分:核心概念映射与环境搭建内容摘要: 本部分旨在建立后端与前端最核心的概…

Java开发工具包,jdk,idea,VMware,rocketmq,redis,CentOS7

Java开发工具包,jdk,idea,VMware,rocketmq,redis,CentOS7 下载地址 通过网盘分享的文件:Java开发环境工具包 链接: https://pan.baidu.com/s/1eJqvPx5DYqtmXgmEtOl8-A?pwdcj1f 提取码: cj1f –…

macOS Python 安装

目录 一、确认系统环境 二、安装 (一)下载安装包 (二)安装过程 三、配置环境变量 四、验证安装 一、确认系统环境 在安装 Python 之前,我们先简单了解一下自己的 MACOS 系统。可以点击屏幕左上角的苹果菜单&…

MySQL 全方位解析:从基础到高可用架构

1. 介绍 (Introduction) 1.1. 什么是 MySQL? MySQL 是全球最受欢迎的开源关系型数据库管理系统 (Relational Database Management System, RDBMS)。它由瑞典的 MySQL AB 公司开发,现隶属于 Oracle 公司。MySQL 将数据存储在不同的、预先定义好结构的表中…