WinForms app with Elfisa.UI, API integration, order workflow, invoices/refusals sync, and production-ready fixes from the desktop roadmap. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.4 KiB
PowerShell
33 lines
1.4 KiB
PowerShell
$ErrorActionPreference = "Stop"
|
||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||
$sln = Join-Path $repoRoot "Elfisa.sln"
|
||
$outDir = Join-Path $repoRoot "src\ElectronicPharmacy\bin\Release"
|
||
$distDir = Join-Path $repoRoot "dist\Электронная-Фармация"
|
||
$zipPath = Join-Path $repoRoot "dist\Электронная-Фармация.zip"
|
||
|
||
Write-Host "Building Release..."
|
||
dotnet build $sln -c Release | Out-Host
|
||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||
|
||
if (Test-Path $distDir) { Remove-Item $distDir -Recurse -Force }
|
||
New-Item -ItemType Directory -Path $distDir | Out-Null
|
||
|
||
Copy-Item -Path (Join-Path $outDir "*") -Destination $distDir -Recurse -Force
|
||
|
||
$readme = @"
|
||
# Электронная Фармация
|
||
|
||
1. Распакуйте архив в любую папку.
|
||
2. Запустите ``Электронная Фармация.exe``.
|
||
3. При первом запуске выполните авторизацию (меню АВТОРИЗАЦИЯ).
|
||
4. Укажите Location ID точки в настройках авторизации.
|
||
|
||
База данных: ``Data\efClient.db`` (или ``efClient.db`` рядом с exe).
|
||
"@
|
||
Set-Content -Path (Join-Path $distDir "README.md") -Value $readme -Encoding UTF8
|
||
|
||
if (Test-Path $zipPath) { Remove-Item $zipPath -Force }
|
||
Compress-Archive -Path $distDir -DestinationPath $zipPath -Force
|
||
|
||
Write-Host "Created $zipPath"
|