Skip to content
墨迹 edited this page Aug 26, 2026 · 5 revisions

构建方法

Windows

安装 Rust MSVC 工具链和 Visual Studio Build Tools 2022(Desktop development with C++),然后:

cargo build --release

输出:

target\\release\\url-scheme-handler.exe

Linux

Ubuntu/Debian 示例依赖:

sudo apt update
sudo apt install -y build-essential pkg-config libgtk-3-dev libxdo-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev

然后:

cargo build --release

输出:

target/release/url-scheme-handler

macOS

安装 Xcode Command Line Tools:

xcode-select --install

然后:

cargo build --release

macOS 还提供 .app 打包脚本:

./packaging/macos/build-app.sh
open "URL Scheme Handler.app"

macOS 的 Objective-C URL Event bridge 在 macos/url_handler.m 中。它通过 NSAppleEventManager 处理 App 已运行时收到的 ush:// URL,不依赖替换 eframe 的 AppDelegate。

Clone this wiki locally