wip(windows): 补齐隐私与许可交付,修好外部人的构建入口
- 新增 PRIVACY.md:逐项写明每个联网端点、发送内容、默认开关与关闭方式,明确云候选默认开启、
token 在 config.toml 明文存储、无任何遥测
- 设置页「用户协议」「隐私政策」两个无 handler 的死按钮接上;前者改名为「开源许可协议」指向
LICENSE,开源产品的用户条款就是许可证本身,不再承诺一份不存在的 EULA
- 安装包随包装入 GPL 正文并在安装向导显示(GPLv3 §4/§6),补上打包测试断言
- release.yml 增加 build provenance attestation,并在发布后向 MSIME-Web 发 repository_dispatch,
让 msime.app/update.json 不再等两小时一次的 cron
- 所有 CMakePresets 的 vcpkg 路径改用 $env{VCPKG_ROOT},server 的 Boost 回退不再指向个人目录
- ui/README.md 指向本机绝对路径的 markdown 死链改成相对链接
- 新增 check-developer-paths.sh 并接入 required 的 quality 检查,防止路径回潮
- docs/installation.md 不再写死版本号
This commit is contained in:
1 parent
6341b4fffc
commit
4fc16952b3
18 files changed
+182
-30
No files matched your search
@@ -24,6 +24,10 @@ jobs:
|
||||
# Ignore style suggestions, but fail on shell correctness warnings and errors.
|
||||
SHELLCHECK_OPTS: --severity=warning
|
||||
run: actionlint -color
|
||||
# Part of "Workflow validation" rather than a job of its own: it is a two-second grep, and this
|
||||
# job is already a required check, so the guard starts protecting main immediately.
|
||||
- name: Reject developer-specific paths in build inputs
|
||||
run: bash scripts/ci/check-developer-paths.sh
|
||||
dependencies:
|
||||
name: Dependency review
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
@@ -312,6 +312,11 @@ jobs:
|
||||
timeout-minutes: 60
|
||||
permissions:
|
||||
contents: write
|
||||
# Build provenance. Unlike Authenticode this costs nothing and needs no certificate, and the
|
||||
# Sigstore transparency log it writes to is outside this organisation's control, so it is the
|
||||
# one integrity signal a repository admin cannot forge by swapping a release asset.
|
||||
id-token: write
|
||||
attestations: write
|
||||
env:
|
||||
DICTIONARY_TAG: ${{ needs.dependencies.outputs.dictionary_tag }}
|
||||
# download-dictionaries.sh stages MetasequoiaImeDict/out under this root, and
|
||||
@@ -439,6 +444,11 @@ jobs:
|
||||
installer/app_data/product-manifest.json
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Attest the installer's build provenance
|
||||
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
|
||||
with:
|
||||
subject-path: ${{ steps.asset.outputs.asset_path }}
|
||||
|
||||
- name: Revalidate the draft release target
|
||||
shell: bash
|
||||
env:
|
||||
@@ -461,3 +471,23 @@ jobs:
|
||||
PRODUCT_MANIFEST: installer/app_data/product-manifest.json
|
||||
RELEASE_TRIGGER: ${{ github.event_name }}
|
||||
run: bash scripts/ci/publish-release.sh
|
||||
|
||||
# msime.app/update.json is what the settings page's "检查更新" reads, and MSIME-Web only
|
||||
# regenerated it from a */30 cron. Scheduled events on public repositories are delayed heavily
|
||||
# -- measured runs sat roughly two hours apart -- so the site advertised an old version for
|
||||
# hours after every release. MSIME-Web already declares a repository_dispatch trigger for
|
||||
# exactly this and nothing was ever sending it.
|
||||
#
|
||||
# This runs after publishing on purpose. If the dispatch fails the release is already out and
|
||||
# correct; what the failure means is that the website is now stale and someone has to act, so
|
||||
# it is reported as a failure rather than swallowed.
|
||||
- name: Refresh the download manifest on msime.app
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
||||
run: |
|
||||
if [[ -z "$GH_TOKEN" ]]; then
|
||||
echo '::error::RELEASE_PLEASE_TOKEN is required to notify MSIME-Web; msime.app/update.json will stay on the previous version until its cron catches up.'
|
||||
exit 1
|
||||
fi
|
||||
gh api --method POST repos/metasequoiaime/MSIME-Web/dispatches -f event_type=update-manifest
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
# Privacy
|
||||
|
||||
Metasequoia IME for Windows converts keystrokes, composition text and candidates locally, using the shared C++ engine and the SQLite dictionaries installed under `%LOCALAPPDATA%\metasequoiaime\`. Local conversion never contacts the network. This document describes the optional online features that do, exactly what each one sends, and how to turn each one off.
|
||||
|
||||
Every claim below is checkable against this repository. Where a default matters, the file and key that set it are named.
|
||||
|
||||
## Network features
|
||||
|
||||
**Cloud candidates are enabled by default.** `general.cloud_candidates` is `true` in the shipped `installer/default_config/config.default.toml`, and `server/src/config/ime_config.cpp` also defaults to `true` when the key is absent. While a composition is active, the typed spelling is sent over HTTPS to Google's input-tools service (`https://inputtools.google.com/request`) to fetch one extra candidate. Google receives that spelling, the IP address and standard request metadata. No committed text, dictionary content, learned frequencies, settings or account data are sent. This is the one online feature that needs no credential, so it is the one that is actually live on a fresh install. Turn it off in 设置 → 输入 → 云候选, or set `cloud_candidates = false` under `[general]` in `%LOCALAPPDATA%\metasequoiaime\config.toml`.
|
||||
|
||||
**AI candidate suggestions require a token you supply.** `[ai_assistant] enabled` ships as `true`, but the shipped token values are placeholders and the runtime rejects placeholders, so no request is made until a real token is entered. Once configured, the segmented spelling and the surrounding composition context are sent to the provider's Chat Completions endpoint — DeepSeek, OpenAI, SiliconFlow or Groq, per `[ai_assistant] provider`. That provider's own privacy terms then apply. Set `enabled = false` to disable it outright.
|
||||
|
||||
**Candidate translation requires credentials you supply.** `[tencent_tmt] enabled` ships as `true` with placeholder credentials, so nothing is sent until real Tencent Cloud keys are entered. Once configured, candidate text that the local dictionaries could not gloss is sent to `https://tmt.tencentcloudapi.com`. Translations are display metadata and never change the text that is committed.
|
||||
|
||||
**Voice input requires a token you supply.** `[voice_input] voice_input` ships as `true` with a placeholder ASR token, so the hotkeys do nothing over the network until a real token is entered. Once configured, recorded audio is uploaded to the configured endpoint — Doubao (`wss://openspeech.bytedance.com/...`), OpenAI, SiliconFlow or Groq. If text polishing is enabled, the returned transcript is additionally sent to the configured Chat Completions endpoint.
|
||||
|
||||
**The update check runs only when you press the button.** 设置 → 关于 → 检查更新 fetches `https://msime.app/update.json` and compares the version. There is no background or scheduled update check, and the request carries no identifier beyond the IP address and a cache-busting timestamp.
|
||||
|
||||
## No telemetry
|
||||
|
||||
There is no analytics, telemetry, crash reporting or usage measurement of any kind. No third-party SDK for those purposes is linked, and there is no endpoint that receives usage data. This is verifiable: searching the `server/`, `windows/`, `ui/`, `ui-html/` and `installer/` trees for `telemetry`, `analytics`, `sentry`, `matomo`, `posthog`, `amplitude`, `mixpanel`, `crashpad` and `breakpad` returns nothing.
|
||||
|
||||
## Local data
|
||||
|
||||
Settings live in `%LOCALAPPDATA%\metasequoiaime\config.toml`. Learned word frequencies and user-created words are stored in `%LOCALAPPDATA%\metasequoiaime\msime_user.db`. Diagnostic logs are written to `%LOCALAPPDATA%\metasequoiaime\log\` and record process lifecycle and error conditions, not typed content. Clipboard history is disabled by default (`clipboard_history = false`); when enabled it records copied text locally and is cleared as soon as it is switched off.
|
||||
|
||||
**API tokens are stored in plain text in `config.toml`.** This differs from the other platforms — macOS and iOS use the Keychain, and Linux uses the desktop Secret Service — and it means anything able to read that file can read the tokens. Use provider tokens scoped to this purpose, and treat the file as a secret when backing up or syncing the profile directory.
|
||||
|
||||
All of these files sit in the current user's profile and are protected only by that account's permissions.
|
||||
|
||||
## Uninstall
|
||||
|
||||
Uninstalling deletes `%LOCALAPPDATA%\metasequoiaime` and `%PROGRAMDATA%\metasequoiaime` in full, including the user dictionary, settings and any installed skins. Back up `msime_user.db` first if you want to keep learned words. An in-place upgrade behaves differently: it preserves `msime_user.db`, `config.toml`, `config.base.toml` and the `skins` directory, and replaces everything else.
|
||||
|
||||
## General
|
||||
|
||||
Metasequoia IME does not sell or share personal data, and installing or using it does not create an account. If a future release adds another network-backed feature, this notice must be updated before that feature ships.
|
||||
|
||||
Security or privacy concerns should be reported privately as described in the organisation [SECURITY.md](https://github.com/metasequoiaime/.github/blob/main/SECURITY.md).
|
||||
@@ -1,7 +1,6 @@
|
||||
# 安装水杉输入法
|
||||
|
||||
> 适用版本:v0.0.9.2(2026 年 8 月 25 日发布,内测版)
|
||||
> 若你安装的是更新版本,请以 [Releases](https://github.com/metasequoiaime/MSIME-Windows/releases) 中的说明为准。
|
||||
> 本文描述当前内测版的安装流程。具体版本号、下载链接与该版本的已知问题一律以 [Releases](https://github.com/metasequoiaime/MSIME-Windows/releases) 页面为准——这里不再写死版本号,避免文档落后于实际发布。
|
||||
|
||||
## 目录
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake"
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -52,6 +52,7 @@ $pinyinTable = Join-Path $RepoRoot (Join-Path $ServerDirectory 'assets\tables\pi
|
||||
$helpcodeSource = Join-Path $RepoRoot (Join-Path $HelpCodeDirectory 'helpcodes')
|
||||
$appIcon = Join-Path $RepoRoot (Join-Path $ServerDirectory 'src\resource\MetasequoiaIME.ico')
|
||||
$thirdPartyNotices = Join-Path $RepoRoot (Join-Path $NoticesDirectory 'THIRD_PARTY_NOTICES.txt')
|
||||
$license = Join-Path $RepoRoot 'LICENSE'
|
||||
$dictionaryDb = Join-Path $RepoRoot (Join-Path $DictionaryDirectory 'out\msime.db')
|
||||
$dictionaryManifest = Join-Path $RepoRoot (Join-Path $DictionaryDirectory 'out\dictionary-manifest.json')
|
||||
$japaneseModel = Join-Path $RepoRoot (Join-Path $DictionaryDirectory 'out\dict_japanese.dat')
|
||||
@@ -67,6 +68,7 @@ Assert-PathExists -LiteralPath $tsf64Release -Description '64 位 TSF Release DL
|
||||
Assert-PathExists -LiteralPath $serverConfig -Description 'Server config.toml'
|
||||
Assert-PathExists -LiteralPath $appIcon -Description '应用图标'
|
||||
Assert-PathExists -LiteralPath $thirdPartyNotices -Description '第三方声明 THIRD_PARTY_NOTICES.txt'
|
||||
Assert-PathExists -LiteralPath $license -Description '许可证 LICENSE'
|
||||
Assert-PathExists -LiteralPath (Join-Path $webviewRoot 'shared') -Description '共享 WebView 消息契约'
|
||||
Assert-PathExists -LiteralPath (Join-Path $webviewRoot 'candwnd') -Description '候选窗 HTML 目录'
|
||||
Assert-PathExists -LiteralPath (Join-Path $webviewRoot 'ftb') -Description '悬浮工具栏 HTML 目录'
|
||||
@@ -174,6 +176,12 @@ Copy-Item -LiteralPath $appIcon -Destination (Join-Path $PSScriptRoot 'Metasequo
|
||||
# rime-ice is GPL-3.0 and requires attribution, and its content forms the bulk of msime.db, so the
|
||||
# notice has to reach the user's disk rather than only exist in the source repository.
|
||||
Copy-Item -LiteralPath $thirdPartyNotices -Destination (Join-Path $PSScriptRoot 'THIRD_PARTY_NOTICES.txt') -Force
|
||||
# GPLv3 sections 4 and 6 require a copy of the licence to reach whoever receives the program, and the
|
||||
# packaged product includes third-party GPL-3.0 dictionary data. macOS and Linux already install the
|
||||
# licence text (CMakeLists.txt in MSIME-Apple and MSIME-Linux); Windows is the platform that actually
|
||||
# ships at volume and was the only one omitting it. THIRD_PARTY_NOTICES.txt does not cover this: it
|
||||
# points at "the LICENSE file" without carrying the GPL text itself.
|
||||
Copy-Item -LiteralPath $license -Destination (Join-Path $PSScriptRoot 'LICENSE.txt') -Force
|
||||
|
||||
$targetIss = Join-Path $PSScriptRoot 'msime_setup.iss'
|
||||
Assert-PathExists -LiteralPath $targetIss -Description '安装脚本'
|
||||
|
||||
@@ -47,6 +47,8 @@ DisableProgramGroupPage=yes
|
||||
OutputDir=Output
|
||||
OutputBaseFilename=MetasequoiaIME_Setup_v{#MyAppVersion}{#MyOutputSuffix}
|
||||
SetupIconFile={#MySourceRoot}\MetasequoiaIME.ico
|
||||
; 安装向导中显示 GPLv3 正文。Prepare-PackageFiles.ps1 会把仓库根的 LICENSE 拷成这个文件。
|
||||
LicenseFile={#MySourceRoot}\LICENSE.txt
|
||||
Compression=lzma2
|
||||
SolidCompression=yes
|
||||
; 安装和卸载界面自动跟随 Windows 的浅色/深色模式。
|
||||
@@ -83,6 +85,12 @@ Source: "{#MySourceRoot}\MetasequoiaIME.ico"; \
|
||||
Source: "{#MySourceRoot}\THIRD_PARTY_NOTICES.txt"; \
|
||||
DestDir: "{commonpf64}\metasequoiaime"; Flags: ignoreversion
|
||||
|
||||
; GPLv3 第 4、6 条要求分发时向接收者提供许可证副本,而 THIRD_PARTY_NOTICES.txt 只是指向
|
||||
; "the LICENSE file"、本身不含 GPL 正文。macOS 与 Linux 的 CMake 安装规则早已随包装入许可证,
|
||||
; Windows 是唯一大规模分发却漏掉这一步的平台。
|
||||
Source: "{#MySourceRoot}\LICENSE.txt"; \
|
||||
DestDir: "{commonpf64}\metasequoiaime"; Flags: ignoreversion
|
||||
|
||||
; TSF DLL 使用版本独立目录,避免升级时覆盖仍被进程加载的 DLL。
|
||||
Source: "{#MySourceRoot}\tsf_dll\32\*.dll"; \
|
||||
DestDir: "{commonpf32}\metasequoiaime\{code:GetVersionDir}"; \
|
||||
|
||||
@@ -19,6 +19,7 @@ try {
|
||||
'windows/build32-release/Release/MetasequoiaImeTsf.dll',
|
||||
'windows/build64-release/Release/MetasequoiaImeTsf.dll',
|
||||
'THIRD_PARTY_NOTICES.txt',
|
||||
'LICENSE',
|
||||
'server/assets/config/config.toml',
|
||||
'server/src/resource/MetasequoiaIME.ico',
|
||||
'vendor/MetasequoiaImeEngine/helpcode/helpcodes/helpcode.txt',
|
||||
@@ -40,7 +41,7 @@ try {
|
||||
& (Join-Path $installer 'Prepare-PackageFiles.ps1') -RepoRoot $fixture -TargetVersion '2026.9.1'
|
||||
foreach ($file in @('app_data/html/webview2/shared/runtime.js', 'app_data/dictionary-manifest.json',
|
||||
'tsf_dll/32/MetasequoiaImeTsf.dll', 'tsf_dll/64/MetasequoiaImeTsf.dll',
|
||||
'app_data/helpcodes/helpcode.txt', 'THIRD_PARTY_NOTICES.txt')) {
|
||||
'app_data/helpcodes/helpcode.txt', 'THIRD_PARTY_NOTICES.txt', 'LICENSE.txt')) {
|
||||
if (-not (Test-Path (Join-Path $installer $file))) { throw "Missing packaged file: $file" }
|
||||
}
|
||||
if (Test-Path (Join-Path $installer 'server_exe/MetasequoiaImeServerTests.exe')) { throw 'Packaged a test executable' }
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Fail if a build input names somebody's home directory.
|
||||
#
|
||||
# CI never noticed these because it does not use the presets: ci.yml and release.yml pass
|
||||
# -DCMAKE_TOOLCHAIN_FILE explicitly, and release.yml even carries a comment saying the presets point
|
||||
# at a developer machine and cannot be used. So the paths only broke people following the README,
|
||||
# which is exactly the population this repository is trying to recruit.
|
||||
#
|
||||
# Editor configuration is deliberately out of scope: the .clangd files are generated per machine by
|
||||
# each component's scripts/prepare_env.py and are expected to hold absolute local paths.
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
|
||||
pattern='(C:[\\/]+[Uu]sers[\\/]+|/Users/|/home/)[A-Za-z0-9_.-]+'
|
||||
|
||||
# Listed into a file rather than an array: mapfile is bash 4+, and macOS still ships bash 3.2, so a
|
||||
# contributor running this locally would otherwise get a confusing "command not found".
|
||||
candidates=$(git ls-files \
|
||||
'*.cmake' \
|
||||
'CMakeLists.txt' \
|
||||
'**/CMakeLists.txt' \
|
||||
'*CMakePresets.json' \
|
||||
'*CMakeUserPresets.json' \
|
||||
'*.md' \
|
||||
| grep -v '^vendor/' || true)
|
||||
|
||||
if [[ -z "$candidates" ]]; then
|
||||
echo 'No build inputs to check.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if matches=$(printf '%s\n' "$candidates" | tr '\n' '\0' | xargs -0 grep -InE "$pattern"); then
|
||||
echo 'Build inputs must not hardcode a developer home directory.'
|
||||
echo 'Use $env{VCPKG_ROOT} in presets, an environment variable with a documented fallback in CMake, and a relative link in Markdown.'
|
||||
echo
|
||||
echo "$matches"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 'No developer-specific paths in build inputs.'
|
||||
@@ -12,12 +12,16 @@ include(CTest)
|
||||
set(MSIME_VENDOR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../vendor")
|
||||
|
||||
# Boost
|
||||
# The author's machine default keeps working untouched; local setups can
|
||||
# override via the BOOST_ROOT environment variable.
|
||||
if(DEFINED ENV{BOOST_ROOT})
|
||||
# An explicit -DBoost_ROOT wins, then BOOST_ROOT from the environment, and only then the scoop
|
||||
# layout under the current user's profile. The fallback used to name one developer's home directory,
|
||||
# which meant anyone else without BOOST_ROOT set got a configure failure pointing at a path that
|
||||
# does not exist on their machine.
|
||||
if(NOT DEFINED Boost_ROOT)
|
||||
if(DEFINED ENV{BOOST_ROOT})
|
||||
set(Boost_ROOT "$ENV{BOOST_ROOT}")
|
||||
else()
|
||||
set(Boost_ROOT "C:/Users/sonnycalcr/scoop/apps/boost/current")
|
||||
elseif(DEFINED ENV{USERPROFILE} AND EXISTS "$ENV{USERPROFILE}/scoop/apps/boost/current")
|
||||
set(Boost_ROOT "$ENV{USERPROFILE}/scoop/apps/boost/current")
|
||||
endif()
|
||||
endif()
|
||||
set (Boost_USE_STATIC_LIBS ON)
|
||||
find_package(Boost REQUIRED COMPONENTS locale json)
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/sonnycalcr/scoop/apps/vcpkg/current/"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/sonnycalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"VCPKG_TARGET_TRIPLET": "x64-windows"
|
||||
}
|
||||
@@ -19,10 +19,10 @@
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"binaryDir": "${sourceDir}/build-release",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/sonnycalcr/scoop/apps/vcpkg/current/"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/sonnycalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"VCPKG_TARGET_TRIPLET": "x64-windows"
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import { setupToggleButton } from './shared';
|
||||
|
||||
const UPDATE_MANIFEST_URL = 'https://msime.app/update.json';
|
||||
const RELEASES_PAGE_URL = 'https://github.com/metasequoiaime/MSIME-Windows/releases';
|
||||
const LICENSE_URL = 'https://github.com/metasequoiaime/MSIME-Windows/blob/main/LICENSE';
|
||||
const PRIVACY_URL = 'https://github.com/metasequoiaime/MSIME-Windows/blob/main/PRIVACY.md';
|
||||
const REQUEST_TIMEOUT_MS = 10000;
|
||||
|
||||
type UpdateManifest = {
|
||||
@@ -74,6 +76,21 @@ export function setupAboutSettings(): void {
|
||||
updateConfig('general.tsf_diagnostic_log', active);
|
||||
});
|
||||
|
||||
// These two rows shipped as buttons with no handler, so the settings page advertised a privacy
|
||||
// policy that did nothing when pressed. They are wired to the documents that actually govern the
|
||||
// software; the terms a user agrees to for an open-source product are its licence.
|
||||
for (const [id, url] of [
|
||||
['about-license-link', LICENSE_URL],
|
||||
['about-privacy-link', PRIVACY_URL],
|
||||
] as const) {
|
||||
const button = document.getElementById(id);
|
||||
if (button instanceof HTMLButtonElement) {
|
||||
button.addEventListener('click', () => postExternalUrl(url));
|
||||
} else {
|
||||
console.warn(`[about] document link ${id} not found`);
|
||||
}
|
||||
}
|
||||
|
||||
const checkButton = document.getElementById('about-check-update');
|
||||
const versionLabel = document.querySelector('#about-settings .about-version');
|
||||
const statusLabel = document.getElementById('about-update-status');
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
</div>
|
||||
<button id="about-check-update" type="button" class="about-update-button">检查更新</button>
|
||||
</div>
|
||||
<button type="button" class="about-link-row about-document-link">
|
||||
<span class="about-link-title">用户协议</span><span class="about-link-arrow" aria-hidden="true">↗</span>
|
||||
<button id="about-license-link" type="button" class="about-link-row about-document-link">
|
||||
<span class="about-link-title">开源许可协议</span><span class="about-link-arrow" aria-hidden="true">↗</span>
|
||||
</button>
|
||||
<button type="button" class="about-link-row about-document-link">
|
||||
<button id="about-privacy-link" type="button" class="about-link-row about-document-link">
|
||||
<span class="about-link-title">隐私政策</span><span class="about-link-arrow" aria-hidden="true">↗</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
"displayName": "Visual Studio 2026 + vcpkg (Debug)",
|
||||
"inherits": "vs2026-base",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake"
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -22,10 +22,10 @@
|
||||
"displayName": "Visual Studio 2026 + vcpkg (Release)",
|
||||
"inherits": "vs2026-base",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/SonnyCalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake"
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ cmake -S . -B build
|
||||
cmake --build build --config Debug
|
||||
```
|
||||
|
||||
如果本机的 `vcpkg` 不在 `C:/Users/SonnyCalcr/scoop/apps/vcpkg/current`,先按自己的环境修改 [CMakeUserPresets.json](C:/Users/SonnyCalcr/EDisk/CppCodes/IMECodes/RelatedProjects/msimeui/CMakeUserPresets.json:1) 里的 `VCPKG_ROOT` 和 `CMAKE_TOOLCHAIN_FILE`。
|
||||
preset 里的 vcpkg 路径取自环境变量 `VCPKG_ROOT`,配置前设好它即可,不需要改文件:`$env:VCPKG_ROOT = 'C:\path\to\vcpkg'`。要写死本机路径的话,改 [CMakeUserPresets.json](CMakeUserPresets.json) 里的 `VCPKG_ROOT` 和 `CMAKE_TOOLCHAIN_FILE`。
|
||||
|
||||
也可以直接使用 `scripts/` 里的 PowerShell 脚本:
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/sonnycalcr/scoop/apps/vcpkg/current/"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/sonnycalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
@@ -18,10 +18,10 @@
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"binaryDir": "${sourceDir}/build-release",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:/Users/sonnycalcr/scoop/apps/vcpkg/current/"
|
||||
"VCPKG_ROOT": "$penv{VCPKG_ROOT}"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "C:/Users/sonnycalcr/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user