新增了客户端打包成sdk的功能和服务端docker镜像打包的功能,并修复了一些问题
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$SdkRoot,
|
||||
|
||||
[string]$ReleaseDir = (Get-Location).Path,
|
||||
|
||||
[switch]$OverwriteConfig
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$sdk = (Resolve-Path $SdkRoot).Path
|
||||
$release = (Resolve-Path $ReleaseDir).Path
|
||||
|
||||
$binDir = Join-Path $sdk "bin"
|
||||
$configDir = Join-Path $sdk "config"
|
||||
$appConfig = Join-Path $configDir "app_config.json"
|
||||
$publicKey = Join-Path $configDir "manifest_public_key.pem"
|
||||
|
||||
foreach ($path in @($binDir, $appConfig, $publicKey)) {
|
||||
if (-not (Test-Path $path)) {
|
||||
throw "SDK file is missing: $path"
|
||||
}
|
||||
}
|
||||
|
||||
Copy-Item (Join-Path $binDir "*") $release -Recurse -Force
|
||||
|
||||
$targetConfigDir = Join-Path $release "config"
|
||||
New-Item $targetConfigDir -ItemType Directory -Force | Out-Null
|
||||
|
||||
$targetAppConfig = Join-Path $targetConfigDir "app_config.json"
|
||||
if ((-not (Test-Path $targetAppConfig)) -or $OverwriteConfig) {
|
||||
Copy-Item $appConfig $targetAppConfig -Force
|
||||
} else {
|
||||
Write-Host "Keep existing config/app_config.json. Use -OverwriteConfig to replace it."
|
||||
}
|
||||
|
||||
Copy-Item $publicKey (Join-Path $targetConfigDir "manifest_public_key.pem") -Force
|
||||
|
||||
Write-Host "SDK files installed to: $release"
|
||||
Write-Host "Next: edit config/app_config.json, then start Launcher.exe."
|
||||
Reference in New Issue
Block a user