chore: prepare repository for submodule split
This commit is contained in:
+33
-3
@@ -4,7 +4,8 @@ param(
|
||||
[string]$ZipFile = "$PSScriptRoot/dist/UpdateClientSDK.zip",
|
||||
[string]$SdkVersion = "0.1.0",
|
||||
[string]$ExampleConfig = "$PSScriptRoot/config/app_config.example.json",
|
||||
[switch]$IncludeDemoMainApp
|
||||
[switch]$IncludeDemoMainApp,
|
||||
[switch]$IncludeQtRuntime
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -46,11 +47,40 @@ $configDir = Join-Path $OutputDir "config"
|
||||
$scriptsDir = Join-Path $OutputDir "scripts"
|
||||
New-Item $binDir,$configDir,$scriptsDir -ItemType Directory -Force | Out-Null
|
||||
|
||||
$excludedTopLevel = @("config", "update", "update_temp")
|
||||
$excludedTopLevel = @("config", "update", "update_temp", "manifest_public_key.pem")
|
||||
if (-not $IncludeDemoMainApp) { $excludedTopLevel += "MainApp.exe" }
|
||||
|
||||
if (-not $IncludeQtRuntime) {
|
||||
$excludedTopLevel += @(
|
||||
"bearer",
|
||||
"iconengines",
|
||||
"imageformats",
|
||||
"platforms",
|
||||
"styles",
|
||||
"translations"
|
||||
)
|
||||
}
|
||||
|
||||
function Test-IsQtRuntimeFile {
|
||||
param([System.IO.FileSystemInfo]$Item)
|
||||
|
||||
if ($IncludeQtRuntime -or $Item.PSIsContainer) {
|
||||
return $false
|
||||
}
|
||||
|
||||
return (
|
||||
$Item.Name -match '^Qt5.*\.dll$' -or
|
||||
$Item.Name -in @(
|
||||
"libEGL.dll",
|
||||
"libGLESv2.dll",
|
||||
"opengl32sw.dll",
|
||||
"d3dcompiler_47.dll"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Get-ChildItem $source -Force | Where-Object {
|
||||
$_.Name -notin $excludedTopLevel
|
||||
$_.Name -notin $excludedTopLevel -and -not (Test-IsQtRuntimeFile $_)
|
||||
} | Copy-Item -Destination $binDir -Recurse -Force
|
||||
|
||||
Copy-Item $exampleConfigPath (Join-Path $configDir "app_config.json") -Force
|
||||
|
||||
Reference in New Issue
Block a user