Compare commits

...

15 Commits

Author SHA1 Message Date
CJK_mkp d50097c013 Merge pull request #465 from InkCanvasForClass/net6
合并462
2026-05-02 17:45:07 +08:00
doudou0720 82f51e639b fix: 修正IACoreHelper文件路径错误
Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
2026-05-02 13:03:16 +08:00
doudou0720 2daab6092f Merge branch 'net6' into net462 2026-05-02 12:42:54 +08:00
doudou0720 f8e02c3f6a Merge branch 'net6' into net462 2026-05-02 10:17:01 +08:00
doudou0720 c5c913bea8 Merge branch 'net6' into net462 2026-05-02 10:16:15 +08:00
doudou0720 b01f2ab301 refactor(build): 更新Helper项目文件以使用新的SDK格式
将InkCanvasForClass.IACoreHelper项目从旧式csproj迁移到新的SDK格式,简化项目配置
同时更新构建目标路径以匹配新的输出目录结构

Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
2026-05-02 10:06:32 +08:00
doudou0720 4e18c73269 Merge branch 'net6' into net462 2026-05-02 09:08:38 +08:00
doudou0720 3a707beb5c Merge commit 'improve:ROT模块' into net462 2026-05-02 00:35:43 +08:00
doudou0720 55bf4f2e7a docs: 更新README和CI配置以使用Release构建
更新README.md添加.NET 4.6.2版本的下载链接,并修改CI工作流从Debug切换到Release构建配置,同时更新相关下载链接的命名格式

Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
2026-05-02 00:25:43 +08:00
doudou0720 d6b9e58415 chore: 清理issue模板并更新README和CI配置
删除不作为主分支的议题模板
在README中添加关于本net462分支的重要说明
将CI工作流中的构建配置从Debug改为Release

Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
2026-05-02 00:12:58 +08:00
doudou0720 9bfcd863c1 ci:删除462构建缓存
Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
2026-05-01 23:21:06 +08:00
doudou0720 8200e88949 Merge branch 'net6' into net462 2026-05-01 23:15:07 +08:00
doudou0720 ea9e53ece0 Merge branch 'beta' into net462
Till commit 057fb35d00
2026-04-06 09:47:27 +08:00
doudou0720 75c7492a01 ci(workflow): 更新触发分支为net462
Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
2026-04-05 12:31:46 +08:00
CJKmkp e02449e4aa Reapply "feat:Downgrade to .NET Framework 4.6.2 project (#415)"
This reverts commit 25dc6a00d3.
2026-04-05 10:53:42 +08:00
21 changed files with 181 additions and 1428 deletions
-66
View File
@@ -1,66 +0,0 @@
name: Bug 报告 | Bug Report
description: 反馈软件缺陷或异常 | Report a bug to help us improve
type: Bug
body:
- type: markdown
attributes:
value: |
感谢你的反馈!请详细填写以下内容,便于我们定位问题。
Thank you for your feedback! Please fill out the following information to help us locate the issue.
在报告问题之前,请确保你的软件已经更新到最新Beta版本,否则我们可能会无条件直接关闭该Issue,感谢配合!
Before reporting the issue, please make sure your software has been updated to the latest Beta version. Otherwise, we may unconditionally close this Issue without any further notice. Thank you for your cooperation!
- type: input
id: version
attributes:
label: 软件版本 | App Version
description: 可在设置中的“关于”界面查看 | You can find it on the "About" interface in the settings
placeholder: 例如 v1.2.3 | e.g. v1.2.3
validations:
required: true
- type: input
id: os
attributes:
label: 操作系统及版本 | OS & Version
placeholder: 例如 Windows 10 22H2 64位 | e.g. Windows 10 22H2 64bit
validations:
required: true
- type: textarea
id: description
attributes:
label: 问题描述 | Description
description: 简要描述遇到的问题 | Briefly describe the problem
validations:
required: true
- type: textarea
id: steps
attributes:
label: 复现步骤 | Steps to Reproduce
description: 如何复现该问题?如有必要可附截图/录屏/触发该问题的文件 | How to reproduce this bug? Screenshots/recordings/specific files if needed
placeholder: |
1.
2.
3.
validations:
required: true
- type: textarea
id: expected
attributes:
label: 期望结果 | Expected Behavior
description: 你期望的正确行为或结果 | What did you expect to happen?
validations:
required: true
- type: textarea
id: extra
attributes:
label: 其他补充信息 | Additional Info
description: 其他相关信息(如日志文件、崩溃日志文件、配置文件、特殊环境等)| Any other context, logs, crash logs, configs, special environment, etc.
validations:
required: false
- type: upload
id: files
attributes:
label: 上传有关文件 | Upload relevant files
description: "你可以在此处上传相关文件 | You can upload relevant files here."
validations:
required: false
@@ -1,44 +0,0 @@
name: 功能请求 | Feature Request
description: 提出你对本项目的功能建议 | Suggest an idea for this project
type: Feature
body:
- type: markdown
attributes:
value: |
感谢你的建议!请详细描述你的需求。
Thank you for your suggestion! Please describe your needs in detail.
- type: textarea
id: description
attributes:
label: 功能描述 | Description
description: 请描述你希望添加的功能 | Describe the feature you want
validations:
required: true
- type: textarea
id: motivation
attributes:
label: 需求动机 | Motivation
description: 为什么需要这个功能?| Why do you need this feature?
validations:
required: true
- type: textarea
id: design
attributes:
label: 期望设计 | Expected Design
description: (可选)描述或画出你期望的界面或交互 | (Optional) Describe or sketch the expected UI/UX
validations:
required: false
- type: textarea
id: extra
attributes:
label: 其他补充信息 | Additional Info
description: 其他补充说明或建议 | Any other context or suggestions
validations:
required: false
- type: upload
id: files
attributes:
label: 上传有关文件 | Upload relevant files
description: "你可以在此处上传相关文件 | You can upload relevant files here."
validations:
required: false
-36
View File
@@ -1,36 +0,0 @@
---
name: (Markdown Template) Bug 报告 | Bug Report
about: 反馈软件缺陷或异常 | Report a bug to help us improve
title: "[Version x.x.x] <your title>"
type: Bug
---
<!---请注意,你正在使用Markdown格式的Issue模板,如果你删除该模板的框架、更改问题的tag/类型/受理人或者不按照规范填写,你的Issue可能被直接关闭,如果你对Markdown不熟悉,请使用位于该选项下方的反馈入口继续反馈,感谢配合!-->
<!---感谢你的反馈!请详细填写以下内容,便于我们定位问题。-->
<!---Thank you for your feedback! Please fill out the following information to help us locate the issue.-->
<!---在报告问题之前,请确保你的软件已经更新到最新Beta版本,否则我们可能会无条件直接关闭该Issue,感谢配合!-->
<!---Before reporting the issue, please make sure your software has been updated to the latest Beta version. Otherwise, we may unconditionally close this Issue without any further notice. Thank you for your cooperation!-->
### 软件版本 | App Version (必填 | Required)
<!---可在设置中的"关于"界面查看 | You can find it on the "About" interface in the settings-->
<!---例如 v1.2.3 | e.g. v1.2.3-->
### 操作系统及版本 | OS & Version (必填 | Required)
<!---例如 Windows 10 22H2 64位 | e.g. Windows 10 22H2 64bit-->
### 问题描述 | Description (必填 | Required)
<!---简要描述遇到的问题 | Briefly describe the problem-->
### 复现步骤 | Steps to Reproduce (必填 | Required)
<!---如何复现该问题?如有必要可附截图/录屏/触发该问题的文件 | How to reproduce this bug? Screenshots/recordings/specific files if needed-->
1.
2.
3.
### 期望结果 | Expected Behavior (必填 | Required)
<!---你期望的正确行为或结果 | What did you expect to happen?-->
### 其他补充信息 | Additional Info (可选 | Optional)
<!---其他相关信息(如日志文件、崩溃日志文件、配置文件、特殊环境等)| Any other context, logs, crash logs, configs, special environment, etc.-->
@@ -1,23 +0,0 @@
---
name: (Markdown Template) 功能请求 | Feature Request
about: 提出你对本项目的功能建议 | Suggest an idea for this project
title: "[Feature Request] "
type: Feature
---
<!---请注意,你正在使用Markdown格式的Issue模板,如果你删除该模板的框架、更改问题的tag/类型/受理人或者不按照规范填写,你的Issue可能被直接关闭,如果你对Markdown不熟悉,请使用位于该选项下方的反馈入口继续反馈,感谢配合!-->
<!---感谢你的建议!请详细描述你的需求。-->
<!---Thank you for your suggestion! Please describe your needs in detail.-->
### 功能描述 | Description (必填 | Required)
<!---请描述你希望添加的功能 | Describe the feature you want-->
### 需求动机 | Motivation (必填 | Required)
<!---为什么需要这个功能?| Why do you need this feature?-->
### 期望设计 | Expected Design (可选 | Optional)
<!---描述或画出你期望的界面或交互 | Describe or sketch the expected UI/UX-->
### 其他补充信息 | Additional Info (可选 | Optional)
<!---其他补充说明或建议 | Any other context or suggestions-->
-1
View File
@@ -1 +0,0 @@
blank_issues_enabled: false
+7 -10
View File
@@ -2,7 +2,7 @@ name: .NET Build & Package
on:
push:
branches: [ net6 ]
branches: [ net462 ]
workflow_dispatch:
concurrency:
@@ -31,22 +31,19 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Restore Package
run: dotnet restore "Ink Canvas.sln" --locked-mode
run: dotnet restore "Ink Canvas.sln"
- name: Build the Solution
env:
DLASS_SENTRY_DSN: ${{ secrets.DLASS_SENTRY_DSN }}
run: msbuild /p:platform="${{ matrix.architecture }}" /p:configuration="Debug" /p:GitFlow="$GITFLOW" "Ink Canvas/InkCanvasForClass.csproj" /m /p:UseMultiToolTask=true /p:EnforceProcessCountAcrossBuilds=true /verbosity:minimal -maxcpucount /p:RunAnalyzers=false
run: msbuild /p:platform="${{ matrix.architecture }}" /p:configuration="Release" /p:GitFlow="$GITFLOW" "Ink Canvas/InkCanvasForClass.csproj" /m /p:UseMultiToolTask=true /p:EnforceProcessCountAcrossBuilds=true /verbosity:minimal -maxcpucount /p:RunAnalyzers=false
- name: Check if exe file is generated
id: check-exe
run: |
$exePath = "Ink Canvas\bin\Debug\${{ matrix.architecture }}\net6.0-windows10.0.19041.0\InkCanvasForClass.exe"
$exePath = "Ink Canvas\bin\Release\${{ matrix.architecture }}\net462\InkCanvasForClass.exe"
if (Test-Path $exePath) {
echo "build_success=true" >> $env:GITHUB_OUTPUT
@@ -73,8 +70,8 @@ jobs:
if: steps.check-exe.outputs.build_success == 'true'
uses: actions/upload-artifact@v7
with:
name: InkCanvasForClass.CE.debug.${{ matrix.architecture }}
path: "Ink Canvas/bin/Debug/${{ matrix.architecture }}/net6.0-windows10.0.19041.0/*"
name: InkCanvasForClass.CE.${{ matrix.architecture }}
path: "Ink Canvas/bin/Release/${{ matrix.architecture }}/net462/*"
- name: Create Summary
if: always()
@@ -93,7 +90,7 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY
echo "[Download Artifact](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "[Nightly.link Download](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.debug.${{ matrix.architecture }}.zip) \([GhProxy Fastly Mirror](https://cdn.gh-proxy.com/nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.debug.${{ matrix.architecture }}.zip) / [GhProxy Mirror](https://gh-proxy.com/nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.debug.${{ matrix.architecture }}.zip)\)" >> $GITHUB_STEP_SUMMARY
echo "[Nightly.link Download](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.${{ matrix.architecture }}.zip) \([GhProxy Fastly Mirror](https://cdn.gh-proxy.com/nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.${{ matrix.architecture }}.zip) / [GhProxy Mirror](https://gh-proxy.com/nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.${{ matrix.architecture }}.zip)\)" >> $GITHUB_STEP_SUMMARY
else
echo "## ❌ Build Failed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
-104
View File
@@ -1,104 +0,0 @@
name: PR Check
on:
pull_request:
types: [opened, synchronize]
branches: [ main, net6 ]
paths-ignore:
- '**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-and-package:
name: Build & Package
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
architecture: [AnyCPU, x86]
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v5
- name: Restore Package
run: dotnet restore "Ink Canvas.sln" --locked-mode
- name: Build the Solution
run: msbuild /p:platform="${{ matrix.architecture }}" /p:configuration="Debug" /p:GitFlow="$GITFLOW" "Ink Canvas/InkCanvasForClass.csproj" /m /p:UseMultiToolTask=true /p:EnforceProcessCountAcrossBuilds=true /verbosity:minimal -maxcpucount /p:RunAnalyzers=false
- name: Check if exe file is generated
id: check-exe
run: |
$exePath = "Ink Canvas\bin\Debug\${{ matrix.architecture }}\net6.0-windows10.0.19041.0\InkCanvasForClass.exe"
if (Test-Path $exePath) {
echo "build_success=true" >> $env:GITHUB_OUTPUT
} else {
echo "build_success=false" >> $env:GITHUB_OUTPUT
if ("${{ github.event_name }}" -eq "workflow_dispatch") {
exit 1
}
}
- name: Create Package (if build succeeded)
id: create-archive
if: steps.check-exe.outputs.build_success == 'true'
env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}
run: |
$shortSha = $env:GITHUB_SHA.Substring(0, 7)
$version = "debug-$shortSha-$env:GITHUB_RUN_NUMBER"
echo "archive_name=$version" >> $env:GITHUB_OUTPUT
- name: Upload Artifact (if build succeeded)
if: steps.check-exe.outputs.build_success == 'true'
uses: actions/upload-artifact@v7
with:
name: InkCanvasForClass.CE.debug.${{ matrix.architecture }}
path: "Ink Canvas/bin/Debug/${{ matrix.architecture }}/net6.0-windows10.0.19041.0/*"
- name: Create Summary
if: always()
shell: bash
run: |
echo "# Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ steps.check-exe.outputs.build_success }}" = "true" ]; then
echo "## ✅ Build Successful" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Run:** #${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "**Version:** ${{ steps.create-archive.outputs.archive_name }}" >> $GITHUB_STEP_SUMMARY
echo "**Architecture:** ${{ matrix.architecture }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "[Download Artifact](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "[Nightly.link Download](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.debug.${{ matrix.architecture }}.zip) \([GhProxy Fastly Mirror](https://cdn.gh-proxy.com/nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.debug.${{ matrix.architecture }}.zip) / [GhProxy Mirror](https://gh-proxy.com/nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/InkCanvasForClass.CE.debug.${{ matrix.architecture }}.zip)\)" >> $GITHUB_STEP_SUMMARY
else
echo "## ❌ Build Failed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Event:** ${{ github.event_name }} (${{ github.event.action || 'N/A' }})" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Architecture:** ${{ matrix.architecture }}" >> $GITHUB_STEP_SUMMARY
echo "**Run:** #${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Check build logs for details." >> $GITHUB_STEP_SUMMARY
fi
-755
View File
@@ -1,755 +0,0 @@
name: Pre-release and Changelog
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
version_type:
description: 'Version bump type'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
- build
prerelease:
description: 'Create as pre-release'
required: true
default: true
type: boolean
draft:
description: 'Create as draft release'
required: true
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-${{ github.sha }}
cancel-in-progress: true
jobs:
prepare:
runs-on: windows-latest
outputs:
tag_name: ${{ steps.get_tag.outputs.tag_name }}
version: ${{ steps.get_tag.outputs.version }}
is_prerelease: ${{ steps.release_type.outputs.is_prerelease }}
changelog: ${{ steps.read_changelog.outputs.changelog }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
# ========== 获取当前版本 ==========
- name: Get current version from Git tag
id: get_version
run: |
# 获取最新的tag
$latestTag = git describe --tags --abbrev=0 2>$null
if ($latestTag) {
$version = $latestTag
echo "Found latest tag: $latestTag"
} else {
# 如果没有tag,使用默认值
$version = "1.0.0.0"
echo "No tag found, using default version: $version"
}
echo "current_version=$version" >> $env:GITHUB_OUTPUT
echo "Current version: $version"
# ========== 处理版本号和标签名 ==========
- name: Get tag name and version
id: get_tag
run: |
if ("${{ github.event_name }}" -eq "push") {
# 从 push tag 事件获取原始标签名
$tagName = "${{ github.ref }}".Replace("refs/tags/", "")
$cleanVersion = $tagName
echo "tag_name=$tagName" >> $env:GITHUB_OUTPUT
echo "version=$cleanVersion" >> $env:GITHUB_OUTPUT
echo "Using pushed tag: $tagName, version: $cleanVersion"
} else {
# 从 workflow_dispatch 计算新版本(4位格式)
$currentVersion = "${{ steps.get_version.outputs.current_version }}"
$versionParts = $currentVersion.Split('.')
# 确保版本号格式正确(至少4部分)
if ($versionParts.Length -ge 4) {
$major = [int]$versionParts[0]
$minor = [int]$versionParts[1]
$patch = [int]$versionParts[2]
$build = [int]$versionParts[3]
} else {
# 如果版本号格式不正确,补充为4位
if ($versionParts.Length -ge 3) {
$major = [int]$versionParts[0]
$minor = [int]$versionParts[1]
$patch = [int]$versionParts[2]
$build = 0
} else {
# 如果版本号格式不正确,抛出错误
echo "Error: Invalid version format. Expected format: x.y.z.w (e.g., 1.7.18.0)"
exit 1
}
}
$versionType = "${{ github.event.inputs.version_type }}"
$isPrerelease = "${{ github.event.inputs.prerelease }}" -eq "true"
switch ($versionType) {
"major" {
$major++
$minor = 0
$patch = 0
$build = 0
}
"minor" {
$minor++
$patch = 0
$build = 0
}
"patch" {
$patch++
$build = 0
}
"build" {
$build++
}
}
# 生成新版本号(4位格式,如1.7.18.0)
$newVersion = "$major.$minor.$patch.$build"
# 根据是否为预发布决定版本号最后一位
# 如果是预发布,确保最后一位不为0(使用1)
if ($isPrerelease -and $build -eq 0) {
$build = 1
$newVersion = "$major.$minor.$patch.$build"
}
$tagName = $newVersion
echo "tag_name=$tagName" >> $env:GITHUB_OUTPUT
echo "version=$newVersion" >> $env:GITHUB_OUTPUT
echo "New tag: $tagName, version: $newVersion"
}
- name: Determine release type
id: release_type
run: |
if ("${{ github.event_name }}" -eq "push") {
# 根据版本号最后一位确定是否为预发布版本
# 最后一位为0表示正式版本,非0表示预发布版本
$version = "${{ steps.get_tag.outputs.version }}"
$versionParts = $version.Split('.')
if ($versionParts.Length -ge 4) {
$build = [int]$versionParts[3]
if ($build -eq 0) {
echo "is_prerelease=false" >> $env:GITHUB_OUTPUT
echo "This is a release"
} else {
echo "is_prerelease=true" >> $env:GITHUB_OUTPUT
echo "This is a pre-release (beta)"
}
} else {
echo "is_prerelease=false" >> $env:GITHUB_OUTPUT
echo "This is a release (invalid version format)"
}
} else {
# workflow_dispatch 方式
echo "is_prerelease=${{ github.event.inputs.prerelease }}" >> $env:GITHUB_OUTPUT
}
# ========== 使用 git-cliff 生成变更日志 ==========
- name: Generate changelog with git-cliff (for pushed tag)
if: github.event_name == 'push'
id: git_cliff_tag
uses: orhun/git-cliff-action@v4
with:
config: build/cliff.toml # 使用项目build目录的 cliff.toml 配置
args: --latest --tag ${{ steps.get_tag.outputs.tag_name }} --output CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate changelog with git-cliff (for workflow_dispatch)
if: github.event_name == 'workflow_dispatch'
id: git_cliff_unreleased
uses: orhun/git-cliff-action@v4
with:
config: build/cliff.toml
args: --unreleased --tag ${{ steps.get_tag.outputs.tag_name }} --output CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Read changelog content
id: read_changelog
run: |
$changelogContent = Get-Content -Path CHANGELOG.md -Raw
echo "changelog<<EOF" >> $env:GITHUB_OUTPUT
echo $changelogContent >> $env:GITHUB_OUTPUT
echo "EOF" >> $env:GITHUB_OUTPUT
build:
needs: prepare
if: success()
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
architecture: [AnyCPU, x86]
outputs:
archive_name: ${{ steps.create_archive.outputs.archive_name }}
zip_size: ${{ steps.calculate_size.outputs.zip_size }}
installer_size: ${{ steps.calculate_installer_size.outputs.installer_size }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Restore Package
run: dotnet restore "Ink Canvas.sln" --locked-mode
- name: Build the Solution (Release)
env:
DLASS_SENTRY_DSN: ${{ secrets.DLASS_SENTRY_DSN }}
run: |
msbuild /p:platform="${{ matrix.architecture }}" /p:configuration="Release" /p:GitFlow="Github Action" "Ink Canvas/InkCanvasForClass.csproj" /m /p:UseMultiToolTask=true /p:EnforceProcessCountAcrossBuilds=true /verbosity:minimal -maxcpucount /p:RunAnalyzers=false
- name: Check if exe file is generated
id: check-exe
run: |
$exePath = "Ink Canvas\bin\Release\${{ matrix.architecture }}\net6.0-windows10.0.19041.0\InkCanvasForClass.exe"
if (Test-Path $exePath) {
echo "build_success=true" >> $env:GITHUB_OUTPUT
} else {
echo "build_success=false" >> $env:GITHUB_OUTPUT
exit 1
}
- name: Install Inno Setup Unofficial Language Files
if: steps.check-exe.outputs.build_success == 'true'
run: |
# 创建临时目录用于下载文件
New-Item -ItemType Directory -Path "temp_lang" -Force
# 下载英语英国版语言文件
Invoke-WebRequest -Uri "https://github.com/jrsoftware/issrc/raw/refs/heads/main/Files/Languages/Unofficial/EnglishBritish.isl" -OutFile "temp_lang/EnglishBritish.isl"
# 下载简体中文版语言文件
Invoke-WebRequest -Uri "https://github.com/jrsoftware/issrc/raw/refs/heads/main/Files/Languages/Unofficial/ChineseSimplified.isl" -OutFile "temp_lang/ChineseSimplified.isl"
# 将文件移动到 Inno Setup 的语言目录
Move-Item -Path "temp_lang/EnglishBritish.isl" -Destination "C:/Program Files (x86)/Inno Setup 6/Languages/EnglishBritish.isl" -Force
Move-Item -Path "temp_lang/ChineseSimplified.isl" -Destination "C:/Program Files (x86)/Inno Setup 6/Languages/ChineseSimplified.isl" -Force
# 清理临时目录
Remove-Item -Path "temp_lang" -Recurse -Force
- name: Create Release Archive
id: create_archive
if: steps.check-exe.outputs.build_success == 'true'
run: |
$version = "${{ needs.prepare.outputs.version }}"
$architecture = "${{ matrix.architecture }}"
# 根据架构生成文件名后缀
if ($architecture -eq "AnyCPU") {
$suffix = "-x64"
} else {
$suffix = ""
}
$archiveName = "InkCanvasForClass.CE.$version$suffix.zip"
# 创建发布目录
New-Item -ItemType Directory -Path "release" -Force
# 复制发布文件(使用架构特定的路径)
Copy-Item "Ink Canvas\bin\Release\$architecture\net6.0-windows10.0.19041.0\*" "release/" -Recurse -Force
# 创建压缩包
Compress-Archive -Path "release/*" -DestinationPath $archiveName -Force
echo "archive_name=$archiveName" >> $env:GITHUB_OUTPUT
- name: Prepare Inno Setup script
if: steps.check-exe.outputs.build_success == 'true'
run: |
$version = "${{ needs.prepare.outputs.version }}"
$architecture = "${{ matrix.architecture }}"
# 更新 ISS 文件中的版本信息
$issPath = "build/InkCanvasForClass CE.iss"
$issContent = Get-Content -Path $issPath -Raw
# 替换版本信息
$issContent = $issContent -replace '#define MyAppVersion ".*"', "#define MyAppVersion `"$version`""
# 替换源文件路径为相对路径(考虑到ISS文件在build目录下,需要返回上级目录)
$issContent = $issContent -replace 'Source: "release\\\*";', 'Source: "../release/*";'
$issContent = $issContent -replace 'Source: ".*\\{#MyAppExeName}";', 'Source: "../release/{#MyAppExeName}";'
$issContent = $issContent -replace 'Source: ".*\\InkCanvasForClass.exe.config";', 'Source: "../release/InkCanvasForClass.exe.config";'
# 更新输出目录为当前目录
$issContent = $issContent -replace 'OutputDir=.*', 'OutputDir=.'
# 更新默认安装目录
$issContent = $issContent -replace 'DefaultDirName=.*', 'DefaultDirName={autopf}/{#MyAppName}'
# 更新许可证文件路径为相对路径(考虑到ISS文件在build目录下,需要返回上级目录)
$issContent = $issContent -replace 'LicenseFile=.*', 'LicenseFile=../LICENSE'
# 保存修改后的 ISS 文件
$issContent | Set-Content -Path $issPath -Encoding UTF8
- name: Build MSI installer with Inno Setup
if: steps.check-exe.outputs.build_success == 'true'
uses: Minionguyjpro/Inno-Setup-Action@v1.2.7
with:
path: build/InkCanvasForClass CE.iss
options: /O.
- name: Rename installer file
if: steps.check-exe.outputs.build_success == 'true'
run: |
$version = "${{ needs.prepare.outputs.version }}"
$architecture = "${{ matrix.architecture }}"
# 根据架构生成文件名后缀
if ($architecture -eq "AnyCPU") {
$suffix = "-x64"
} else {
$suffix = ""
}
$setupFile = "InkCanvasForClass CE Setup.exe"
$newSetupName = "InkCanvasForClass.CE.$version$suffix.Setup.exe"
if (Test-Path $setupFile) {
Rename-Item -Path $setupFile -NewName $newSetupName
} else {
Write-Error "Setup file not found: $setupFile"
}
- name: Calculate archive size
id: calculate_size
if: steps.check-exe.outputs.build_success == 'true'
run: |
$version = "${{ needs.prepare.outputs.version }}"
$architecture = "${{ matrix.architecture }}"
# 根据架构生成文件名后缀
if ($architecture -eq "AnyCPU") {
$suffix = "-x64"
} else {
$suffix = ""
}
$archiveName = "InkCanvasForClass.CE.$version$suffix.zip"
# 获取文件大小(字节)
$fileSize = (Get-Item $archiveName).Length
echo "zip_size=$fileSize" >> $env:GITHUB_OUTPUT
- name: Calculate installer size
id: calculate_installer_size
if: steps.check-exe.outputs.build_success == 'true'
run: |
$version = "${{ needs.prepare.outputs.version }}"
$architecture = "${{ matrix.architecture }}"
# 根据架构生成文件名后缀
if ($architecture -eq "AnyCPU") {
$suffix = "-x64"
} else {
$suffix = ""
}
$installerName = "InkCanvasForClass.CE.$version$suffix.Setup.exe"
if (Test-Path $installerName) {
# 获取文件大小(字节)
$fileSize = (Get-Item $installerName).Length
echo "installer_size=$fileSize" >> $env:GITHUB_OUTPUT
} else {
Write-Error "Installer file not found: $installerName"
}
- name: Upload Build Artifacts
if: steps.check-exe.outputs.build_success == 'true'
run: |
$version = "${{ needs.prepare.outputs.version }}"
$architecture = "${{ matrix.architecture }}"
# 根据架构生成文件名后缀
if ($architecture -eq "AnyCPU") {
$suffix = "-x64"
} else {
$suffix = ""
}
$zipFile = "InkCanvasForClass.CE.$version$suffix.zip"
$setupFile = "InkCanvasForClass.CE.$version$suffix.Setup.exe"
echo "zip_file=$zipFile" >> $env:GITHUB_OUTPUT
echo "setup_file=$setupFile" >> $env:GITHUB_OUTPUT
id: get_file_names
- name: Upload Build Artifacts
if: steps.check-exe.outputs.build_success == 'true'
uses: actions/upload-artifact@v7
with:
name: build-files-${{ needs.prepare.outputs.version }}-${{ matrix.architecture }}
path: |
${{ steps.get_file_names.outputs.zip_file }}
${{ steps.get_file_names.outputs.setup_file }}
- name: Create Build Summary
if: always()
shell: bash
run: |
echo "# Release Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ steps.check-exe.outputs.build_success }}" = "true" ]; then
echo "## ✅ Release Build Successful" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Version:** ${{ needs.prepare.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "**Tag:** \`${{ needs.prepare.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Release Type:** ${{ needs.prepare.outputs.is_prerelease == 'true' && 'Pre-release' || 'Release' }}" >> $GITHUB_STEP_SUMMARY
echo "**Architecture:** ${{ matrix.architecture }}" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Run:** #${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ -n "${{ steps.calculate_size.outputs.zip_size }}" ]; then
echo "**Archive Size:** ${{ steps.calculate_size.outputs.zip_size }} bytes" >> $GITHUB_STEP_SUMMARY
fi
if [ -n "${{ steps.calculate_installer_size.outputs.installer_size }}" ]; then
echo "**Installer Size:** ${{ steps.calculate_installer_size.outputs.installer_size }} bytes" >> $GITHUB_STEP_SUMMARY
fi
else
echo "## ❌ Release Build Failed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Version:** ${{ needs.prepare.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "**Tag:** \`${{ needs.prepare.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Architecture:** ${{ matrix.architecture }}" >> $GITHUB_STEP_SUMMARY
echo "**Event:** ${{ github.event_name }} (${{ github.event.action || 'N/A' }})" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Run:** #${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Check build logs for details." >> $GITHUB_STEP_SUMMARY
fi
sign:
needs: [prepare, build]
if: success()
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v8
with:
pattern: build-files-${{ needs.prepare.outputs.version }}-*
merge-multiple: false
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Sign release artifacts with sigstore-python
uses: sigstore/gh-action-sigstore-python@v3.3.0
with:
inputs: |
build-files-${{ needs.prepare.outputs.version }}-AnyCPU/*.zip
build-files-${{ needs.prepare.outputs.version }}-AnyCPU/*.exe
build-files-${{ needs.prepare.outputs.version }}-x86/*.zip
build-files-${{ needs.prepare.outputs.version }}-x86/*.exe
release-signing-artifacts: true
upload-signing-artifacts: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Signed Artifacts
uses: actions/upload-artifact@v7
with:
name: signed-files-${{ needs.prepare.outputs.version }}
path: |
build-files-${{ needs.prepare.outputs.version }}-AnyCPU/*.sigstore.json
build-files-${{ needs.prepare.outputs.version }}-x86/*.sigstore.json
release:
needs: [prepare, build, sign]
if: success()
runs-on: ubuntu-slim
permissions:
contents: write
outputs:
enhanced_changelog: ${{steps.enhanced_changelog.outputs.enhanced_changelog}}
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v8
with:
pattern: build-files-${{ needs.prepare.outputs.version }}-*
merge-multiple: true
- name: Download Signed Artifacts (if exists)
uses: actions/download-artifact@v8
with:
name: signed-files-${{ needs.prepare.outputs.version }}
continue-on-error: true
- name: Create enhanced changelog with file table
id: enhanced_changelog
run: |
version='${{ needs.prepare.outputs.version }}'
# 读取git-cliff生成的changelog内容
originalChangelog='${{ needs.prepare.outputs.changelog }}'
# 检查是否为预发布版本,如果是则添加警告提示
if [ '${{ needs.prepare.outputs.is_prerelease }}' = "true" ]; then
warningText=$'\n> [!CAUTION]\n'
warningText+=$'> **注意:此版本为预览或测试版**\n'
warningText+=$'> \n'
warningText+=$'> 请注意,这是一个预览/测试版本,使用时可能出现BUG,常规用户建议使用预览版或正式版\n\n'
originalChangelog="${warningText}${originalChangelog}"
fi
# 构建文件信息表格
fileTable=$'\n## 文件信息 (File Information)\n'
fileTable+=$'| 文件名 | 大小 |\n'
fileTable+=$'|--------|------|\n'
# AnyCPU (x64) 架构文件
if [ -f "InkCanvasForClass.CE.$version-x64.zip" ]; then
zipSize=$(wc -c < "InkCanvasForClass.CE.$version-x64.zip")
fileTable+=$'| InkCanvasForClass.CE.'"$version"'-x64.zip | '"$zipSize"' bytes |\n'
fi
if [ -f "InkCanvasForClass.CE.$version-x64.Setup.exe" ]; then
installerSize=$(wc -c < "InkCanvasForClass.CE.$version-x64.Setup.exe")
fileTable+=$'| InkCanvasForClass.CE.'"$version"'-x64.Setup.exe | '"$installerSize"' bytes |\n'
fi
if [ -f "InkCanvasForClass.CE.$version-x64.zip.sigstore.json" ]; then
sigstoreSize=$(wc -c < "InkCanvasForClass.CE.$version-x64.zip.sigstore.json")
fileTable+=$'| InkCanvasForClass.CE.'"$version"'-x64.zip.sigstore.json | '"$sigstoreSize"' bytes |\n'
fi
if [ -f "InkCanvasForClass.CE.$version-x64.Setup.exe.sigstore.json" ]; then
sigstoreSize=$(wc -c < "InkCanvasForClass.CE.$version-x64.Setup.exe.sigstore.json")
fileTable+=$'| InkCanvasForClass.CE.'"$version"'-x64.Setup.exe.sigstore.json | '"$sigstoreSize"' bytes |\n'
fi
# x86 架构文件
if [ -f "InkCanvasForClass.CE.$version.zip" ]; then
zipSize=$(wc -c < "InkCanvasForClass.CE.$version.zip")
fileTable+=$'| InkCanvasForClass.CE.'"$version"'.zip | '"$zipSize"' bytes |\n'
fi
if [ -f "InkCanvasForClass.CE.$version.Setup.exe" ]; then
installerSize=$(wc -c < "InkCanvasForClass.CE.$version.Setup.exe")
fileTable+=$'| InkCanvasForClass.CE.'"$version"'.Setup.exe | '"$installerSize"' bytes |\n'
fi
if [ -f "InkCanvasForClass.CE.$version.zip.sigstore.json" ]; then
sigstoreSize=$(wc -c < "InkCanvasForClass.CE.$version.zip.sigstore.json")
fileTable+=$'| InkCanvasForClass.CE.'"$version"'.zip.sigstore.json | '"$sigstoreSize"' bytes |\n'
fi
if [ -f "InkCanvasForClass.CE.$version.Setup.exe.sigstore.json" ]; then
sigstoreSize=$(wc -c < "InkCanvasForClass.CE.$version.Setup.exe.sigstore.json")
fileTable+=$'| InkCanvasForClass.CE.'"$version"'.Setup.exe.sigstore.json | '"$sigstoreSize"' bytes |\n'
fi
fileTable+=$'\n*文件大小信息由GitHub Actions自动生成*\n'
# 将表格附加到原始changelog
enhancedChangelog="${originalChangelog}${fileTable}"
# 输出增强版changelog内容
echo "enhanced_changelog<<EOF" >> $GITHUB_OUTPUT
echo "$enhancedChangelog" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "Enhanced changelog created with file information table"
- name: Display Release Info
run: |
echo "=== Creating Release ==="
echo "Version: ${{ needs.prepare.outputs.version }}"
echo "Tag: ${{ needs.prepare.outputs.tag_name }}"
echo "Pre-release: ${{ needs.prepare.outputs.is_prerelease }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.prepare.outputs.tag_name }}
name: ICC CE ${{ needs.prepare.outputs.version }}
body: |
${{ steps.enhanced_changelog.outputs.enhanced_changelog }}
draft: ${{ github.event.inputs.draft || false }}
prerelease: ${{ needs.prepare.outputs.is_prerelease == 'true' }}
files: |
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}-x64.zip
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}-x64.Setup.exe
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}-x64.zip.sigstore.json
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}-x64.Setup.exe.sigstore.json
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}.zip
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}.Setup.exe
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}.zip.sigstore.json
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}.Setup.exe.sigstore.json
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
post_release:
needs: [prepare, release]
if: success() && github.event.inputs.draft != 'true'
runs-on: ubuntu-slim
permissions:
id-token: write
contents: write
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v8
with:
pattern: build-files-${{ needs.prepare.outputs.version }}-*
merge-multiple: true
- name: Get beta token
uses: octo-sts/action@main
id: octo-sts-beta
with:
scope: InkCanvasForClass/community-beta
identity: repo-sync
- name: Get download token
uses: octo-sts/action@main
id: octo-sts-downloads
with:
scope: InkCanvasForClass/downloads
identity: repo-sync
- name: Sync downloads repos(Universal)
env:
GITHUB_TOKEN: ${{ steps.octo-sts-downloads.outputs.token }}
run: |
set -e
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
REPO_DIR=$(mktemp -d)
git clone --depth 1 --filter=blob:none --branch main https://x-access-token:${{ steps.octo-sts-downloads.outputs.token }}@github.com/InkCanvasForClass/downloads.git $REPO_DIR
cd $REPO_DIR
IS_PRERELEASE="${{ needs.prepare.outputs.is_prerelease }}"
VERSION="${{ needs.prepare.outputs.version }}"
X64_ZIP_FILE="$GITHUB_WORKSPACE/InkCanvasForClass.CE.$VERSION-x64.zip"
X86_ZIP_FILE="$GITHUB_WORKSPACE/InkCanvasForClass.CE.$VERSION.zip"
if [ "$IS_PRERELEASE" == "true" ]; then
mkdir -p Beta
if [ -f "$X64_ZIP_FILE" ]; then
cp "$X64_ZIP_FILE" Beta/
git add Beta/InkCanvasForClass.CE.$VERSION-x64.zip
fi
if [ -f "$X86_ZIP_FILE" ]; then
cp "$X86_ZIP_FILE" Beta/
git add Beta/InkCanvasForClass.CE.$VERSION.zip
fi
git commit -m "Add $VERSION PreRelease"
else
mkdir -p Release Beta
if [ -f "$X64_ZIP_FILE" ]; then
cp "$X64_ZIP_FILE" Release/
cp "$X64_ZIP_FILE" Beta/
git add Release/InkCanvasForClass.CE.$VERSION-x64.zip Beta/InkCanvasForClass.CE.$VERSION-x64.zip
fi
if [ -f "$X86_ZIP_FILE" ]; then
cp "$X86_ZIP_FILE" Release/
cp "$X86_ZIP_FILE" Beta/
git add Release/InkCanvasForClass.CE.$VERSION.zip Beta/InkCanvasForClass.CE.$VERSION.zip
fi
git commit -m "Add $VERSION Release"
fi
git push origin main
- name: Update AutomaticUpdateVersionControl in beta repo
env:
GITHUB_TOKEN: ${{ steps.octo-sts-beta.outputs.token }}
run: |
CONTENT=$(echo -n "${{ needs.prepare.outputs.version }}" | base64 -w0)
SHA=$(gh api /repos/InkCanvasForClass/community-beta/contents/AutomaticUpdateVersionControl.txt --jq '.sha' 2>/dev/null || echo "")
gh api \
--method PUT \
/repos/InkCanvasForClass/community-beta/contents/AutomaticUpdateVersionControl.txt \
-f message="Update AutomaticUpdateVersionControl.txt" \
-f content="$CONTENT" \
-f branch="main" \
${SHA:+-f sha="$SHA"}
- name: Create GitHub Release on beta repo
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.prepare.outputs.tag_name }}
name: ICC CE ${{ needs.prepare.outputs.version }}
body: |
${{ needs.release.outputs.enhanced_changelog }}
draft: false
prerelease: ${{ needs.prepare.outputs.is_prerelease == 'true' }}
files: |
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}-x64.zip
InkCanvasForClass.CE.${{ needs.prepare.outputs.version }}.zip
fail_on_unmatched_files: false
repository: "InkCanvasForClass/community-beta"
token: ${{ steps.octo-sts-beta.outputs.token }}
env:
GITHUB_TOKEN: ${{ steps.octo-sts-beta.outputs.token }}
- name: Update community repo AutomaticUpdateVersionControl
if: ${{needs.prepare.outputs.is_prerelease == 'false'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
CONTENT=$(echo -n "${{ needs.prepare.outputs.version }}" | base64 -w0)
SHA=$(gh api /repos/InkCanvasForClass/community/contents/AutomaticUpdateVersionControl.txt --jq '.sha' 2>/dev/null || echo "")
gh api \
--method PUT \
/repos/InkCanvasForClass/community/contents/AutomaticUpdateVersionControl.txt \
-f message="Update AutomaticUpdateVersionControl.txt" \
-f content="$CONTENT" \
-f branch="net6" \
${SHA:+-f sha="$SHA"}
+2 -1
View File
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</configuration>
+1 -1
View File
@@ -302,7 +302,7 @@ namespace Ink_Canvas.Helpers
/// <returns>派生出的密钥字节数组,长度等于 <paramref name="keyBytes"/>。</returns>
private static byte[] DeriveKey(string password, byte[] salt, int keyBytes)
{
// 注意:Rfc2898DeriveBytes 在 net472 默认 HMACSHA1
// 注意:Rfc2898DeriveBytes 在 net462 默认 HMACSHA1
using (var kdf = new Rfc2898DeriveBytes(password, salt, Pbkdf2Iterations))
{
return kdf.GetBytes(keyBytes);
+2 -2
View File
@@ -4,7 +4,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Ink_Canvas</RootNamespace>
<AssemblyName>InkCanvasForClass</AssemblyName>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net462</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
@@ -667,7 +667,7 @@
<Target Name="CopyIACoreHelper" AfterTargets="Build">
<ItemGroup>
<IACoreHelperFiles Include="$(MSBuildProjectDirectory)\..\InkCanvas.IACoreHelper\bin\$(Configuration)\*.*" />
<IACoreHelperFiles Include="$(MSBuildProjectDirectory)\..\InkCanvas.IACoreHelper\bin\x86\Debug\net462\*.*" />
</ItemGroup>
<Copy SourceFiles="@(IACoreHelperFiles)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" Condition="'@(IACoreHelperFiles)' != ''" />
</Target>
+1 -1
View File
@@ -120,7 +120,7 @@ namespace Ink_Canvas
public OneEuroFilter FilterPressure { get; } = new OneEuroFilter(1f, 0.02f, 1f);
}
private static long RealtimeNowMs() => Environment.TickCount64;
private static long RealtimeNowMs() => Environment.TickCount & 0x7FFFFFFF;
private static float RealtimeClamp(float x, float min, float max)
{
+22 -1
View File
@@ -3,9 +3,12 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Loader;
using System.Threading.Tasks;
#if NETCOREAPP
using System.Runtime.Loader;
#endif
namespace Ink_Canvas.Plugins
{
public class PluginManager : IPluginHost
@@ -26,7 +29,12 @@ namespace Ink_Canvas.Plugins
private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>();
private readonly string _pluginsDirectory;
private readonly List<PluginInfo> _plugins = new List<PluginInfo>();
#if NETCOREAPP
private readonly Dictionary<string, AssemblyLoadContext> _assemblyContexts = new Dictionary<string, AssemblyLoadContext>();
#else
private readonly Dictionary<string, object> _assemblyContexts = new Dictionary<string, object>();
#endif
public IReadOnlyList<PluginInfo> Plugins
{
@@ -49,6 +57,7 @@ namespace Ink_Canvas.Plugins
public async Task LoadAllAsync()
{
#if NETCOREAPP
try
{
if (!Directory.Exists(_pluginsDirectory))
@@ -115,8 +124,13 @@ namespace Ink_Canvas.Plugins
{
LogError("Failed to load plugins", ex);
}
#else
Log("Plugin loading is not supported on .NET Framework");
await Task.CompletedTask;
#endif
}
#if NETCOREAPP
private async Task LoadPluginAsync(string pluginFile)
{
var fileName = Path.GetFileName(pluginFile);
@@ -173,6 +187,7 @@ namespace Ink_Canvas.Plugins
await Task.CompletedTask;
}
#endif
public void UnloadPlugin(PluginInfo plugin)
{
@@ -182,11 +197,15 @@ namespace Ink_Canvas.Plugins
_plugins.Remove(plugin);
plugin.IsLoaded = false;
#if NETCOREAPP
if (_assemblyContexts.TryGetValue(plugin.Id, out var alc))
{
_assemblyContexts.Remove(plugin.Id);
alc.Unload();
}
#else
_assemblyContexts.Remove(plugin.Id);
#endif
Log(string.Format("Plugin unloaded: {0}", plugin.Name));
OnPluginUnloaded(plugin);
@@ -263,6 +282,7 @@ namespace Ink_Canvas.Plugins
}
}
#if NETCOREAPP
private class PluginAssemblyLoadContext : AssemblyLoadContext
{
private readonly AssemblyDependencyResolver _resolver;
@@ -283,5 +303,6 @@ namespace Ink_Canvas.Plugins
return null;
}
}
#endif
}
}
+3 -3
View File
@@ -1215,7 +1215,7 @@ namespace Ink_Canvas.Windows
if (!File.Exists(RecentTimersJsonPath))
{
Array.Fill(_recentTimers, "--:--");
for (int i = 0; i < _recentTimers.Length; i++) _recentTimers[i] = "--:--";
return;
}
@@ -1234,12 +1234,12 @@ namespace Ink_Canvas.Windows
}
else
{
Array.Fill(_recentTimers, "--:--");
for (int i = 0; i < _recentTimers.Length; i++) _recentTimers[i] = "--:--";
}
}
catch (Exception)
{
Array.Fill(_recentTimers, "--:--");
for (int i = 0; i < _recentTimers.Length; i++) _recentTimers[i] = "--:--";
}
}
+119 -65
View File
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0-windows10.0.19041": {
".NETFramework,Version=v4.6.2": {
"AForge.Imaging": {
"type": "Direct",
"requested": "[2.2.5, )",
@@ -60,7 +60,8 @@
"resolved": "2.0.131",
"contentHash": "f71kXNl6PjCqipJ7DQytg1QUBMQ+7j8rF1UyL8UPegymG1G57EYsskdIcf/VmF6JDuts6Dk6F8Hd4ziiz4/3Dw==",
"dependencies": {
"H.NotifyIcon": "2.0.131"
"H.NotifyIcon": "2.0.131",
"System.ValueTuple": "4.5.0"
}
},
"iNKORE.UI.WPF": {
@@ -75,6 +76,7 @@
"resolved": "0.10.2.1",
"contentHash": "nGwuuVul+TcLCTgPmaAZCc0fYFqUpCNZ8PiulVT3gZnsWt/AvxMZ0DSPpuyI/iRPc/NhFIg9lSIR7uaHWV0I/Q==",
"dependencies": {
"System.ValueTuple": "4.5.0",
"iNKORE.UI.WPF": "1.2.8"
}
},
@@ -94,8 +96,10 @@
"resolved": "6.0.0",
"contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.International.Converters.PinYinConverter": {
@@ -104,6 +108,15 @@
"resolved": "1.0.0",
"contentHash": "hEs/VPwGFeVNLf2Wc6k2bMYF71zE6x+lW4MfebRAjkVbAbaa4DbEmdFRfSBymvGLtdsCUvXo2aa/yFKYSCYmEQ=="
},
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net462": "1.0.3"
}
},
"Microsoft.Office.Interop.PowerPoint": {
"type": "Direct",
"requested": "[15.0.4420.1018, )",
@@ -116,9 +129,8 @@
"resolved": "7.1.3",
"contentHash": "A1dglAzb24gjehmb7DwGd07mfyZ1gacAK7ObE0KwDlRc3mayH2QW7cSOy3TkkyELjLg19OQBuhPOj4SpXET9lg==",
"dependencies": {
"Microsoft.Win32.Registry": "4.7.0",
"System.Drawing.Common": "4.7.0",
"System.Reflection.Emit": "4.7.0",
"Microsoft.NETFramework.ReferenceAssemblies": "1.0.0",
"Microsoft.Windows.SDK.Contracts": "10.0.19041.1",
"System.ValueTuple": "4.5.0"
}
},
@@ -165,6 +177,7 @@
"contentHash": "PwcF5yIzcKuhd/3BOxU3QHJA5/xYiuSNSaSpXi2kR3x7ONKel73xi49GfYvRg4mbMN1gRjxduqxQL6iRNNWqBA==",
"dependencies": {
"System.Reflection.Metadata": "5.0.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
"System.Text.Json": "8.0.5"
}
},
@@ -229,10 +242,7 @@
"H.GeneratedIcons.System.Drawing": {
"type": "Transitive",
"resolved": "2.0.131",
"contentHash": "QoNGQrhxzG+dQufa4xRjSqihMy5aVVVZqQUt0fLJbwhs7rcM4hpN1qVkZpZEkHsRgrHfFBC/Ursjh8STY/sg7A==",
"dependencies": {
"System.Drawing.Common": "8.0.0"
}
"contentHash": "QoNGQrhxzG+dQufa4xRjSqihMy5aVVVZqQUt0fLJbwhs7rcM4hpN1qVkZpZEkHsRgrHfFBC/Ursjh8STY/sg7A=="
},
"H.NotifyIcon": {
"type": "Transitive",
@@ -247,21 +257,38 @@
"resolved": "1.27.0",
"contentHash": "We7LtBdoukRg9mqTfa1f5n8z/GQPMKBRj3URk9DiMuqzIHkW1lTgK5njVPSScxsRt4YzW22423tSnLWNm2MJKg=="
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg=="
"contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ=="
"resolved": "1.1.1",
"contentHash": "TMBuzAHpTenGbGgk0SMTwyEkyijY/Eae4ZGsFNYJvAr/LDn1ku3Etp3FPxChmDp5HHF3kzJuoaa08N0xjqAJfQ=="
},
"Microsoft.NETCore.Targets": {
"type": "Transitive",
"resolved": "1.1.3",
"contentHash": "3Wrmi0kJDzClwAC+iBdUBpEKmEle8FQNsCs77fkiOIw/9oYA07bL1EZNX0kQ2OMN3xpwvl0vAtOCYY3ndDNlhQ=="
},
"Microsoft.NETFramework.ReferenceAssemblies.net462": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "IzAV30z22ESCeQfxP29oVf4qEo8fBGXLXSU6oacv/9Iqe6PzgHDKCaWfwMBak7bSJQM0F5boXWoZS+kChztRIQ=="
},
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
@@ -271,50 +298,89 @@
"System.Security.Principal.Windows": "5.0.0"
}
},
"Microsoft.Win32.SystemEvents": {
"Microsoft.Windows.SDK.Contracts": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "9opKRyOKMCi2xJ7Bj7kxtZ1r9vbzosMvRrdEhVhDz8j8MoBGgB+WmC94yH839NPH+BclAjtQ/pyagvi/8gDLkw=="
"resolved": "10.0.19041.1",
"contentHash": "sgDwuoyubbLFNJR/BINbvfSNRiglF91D+Q0uEAkU4ZTO5Hgbnu8+gA4TCc65S56e1kK7gvR1+H4kphkDTr+9bw==",
"dependencies": {
"System.Runtime.WindowsRuntime": "4.6.0",
"System.Runtime.WindowsRuntime.UI.Xaml": "4.6.0"
}
},
"NHotkey": {
"type": "Transitive",
"resolved": "4.0.0",
"contentHash": "5HKzttVKWeKoDQKJd3+J7Dy1MW6gbNNYfftkVufe2ddFQD0kXjnT1IN3ZJBfF6QVEQmHpQSp+/PT7Jo2YyHFcw=="
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.1",
"contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
},
"System.CodeDom": {
"type": "Transitive",
"resolved": "10.0.5",
"contentHash": "hGZWDDJh1U6t7fy3iO4HlZYK1ur1fWE3sTqTNHkHk0Leh0JUcxYM//JtLBNG5g+6D2Lt0+aHH8rc7e5oIlNgCg=="
},
"System.Drawing.Common": {
"System.Collections.Immutable": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "JkbHJjtI/dWc5dfmEdJlbe3VwgZqCkZRtfuWFh5GOv0f+gGCfBtzMpIVkmdkj2AObO9y+oiOi81UGwH3aBYuqA==",
"resolved": "5.0.0",
"contentHash": "FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"dependencies": {
"Microsoft.Win32.SystemEvents": "8.0.0"
"System.Memory": "4.5.4"
}
},
"System.Reflection.Emit": {
"System.Memory": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ=="
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ=="
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==",
"dependencies": {
"System.Collections.Immutable": "5.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
},
"System.Runtime.InteropServices.RuntimeInformation": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw=="
},
"System.Runtime.WindowsRuntime": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "IWrs1TmbxP65ZZjIglNyvDkFNoV5q2Pofg5WO7I8RKQOpLdFprQSh3xesOoClBqR4JHr4nEB1Xk1MqLPW1jPuQ=="
},
"System.Runtime.WindowsRuntime.UI.Xaml": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "r4tNw5v5kqRJ9HikWpcyNf3suGw7DjX93svj9iBjtdeLqL8jt9Z+7f+s4wrKZJr84u8IMsrIjt8K6jYvkRqMSg==",
"dependencies": {
"System.Runtime.WindowsRuntime": "4.6.0"
}
},
"System.Security.AccessControl": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
@@ -328,6 +394,8 @@
"resolved": "8.0.0",
"contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
@@ -336,8 +404,21 @@
"resolved": "8.0.5",
"contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "8.0.0",
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "8.0.0"
"System.Text.Encodings.Web": "8.0.0",
"System.Threading.Tasks.Extensions": "4.5.4",
"System.ValueTuple": "4.5.0"
}
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"System.ValueTuple": {
@@ -356,7 +437,7 @@
"type": "Project"
}
},
"net6.0-windows10.0.19041/win-arm64": {
".NETFramework,Version=v4.6.2/win-arm64": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
@@ -366,17 +447,16 @@
"System.Security.Principal.Windows": "5.0.0"
}
},
"Microsoft.Win32.SystemEvents": {
"System.Runtime.InteropServices.RuntimeInformation": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "9opKRyOKMCi2xJ7Bj7kxtZ1r9vbzosMvRrdEhVhDz8j8MoBGgB+WmC94yH839NPH+BclAjtQ/pyagvi/8gDLkw=="
"resolved": "4.3.0",
"contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw=="
},
"System.Security.AccessControl": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
@@ -384,17 +464,9 @@
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
}
},
"net6.0-windows10.0.19041/win-x64": {
".NETFramework,Version=v4.6.2/win-x64": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
@@ -404,17 +476,16 @@
"System.Security.Principal.Windows": "5.0.0"
}
},
"Microsoft.Win32.SystemEvents": {
"System.Runtime.InteropServices.RuntimeInformation": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "9opKRyOKMCi2xJ7Bj7kxtZ1r9vbzosMvRrdEhVhDz8j8MoBGgB+WmC94yH839NPH+BclAjtQ/pyagvi/8gDLkw=="
"resolved": "4.3.0",
"contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw=="
},
"System.Security.AccessControl": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
@@ -422,17 +493,9 @@
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
}
},
"net6.0-windows10.0.19041/win-x86": {
".NETFramework,Version=v4.6.2/win-x86": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
@@ -442,17 +505,16 @@
"System.Security.Principal.Windows": "5.0.0"
}
},
"Microsoft.Win32.SystemEvents": {
"System.Runtime.InteropServices.RuntimeInformation": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "9opKRyOKMCi2xJ7Bj7kxtZ1r9vbzosMvRrdEhVhDz8j8MoBGgB+WmC94yH839NPH+BclAjtQ/pyagvi/8gDLkw=="
"resolved": "4.3.0",
"contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw=="
},
"System.Security.AccessControl": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
@@ -460,14 +522,6 @@
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net462</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<RootNamespace>Ink_Canvas.Controls</RootNamespace>
@@ -1,69 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{B1A2C3D4-E5F6-7890-ABCD-EF1234567891}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>InkCanvas.IACoreHelper</RootNamespace>
<AssemblyName>InkCanvas.IACoreHelper</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFramework>net462</TargetFramework>
<RootNamespace>InkCanvasForClass.IACoreHelper</RootNamespace>
<AssemblyName>InkCanvasForClass.IACoreHelper</AssemblyName>
<Deterministic>true</Deterministic>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' Or '$(Platform)' == 'x64' Or '$(Platform)' == 'ARM64' ">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DebugSymbols Condition=" '$(Configuration)' == 'Debug' ">true</DebugSymbols>
<DebugType Condition=" '$(Configuration)' == 'Debug' ">full</DebugType>
<DebugType Condition=" '$(Configuration)' != 'Debug' ">pdbonly</DebugType>
<Optimize Condition=" '$(Configuration)' == 'Debug' ">false</Optimize>
<Optimize Condition=" '$(Configuration)' != 'Debug' ">true</Optimize>
<DefineConstants Condition=" '$(Configuration)' == 'Debug' ">DEBUG;TRACE</DefineConstants>
<DefineConstants Condition=" '$(Configuration)' != 'Debug' ">TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsBase" />
<Reference Include="System.Xml" />
<Reference Include="IAWinFX">
<HintPath>..\Ink Canvas\Resources\IACore\IAWinFX.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="IpcProtocol.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net462</TargetFramework>
<UseWPF>true</UseWPF>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
+14 -1
View File
@@ -21,6 +21,19 @@
</div>
> [!IMPORTANT]
> 该分支 `net462` 为 `net6` 分支的微调,使其在 .Net Framework 4.6.2 以及以上版本上运行。
> 受 .Net Framework 版本的限制,该版本 InkCanvasForClass 不支持插件功能。
> 由于该版本不受正式支持,仅在该平台上发生的 Bug 将大概率不会被修复。
> 如果您在使用该版本时遇到任何问题,请前往使用 `net6` 分支的软件构建,感谢您的理解。
> [!NOTE]
> 您可以从此处下载该版本的最新软件构建:
>
> [AnyCPU](https://nightly.link/InkCanvasForClass/community/workflows/dotnet-desktop/net462/InkCanvasForClass.CE.AnyCPU.zip)/[GhProxy](https://gh-proxy.com/https://nightly.link/InkCanvasForClass/community/workflows/dotnet-desktop/net462/InkCanvasForClass.CE.AnyCPU.zip)
>
> [x86](https://nightly.link/InkCanvasForClass/community/workflows/dotnet-desktop/net462/InkCanvasForClass.CE.x86.zip)/[GhProxy](https://gh-proxy.com/https://nightly.link/InkCanvasForClass/community/workflows/dotnet-desktop/net462/InkCanvasForClass.CE.x86.zip)
## 💫 软件说明
使用该版本 InkCanvasForClass,意味着您同意自行承担任何可能存在的问题与风险。建议不要在公众场合(例如公开课,录播课,线上直播课,大型会议)使用未经广泛测试和优化的 Beta 版本,对使用 Beta 版本而带来的任何问题和风险(例如:被班主任批斗,被校长处罚,崩溃而导致的场面混乱,全球海平面上升等),**将由使用者自行承担**,[CJKmkp](https://github.com/CJKmkp) 及其项目的所有维护者不提供任何担保。
@@ -55,7 +68,7 @@
4. 如果上述方法不能解决你的问题,请参考这个链接[【点击此处以跳转】](https://www.inkeys.top/tutorial/ppt-com.html)
### 程序无法正常启动
请检查你的电脑上是否安装了 `.Net Runtime 6.0` 或更高版本。若没有,请[前往官网](https://dotnet.microsoft.com/zh-cn/download/dotnet/6.0)下载安装。
请检查你的电脑上是否安装了 `.Net Framework 4.6.2` 或更高版本。若没有,请[前往官网](https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net462-offline-installer "下载 .Net Framework 4.6.2")下载安装。
如果仍无法运行,请[安装 `Microsoft Office`](https://www.coolhub.top/archives/11)。
-150
View File
@@ -1,150 +0,0 @@
; 脚本由 Inno Setup 脚本向导生成。
; 有关创建 Inno Setup 脚本文件的详细信息,请参阅帮助文档!
#define MyAppName "InkCanvasForClass CE"
#define MyAppVersion "1.7.18.1"
#define MyAppPublisher "CJK_mkp"
#define MyAppURL "https://inkcanvasforclass.github.io"
#define MyAppExeName "InkCanvasForClass.exe"
#define MyAppAssocName MyAppName + ""
#define MyAppAssocExt ".exe"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
[Setup]
; 注意:AppId 的值唯一标识此应用程序。不要在其他应用程序的安装程序中使用相同的 AppId 值。
; (若要生成新的 GUID,请在 IDE 中单击 "工具|生成 GUID"。)
AppId={{CA801226-FD02-4C78-BCF8-753B38E70CB3}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={localappdata}\{#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName}
ChangesAssociations=yes
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=LICENSE
; 取消注释以下行以在非管理员安装模式下运行 (仅为当前用户安装)。
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=.
OutputBaseFilename=InkCanvasForClass CE Setup
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
Name: "english"; MessagesFile: "compiler:Languages\EnglishBritish.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "dotnet6"; Description: "下载并安装 .NET Runtime 6 (运行本程序所需)"; GroupDescription: "运行时组件:"; Flags: unchecked
[Files]
Source: "release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; 注意:不要在任何共享系统文件上使用 "Flags: ignoreversion"
[Registry]
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Code]
var
DownloadPage: TDownloadWizardPage;
function GetDotNet6DownloadUrl: String;
begin
if IsWin64 then
Result := 'https://builds.dotnet.microsoft.com/dotnet/Runtime/6.0.36/dotnet-runtime-6.0.36-win-x64.exe'
else
Result := 'https://builds.dotnet.microsoft.com/dotnet/Runtime/6.0.36/dotnet-runtime-6.0.36-win-x86.exe';
end;
function GetDotNet6InstallerName: String;
begin
if IsWin64 then
Result := 'dotnet-runtime-6.0.36-win-x64.exe'
else
Result := 'dotnet-runtime-6.0.36-win-x86.exe';
end;
procedure InitializeWizard;
begin
DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), nil);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
var
Error: String;
begin
if CurPageID = wpReady then
begin
if IsTaskSelected('dotnet6') then
begin
WizardForm.StatusLabel.Caption := '正在下载 .NET Runtime 6...';
WizardForm.StatusLabel.Visible := True;
DownloadPage.Clear;
DownloadPage.Add(
GetDotNet6DownloadUrl,
GetDotNet6InstallerName, '');
DownloadPage.Show;
try
try
DownloadPage.Download;
except
if DownloadPage.AbortedByUser then
Log('Aborted by user.')
else
begin
Error := Format('%s: %s', [DownloadPage.LastBaseNameOrUrl, GetExceptionMessage]);
SuppressibleMsgBox(AddPeriod(Error), mbCriticalError, MB_OK, IDOK);
end;
Result := False;
Exit;
end;
finally
DownloadPage.Hide;
WizardForm.StatusLabel.Visible := False;
end;
end;
end;
Result := True;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode: Integer;
DotNetInstallerPath: String;
begin
if CurStep = ssPostInstall then
begin
if IsTaskSelected('dotnet6') then
begin
DotNetInstallerPath := ExpandConstant(Format('{tmp}\%s', [GetDotNet6InstallerName]));
if FileExists(DotNetInstallerPath) then
begin
WizardForm.StatusLabel.Caption := '正在安装 .NET Runtime 6...';
WizardForm.StatusLabel.Visible := True;
Log('Installing .NET Runtime 6...');
Exec(DotNetInstallerPath, '/install /quiet /norestart', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
Log(Format('Installation completed with code: %d', [ResultCode]));
WizardForm.StatusLabel.Visible := False;
DeleteFile(DotNetInstallerPath);
end;
end;
end
end;
-112
View File
@@ -1,112 +0,0 @@
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
[changelog]
# A Tera template to be rendered for each release in the changelog.
# See https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits | unique(attribute="message") %}
* {{ commit.message | split(pat="\n") | first | trim }}\
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif %}\
{% if commit.remote.pr_number %} in #{{ commit.remote.pr_number }}{%- endif %}
{% endfor %}
{% endfor %}
----
- 该版本有 {{ statistics.commit_count }} 次提交
- 在版本中共有 {{ statistics.links | length }} 个关联议题和合并请求
{%- if statistics.links | length > 0 %}
{%- for link in statistics.links %}
{{ " " }}- [{{ link.text }}]({{ link.href }}) (被提及 {{ link.count }} 次)
{%- endfor %}
{%- endif %}
感谢 {% for contributor in github.contributors %} @{{ contributor.username }} {%- endfor -%} 为本版本做出了贡献
"""
# Remove leading and trailing whitespaces from the changelog's body.
trim = true
# Render body even when there are no releases to process.
render_always = true
# An array of regex based postprocessors to modify the changelog.
postprocessors = [
# Replace the placeholder <REPO> with a URL.
#{ pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" },
]
# render body even when there are no releases to process
# render_always = true
# output file path
# output = "test.md"
[git]
# Parse commits according to the conventional commits specification.
# See https://www.conventionalcommits.org
conventional_commits = true
# Exclude commits that do not match the conventional commits specification.
filter_unconventional = false
# Require all commits to be conventional.
# Takes precedence over filter_unconventional.
require_conventional = false
# Split commits on newlines, treating each line as an individual commit.
split_commits = false
# An array of regex based parsers to modify commit messages prior to further processing.
commit_preprocessors = [
# Replace issue numbers with link templates to be updated in `changelog.postprocessors`.
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
# Check spelling of the commit message using https://github.com/crate-ci/typos.
# If the spelling is incorrect, it will be fixed automatically.
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
]
# Prevent commits that are breaking from being excluded by commit parsers.
protect_breaking_commits = false
# An array of regex based parsers for extracting data from the commit message.
# Assigns commits to groups.
# Optionally sets the commit's scope and can decide to exclude commits from further processing.
commit_parsers = [
{ message = "^(feat|add|新增|添加)", group = "<!-- 00 -->🚀 新增功能" },
{ message = "^(fix|修复)", group = "<!-- 01 -->🐛 修复" },
{ message = "^doc", group = "<!-- 05 -->📚 文档更改" },
{ message = "^(improve|改进|优化)", group = "<!-- 03 -->⚡ 体验优化" },
{ message = "^refactor", group = "<!-- 02 -->🚜 重构" },
{ message = "^style", group = "<!-- 06 -->🎨 格式化" },
{ message = "^(delete|删除|移除)", group = "<!-- 04 -->❌ 删除功能" },
{ message = "^test", group = "<!-- 07 -->🧪 测试" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^Merge branch", skip = true },
{ message = "^chore|^ci", group = "<!-- 08 -->⚙️ 杂项" },
{ body = ".*security", group = "<!-- 09 -->🛡️ 安全" },
{ message = "^Revert", group = "<!-- 10 -->◀️ 回退" },
{ message = "^Merge pull request", group = "<!-- 11 -->🔀 合并请求" },
{ message = "^(版本|version|更新版本号)", group = "<!-- 12 -->🎉 版本号更新" },
{ message = ".*", group = "<!-- 13 -->💼 其他更改" },
]
# Exclude commits that are not matched by any commit parser.
filter_commits = false
# An array of link parsers for extracting external references, and turning them into URLs, using regex.
link_parsers = [
{ pattern = "#(\\d+)", href = "https://github.com/InkCanvasForClass/community/issues/$1"},
]
# Include only the tags that belong to the current branch.
use_branch_tags = false
# Order releases topologically instead of chronologically.
topo_order = false
# Order releases topologically instead of chronologically.
topo_order_commits = true
# Order of commits in each group/release within the changelog.
# Allowed values: newest, oldest
sort_commits = "oldest"
# Process submodules commits
recurse_submodules = false