+- ps: >-
+ $env:Path = "C:\ProxSpace\msys\bin;$env:Path"
+
+
+ #make
+
+ bash -lc -i "pwd;make all"
+
+
+ #some checks
+
+ if(!(Test-Path C:\ProxSpace\pm3\client\proxmark3.exe)){
+
+ throw "Main file proxmark3.exe not exists."
+
+ }
+
+ if(!(Test-Path C:\ProxSpace\pm3\armsrc\obj\fullimage.elf)){
+
+ throw "ARM file fullimage.elf not exists."
+
+ }
+
+ if(!(Test-Path C:\ProxSpace\pm3\client\hardnested\tables\*.bin.z)){
+
+ throw "Files in hardnested\tables not exists."
+
+ }
+
+
+ #copy
+
+ Write-Host "Copy release files..." -NoNewLine -ForegroundColor Yellow
+
+ New-Item -ItemType Directory -Force -Path C:\ProxSpace\Release
+
+ Copy-Item C:\ProxSpace\pm3\client\*.exe C:\ProxSpace\Release
+
+ New-Item -ItemType Directory -Force -Path C:\ProxSpace\Release\arm
+
+ Copy-Item C:\ProxSpace\pm3\armsrc\obj\*.elf C:\ProxSpace\Release\arm
+
+ Copy-Item C:\ProxSpace\pm3\bootrom\obj\*.elf C:\ProxSpace\Release\arm
+
+ New-Item -ItemType Directory -Force -Path C:\ProxSpace\Release\scripts
+
+ Copy-Item C:\ProxSpace\pm3\client\scripts\*.lua C:\ProxSpace\Release\scripts
+
+ New-Item -ItemType Directory -Force -Path C:\ProxSpace\Release\hardnested\tables
+
+ Copy-Item C:\ProxSpace\pm3\client\hardnested\*.bin C:\ProxSpace\Release\hardnested
+
+ Copy-Item C:\ProxSpace\pm3\client\hardnested\tables\*.bin.z C:\ProxSpace\Release\hardnested\tables
+
+ Write-Host "[ OK ]" -ForegroundColor Green
+
+
+ #archive and push
+
+ $releasename=""
+
+ if ($env:appveyor_repo_tag -match "true"){
+
+ $releasename=$env:APPVEYOR_REPO_TAG_NAME + "/"
+
+ }
+
+ $releasename+=$env:APPVEYOR_BUILD_VERSION + " [" + $env:APPVEYOR_REPO_COMMIT.Substring(0, 7) + "]"
+
+
+ Write-Host "Archive and publish release files ($releasename)..." -NoNewLine -ForegroundColor Yellow
+
+ cd C:\ProxSpace
+
+ 7z a release.zip C:\ProxSpace\Release
+
+ Push-AppveyorArtifact release.zip -DeploymentName "$releasename"
+
+ Write-Host "[ OK ]" -ForegroundColor Green
+
+
+ Write-Host "Builded..." -ForegroundColor Yellow