This repository was archived by the owner on Apr 28, 2026. It is now read-only.
feat(onboarding): 首次启动引导、运行时依赖管理与构建系统增强#1
Open
yblpoi wants to merge 24 commits into
Open
Conversation
修改多处代码路径获取逻辑,统一使用 get_app_config_dir() 获取标准配置目录 新增 migrate_old_data() 函数用于将旧路径数据迁移到新目录
- 仅在Macos上进行测试 - 后续在windows上测试稳定后,尝试修改打包
feat(ui): 更新欢迎向导以支持新特性复选框和运行时检查
- Introduced helper functions to retrieve `_MEIPASS` and application root paths in config.py for better compatibility with PyInstaller. - Updated FlightDetector and KeypointDetector to utilize the new runtime path functions, ensuring correct model loading in frozen environments. - Refactored main.py to inject patch paths and set the application root dynamically, improving the handling of runtime configurations. - Enhanced BirdID dock panel to use runtime paths for resource loading, ensuring consistent behavior across different environments. - Improved type hinting and error handling across various modules for better code clarity and robustness.
…alog on interrupted initialization - Adjusted button widths in StyledMessageBox based on the number of buttons. - Added a check in SuperPickyMainWindow to show an environment repair dialog if initialization was interrupted. - Updated WelcomeOnboardingDialog to include a runtime status page with detailed runtime information. - Introduced new scripts for building full and lite versions of the application on macOS. - Implemented a comprehensive build script for macOS that includes signing and DMG creation.
- Introduced structured progress events for onboarding flows in `core/initialization_progress.py`. - Updated `ui/welcome_onboarding_dialog.py` to utilize the new progress model, improving the separation of UI logic and progress tracking. - Refactored progress emission in `scripts/download_models.py` to provide detailed feedback during resource downloads. - Improved pip argument construction in `core/runtime_bootstrap.py` to include a raw progress bar. - Enhanced runtime requirements management in `core/runtime_requirements.py` with additional documentation and improved method signatures. - Removed legacy requirements file path function to streamline dependency management.
Mac版本有待测试
There was a problem hiding this comment.
Pull request overview
This PR introduces a first-launch onboarding + initialization pipeline for Lite builds, strengthens runtime/resource provisioning (including source probing, downloads, and patch gating/cleanup), and modernizes release/build tooling across Windows/macOS.
Changes:
- Added initialization subsystems (source probing, structured progress model, runtime requirements/bootstrap, safer patch validation/cleanup, directory scan safety checks).
- Updated UI + i18n to support onboarding/repair flows and improved dialogs/batch scanning UX.
- Reworked build/release automation (Python build scripts, new Lite specs, CI workflow, Inno templates, legacy script wrappers).
Reviewed changes
Copilot reviewed 54 out of 55 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| workflows/intel-build.md | Updates macOS Intel build instructions to new Python build script. |
| workflows/dev_docs/project_structure.md | Documents new build script entrypoints. |
| ui/custom_dialogs.py | Adjusts dialog button sizing/centering. |
| ui/birdname_search_widget.py | Migrates BirdName paths to config helpers and refactors minor UI/style. |
| tools/update_checker.py | Skips patch checks safely when runtime/channel disallows patches. |
| tools/patch_manager.py | Adds patch channel validation + safer patch cleanup and application guards. |
| superpicky_cli.py | Updates batch scanning to new scanner API + adds dangerous-root guard. |
| scripts/verify_patch_cleanup_regression.py | Adds manual regression checker for patch cleanup during init flows. |
| scripts/ci_release.py | Adds CI helper utilities for release metadata, assets, patch packaging, secrets. |
| requirements_cuda.txt | Adds NJU PyTorch CUDA extra index mirror. |
| main.py | Refactors early bootstrap: patch overlay gating, runtime bootstrap dispatch, migrations, logging. |
| locales/zh_CN.json | Adds onboarding/repair/scan safety strings and renames update menu label. |
| locales/en_US.json | Adds onboarding/repair/scan safety strings and renames update menu label. |
| inno/SuperPicky_CUDA_Patch.iss | Parameterizes version/hash/exe naming for patch installer. |
| inno/SuperPicky.iss | Simplifies and parameterizes Full installer script. |
| inno/SuperPicky-lite.iss | Adds Lite installer script template. |
| core/source_probe.py | Adds HTTP-based mirror probing and selection helpers. |
| core/runtime_requirements.py | Centralizes platform runtime requirements in Python. |
| core/runtime_bootstrap.py | Adds frozen-runtime pip bootstrapper for Windows Lite. |
| core/recursive_scanner.py | Adds DFS scan results model + dangerous-root detection and new scan API. |
| core/keypoint_detector.py | Switches model path resolution to install-scoped helpers; improves typing/guards. |
| core/initialization_progress.py | Adds structured progress events + deterministic animation model. |
| core/flight_detector.py | Switches model path resolution to install-scoped helpers; improves typing/guards. |
| core/build_info.py | Updates injected build metadata and release channel. |
| core/batch_processor.py | Accepts scanned directory summaries and reduces redundant counting. |
| build_release_win.py | Adds Lite build support, new spec selection, zip creation via stdlib, templated Inno injection. |
| build_release_lite_win.bat | Adds Lite Windows wrapper invoking Python build script. |
| build_release_lite_mac.sh | Adds Lite macOS wrapper invoking Python build script. |
| build_release_full_mac.sh | Adds Full macOS wrapper invoking Python build script. |
| build_release_cuda.bat | Redirects CUDA build to Python build script with consistent args. |
| build_release_cpu.bat | Simplifies CPU wrapper to call consolidated build script. |
| build_release_all.bat | Builds CPU + Lite in sequence. |
| build_release.sh | Replaces legacy macOS shell build with compatibility wrapper to Python script. |
| build_release.bat | Replaces legacy Windows shell build with compatibility wrapper to Python script. |
| birdid/osea_classifier.py | Migrates resource path logic to install-scoped helpers; formatting cleanups. |
| ai_model.py | Ensures YOLO model path is absolute and exists before loading. |
| advanced_config.py | Adds initialization/runtime selection state and defaults auto update to false. |
| SuperPicky_lite_win.spec | Adds Windows Lite spec excluding torch bundles and includes bootstrap hiddenimports/data. |
| SuperPicky_lite.spec | Adds macOS Lite spec. |
| SuperPicky_full.spec | Adds wrapper spec to keep legacy full spec stable. |
| SuperPicky.spec | Adds env overrides for target arch/codesign/entitlements and version injection. |
| CLAUDE.md | Expands verification and repo guidance. |
| AGENTS.md | Expands agent/dev guidelines and verification notes. |
| .gitignore | Ignores .python-version. |
| .github/workflows/build-release-lite.yml | Adds GitHub Actions workflow to build/release Lite for Windows/macOS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更概述 / Summary of Changes
本 PR 引入了全新的"首次启动引导"(Onboarding)流程,并配套完善了运行时依赖管理、模型自动下载、补丁与更新检查机制,同时改进了构建系统以支持 macOS / Windows 双平台 Lite 版本发布。
This PR introduces a brand-new first-launch onboarding wizard, runtime dependency management, automatic model downloads, patch/update checking, and improved build tooling for both macOS and Windows Lite distributions.
主要改动 / Key Changes
🚀 首次启动引导 / First-Launch Onboarding
ui/welcome_onboarding_dialog.py),支持用户设置摄影等级、自动更新选项、运行时安装位置⚙️ 运行时与初始化 / Runtime & Initialization
core/initialization_manager.py)core/initialization_progress.py),引入结构化进度事件,分离 UI 与进度跟踪逻辑core/runtime_bootstrap.py)📥 模型下载 / Model Download
scripts/download_models.py)🔧 配置与路径 / Config & Paths
get_app_config_dir()获取标准配置目录,新增migrate_old_data()用于旧数据迁移(config.py)_MEIPASS/ 应用根路径辅助函数,提升 PyInstaller 打包环境兼容性🔄 补丁与更新 / Patch & Update
📦 构建系统 / Build System
build_release_lite_mac.sh),支持多语言界面和桌面图标创建🔍 批量处理 / Batch Processing
测试说明 / Testing Notes