+30
-11
@@ -135,28 +135,47 @@ dotnet test --collect:"XPlat Code Coverage" --settings CursorLang.Tests\coverage
|
||||
композиционный корень в `App.xaml.cs`, который вместо этого проверяется сквозным
|
||||
запуском приложения.
|
||||
|
||||
## Непрерывная сборка
|
||||
|
||||
Пайплайны лежат в `.gitea/workflows` и работают на Gitea Actions. Запрос
|
||||
на слияние в `master` собирается и проверяется тестами; по тегу вида `v1.2.3.0`
|
||||
проект собирается, проходит тесты, пакуется в MSIX и выкладывается релизом
|
||||
с приложенными пакетами. Номер версии берётся только из тега — тег любого
|
||||
другого вида останавливает прогон в самом начале.
|
||||
|
||||
Обоим пайплайнам нужен runner под Windows с меткой `windows-x64`, на нём —
|
||||
.NET 10 SDK и git-lfs. Выгрузка исходников тянет файлы LFS: без них иконка
|
||||
остаётся текстовой заглушкой и сборка на ней падает. Работать runner должен
|
||||
в интерактивном сеансе рабочего стола — тесты поднимают настоящие окна,
|
||||
а службе в нулевом сеансе ждать нечего.
|
||||
|
||||
Пакет, который несёт релиз, загружается в Partner Center как есть. Identity
|
||||
берётся из переменных репозитория, а если те не заданы — из значений по
|
||||
умолчанию в скрипте: `MSIX_IDENTITY_NAME`, `MSIX_PUBLISHER`
|
||||
и `MSIX_PUBLISHER_DISPLAY_NAME`.
|
||||
|
||||
## Сборка пакета MSIX
|
||||
|
||||
Ни Visual Studio, ни Windows SDK не требуются — `makeappx` и `signtool`
|
||||
поставляются из пакета NuGet. Порядок публикации целиком — от регистрации
|
||||
разработчика до отправки на проверку — описан в
|
||||
Ни Visual Studio, ни Windows SDK не требуются — `makeappx` поставляется из
|
||||
пакета NuGet. Порядок публикации целиком — от регистрации разработчика
|
||||
до отправки на проверку — описан в
|
||||
[Packaging/PUBLISHING.RU.md](Packaging/PUBLISHING.RU.md).
|
||||
|
||||
```powershell
|
||||
# Разово: отрисовать логотипы и иконку exe (уже в репозитории, повторить после правок)
|
||||
powershell -File Packaging\New-Assets.ps1
|
||||
|
||||
# Сборка и подпись для локальной проверки
|
||||
powershell -File Packaging\build-msix.ps1 -Architectures x64 -Sign
|
||||
# Проверка на своей машине: только своя архитектура
|
||||
powershell -File Packaging\build-msix.ps1 -Architectures x64
|
||||
|
||||
# Сборка для Store — identity берётся из Partner Center
|
||||
# Для Partner Center — identity та, что зарезервирована там
|
||||
powershell -File Packaging\build-msix.ps1 -Version 1.0.1.0 `
|
||||
-IdentityName 12345Alrakis.CursorLang -Publisher "CN=ABCD1234-..."
|
||||
-IdentityName 12345AleksandrNeychev.CursorLang -Publisher "CN=ABCD1234-..."
|
||||
```
|
||||
|
||||
Результат — `artifacts\packages\CursorLang-<version>.msixbundle`, покрывающий x64
|
||||
и arm64. Загружать в Partner Center его нужно неподписанным — Store подписывает
|
||||
пакет собственным сертификатом.
|
||||
Результат — `artifacts\packages\CursorLang-<версия>.msixbundle`, покрывающий x64
|
||||
и arm64; рядом лежат пакеты отдельных архитектур. Bundle загружается в Partner
|
||||
Center как есть.
|
||||
|
||||
Приложение поставляется с собственной копией .NET: Windows не включает .NET 10, а
|
||||
MSIX не может установить среду выполнения как зависимость пакета.
|
||||
@@ -166,5 +185,5 @@ MSIX не может установить среду выполнения как
|
||||
|
||||
```powershell
|
||||
Add-AppxPackage -Register artifacts\layout\x64\AppxManifest.xml
|
||||
Remove-AppxPackage (Get-AppxPackage -Name Alrakis.CursorLang).PackageFullName
|
||||
Remove-AppxPackage (Get-AppxPackage -Name CursorLang).PackageFullName
|
||||
```
|
||||
|
||||
@@ -133,28 +133,46 @@ What stays uncovered is what a test process cannot reach: the code paths that
|
||||
require an MSIX package identity — `StartupTask` and the package data folder —
|
||||
and the composition root in `App.xaml.cs`, which is exercised end-to-end instead.
|
||||
|
||||
## Continuous integration
|
||||
|
||||
The pipelines live in `.gitea/workflows` and run on Gitea Actions. A pull
|
||||
request into `master` is built and tested; a tag of the form `v1.2.3.0` is built,
|
||||
tested, packed into an MSIX and published as a release with the packages
|
||||
attached. The version is taken from the tag alone — a tag shaped any other way
|
||||
stops the run right at the start.
|
||||
|
||||
Both pipelines ask for a Windows runner labelled `windows-x64` with the .NET 10
|
||||
SDK and git-lfs on it. The checkout pulls LFS files: without them the icon is a
|
||||
text pointer and the build fails on it. The runner has to work in an interactive
|
||||
desktop session — the tests raise real windows, and a service in session 0 has
|
||||
nothing for them to wait for.
|
||||
|
||||
The package the release carries goes to Partner Center as it is. The identity
|
||||
comes from repository variables and falls back to the defaults of the script when
|
||||
unset: `MSIX_IDENTITY_NAME`, `MSIX_PUBLISHER` and `MSIX_PUBLISHER_DISPLAY_NAME`.
|
||||
|
||||
## Building the MSIX package
|
||||
|
||||
Neither Visual Studio nor the Windows SDK is required — `makeappx` and
|
||||
`signtool` come from a NuGet package. The full publishing procedure — from
|
||||
opening a developer account to submitting for certification — is written up in
|
||||
Neither Visual Studio nor the Windows SDK is required — `makeappx` comes from a
|
||||
NuGet package. The full publishing procedure — from opening a developer account
|
||||
to submitting for certification — is written up in
|
||||
[Packaging/PUBLISHING.RU.md](Packaging/PUBLISHING.RU.md) (Russian only).
|
||||
|
||||
```powershell
|
||||
# One-off: draw the logos and the exe icon (already committed, rerun after edits)
|
||||
powershell -File Packaging\New-Assets.ps1
|
||||
|
||||
# Build and sign for local testing
|
||||
powershell -File Packaging\build-msix.ps1 -Architectures x64 -Sign
|
||||
# A check on your own machine: your architecture alone
|
||||
powershell -File Packaging\build-msix.ps1 -Architectures x64
|
||||
|
||||
# Build for the Store — identity comes from Partner Center
|
||||
# For Partner Center — the identity is the one reserved there
|
||||
powershell -File Packaging\build-msix.ps1 -Version 1.0.1.0 `
|
||||
-IdentityName 12345Alrakis.CursorLang -Publisher "CN=ABCD1234-..."
|
||||
-IdentityName 12345AleksandrNeychev.CursorLang -Publisher "CN=ABCD1234-..."
|
||||
```
|
||||
|
||||
The result is `artifacts\packages\CursorLang-<version>.msixbundle` covering x64
|
||||
and arm64. Upload it to Partner Center unsigned — the Store signs it with its own
|
||||
certificate.
|
||||
and arm64; next to it lie the packages of single architectures. Upload the bundle
|
||||
to Partner Center as it is.
|
||||
|
||||
The app ships with its own copy of .NET: Windows does not include .NET 10, and
|
||||
MSIX cannot install a runtime as a package dependency.
|
||||
@@ -164,5 +182,5 @@ needs Developer Mode and no signature at all:
|
||||
|
||||
```powershell
|
||||
Add-AppxPackage -Register artifacts\layout\x64\AppxManifest.xml
|
||||
Remove-AppxPackage (Get-AppxPackage -Name Alrakis.CursorLang).PackageFullName
|
||||
Remove-AppxPackage (Get-AppxPackage -Name CursorLang).PackageFullName
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user