24 コミット
作成者 SHA1 メッセージ 日付
routersys c3449f6654 Gitea Actions のワークフローを直す 2026-11-08 13:05:39 +09:00
routersys 97abd7fe22 Gitea Actions のワークフローを直す 2026-11-08 10:15:15 +09:00
routersys 2260e9c183 Gitea Actions のワークフローを直す 2026-11-08 09:48:13 +09:00
routersys 6400a9ed48 過去のタグ用ワークフローを消す 2026-11-08 03:57:46 +09:00
routersys 3d0105fdef Gitea Actions のワークフローを直す 2026-11-08 03:55:50 +09:00
routersys 76d77338c1 Gitea Actions の過去のタグ用ワークフローを足す 2026-11-08 01:34:02 +09:00
routersys 7d01af537f Gitea Actions の過去のタグ用ワークフローを足す 2026-11-08 01:06:30 +09:00
routersys 1c67230855 Gitea Actions の過去のタグ用ワークフローを足す 2026-11-07 23:50:54 +09:00
routersys 6ba29fc0e3 Gitea Actions の過去のタグ用ワークフローを足す 2026-11-07 22:35:34 +09:00
routersys 5af00f60ce Gitea Actions のワークフローを直す 2026-11-07 22:07:49 +09:00
routersys d660676f4a Gitea Actions のワークフローを直す 2026-11-07 21:53:27 +09:00
routersys 6495c2a642 Gitea Actions のワークフローを足す 2026-11-07 19:52:53 +09:00
routersys f45b32d43e 画像の参照先をGiteaへ移す 2026-11-07 18:21:31 +09:00
routersys d5181753ed サブモジュールの参照先をGiteaへ移す 2026-11-07 18:17:31 +09:00
routersys 0afd1eecf4 不具合の報告の説明を送信の上限と項目へ合わせる 2026-11-02 11:35:42 +09:00
routersys b4d2e00655 不具合の報告の記載を実装に合わせる 2026-10-04 09:24:08 +09:00
routersys 171000d271 バージョンをv2.0.2へ更新する
リリース / build-and-release (workflow_dispatch) Actions がタグ v2.0.2 のコミットから作成しました
2026-10-03 17:22:49 +09:00
routersys 1c1d206b86 資源が回収された後の処理器の描画の試験を追加する 2026-10-03 17:08:21 +09:00
routersys 9228917700 格子の資源が回収された後に計算し直す試験を追加する 2026-10-03 17:08:21 +09:00
routersys 9604213016 格子の資源が回収された後の描画の試験を追加する 2026-10-03 17:08:20 +09:00
routersys 9808924782 回収された格子の資源を描画の前に作り直す
・GPUのメモリが逼迫して資源が回収された後に、描画が失敗し続ける不具合を修正-F
2026-10-03 17:08:20 +09:00
routersys 261bcf45f1 可視範囲の取得から使われない引数を除く 2026-09-26 00:06:08 +09:00
routersys 8461aab4cd Textsの名前空間をファイル形式にする 2026-09-26 00:06:08 +09:00
routersys a91acb6a93 エディターのコード規則を追加する 2026-09-25 21:40:09 +09:00
14個のファイルの変更、739行の追加、42行の削除

検索条件に一致するファイルはありません

+77
ファイルの表示
@@ -0,0 +1,77 @@
root = true
[*]
indent_style = space
indent_size = 4
tab_width = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{json,yml,yaml}]
indent_size = 2
[*.{csproj,props,targets,vcxproj,filters,slnx,resx,xml}]
charset = unset
indent_style = unset
indent_size = unset
[*.md]
trim_trailing_whitespace = false
[*.cs]
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
dotnet_style_qualification_for_field = false:error
dotnet_style_qualification_for_property = false:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_event = false:error
dotnet_style_predefined_type_for_locals_parameters_members = true:error
dotnet_style_predefined_type_for_member_access = true:error
dotnet_style_readonly_field = true:warning
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_code_quality_unused_parameters = all:warning
csharp_style_namespace_declarations = file_scoped:error
csharp_using_directive_placement = outside_namespace:error
csharp_prefer_braces = when_multiline:silent
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = true:silent
csharp_style_expression_bodied_methods = when_on_single_line:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_prefer_pattern_matching = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_switch_expression = true:suggestion
csharp_style_prefer_readonly_struct = true:warning
csharp_style_prefer_readonly_struct_member = true:warning
csharp_prefer_static_local_function = true:warning
csharp_style_prefer_primary_constructors = true:silent
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
dotnet_diagnostic.IDE0005.severity = warning
dotnet_diagnostic.IDE0055.severity = warning
dotnet_diagnostic.IDE0161.severity = error
[{YMM4-GitHubUpdateNotifier,YMM4-Telemetry,YukkuriMovieMaker.Generator}/**]
dotnet_diagnostic.IDE0005.severity = none
dotnet_diagnostic.IDE0055.severity = none
dotnet_diagnostic.IDE0161.severity = none
[*.{g.cs,designer.cs}]
generated_code = true
dotnet_diagnostic.IDE0005.severity = none
dotnet_diagnostic.IDE0055.severity = none
dotnet_diagnostic.IDE0161.severity = none
+538
ファイルの表示
@@ -0,0 +1,538 @@
name: リリース
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: リリースするタグ
required: true
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: ソースコードのチェックアウト
uses: actions/checkout@v7
env:
GIT_CONFIG_COUNT: "2"
GIT_CONFIG_KEY_0: url.https://git.routersys.com/routersys/.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/routersys/
GIT_CONFIG_KEY_1: url.https://git.routersys.com/manju-summoner/YukkuriMovieMaker.Generator.insteadOf
GIT_CONFIG_VALUE_1: https://github.com/manju-summoner/YukkuriMovieMaker.Generator
with:
ref: ${{ inputs.tag || github.ref_name }}
submodules: recursive
fetch-depth: 0
- name: MSBuild のセットアップ
uses: microsoft/setup-msbuild@v3
- name: YMM4 最新リリースの取得と解凍
id: ymm4
shell: pwsh
run: |
$list = 'C:\runner\cache\ymm4\releases.json'
New-Item -ItemType Directory -Force -Path (Split-Path $list) | Out-Null
if (-not (Test-Path $list) -or (Get-Item $list).Length -lt 1000 -or ((Get-Date) - (Get-Item $list).LastWriteTime).TotalHours -gt 6) {
$fetched = $null
for ($attempt = 1; $attempt -le 6 -and -not $fetched; $attempt++) {
try {
$fetched = Invoke-RestMethod -Uri "https://api.github.com/repos/manju-summoner/YukkuriMovieMaker4/releases?per_page=100" `
-Headers @{ "User-Agent" = "LowPolyAbstraction-CI" } -ErrorAction Stop
}
catch {
$message = $_.Exception.Message
Write-Host "リリース一覧の取得に失敗しました($attempt 回目): $($message.Substring(0, [Math]::Min(80, $message.Length)))"
Start-Sleep -Seconds (5 * $attempt)
}
}
if (@($fetched).Count -gt 0) {
$fetched | Select-Object tag_name, published_at, prerelease, draft, assets |
ConvertTo-Json -Depth 6 | Set-Content -Path $list -Encoding UTF8
}
elseif (-not (Test-Path $list)) { throw 'the list of releases could not be fetched' }
else { Write-Host '保存済みのリリース一覧を使います' }
}
$when = [DateTimeOffset](git log -1 --format=%cI)
$releases = @(Get-Content -Raw -Path $list | ConvertFrom-Json | Where-Object { -not $_.draft -and -not $_.prerelease })
$release = $releases | Where-Object { [DateTimeOffset]$_.published_at -le $when } | Select-Object -First 1
if (-not $release) { $release = $releases | Select-Object -Last 1 }
Write-Host "最後のコミット $when に合わせた YMM4: $($release.tag_name)"
$asset = $release.assets | Where-Object { $_.name -like "*_Lite.zip" } | Select-Object -First 1
if (-not $asset) {
$asset = $release.assets | Where-Object { $_.name -like "*.zip" } | Select-Object -First 1
}
Write-Host "ダウンロード対象: $($asset.name)"
$cache = Join-Path 'C:\runner\cache\ymm4' $asset.name
$extracted = "$cache.extracted"
$lock = New-Object System.Threading.Mutex($false, 'Global\ci-ymm4-cache')
[void]$lock.WaitOne()
try {
if (-not (Test-Path "$extracted\.complete")) {
New-Item -ItemType Directory -Force -Path (Split-Path $cache) | Out-Null
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $cache
Remove-Item -Recurse -Force $extracted -ErrorAction SilentlyContinue
Expand-Archive -Path $cache -DestinationPath $extracted -Force
New-Item -ItemType File -Path "$extracted\.complete" | Out-Null
}
else {
Write-Host "保存済みの YMM4 を使います: $extracted"
}
}
finally {
$lock.ReleaseMutex()
}
$ymm4Dir = (Get-ChildItem -Path $extracted -Recurse -Filter "YukkuriMovieMaker.dll" |
Select-Object -First 1).DirectoryName
Write-Host "YMM4 DLL ディレクトリ: $ymm4Dir"
echo "YMM4_DIR=$ymm4Dir\" >> $env:GITHUB_OUTPUT
- name: タグ名からバージョンを取得
id: version
shell: pwsh
run: |
$tag = "${{ inputs.tag || github.ref_name }}"
echo "TAG=$tag" >> $env:GITHUB_OUTPUT
echo "VERSION=$($tag.TrimStart('v'))" >> $env:GITHUB_OUTPUT
- name: バージョン記載の照合
shell: pwsh
run: |
$tag = "${{ steps.version.outputs.TAG }}"
$version = "${{ steps.version.outputs.VERSION }}"
$problems = @()
$csprojPath = "LowPolyAbstraction/LowPolyAbstraction.csproj"
$csproj = Get-Content $csprojPath -Raw
if (-not $csproj.Contains("<Version>$version</Version>")) {
$current = if ($csproj -match '<Version>([^<]*)</Version>') { $Matches[1] } else { "記載なし" }
$problems += "$csprojPath の <Version> が $current です。$version にしてください。"
}
$readmePath = ".github/Plugin_Readme.txt"
$readme = Get-Content $readmePath -Raw
if (-not $readme.Contains(" ローポリ化 for YMM4 $tag")) {
$current = if ($readme -match '(?m)^ ローポリ化 for YMM4 (\S+)') { $Matches[1] } else { "記載なし" }
$problems += "$readmePath の見出しが $current です。$tag にしてください。"
}
if ($problems.Count -eq 0) {
Write-Host "バージョン記載は $tag と一致しています"
exit 0
}
foreach ($problem in $problems) {
Write-Host "::error::$problem"
}
Write-Host "::error::リリースの対象は $tag が指すコミットです。タグを付けた後で main へ訂正を積んでも、その訂正はリリースに入りません。タグを削除し、記載を直したコミットを積んでから付け直してください。"
exit 1
- name: シェーダーのビルド
shell: pwsh
run: |
msbuild LowPolyAbstraction.Shader/LowPolyAbstraction.Shader.vcxproj `
/p:Configuration=Release `
/p:Platform=Win32 `
/nologo
- name: プロジェクトのビルド
shell: pwsh
run: |
$proj = "LowPolyAbstraction/LowPolyAbstraction.csproj"
dotnet build "$proj" `
-c Release `
-p:YMM4DirPath="${{ steps.ymm4.outputs.YMM4_DIR }}" `
-p:Platform=x64 `
-p:SkipPluginDeploy=true
- name: テストプロジェクトのビルド
shell: pwsh
run: |
dotnet build LowPolyAbstraction.Tests/LowPolyAbstraction.Tests.csproj `
-c Release `
-p:YMM4DirPath="${{ steps.ymm4.outputs.YMM4_DIR }}" `
-p:Platform=x64 `
-p:SkipPluginDeploy=true `
-maxcpucount:1
- name: テストの実行
shell: pwsh
run: |
dotnet test LowPolyAbstraction.Tests/LowPolyAbstraction.Tests.csproj `
--no-build `
--no-restore `
-c Release `
-p:Platform=x64 `
-p:SkipPluginDeploy=true
- name: パッケージの作成
id: package
shell: pwsh
run: |
$version = "${{ steps.version.outputs.TAG }}"
$outDir = "LowPolyAbstraction/bin/x64/Release/net10.0-windows10.0.19041.0"
$stageRoot = "stage/LowPolyAbstraction"
$pkgName = "LowPolyAbstraction_$version.ymme"
New-Item -ItemType Directory -Path $stageRoot -Force | Out-Null
New-Item -ItemType Directory -Path "$stageRoot/LICENSE" -Force | Out-Null
$dll = "$outDir/plugin/LowPolyAbstraction.dll"
if (-not (Test-Path $dll)) {
Write-Error "ビルド結果に LowPolyAbstraction.dll が見つかりませんでした: $dll"
exit 1
}
Copy-Item $dll "$stageRoot/"
foreach ($lang in @("ar-sa", "en-us", "es-es", "id-id", "ko-kr", "zh-cn", "zh-tw")) {
$src = "$outDir/$lang"
if (Test-Path $src) {
New-Item -ItemType Directory -Path "$stageRoot/$lang" -Force | Out-Null
Copy-Item "$src/*.dll" "$stageRoot/$lang/"
}
}
Copy-Item ".github/LICENSE/*.txt" "$stageRoot/LICENSE/"
Copy-Item ".github/Plugin_Readme.txt" "$stageRoot/Readme.txt"
$readme = Get-Content "$stageRoot/Readme.txt" -Raw
if (-not $readme.Contains(" ローポリ化 for YMM4 $version")) {
Write-Error "同梱する Readme.txt の見出しが $version と一致しません"
exit 1
}
Compress-Archive -Path "stage/*" -DestinationPath $pkgName -CompressionLevel Optimal
echo "PKG_NAME=$pkgName" >> $env:GITHUB_OUTPUT
- name: 変更履歴の作成
id: changelog
shell: pwsh
env:
GITEA_TOKEN: ${{ github.token }}
TAG: ${{ steps.version.outputs.TAG }}
REPOSITORY: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
PACKAGE: ${{ steps.package.outputs.PKG_NAME }}
run: |
$tag = $env:TAG
$repository = $env:REPOSITORY
$server = $env:SERVER_URL
$code = [char]0x60
$fence = [string]::new($code, 3)
$unit = [char]0x1f
$record = [char]0x1e
$previous = ""
$candidates = @(git tag --list "v*" --merged $tag --sort=-creatordate | Where-Object { $_ -ne $tag })
if ($candidates.Count -gt 0) {
$previous = $candidates[0]
}
Write-Host "直前のタグ: $previous"
$range = if ($previous) { "$previous..$tag" } else { $tag }
$log = (@(git log "--format=%H%x1f%s%x1f%an%x1f%ad%x1f%b%x1e" --date=short $range) -join "`n") -split $record
$commits = @()
foreach ($entry in $log) {
if (-not $entry.Trim()) { continue }
$fields = $entry.TrimStart("`n") -split $unit
if ($fields.Count -lt 5) { continue }
$commits += [pscustomobject]@{
Sha = $fields[0]
Subject = $fields[1]
Name = $fields[2]
Date = $fields[3]
Body = $fields[4]
Login = ""
Avatar = ""
}
}
Write-Host "コミット数: $($commits.Count)"
$categories = [ordered]@{
A = @{ Title = "追加"; Symbol = "+"; Items = [System.Collections.Generic.List[pscustomobject]]::new() }
M = @{ Title = "変更"; Symbol = "~"; Items = [System.Collections.Generic.List[pscustomobject]]::new() }
D = @{ Title = "削除"; Symbol = "-"; Items = [System.Collections.Generic.List[pscustomobject]]::new() }
F = @{ Title = "修正"; Symbol = "!"; Items = [System.Collections.Generic.List[pscustomobject]]::new() }
}
foreach ($commit in $commits) {
if (-not $commit.Body) { continue }
foreach ($bodyLine in ($commit.Body -split "`n")) {
$trimmed = $bodyLine.Trim()
if ($trimmed -notmatch '^・(.+)-([AMDF])$') { continue }
$categories[$Matches[2]].Items.Add([pscustomobject]@{ Text = $Matches[1]; Sha = $commit.Sha })
}
}
$pending = [System.Collections.Generic.HashSet[string]]::new()
foreach ($commit in $commits) {
[void]$pending.Add($commit.Sha)
}
$headers = @{ Authorization = "token $env:GITEA_TOKEN" }
$accounts = @{}
$page = 1
while ($pending.Count -gt 0 -and $page -le 20) {
$rows = @()
try {
$rows = @(Invoke-RestMethod -Uri "$server/api/v1/repos/$repository/commits?sha=$tag&limit=50&page=$page&stat=false&verification=false&files=false" -Headers $headers)
}
catch {
Write-Host "コミットの作者を取得できませんでした: $($_.Exception.Message)"
break
}
if ($rows.Count -eq 0) { break }
foreach ($row in $rows) {
if ($pending.Remove($row.sha)) {
$login = ""
$avatar = ""
if ($row.author) {
$login = [string]$row.author.login
$avatar = [string]$row.author.avatar_url
}
$accounts[$row.sha] = @{ Login = $login; Avatar = $avatar }
}
}
if ($rows.Count -lt 50) { break }
$page++
}
foreach ($commit in $commits) {
if ($accounts.ContainsKey($commit.Sha)) {
$commit.Login = $accounts[$commit.Sha].Login
$commit.Avatar = $accounts[$commit.Sha].Avatar
}
}
$emptyTree = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
$base = if ($previous) { $previous } else { $emptyTree }
$shortstat = (@(git diff --shortstat $base $tag) -join " ")
$changedFiles = 0
$insertions = 0
$deletions = 0
if ($shortstat -match "(\d+) file") { $changedFiles = [int]$Matches[1] }
if ($shortstat -match "(\d+) insertion") { $insertions = [int]$Matches[1] }
if ($shortstat -match "(\d+) deletion") { $deletions = [int]$Matches[1] }
$diffStat = @(git diff --stat $base $tag)
$tagDate = (git log -1 "--format=%ad" --date=short $tag)
$contributors = @($commits |
Group-Object -Property { if ($_.Login) { $_.Login } else { $_.Name } } |
Sort-Object -Property Count -Descending)
function Get-Icon($avatar, $login, $size) {
if (-not $avatar) { return "" }
$sized = if ($avatar.Contains("?")) { "$avatar&s=$($size * 2)" } else { "$avatar" + "?s=$($size * 2)" }
return "<img src=""$sized"" width=""$size"" height=""$size"" alt=""$login""> "
}
$package = Get-Item $env:PACKAGE
$size = [math]::Round($package.Length / 1MB, 2)
$body = [System.Collections.Generic.List[string]]::new()
$body.Add("## 概要")
$body.Add("")
$body.Add("| 項目 | 内容 |")
$body.Add("|---|---|")
$body.Add("| タグ | [$tag]($server/$repository/tree/$tag) |")
$body.Add("| 公開日 | $tagDate |")
if ($previous) {
$body.Add("| 直前のリリース | [$previous]($server/$repository/releases/tag/$previous) |")
}
$body.Add("| コミット数 | $($commits.Count) |")
$body.Add("| 貢献者 | $($contributors.Count) 名 |")
$body.Add("| 変更されたファイル | $changedFiles |")
$body.Add("| 追加された行 | $insertions |")
$body.Add("| 削除された行 | $deletions |")
$hasHighlights = ($categories.Values | ForEach-Object { $_.Items.Count } | Measure-Object -Sum).Sum -gt 0
if ($hasHighlights) {
$body.Add("")
$body.Add("## 主な変更")
foreach ($key in $categories.Keys) {
$category = $categories[$key]
if ($category.Items.Count -eq 0) { continue }
$body.Add("")
$body.Add("### [$($category.Symbol)] $($category.Title)")
$body.Add("")
foreach ($item in $category.Items) {
$short = $item.Sha.Substring(0, 7)
$body.Add("- $($item.Text) ([$code$short$code]($server/$repository/commit/$($item.Sha)))")
}
}
}
$body.Add("")
$body.Add("## ダウンロード")
$body.Add("")
$body.Add("| ファイル | サイズ |")
$body.Add("|---|---|")
$body.Add("| $($package.Name) | $size MB |")
$body.Add("")
$body.Add("## 貢献者")
$body.Add("")
$body.Add("| 貢献者 | コミット数 |")
$body.Add("|---|---|")
foreach ($contributor in $contributors) {
$first = $contributor.Group[0]
if ($first.Login) {
$name = (Get-Icon $first.Avatar $first.Login 40) + "[@$($first.Login)]($server/$($first.Login))"
}
else {
$name = $first.Name
}
$body.Add("| $name | $($contributor.Count) |")
}
$body.Add("")
$body.Add("## 変更履歴")
$body.Add("")
$body.Add("| コミット | 内容 | 貢献者 | 日付 |")
$body.Add("|---|---|---|---|")
$maximumCommits = 300
$listed = 0
foreach ($commit in $commits) {
if ($listed -ge $maximumCommits) { break }
$short = $commit.Sha.Substring(0, 7)
$subject = $commit.Subject -replace '\|', '\|'
if ($commit.Login) {
$author = (Get-Icon $commit.Avatar $commit.Login 20) + "[@$($commit.Login)]($server/$($commit.Login))"
}
else {
$author = $commit.Name
}
$body.Add("| [$code$short$code]($server/$repository/commit/$($commit.Sha)) | $subject | $author | $($commit.Date) |")
$listed++
}
if ($commits.Count -gt $maximumCommits) {
$body.Add("")
$body.Add("残り $($commits.Count - $maximumCommits) 件のコミットは省略しました。")
}
if ($diffStat.Count -gt 0) {
$body.Add("")
$body.Add("## 変更されたファイル")
$body.Add("")
$body.Add("<details>")
$body.Add("<summary>差分の統計</summary>")
$body.Add("")
$body.Add($fence)
$maximumStatLines = 200
$shown = 0
foreach ($line in $diffStat) {
if ($shown -ge $maximumStatLines) { break }
$body.Add($line)
$shown++
}
if ($diffStat.Count -gt $maximumStatLines) {
$body.Add("... 残り $($diffStat.Count - $maximumStatLines) 行は省略しました。")
}
$body.Add($fence)
$body.Add("")
$body.Add("</details>")
}
if ($previous) {
$body.Add("")
$body.Add("## 全ての変更")
$body.Add("")
$body.Add("$server/$repository/compare/$previous...$tag")
}
$path = "release-body.md"
Set-Content -Path $path -Value ($body -join "`n") -Encoding utf8NoBOM
if (-not (Test-Path $path)) {
throw "変更履歴を作成できませんでした。"
}
Write-Host "変更履歴の行数: $($body.Count)"
$global:LASTEXITCODE = 0
- name: Gitea リリースの作成
shell: pwsh
env:
GITEA_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
EVENT_NAME: ${{ github.event_name }}
WORKFLOW_NAME: ${{ github.workflow }}
JOB_NAME: ${{ github.job }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
RELEASE_NAME: ${{ steps.version.outputs.TAG }}
RELEASE_BODY: ''
RELEASE_BODY_PATH: release-body.md
RELEASE_DRAFT: false
RELEASE_PRERELEASE: false
RELEASE_FILES: |
${{ steps.package.outputs.PKG_NAME }}
run: |
$headers = @{ Authorization = "token $env:GITEA_TOKEN" }
$api = "$env:SERVER_URL/api/v1/repos/$env:REPOSITORY"
$tag = $env:RELEASE_TAG
$body = $env:RELEASE_BODY
if ($env:RELEASE_BODY_PATH -and (Test-Path $env:RELEASE_BODY_PATH)) {
$body = Get-Content $env:RELEASE_BODY_PATH -Raw -Encoding utf8
}
$files = @()
foreach ($pattern in ($env:RELEASE_FILES -split "[`r`n,]+" | Where-Object { $_.Trim() })) {
$found = @(Get-ChildItem -Path $pattern.Trim() -File -ErrorAction SilentlyContinue)
if ($found.Count -eq 0) { throw "リリースに付けるファイルが見つかりません: $pattern" }
$files += $found
}
$payload = @{
tag_name = $tag
name = $env:RELEASE_NAME
body = [string]$body
draft = ($env:RELEASE_DRAFT -eq 'true')
prerelease = ($env:RELEASE_PRERELEASE -eq 'true')
} | ConvertTo-Json
$bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
$existing = $null
try { $existing = Invoke-RestMethod -Uri "$api/releases/tags/$([System.Uri]::EscapeDataString($tag))" -Headers $headers } catch { }
if ($existing) {
$release = Invoke-RestMethod -Method Patch -Uri "$api/releases/$($existing.id)" -Headers $headers -ContentType "application/json; charset=utf-8" -Body $bytes
foreach ($asset in @($existing.assets)) {
Invoke-RestMethod -Method Delete -Uri "$api/releases/$($existing.id)/assets/$($asset.id)" -Headers $headers | Out-Null
}
} else {
$release = Invoke-RestMethod -Method Post -Uri "$api/releases" -Headers $headers -ContentType "application/json; charset=utf-8" -Body $bytes
}
foreach ($file in $files) {
$name = [System.Uri]::EscapeDataString($file.Name)
Invoke-RestMethod -Method Post -Uri "$api/releases/$($release.id)/assets?name=$name" -Headers $headers -Form @{ attachment = Get-Item $file.FullName } | Out-Null
Write-Host "添付しました: $($file.Name)"
}
Write-Host "リリースを作成しました: $($release.html_url)"
if ($env:EVENT_NAME -eq 'workflow_dispatch') {
try {
$sha = (git rev-parse HEAD).Trim()
$status = @{
state = 'success'
context = "$env:WORKFLOW_NAME / $env:JOB_NAME (workflow_dispatch)"
description = "Actions がタグ $tag のコミットから作成しました"
target_url = $env:RUN_URL
} | ConvertTo-Json
Invoke-RestMethod -Method Post -Uri "$api/statuses/$sha" -Headers $headers -ContentType "application/json; charset=utf-8" -Body ([System.Text.Encoding]::UTF8.GetBytes($status)) | Out-Null
Write-Host "タグのコミット $sha に成功の状態を付けました"
}
catch {
Write-Warning "タグのコミットに状態を付けられませんでした: $($_.Exception.Message)"
}
}
+21 -8
ファイルの表示
@@ -1,5 +1,5 @@
========================================
ローポリ化 for YMM4 v2.0.1
ローポリ化 for YMM4 v2.0.2
========================================
YukkuriMovieMaker4上で動作する、素材を三角形の面で塗り分けて
ローポリ画として描画する映像エフェクトプラグインです。
@@ -81,15 +81,22 @@ YukkuriMovieMaker4上で動作する、素材を三角形の面で塗り分け
■ 不具合の報告
--------------------------------------------------------------------------------
本プラグインは、想定していない例外が起きたときに、その内容を開発者へ自動で
送信します。同意は求めず、常に送信します。
送信します。同意は求めません。止める設定もありません。
送信する数には上限があります。YMM4の1回の起動で送る報告は、
YMM4-Telemetryで報告する別のプラグインと合わせて20件までです。
例外の型と発生位置が同じ報告は3件までです。上限を超えた報告と、
送信先から待つよう求められている間に起きた報告は、送信も退避もしません。
送信する情報は次のとおりです。
例外 : 型の完全名、メッセージ、スタックトレース
発生位置 : モジュール名、関数名、ファイル名、行番号
発生位置 : モジュール名、関数名、ファイル名、行番号、
プラグイン自身のコードかどうか
プラグイン : アセンブリ名、バージョン
実行環境 : OSの名前とバージョン、.NETのバージョン、
CPUのアーキテクチャ、論理プロセッサ数
識別子 : YMM4の起動ごとに決まるセッション識別子、報告ごとの識別子
時刻 : 報告を作った時刻(UTC)
映像の中身とプロジェクトの内容は送信しません。継続して個人を追跡する
識別子も持ちません。セッション識別子はYMM4を起動し直すと別の値に
@@ -99,8 +106,10 @@ YukkuriMovieMaker4上で動作する、素材を三角形の面で塗り分け
送信するのは想定していない例外だけです。YMM4が本プラグインのエフェクトを
作るとき、フレームごとに更新するとき、入力をつなぎ直すとき、破棄するときと、
Direct2Dがシェーダーの定数を書き込むときに起きた例外を報告し、その後は
YMM4へそのまま渡します。画面の操作やバックグラウンドの処理で未処理に
なった例外も報告しますが、本プラグインのコードが関わる例外に限ります。
YMM4へそのまま渡します。更新の確認では、更新情報の取得と比較で起きた例外は
報告しません。通知の文を組み立てて表示するときに起きた例外は報告し、
YMM4へは渡しません。画面の操作やバックグラウンドの処理で未処理になった
例外も報告しますが、本プラグインのコードが関わる例外に限ります。
本プラグインの外で起きた例外は送信しません。
次の失敗は送信しません。
@@ -110,10 +119,14 @@ YukkuriMovieMaker4上で動作する、素材を三角形の面で塗り分け
計算領域が上限を超えるときに、
エフェクトを適用せず入力映像を
表示したとき
更新の確認の通信の失敗 : GitHubへ接続できない
更新の確認の通信の失敗 : manjubox.netとGitHubのどちらへも
接続できない
送信できなかった報告はYMM4のユーザーフォルダーへ退避し、次回の起動時に
送り直します。送信も再送も非同期に行うため、起動と描画が遅くなることは
送信できなかった報告はYMM4のユーザーフォルダーへ退避します。
次にYMM4を起動したあと、本プラグインのエフェクトを生成するか、
同じくYMM4-Telemetryで報告する別のプラグインが動き始めると、
退避した報告を1回の起動で10件まで送り直します。
送信も再送も非同期に行うため、通信を待って起動と描画が遅くなることは
ありません。
--------------------------------------------------------------------------------
■ 免責事項
+3 -3
ファイルの表示
@@ -1,9 +1,9 @@
[submodule "YukkuriMovieMaker.Generator"]
path = YukkuriMovieMaker.Generator
url = https://github.com/manju-summoner/YukkuriMovieMaker.Generator.git
url = https://git.routersys.com/manju-summoner/YukkuriMovieMaker.Generator.git
[submodule "YMM4-GitHubUpdateNotifier"]
path = YMM4-GitHubUpdateNotifier
url = https://github.com/routersys/YMM4-GitHubUpdateNotifier.git
url = https://git.routersys.com/routersys/YMM4-GitHubUpdateNotifier.git
[submodule "YMM4-Telemetry"]
path = YMM4-Telemetry
url = https://github.com/routersys/YMM4-Telemetry.git
url = https://git.routersys.com/routersys/YMM4-Telemetry.git
+2 -2
ファイルの表示
@@ -298,7 +298,7 @@ static int Structure(HarnessImage image)
Console.WriteLine($" {variants[index].Name,-11} min={sorted[0],7:F2} median={median,7:F2} max={sorted[^1],7:F2}");
}
if (pipeline.TryGetVisibleBounds(image.Width, image.Height, in parameters, out var rect))
if (pipeline.TryGetVisibleBounds(image.Width, image.Height, out var rect))
{
using var rectOutput = device.AllocateReadWriteTexture2D<Bgra32, Float4>(rect.Width, rect.Height);
pipeline.RenderVisible(rectOutput, image.Width, image.Height, rect, in parameters);
@@ -307,7 +307,7 @@ static int Structure(HarnessImage image)
for (var frame = 0; frame < RectFrames; frame++)
{
pipeline.Simulate(sourceTexture, image.Width, image.Height, 0, 0, image.Width, image.Height, in parameters);
pipeline.TryGetVisibleBounds(image.Width, image.Height, in parameters, out rect);
pipeline.TryGetVisibleBounds(image.Width, image.Height, out rect);
pipeline.RenderVisible(rectOutput, image.Width, image.Height, rect, in parameters);
}
pipeline.WaitForCompletion();
+24
ファイルの表示
@@ -419,6 +419,30 @@ public sealed class LowPolyAbstractionEffectProcessorTests
Assert.True(IsRedrawn(after, source));
}
[Fact(Timeout = 60000)]
public async Task AProcessorDrawsLikeAFreshOneAfterTheDeviceReclaimsIdleMemory()
{
await Task.Run(() =>
{
using var devices = new GraphicsDevices();
using var context = devices.CreateContext();
RequireInterop(context);
using var source = new SourceImage(context, Size, Size, (x, y) => x is >= 16 and < 48 && y is >= 16 and < 48 ? Bgra.Opaque(80, 200, 255) : Bgra.Transparent);
var effect = new LowPolyAbstractionEffect();
using var processor = effect.CreateVideoEffect(context);
processor.SetInput(source.Bitmap);
RenderFrame(context, processor, 0);
GraphicsDevice.GetDefault().TrimMemory();
var reclaimed = RenderFrame(context, processor, 0);
using var fresh = effect.CreateVideoEffect(context);
fresh.SetInput(source.Bitmap);
var expected = RenderFrame(context, fresh, 0);
Assert.True(reclaimed.SamePixelsAs(expected));
}, TestContext.Current.CancellationToken);
}
[Fact]
public void AFailureWhileUpdatingIsNotSwallowed()
{
+2 -2
ファイルの表示
@@ -121,7 +121,7 @@ public sealed class LowPolyAbstractionInteropTests
{
interop.Draw(source.Bitmap);
interop.Pipeline.Simulate(interop.Resources.GetSourceComputeBinding(), 96, 96, 0, 0, 96, 96, in parameters);
Assert.True(interop.Pipeline.TryGetVisibleBounds(96, 96, in parameters, out var visible));
Assert.True(interop.Pipeline.TryGetVisibleBounds(96, 96, out var visible));
var (width, height) = outputSize(visible);
Assert.True(interop.Resources.TryEnsureOutput(width, height, out _));
interop.Pipeline.RenderVisible(interop.Resources.GetOutputComputeBinding(), 96, 96, visible, in parameters);
@@ -154,7 +154,7 @@ public sealed class LowPolyAbstractionInteropTests
Assert.True(interop.Resources.TryEnsureSource(size, size, out var sourceChanged));
interop.Draw(source.Bitmap);
Assert.True(interop.Pipeline.Simulate(interop.Resources.GetSourceComputeBinding(), size, size, 0, 0, size, size, in parameters));
Assert.True(interop.Pipeline.TryGetVisibleBounds(size, size, in parameters, out var visible));
Assert.True(interop.Pipeline.TryGetVisibleBounds(size, size, out var visible));
Assert.True(interop.Resources.TryEnsureOutput(visible.Width, visible.Height, out _));
interop.Pipeline.RenderVisible(interop.Resources.GetOutputComputeBinding(), size, size, visible, in parameters);
var output = interop.CaptureOutput(context, out var width, out var height);
+39 -4
ファイルの表示
@@ -498,6 +498,41 @@ public sealed class LowPolyAbstractionPipelineTests
}
}
[Fact]
public void APipelineWhoseGridWasReclaimedDrawsLikeAFreshOne()
{
using var pipeline = CreatePipeline();
using var fresh = CreatePipeline();
var source = TwoTone(64, 64, 16, 16, 32, 32);
var parameters = Parameters();
Render(pipeline, source, 64, 64, parameters);
GraphicsDevice.GetDefault().TrimMemory();
var reused = Render(pipeline, source, 64, 64, parameters);
var expected = Render(fresh, source, 64, 64, parameters);
Assert.Equal(expected, reused);
}
[Fact]
public void AReclaimedGridIsSimulatedAgain()
{
using var pipeline = CreatePipeline();
var parameters = Parameters();
var device = GraphicsDevice.GetDefault();
using var texture = device.AllocateReadWriteTexture2D<Bgra32, Float4>(64, 64);
Upload(texture, TwoTone(64, 64, 16, 16, 32, 32));
var first = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters);
var repeated = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters);
device.TrimMemory();
var reclaimed = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters);
Assert.True(first);
Assert.False(repeated);
Assert.True(reclaimed);
}
[Fact]
public void AWarmPipelineAllocatesNoManagedMemory()
{
@@ -580,7 +615,7 @@ public sealed class LowPolyAbstractionPipelineTests
Upload(sourceTexture, source);
pipeline.Simulate(sourceTexture, 192, 192, 0, 0, 192, 192, in parameters);
Assert.True(pipeline.TryGetVisibleBounds(192, 192, in parameters, out var rect));
Assert.True(pipeline.TryGetVisibleBounds(192, 192, out var rect));
using var outputTexture = device.AllocateReadWriteTexture2D<Bgra32, Float4>(rect.Width, rect.Height);
pipeline.RenderVisible(outputTexture, 192, 192, rect, in parameters);
var visible = new Bgra32[rect.Width * rect.Height];
@@ -617,7 +652,7 @@ public sealed class LowPolyAbstractionPipelineTests
pipeline.Simulate(source, canvas, canvas, 0, 0, canvas, canvas, in parameters);
Assert.True(pipeline.TryGetVisibleBounds(canvas, canvas, in parameters, out var rect));
Assert.True(pipeline.TryGetVisibleBounds(canvas, canvas, out var rect));
Assert.Equal((0, 0), (rect.X % 4, rect.Y % 4));
Assert.True(rect.Width % 4 == 0 || rect.X + rect.Width == canvas, $"{rect}");
Assert.True(rect.Height % 4 == 0 || rect.Y + rect.Height == canvas, $"{rect}");
@@ -634,12 +669,12 @@ public sealed class LowPolyAbstractionPipelineTests
var parameters = Parameters();
using var source = UploadedSquare();
pipeline.Simulate(source, 128, 128, 0, 0, 128, 128, in parameters);
Assert.True(pipeline.TryGetVisibleBounds(128, 128, in parameters, out _));
Assert.True(pipeline.TryGetVisibleBounds(128, 128, out _));
Upload(source, new int[128 * 128]);
pipeline.Simulate(source, 128, 128, 0, 0, 128, 128, in parameters);
Assert.False(pipeline.TryGetVisibleBounds(128, 128, in parameters, out var rect));
Assert.False(pipeline.TryGetVisibleBounds(128, 128, out var rect));
Assert.Equal(default, rect);
}
+1
ファイルの表示
@@ -4,6 +4,7 @@
<Platform Name="x64" />
</Configurations>
<Folder Name="/Solution Items/">
<File Path=".editorconfig" />
<File Path=".gitattributes" />
<File Path=".gitignore" />
<File Path=".gitmodules" />
+1 -1
ファイルの表示
@@ -5,7 +5,7 @@
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>2.0.1</Version>
<Version>2.0.2</Version>
<Platforms>AnyCPU;x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+1 -1
ファイルの表示
@@ -142,7 +142,7 @@ internal sealed class LowPolyAbstractionEffectProcessor : VideoEffectProcessorBa
itemHeight,
in pipelineParameters);
if (!_pipeline.TryGetVisibleBounds(canvasWidth, canvasHeight, in pipelineParameters, out var rect))
if (!_pipeline.TryGetVisibleBounds(canvasWidth, canvasHeight, out var rect))
{
_effect.Amount = 0f;
_parameters = parameters;
+17 -9
ファイルの表示
@@ -168,7 +168,7 @@ internal sealed class LowPolyAbstractionPipeline : IDisposable
return true;
}
internal bool TryGetVisibleBounds(int canvasWidth, int canvasHeight, in Parameters parameters, out PixelRect rect)
internal bool TryGetVisibleBounds(int canvasWidth, int canvasHeight, out PixelRect rect)
{
rect = default;
if (!_hasStructure || _cachedMinX > _cachedMaxX || _cachedMinY > _cachedMaxY)
@@ -266,14 +266,16 @@ internal sealed class LowPolyAbstractionPipeline : IDisposable
private void EnsureGrid(int workingWidth, int workingHeight, int siteCapacity)
{
if (_workingWidth == workingWidth && _workingHeight == workingHeight && _siteCapacity == siteCapacity)
return;
var resized = _workingWidth != workingWidth || _workingHeight != workingHeight || _siteCapacity != siteCapacity;
if (resized)
{
_structureKey = null;
_hasStructure = false;
_workingWidth = 0;
_workingHeight = 0;
_siteCapacity = 0;
}
_structureKey = null;
_hasStructure = false;
_workingWidth = 0;
_workingHeight = 0;
_siteCapacity = 0;
var pixelCount = workingWidth * workingHeight;
var triangleCapacity = LowPolyAbstractionSettings.GetTriangleCapacity(siteCapacity);
var scanLength = Math.Max((workingWidth + 1) * (workingHeight + 1), triangleCapacity);
@@ -301,8 +303,14 @@ internal sealed class LowPolyAbstractionPipeline : IDisposable
triangleErrorsLength: triangleCapacity,
triangleVerticesLength: triangleCapacity * 3,
weightLength: pixelCount),
out _))
out var changed))
throw new InvalidOperationException();
if (changed)
{
_structureKey = null;
_hasStructure = false;
}
_workingWidth = workingWidth;
_workingHeight = workingHeight;
_siteCapacity = siteCapacity;
+4 -6
ファイルの表示
@@ -1,10 +1,8 @@
using YukkuriMovieMaker.Generator;
namespace LowPolyAbstraction
{
[AutoGenLocalizer]
partial class Texts
{
namespace LowPolyAbstraction;
}
[AutoGenLocalizer]
partial class Texts
{
}
+9 -6
ファイルの表示
@@ -12,7 +12,7 @@ YukkuriMovieMaker4(YMM4)上で動作する、素材を三角形の面で塗
三角形の配置は素材とシードから決定論的に決まり、同じ設定では常に同じ形になります。
強さ、細かさ、輪郭忠実度、細分化、グラデーション、輪郭線、彩度、明度ゆらぎの8項目はアニメーションに対応しています。
![Image](https://github.com/routersys/YMM4-LowPolyAbstraction/blob/main/docs/LowPolyAbstraction.png)
![Image](https://git.routersys.com/routersys/YMM4-LowPolyAbstraction/raw/branch/main/docs/LowPolyAbstraction.png)
---
@@ -185,32 +185,35 @@ YukkuriMovieMaker4(YMM4)上で動作する、素材を三角形の面で塗
## 不具合の報告
本プラグインは、想定していない例外が起きたときに、その内容を開発者へ自動で送信します。同意は求めず、常に送信します。
本プラグインは、想定していない例外が起きたときに、その内容を開発者へ自動で送信します。同意は求めません。止める設定もありません。
送信する数には上限があります。YMM4の1回の起動で送る報告は、YMM4-Telemetryで報告する別のプラグインと合わせて20件までです。例外の型と発生位置が同じ報告は3件までです。上限を超えた報告と、送信先から待つよう求められている間に起きた報告は、送信も退避もしません。
送信する情報は次のとおりです。
| 種類 | 内容 |
|---|---|
| 例外 | 型の完全名、メッセージ、スタックトレース |
| 発生位置 | モジュール名、関数名、ファイル名、行番号 |
| 発生位置 | モジュール名、関数名、ファイル名、行番号、プラグイン自身のコードかどうか |
| プラグイン | アセンブリ名、バージョン |
| 実行環境 | OSの名前とバージョン、.NETのバージョン、CPUのアーキテクチャ、論理プロセッサ数 |
| 識別子 | YMM4の起動ごとに決まるセッション識別子、報告ごとの識別子 |
| 時刻 | 報告を作った時刻(UTC) |
メッセージとファイル名は、送信の前に置き換えを通します。置き換えるのは、Windowsのユーザー名、ユーザーフォルダー、AppDataのパス、マシン名、ドメイン名、メールアドレス、IPv4アドレスです。送信元のIPアドレスは受信側へ渡す手前で取り除いています。
映像の中身とプロジェクトの内容は送信しません。継続して個人を追跡する識別子も持ちません。セッション識別子はYMM4を起動し直すと別の値になります。
送信するのは想定していない例外だけです。YMM4が本プラグインのエフェクトを作るとき、フレームごとに更新するとき、入力をつなぎ直すとき、破棄するときと、Direct2Dがシェーダーの定数を書き込むときに起きた例外を報告し、その後はYMM4へそのまま渡します。画面の操作やバックグラウンドの処理で未処理になった例外も報告しますが、本プラグインのコードが関わる例外に限ります。本プラグインの外で起きた例外は送信しません。
送信するのは想定していない例外だけです。YMM4が本プラグインのエフェクトを作るとき、フレームごとに更新するとき、入力をつなぎ直すとき、破棄するときと、Direct2Dがシェーダーの定数を書き込むときに起きた例外を報告し、その後はYMM4へそのまま渡します。更新の確認では、更新情報の取得と比較で起きた例外は報告しません。通知の文を組み立てて表示するときに起きた例外は報告し、YMM4へは渡しません。画面の操作やバックグラウンドの処理で未処理になった例外も報告しますが、本プラグインのコードが関わる例外に限ります。本プラグインの外で起きた例外は送信しません。
次の失敗は送信しません。
| 種類 | 例 |
|---|---|
| 効果をかけないだけで済ませるもの | Direct3D 12デバイスを取得できない、YMM4のDirect3D 11デバイスとの共有テクスチャや共有フェンスを作成できない、計算領域が上限を超えるときに、エフェクトを適用せず入力映像を表示したとき |
| 更新の確認の通信の失敗 | GitHubへ接続できない |
| 更新の確認の通信の失敗 | manjubox.netとGitHubのどちらへも接続できない |
送信できなかった報告はYMM4のユーザーフォルダーへ退避し、次回の起動時に送り直します。送信も再送も非同期に行うため、起動と描画が遅くなることはありません。
送信できなかった報告はYMM4のユーザーフォルダーへ退避します。次にYMM4を起動したあと、本プラグインのエフェクトを生成するか、同じくYMM4-Telemetryで報告する別のプラグインが動き始めると、退避した報告を1回の起動で10件まで送り直します。送信も再送も非同期に行うため、通信を待って起動と描画が遅くなることはありません。
実装は [YMM4-Telemetry](https://github.com/routersys/YMM4-Telemetry) をサブモジュールとして取り込んでいます。