elfisa-pharmacy/dist/build-release.ps1
Magomed d1740d49bf Initial commit: Электронная Фармация desktop client.
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>
2026-07-14 12:25:38 +03:00

33 lines
1.4 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$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"