/
klischa
/
AstraScanner2
Обзор
Документация
Войти
/
klischa
/
AstraScanner2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
deploy.ps1
55 строк
2 KB
k k
Сборка: добавлены post-build копии, README-DEV, исправлены ошибки статических переменных
09 май 2026, 17:19
09 май 2026, 17:19
5277c49
Код
Авторство
О чём код?
# deploy.ps1 - Script to deploy the application $sourceExe = "build/Release/AstraScanner.exe" $destDir = "dist" # Check if the executable exists if (-not (Test-Path $sourceExe)) { Write-Host "Error: $sourceExe not found. Build the project first." -ForegroundColor Red exit 1 } # Remove old dist folder if (Test-Path $destDir) { Remove-Item $destDir -Recurse -Force } # Create new dist folder New-Item -ItemType Directory -Path $destDir | Out-Null # Copy executable Copy-Item $sourceExe -Destination $destDir Write-Host "Copied: AstraScanner.exe" -ForegroundColor Green # Copy OpenNI2 if exists $openni2Dir = "C:/Program Files/OpenNI2" if (Test-Path $openni2Dir) { Copy-Item $openni2Dir -Destination "$destDir/OpenNI2" -Recurse -Force Write-Host "Copied: OpenNI2" -ForegroundColor Green } else { Write-Host "Warning: OpenNI2 not found in C:/Program Files/OpenNI2" -ForegroundColor Yellow } # Copy Qt platforms $qtPluginsDir = "C:/dev/vcpkg/installed/x64-windows/tools/qt6/plugins" if (Test-Path $qtPluginsDir) { Copy-Item "$qtPluginsDir/platforms" -Destination "$destDir/platforms" -Recurse -Force Write-Host "Copied: Qt platforms" -ForegroundColor Green } else { Write-Host "Warning: Qt plugins not found" -ForegroundColor Yellow } # Copy vcpkg runtime DLLs $vcpkgBinDir = "C:/dev/vcpkg/installed/x64-windows/bin" if (Test-Path $vcpkgBinDir) { Get-ChildItem $vcpkgBinDir -Filter "*.dll" | ForEach-Object { Copy-Item $_.FullName -Destination $destDir -Force } Write-Host "Copied DLLs from vcpkg/bin" -ForegroundColor Green } else { Write-Host "Warning: vcpkg bin directory not found" -ForegroundColor Yellow } Write-Host "=====================================" -ForegroundColor Cyan Write-Host "Done! You can now run: $destDir/AstraScanner.exe" -ForegroundColor Cyan Write-Host "Deployment folder created: $destDir" -ForegroundColor Cyan