From fc653e778dbe994be3867fc082621468c0dcfa1d Mon Sep 17 00:00:00 2001 From: QwejayHuang Date: Tue, 4 Aug 2026 20:40:04 +0800 Subject: [PATCH] v2.7.3 - add Python env manager, folder mode & native AST scanner - Add Python Environment Manager with local switching & one-click download - Support Folder Mode (--onedir) and custom contents directory (--contents-directory) - Replace pipreqs with native recursive AST static analysis for dependency scanning - Add Playwright browser download mirror support (npmmirror / huaweicloud) - Upgrade UPX exclusion rules to dynamically exclude Python core & runtime DLLs - Refactor UI dialogs, thread cancellation handling, and polish i18n translations --- CHANGELOG.md | 21 +- CHANGELOG_EN.md | 18 + README.md | 13 +- README_EN.md | 10 +- pyproject.toml | 4 +- qpypack/locales/de_DE.json | 128 ++- qpypack/locales/es_ES.json | 107 +- qpypack/locales/fr_FR.json | 104 +- qpypack/locales/ja_JP.json | 121 ++- qpypack/locales/ko_KR.json | 109 +- qpypack/locales/pt_BR.json | 121 ++- qpypack/locales/ru_RU.json | 102 +- qpypack/locales/zh_TW.json | 171 ++-- qpypack/main.py | 1941 ++++++++++++++++++++++++++---------- 14 files changed, 2173 insertions(+), 797 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e22c751..7df2bd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,27 @@ QPyPack 项目的所有重要变更都将记录在此文件中。 [English Version](./CHANGELOG_EN.md) | **中文** --- + +## [2.7.3] - 2026-08-04 + +#### 新增 +* **Python 环境管理器**:新增环境管理弹窗,支持本地已安装 Python 的智能识别切换,以及官方/国内镜像源的一键下载安装。 +* **文件夹打包模式**:运行模式新增文件夹模式,并支持自定义内部资源目录名。 +* **原生 AST 依赖分析**:全面重构依赖扫描机制,使用原生 AST 解析替代 pipreqs,大幅提升隐式依赖分析速度与准确度。 +* **Playwright 镜像加速**:新增 Playwright 浏览器驱动的镜像源下载及官方 CDN 自动回退机制。 + +#### 改进 +* **UPX 动态避让**:升级 UPX 压缩策略,自动识别并排除当前 Python 版本的核心 DLL 及 `vcruntime140_1.dll`,防止报错。 +* **线程与中断控制**:强化构建取消与清理逻辑,避免线程残留与临时文件锁死。 +* **平台兼容与超时保护**:优化 macOS Bundle Identifier 生成逻辑,增加命令执行超时保护机制。 +* **界面细节调整**:重构打包模式单选区域,精简关于页面布局与间距,更新版权标识。 +* **国际化翻译**:更新部分文字表述及翻译。 + +--- + ## [2.7.2] - 2026-08-03 -### 核心改进 +### 改进 * **编译器选择策略调整**:取消之前对 Python 3.13+ 强行硬编码/限制使用 Zig 编译器的逻辑。改由优化后的自适应探测策略:优先检测本地 MSVC / Clang / GCC(MinGW64) 环境,若均未检测到,则转由 Nuitka 自动检测并托管下载兼容的 MinGW-w64 C 编译器工具链。 * **更新 Python 平台兼容性矩阵**:修正设置面板中 Python 解释器选择器的平台指示卡片,更加准确地反映 Nuitka C 后端编译器的自动选择与托管能力。 * **优化构建日志与提示**:当未检测到本地 C 编译器时,显示下载 MinGW-w64 提示;增加对本地编译器的显式识别与反馈。 @@ -18,7 +36,6 @@ QPyPack 项目的所有重要变更都将记录在此文件中。 * **恢复默认依赖目录**:将 PyInstaller 单目录模式的依赖文件夹名称恢复为官方默认的 `_internal`,方便同类软件合并放置以共用运行库,减少磁盘占用。 * **优化交互状态保持**:拖入新脚本或重置工作区时,不再清空用户已配置的“自定义输出目录”,提升连续打包时的操作体验。 - --- ## [2.7.1] - 2026-08-02 diff --git a/CHANGELOG_EN.md b/CHANGELOG_EN.md index 02694c0..fae2636 100644 --- a/CHANGELOG_EN.md +++ b/CHANGELOG_EN.md @@ -8,6 +8,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 **English** | [中文版](./CHANGELOG.md) --- + +## [2.7.3] - 2026-08-04 + +#### Added +* **Python Environment Manager**: Added a new management dialog that supports intelligent detection and switching of local Python installations, as well as one-click download/installation via official or mirror sources. +* **Folder Mode (`--onedir`)**: Added Folder Mode to execution settings, along with support for customizable internal contents directory names (`--contents-directory`). +* **Native AST Dependency Analysis**: Refactored the dependency scanner using native AST parsing instead of `pipreqs`, significantly improving speed and accuracy for implicit dependency detection. +* **Playwright Mirror Acceleration**: Added mirror source downloads for Playwright browser binaries with automatic fallback to official CDNs. + +#### Improved +* **Dynamic UPX Exclusion**: Upgraded UPX compression rules to automatically detect and exclude core Python DLLs and `vcruntime140_1.dll` to prevent runtime errors. +* **Thread & Interruption Control**: Strengthened build cancellation and cleanup logic to prevent lingering threads and locked temporary files. +* **Platform Compatibility & Timeouts**: Optimized macOS Bundle Identifier generation and introduced command execution timeout protection. +* **UI Polish**: Refactored execution mode radio buttons, streamlined About tab layout and spacing, and updated copyright notices. +* **i18n Updates**: Refined wording and updated translations across various UI text and logs. + +--- + ## [2.7.2] - 2026-08-03 ### Key Improvements diff --git a/README.md b/README.md index 6b0cfb0..3f8381e 100644 --- a/README.md +++ b/README.md @@ -89,13 +89,14 @@ QPyPack 是一款现代化的跨平台 Python 打包工具。它深度整合 **P ## 🚀 核心特性 (Key Features) -- ✨ **极简拖拽,即刻启程**:拖入 `.py` 或 `.pyw` 源代码,全自动完成应用元数据解析、工作区初始化与图标匹配。 -- ⚙️ **双打包引擎自由切换**: - - **PyInstaller**:打包速度快,兼容性极佳,零 C 编译器依赖。 - - **Nuitka**:将源码编译为原生 C/C++ 二进制,体积更小、运行更快、代码深度抗反编译。 +- ✨ **极组拖拽,即刻启程**:拖入 `.py` 或 `.pyw` 源代码,全自动完成应用元数据解析、工作区初始化与图标匹配。 +- 🐍 **Python 环境智能管理**:内置 Python 环境管理弹窗,支持本地多版本平滑切换,无 Python 环境时支持从官方/国内镜像源**一键自动下载安装与配置**。 +- ⚙️ **双打包引擎与多元模式**: + - 支持 **PyInstaller**(构建迅速,兼容性优异)与 **Nuitka**(编译为原生 C/C++,体积小、运行快、强抗反编译)双引擎自由切换。 + - 支持 **单文件 (`--onefile`)** 与 **文件夹 (`--onedir`)** 模式,可自定义内部依赖资源目录 (`--contents-directory`)。 - 🔍 **C/C++ 编译器智能托管**:优先调用本地 MSVC、Clang (LLVM) 或 GCC;未检测到本地编译器时,由 Nuitka 自动托管下载兼容的 MinGW-w64 编译器。 -- 🛡️ **三重依赖防护网**:融合 `requirements.txt`、原生 **AST 静态语法树** 扫描与 `pipreqs`,智能捕获所有隐式导入(Hidden Imports)。 -- 📦 **复杂第三方库零配置预设**:内置对 `ttkbootstrap`、`customtkinter`、`playwright`、`moviepy` 等高频报错/遗漏资源库的自动 Hooks 拦截与资源收集。 +- 🛡️ **原生 AST 三重依赖防护**:融合 `requirements.txt`、原生 **AST 静态语法树递归扫描** 与环境安装包映射,智能捕获所有隐式导入(Hidden Imports)。 +- 📦 **复杂第三方库零配置预设**:内置对 `ttkbootstrap`、`customtkinter`、`playwright`、`moviepy` 等高频报错/遗漏资源库的自动 Hooks 拦截与资源收集(支持 Playwright 镜像加速)。 - 🛡️ **防锁沙盒与自愈机制**:构建前物理资源评估,捕获内存溢出(OOM/ZstdError)自动降低并发重试,支持 Temp 目录防锁隔离,解决 OneDrive/杀软锁文件导致的构建中断。 - 🎨 **纯矢量 UI & 多语言支持**:全界面基于 Google Material SVG 矢量图标,完美适配高分屏缩放;原生支持中、英、日、韩、德、法等全球多语言无缝切换。 diff --git a/README_EN.md b/README_EN.md index d445701..e3b0d9e 100644 --- a/README_EN.md +++ b/README_EN.md @@ -86,12 +86,14 @@ Whether you are bundling lightweight scripts or complex applications (e.g., PySi ## 🚀 Key Features - ✨ **Drag, Drop & Go**: Simply drop `.py` / `.pyw` files; QPyPack auto-parses metadata, matches application icons, and initializes the workspace. -- ⚙️ **Dual Engines**: +- 🐍 **Smart Python Environment Manager**: Built-in environment dialog supporting intelligent local Python detection/switching, as well as one-click automatic downloading & installation via official or mirror sources. +- ⚙️ **Dual Engines & Flexible Execution Modes**: - **PyInstaller**: Rapid build speeds, high compatibility, zero compiler setup. - **Nuitka**: Compiles Python source directly to native C/C++ binaries for smaller sizes, faster runtime, and anti-decompilation protection. -- 🔍 **Seamless C/C++ Compiler Integration**: Auto-detects local MSVC, Clang, or GCC environments, and silently manages MinGW-w64 downloads without manual environment variable setups.) -- 🛡️ **Triple-Layer Dependency Protection**: Combines `requirements.txt` parsing, native **AST static analysis**, and `pipreqs` to capture hidden imports. -- 📦 **Zero-Config Presets**: Automated hooks and resource collection for troublesome packages (`ttkbootstrap`, `customtkinter`, `playwright`, `moviepy`, etc.). + - Supports both **One-File (`--onefile`)** and **Folder Mode (`--onedir`)**, with customizable internal dependencies directory names (`--contents-directory`). +- 🔍 **Seamless C/C++ Compiler Integration**: Auto-detects local MSVC, Clang, or GCC environments, and silently manages MinGW-w64 downloads without manual environment variable setups. +- 🛡️ **Triple-Layer Dependency Protection**: Combines `requirements.txt` parsing, native **AST static analysis**, and environment package mapping to capture all implicit imports. +- 📦 **Zero-Config Presets**: Automated hooks and resource collection for troublesome packages (`ttkbootstrap`, `customtkinter`, `playwright` with mirror acceleration support, `moviepy`, etc.). - 🛡️ **Resilient Sandboxing & Fallbacks**: Runs pre-flight RAM/disk checks, retries in single-thread concurrency on OOM/ZstdError, and isolates builds in Temp directories to bypass OneDrive sync locks. - 🎨 **Pure Vector UI & i18n**: Rendered with Google Material SVG vector icons with native multi-language support (English, Chinese, Japanese, Korean, German, French, etc.). diff --git a/pyproject.toml b/pyproject.toml index ceccae7..db6b2e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta" [project] name = "qpypack" -version = "2.7.1" +version = "2.7.3" description = "A cross-platform GUI packaging and compilation suite based on PyInstaller and Nuitka." -readme = "README.md" +readme = "README_EN.md" authors = [ { name = "QwejayHuang" } ] diff --git a/qpypack/locales/de_DE.json b/qpypack/locales/de_DE.json index d778730..edc26f1 100644 --- a/qpypack/locales/de_DE.json +++ b/qpypack/locales/de_DE.json @@ -11,6 +11,7 @@ "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "Plattformübergreifendes GUI-Tool zur Python-Paketierung basierend auf PyInstaller & Nuitka", "Python Packaging, Reimagined.": "Python-Paketierung, neu gedacht.", "Drop Python source code to start": "Ziehe den Python-Quellcode hierher, um zu beginnen", + "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Python-Skript (.py/.pyw) hierher ziehen\noder zum Durchsuchen klicken...", "Build Settings": "Build-Einstellungen", "Preferences": "Einstellungen", "About": "Über QPyPack", @@ -55,6 +56,7 @@ "Import Preset...": "Voreinstellung importieren...", "Reset to Default Config": "Auf Standardkonfiguration zurücksetzen", "Cancel & Return": "Abbrechen & Zurück", + "Cancel": "Abbrechen", "Configure Build Settings": "Build-Parameter konfigurieren", "Toggle Execution Log": "Ausführungsprotokoll anzeigen/ausblenden", "Detailed Mode": "Detaillierter Modus", @@ -63,6 +65,8 @@ "Select All": "Alles auswählen", "Clear Log": "Protokoll löschen", "Export Log...": "Protokoll exportieren...", + "Reset": "Zurücksetzen", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": "Möchten Sie wirklich alle Einstellungen zurücksetzen?
Alle Einstellungen werden auf den Standardzustand zurückgesetzt.", "Engine & Environment": "Build-Engine und Umgebung", "Execution Mode": "Ausführungsmodus", "Mirrors & Scanner": "Spiegelserver und Scanner", @@ -87,12 +91,14 @@ "UPX Path:": "UPX-Pfad:", "PyInstaller Version:": "PyInstaller-Version:", "Nuitka Version:": "Nuitka-Version:", - "Pipreqs Version:": "Pipreqs-Version:", "Version:": "Version:", "Author/Company:": "Autor/Organisation:", "Description:": "Beschreibung:", - "Output Rule:": "Ausgaberegel:", + "Output Location:": "Speicherort:", "Target Directory:": "Zielverzeichnis:", + "Temporary Directory:": "Temporäres Verzeichnis:", + "Source Directory (.qpypack_build)": "Quellverzeichnis (.qpypack_build)", + "System Temp Directory": "System-Temp-Verzeichnis", "Source File Directory": "Verzeichnis der Quelldatei", "Custom Directory": "Benutzerdefiniertes Verzeichnis", "Import Name": "Importname", @@ -104,10 +110,13 @@ "Import name (e.g. cv2):": "Importname (z.B. cv2):", "PyPI package name for [{imp_name}]:": "PyPI-Paketname für [{imp_name}]:", "One-File Mode (--onefile)": "Einzeldatei-Modus (--onefile)", + "Folder Mode (--onedir)": "Ordner-Modus (--onedir)", + "Contents Directory (--contents-directory):": "Inhaltsverzeichnis (--contents-directory):", + "Internal directory name for dependencies (default: _internal)": "Interner Verzeichnisname für Abhängigkeiten (Standard: _internal)", "Hide Console (--noconsole)": "Konsole ausblenden (--noconsole)", "Use Virtual Environment (Recommended)": "Isolierte virtuelle Umgebung nutzen", "Install requirements.txt": "requirements.txt installieren", - "Analyze Dependencies (pipreqs)": "Abhängigkeiten analysieren (pipreqs)", + "Analyze Dependencies (AST)": "Abhängigkeiten analysieren (AST)", "Scan Entire Folder": "Gesamten Ordner scannen", "Enable UPX Compression": "UPX-Komprimierung aktivieren", "Lite Mode (Exclude Dev/Test Dependencies)": "Lite-Modus (Dev/Test ausschließen)", @@ -124,22 +133,22 @@ "Leave blank to auto-detect from environment variables": "Leer lassen für automatische Erkennung aus Variablen", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "Schließt überflüssige Abhängigkeiten aus, um Dateigröße zu reduzieren.", "Double-click to edit target path; Drag & drop supported": "Doppelklick zum Bearbeiten; Drag & Drop unterstützt", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Doppelklick zum Bearbeiten; Drag & Drop unterstützt. Nutzen Sie 'Voreinstellung exportieren' zum Speichern.", "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": "PyInstaller — Schnelle Erstellung, hervorragende Kompatibilität. Keine C-Compiler benötigt.", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": "Nuitka — Kompiliert in eine native C/C++ Binärdatei. Bessere Leistung und Schutz des Quellcodes.", - "
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} Unterstützung:Python herunterladen
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Vollständige Abwärtskompatibilität", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} Unterstützung:Python herunterladen
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box": "
Python {ver} Unterstützung:Python herunterladen
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 wird nativ unterstützt", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)": "
Python {ver} Unterstützung:Python herunterladen
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Erfordert MSVC / Clang / Zig", - "
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...": "
Python InterpreterPython herunterladen
Automatische Systemerkennung...", + "
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} Unterstützung:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Vollständige Abwärtskompatibilität", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} Unterstützung:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} Unterstützung:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Automatische Erkennung und Verwaltung des C-Backend-Compilers", + "
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...": "
Python Interpreter
Automatische Systemerkennung...", "[INFO] Build Cancelled.": "[INFO] Build abgebrochen.", "[INFO] Performing pre-flight environment checks...": "[INFO] Führe Vorab-Umgebungsprüfungen durch...", "[INFO] Analyzing source code and project dependencies...": "[INFO] Analysiere Quellcode und Abhängigkeiten...", "[INFO] Initializing isolated build environment...": "[INFO] Initialisiere isolierte Build-Umgebung...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] Playwright erkannt. Installiere integrierte Browser...", "[INFO] Python interpreter path: {path}": "[INFO] Python-Pfad: {path}", "[INFO] Creating virtual environment...": "[INFO] Erstelle virtuelle Umgebung...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] Synchronisiere und aktualisiere pip...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] Scanne Quellcode mit pipreqs...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] Installiere Engine [{pkg}] und Kern-Abhängigkeiten...", + "[INFO] Scanning project source code via AST engine...": "[INFO] Scanne Quellcode mit AST-Engine...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka-Tipp: Stellen Sie bei Compiler-Download eine stabile Verbindung sicher.", "[INFO] Successfully installed compatible versions.": "[INFO] Kompatible Versionen erfolgreich installiert.", "[INFO] Resolving project dependencies...": "[INFO] Abhängigkeiten werden aufgelöst...", @@ -152,11 +161,16 @@ "[INFO] Installing build environment and project dependencies ({count} packages): {pkgs}": "[INFO] Installiere Abhängigkeiten ({count} Pakete): {pkgs}", "[INFO] Switching to backup PyPI source for retrieval: {url}": "[INFO] Wechsel zum Backup-PyPI-Spiegelserver: {url}", "[INFO] Starting {engine} engine to compile binary files...": "[INFO] Starte {engine} für die Kompilierung...", + "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] Lokale MSVC-Umgebung gefunden, nativer C++ Compiler wird bevorzugt.", + "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] Lokale Clang-Umgebung gefunden, LLVM Clang Compiler wird bevorzugt.", + "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+ erkannt: Verwende Zig-Compiler (--zig) als C-Backend.", + "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] Verwende MinGW64-Compiler für C-Backend.", + "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Lokale GCC/MinGW-w64-Umgebung gefunden, verwende MinGW64.", + "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Lokale Zig-Umgebung gefunden. Nuitka verwaltet die C-Backend-Kompilierung.", + "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Kein lokaler C-Compiler erkannt. Nuitka lädt automatisch eine MinGW-w64 Toolchain herunter.", "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] Evaluiere RAM (Verfügbar: {ram:.1f} GB). Parallelität angepasst: {cores} -> {safe_jobs} ...", "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] Entferne Icon-Parameter und baue neu...", - "[INFO] Writing application icon...": "[INFO] Schreibe Anwendungssymbol...", - "[INFO] Application icon written successfully.": "[INFO] Anwendungssymbol erfolgreich geschrieben.", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] Nuitka-Optimierungen aktiviert...", + "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Lite-Modus aktiviert. Wende Bytecode-Optimierung (-OO) an und entferne Dev-Module...", "[INFO] Compilation completed, archiving built files...": "[INFO] Kompilierung abgeschlossen, archiviere Dateien...", "[INFO] Validating output files and generating final product...": "[INFO] Validiere Ausgabedateien und erstelle Produkt...", "[INFO] Build log exported to: {path}": "[INFO] Protokoll exportiert nach: {path}", @@ -166,15 +180,17 @@ "[WARN] Specified versions failed to install. Stripping version constraints for automatic compatibility match...": "[WARN] Installation bestimmter Versionen fehlgeschlagen. Versuche Auto-Kompatibilität...", "[WARN] Some dependencies failed to install, build will proceed with risk...": "[WARN] Einige Abhängigkeiten fehlen, Build wird fortgesetzt (mit Risiko)...", "[WARN] Low disk space detected on build target drive (Available: {free:.1f} GB, >= 5.0 GB recommended). Build process may interrupt due to disk exhaustion.": "[WARN] Wenig Speicherplatz (Verfügbar: {free:.1f} GB). Der Build könnte fehlschlagen.", - "[WARN] Memory allocation exception caught (ZstdError / OOM). Triggering memory protection fallback: Retrying in single-thread mode...": "[WARN] Out-Of-Memory Ausnahme. Wiederhole im Einzel-Thread-Modus...", - "[WARN] System low memory detected (zstd memory allocation failed). Automatically retrying in single-thread low-memory mode...": "[WARN] Wenig Arbeitsspeicher erkannt. Wiederhole im Einzel-Thread-Modus...", + "[WARN] Memory allocation exception caught (ZstdError / OOM). Triggering memory protection fallback: Retrying in single-thread mode...": "[WARN] Speicherausnahme (OOM). Wiederhole im Einzel-Thread-Modus...", + "[WARN] System low memory detected (zstd memory allocation failed). Automatically retrying in single-thread low-memory mode...": "[WARN] System mit wenig Speicher. Wiederhole im Einzel-Thread-Modus...", "[WARN] Icon resource writing blocked (possibly locked by system/antivirus), triggering fallback protection...": "[WARN] Schreiben des Icons blockiert. Aktiviere Fallback...", "[WARN] Strongly recommend checking [Virtual Environment] to maximize lite mode effect.": "[WARN] Es wird empfohlen, [Virtuelle Umgebung] für den Lite-Modus zu aktivieren.", "[WARN] Pause code injection exception: {error}": "[WARN] Ausnahme bei Pause-Code Injektion: {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] AST Analyse-Fehler: {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] Lese-Warnung für requirements.txt: {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] Parse-Warnung für pipreqs: {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] Befehls-Zeitüberschreitung (>{timeout}s)", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] 'requests' oder 'httpx' erkannt. 'certifi'-Zertifikate werden automatisch eingebunden.", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] Nutzung von '__file__' erkannt. Nutzen Sie im Einzeldatei-Modus 'sys._MEIPASS', um Ressourcen zu lokalisieren!", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] Tipp: Erstellte Dateien könnten von Antivirensoftware falsch positiv erkannt werden. Ausnahmen oder Signierung empfohlen.", "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] Abbruch: Zu wenig Speicherplatz. Bitte mindestens 5 GB freigeben.", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] Zielverzeichnis fehlen Schreibrechte: {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] Abhängigkeitsdatei nicht gefunden: {path}", @@ -186,8 +202,10 @@ "[ERROR] Product transfer failed, file might be occupied by system process or lack permission: {error}": "[ERROR] Übertragung fehlgeschlagen: {error}", "[ERROR] Could not locate valid executable product in temporary build directory: {path}": "[ERROR] Kein ausführbares Produkt gefunden: {path}", "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[Syntaxfehler] Quellcode enthält Fehler:\n - Datei: {file}\n - Typ: {type}\n - Zeile: {line}\n - Details: {desc}\n\nTipp: Testen Sie den Code lokal.", - "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] Kompilierung abgebrochen. Nutzen Sie den 'Detaillierten Modus'.", + "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] Kompilierung unterbrochen. Klicken Sie auf 'Detaillierter Modus'.", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] Zieldatei durch Cloud gesperrt. Bitte entschlüsseln.", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] Zieldatei wird ausgeführt oder ist blockiert. Bitte schließen Sie die Anwendung.", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] 'multiprocessing'-Modul erkannt. Stellen Sie sicher, dass 'multiprocessing.freeze_support()' aufgerufen wird.", "[ERROR] Please load a valid Python source file first!": "[ERROR] Bitte zuerst eine gültige Python-Datei laden!", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] Fehler bei AST-Analyse: {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] Voreinstellung Export-Fehler: {error}", @@ -196,16 +214,9 @@ "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] Build beendet, aber folgende fehlten:\n\n - {pkgs}", "[ERROR] Process error: command or binary missing ({error})": "[ERROR] Prozessfehler: ({error})", "[ERROR] System execution exception: {error}": "[ERROR] Systemfehler: {error}", - "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "Warnung: {pkgs} nicht installiert.", - "Package mappings have been reset to defaults.": "Zuordnungen zurückgesetzt.", - "Config preset exported to: {path}": "Voreinstellung exportiert nach: {path}", - "Config preset imported successfully.": "Voreinstellung importiert.", - "AST scan completed, found {count} dependencies.": "AST-Analyse: {count} Abhängigkeiten gefunden.", + "[ERROR] I/O Exception: {err_msg}": "[ERROR] E/A-Ausnahme: {err_msg}", "No log content.": "Kein Protokoll vorhanden.", "Log saved to: {path}": "Protokoll gespeichert unter: {path}", - "Attention: Please check the log for details.": "Achtung: Details im Protokoll.", - "Are you sure you want to reset all preferences to default?": "Wirklich alles zurücksetzen?", - "Global configuration has been reset.": "Konfiguration zurückgesetzt.", "\\nProgram execution completed, press Enter to exit...": "\\nAusführung beendet. Enter drücken...", "Project-specific. Not saved to global preferences. Use 'Export Preset' to save config.": "Projektspezifisch. Mit 'Voreinstellung exportieren' speichern.", "GitHub Repository": "GitHub", @@ -215,17 +226,62 @@ "QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!": "QPyPack ist kostenlos. Unterstützen Sie den Autor mit einem Kaffee!", "* Sponsorship is completely voluntary, serves as an unconditional encouragement to the open-source community, and involves no commercial commitments. Thank you for your support!": "* Sponsoring ist freiwillig. Danke für die Unterstützung!", "Python Environment Required": "Python benötigt", - "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "Kein Python gefunden!
Bitte installieren Sie Python (mit 'Add to PATH').", + "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "Kein Python gefunden!
Bitte installieren Sie Python (aktivieren Sie 'Add Python.exe to PATH').", "Download Python": "Python herunterladen", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (Experimentell)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (Empfohlen)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Win7-Unterstützung)", + "Downloading Python {ver}... Please wait.": "Lade Python {ver} herunter... Bitte warten.", + "Configure Manually": "Manuell konfigurieren", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "Zu [Build-Einstellungen] -> [Engine] gewechselt. Bitte stellen Sie den Python-Pfad ein.", + "Python Environment Management": "Python-Umgebungsverwaltung", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": "Python-Umgebung erforderlich
Der Build benötigt einen Python-Interpreter.
Wählen Sie eine Version zum automatischen Download, Installation und Konfiguration der Umgebungsvariablen.
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": "Python-Umgebungsverwaltung
Unterstützt das Wechseln von lokal erkannten Python-Umgebungen oder das Herunterladen neuer Versionen.", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": "💡 Empfehlung: Python 3.11.9 wird für optimale Build-Kompatibilität und Engine-Unterstützung empfohlen.", + "View Python": "Python anzeigen", + "Locally Detected Pythons": "Lokal erkannte Pythons", + "Download New Version": "Neue Version herunterladen", + "Use Selected Environment": "Ausgewählte Umgebung verwenden", + "No local Python environments detected.": "Keine lokalen Python-Umgebungen erkannt.", + "Select Python Version to Download:": "Wählen Sie die Python-Version zum Herunterladen aus:", + "Click to automatically download, install Python, and configure system environment variables.": "Klicken Sie hier, um Python automatisch herunterzuladen, zu installieren und die Systemumgebungsvariablen zu konfigurieren.", + "One-Click Download & Install": "Ein-Klick-Download & Installation", + "Use Installed Version Directly": "✔ Installierte Version direkt verwenden", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": "✔ Lokal erkannt:
{path}
Bereit zum direkten Wechsel ohne erneutes Herunterladen.", + "Switched to local Python environment: {path}": "Zu lokaler Python-Umgebung gewechselt: {path}", + "Download complete. Starting Python installation...": "Download abgeschlossen. Starte Python-Installation...", + "Install Complete": "Installation abgeschlossen", + "Exit Now": "Jetzt beenden", + "Later": "Später", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": "Python-Umgebung erfolgreich installiert!

Systemumgebungsvariablen aktualisiert. Ein Neustart der Software wird empfohlen.", + "Python installed. Please restart QPyPack manually later.": "Python installiert. Bitte starten Sie QPyPack später manuell neu.", + "[Syntax Error] Source code syntax parsing failed, build aborted:\n - File: {file}\n - Line: Line {line}\n - Detail: {desc}\n\n💡 Tip: This is usually NOT a fault of the packaging tool.\nPlease ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\nUsing newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\nWe recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": "[Syntaxfehler] Quellcode-Syntaxanalyse fehlgeschlagen, Build abgebrochen:\n - Datei: {file}\n - Zeile: Zeile {line}\n - Detail: {desc}\n\n💡 Tipp: Dies ist normalerweise KEIN Fehler des Tools.\nStellen Sie sicher, dass die ausgewählte Python-Version mit der Version übereinstimmt, die Sie zum Schreiben des Codes verwendet haben.\nDie Verwendung neuerer Syntax in einer älteren Python-Umgebung löst diesen Fehler aus.\nWir empfehlen, zu [Build-Einstellungen] -> [Engine] zu gehen, um zur richtigen Python-Version zu wechseln.", + "[FAILED] Build interrupted exceptionally!\n\n🔍 Common Troubleshooting:\n1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": "[FAILED] Build fehlerhaft abgebrochen!\n\n🔍 Häufige Fehlerursachen:\n1. Versionskonflikt (Sehr häufig): Die gewählte Python-Version ist inkompatibel mit dem Quellcode. Wechseln Sie unter [Build-Einstellungen] zur richtigen Version.\n2. Fehlende Abhängigkeiten: Schalten Sie oben auf 'Detaillierter Modus', um nach ModuleNotFoundError zu suchen.\n3. Antivirus-Blockierung: Stellen Sie sicher, dass Ihr Antivirenprogramm den Prozess nicht blockiert.\n\n(Hinweis: Dies liegt meist an Umgebungsunterschieden und nicht an der Engine selbst. Prüfen Sie das Protokoll.)", + "Status: Build Cancelled": "Status: Build abgebrochen", + "Build Cancelled": "Build abgebrochen", + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] Paket '{pkg}' konnte nicht installiert werden, überspringe...", + "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "Warnung: {pkgs} nicht installiert.", + "Package mappings have been reset to defaults.": "Zuordnungen zurückgesetzt.", + "Global configuration has been reset.": "Konfiguration zurückgesetzt.", + "Config preset exported to: {path}": "Voreinstellung exportiert nach: {path}", + "Config preset imported successfully.": "Voreinstellung importiert.", + "AST scan completed, found {count} dependencies.": "AST-Analyse: {count} Abhängigkeiten gefunden.", + "Attention: Please check the log for details.": "Achtung: Details im Protokoll.", + "One-Click Install": "Ein-Klick-Installation", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] Python-Installation fehlgeschlagen oder abgebrochen.", + "System Default ({sys_native})": "Systemstandard ({sys_native})", + "My Studio": "My Studio", + "Python Executable": "Python-Ausführbare", + "Invalid syntax": "Ungültige Syntax", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] Lade Playwright-Browser über Mirror herunter: {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] Wiederhole Download der Playwright-Browser über offizielles CDN...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] Installation der Playwright-Browser fehlgeschlagen, der Build wird mit Risiko fortgesetzt...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] Die Icon-Konvertierung in .icns ist fehlgeschlagen, Build ohne Icon.", + "OK": "OK", "Unknown": "Unbekannt", - "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Python-Skript (.py/.pyw) hierher ziehen\noder Klicken zum Durchsuchen...", - "System Temp Directory (Anti-Lock / Cloud-Friendly)": "System-Temp-Verzeichnis (Anti-Lock / Cloud-freundlich)", - "Cancel": "Abbrechen", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Doppelklick zum Bearbeiten; Drag & Drop unterstützt. Nutzen Sie 'Voreinstellung exportieren' zum Speichern.", - "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Lokale GCC/MinGW-w64-Umgebung gefunden, MinGW64-Compiler wird verwendet.", - "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Lokale Zig-Umgebung gefunden, Nuitka übernimmt die C-Backend-Kompilierung.", - "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Kein lokaler C-Compiler erkannt. Nuitka wird automatisch eine kompatible MinGW-w64-Toolchain herunterladen und verwalten.", - "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Lite-Modus aktiviert, Bytecode-Optimierung (-OO) wird angewendet und Entwicklermodule entfernt...", - "[ERROR] I/O Exception: {err_msg}": "[ERROR] E/A-Ausnahme: {err_msg}", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} Unterstützung:Python herunterladen
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka Automatische Erkennung und Verwaltung des C-Backend-Compilers" + "Script and settings retained. Ready to rebuild.": "Skript und Einstellungen beibehalten. Bereit zum erneuten Bauen." } diff --git a/qpypack/locales/es_ES.json b/qpypack/locales/es_ES.json index 0d8f60a..8cb359a 100644 --- a/qpypack/locales/es_ES.json +++ b/qpypack/locales/es_ES.json @@ -7,10 +7,10 @@ "Tencent Cloud (China)": "Nube Tencent (China)", "Huawei Cloud (China)": "Nube Huawei (China)", "USTC (China)": "USTC (China)", - "Modern Cross-Platform Python Application Packager": "Empaquetador de aplicaciones Python multiplataforma moderno", "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "Herramienta GUI multiplataforma para empaquetar aplicaciones Python basada en PyInstaller y Nuitka", "Python Packaging, Reimagined.": "Empaquetado de Python, reimaginado.", "Drop Python source code to start": "Suelta el código fuente de Python para comenzar", + "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Arrastra y suelta el script (.py/.pyw) aquí\no Haz clic para buscar...", "Build Settings": "Opciones de compilación", "Preferences": "Preferencias", "About": "Acerca de", @@ -21,7 +21,7 @@ "Package Map": "Mapeo", "Execution Log": "Registro de Ejecución", "Loaded: {filename}": "Cargado: {filename}", - "Parsing metadata...": "Analizando metadatos...", + "Parsing metadata...": "Analizando metadados...", "Ready, waiting for build.": "Listo, esperando compilación.", "Initializing build...": "Inicializando compilación...", "Preparing engine...": "Preparando el motor...", @@ -55,6 +55,7 @@ "Import Preset...": "Importar ajustes...", "Reset to Default Config": "Restablecer configuración predeterminada", "Cancel & Return": "Cancelar y regresar", + "Cancel": "Cancelar", "Configure Build Settings": "Configurar parámetros de compilación", "Toggle Execution Log": "Alternar registro de ejecución", "Detailed Mode": "Modo Detallado", @@ -63,6 +64,8 @@ "Select All": "Seleccionar todo", "Clear Log": "Limpiar registro", "Export Log...": "Exportar registro...", + "Reset": "Restablecer", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": "¿Estás seguro de que quieres restablecer todas las preferencias?
Todas las configuraciones se restaurarán a su estado predeterminado.", "Engine & Environment": "Motor de compilación y entorno", "Execution Mode": "Modo de ejecución", "Mirrors & Scanner": "Servidores espejo y escáner", @@ -87,12 +90,14 @@ "UPX Path:": "Ruta UPX:", "PyInstaller Version:": "Versión de PyInstaller:", "Nuitka Version:": "Versión de Nuitka:", - "Pipreqs Version:": "Versión de Pipreqs:", "Version:": "Versión:", "Author/Company:": "Autor/Organización:", "Description:": "Descripción:", - "Output Rule:": "Regla de ubicación:", + "Output Location:": "Ubicación de salida:", "Target Directory:": "Carpeta de destino:", + "Temporary Directory:": "Directorio temporal:", + "Source Directory (.qpypack_build)": "Directorio fuente (.qpypack_build)", + "System Temp Directory": "Directorio Temp del sistema", "Source File Directory": "Carpeta del archivo fuente", "Custom Directory": "Carpeta personalizada", "Import Name": "Nombre de importación", @@ -104,10 +109,13 @@ "Import name (e.g. cv2):": "Nombre de importación (ej. cv2):", "PyPI package name for [{imp_name}]:": "Nombre de paquete PyPI para [{imp_name}]:", "One-File Mode (--onefile)": "Modo de archivo único (--onefile)", + "Folder Mode (--onedir)": "Modo carpeta (--onedir)", + "Contents Directory (--contents-directory):": "Directorio de contenido (--contents-directory):", + "Internal directory name for dependencies (default: _internal)": "Nombre del directorio interno para dependencias (predeterminado: _internal)", "Hide Console (--noconsole)": "Ocultar consola (--noconsole)", "Use Virtual Environment (Recommended)": "Usar entorno virtual (Recomendado)", "Install requirements.txt": "Instalar requirements.txt", - "Analyze Dependencies (pipreqs)": "Analizar dependencias (pipreqs)", + "Analyze Dependencies (AST)": "Analizar dependencias (AST)", "Scan Entire Folder": "Escanear toda la carpeta", "Enable UPX Compression": "Habilitar compresión UPX", "Lite Mode (Exclude Dev/Test Dependencies)": "Modo ligero (Excluir dependencias dev/test)", @@ -124,22 +132,22 @@ "Leave blank to auto-detect from environment variables": "Dejar en blanco para detectar desde las variables de entorno", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "Excluye dependencias innecesarias dinámicamente para reducir el tamaño y acelerar la compilación.", "Double-click to edit target path; Drag & drop supported": "Doble clic para editar la ruta. Admite arrastrar y soltar", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Doble clic para editar la ruta; Admite arrastrar y soltar. Use 'Exportar ajustes' para guardar y reutilizar.", "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": "PyInstaller — Empaqueta el intérprete Python y el bytecode. Construcción rápida y excelente compatibilidad.", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": "Nuitka — Compila a binario C/C++ nativo. Menor tamaño, mayor rendimiento y protección de código fuente.", - "
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} Soporte:Descargar Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
SO Heredado Compatibilidad total hacia atrás", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} Soporte:Descargar Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box": "
Python {ver} Soporte:Descargar Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Compatible con MinGW64 listo para usar", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)": "
Python {ver} Soporte:Descargar Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requiere MSVC / Clang / Zig (MinGW64 no soportado)", - "
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...": "
Intérprete PythonDescargar Python
Detectando automáticamente el entorno del sistema...", + "
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} Soporte:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
SO Heredado Compatibilidad total hacia atrás", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} Soporte:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} Soporte:
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka Detectando y gestionando automáticamente el compilador backend C", + "
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...": "
Intérprete Python
Detectando automáticamente el entorno del sistema...", "[INFO] Build Cancelled.": "[INFO] Compilación cancelada.", "[INFO] Performing pre-flight environment checks...": "[INFO] Realizando controles de seguridad del entorno...", "[INFO] Analyzing source code and project dependencies...": "[INFO] Analizando el código fuente y las dependencias...", "[INFO] Initializing isolated build environment...": "[INFO] Inicializando entorno de compilación...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] Playwright detectado. Instalando navegadores integrados...", "[INFO] Python interpreter path: {path}": "[INFO] Ruta del intérprete Python: {path}", "[INFO] Creating virtual environment...": "[INFO] Creando entorno virtual...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] Actualizando el gestor de paquetes pip...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] Escaneando dependencias vía pipreqs...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] Instalando motor [{pkg}] y dependencias clave...", + "[INFO] Scanning project source code via AST engine...": "[INFO] Escaneando dependencias vía motor AST...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Consejo de Nuitka: Si se solicita descargar GCC/MinGW, mantenga una conexión estable.", "[INFO] Successfully installed compatible versions.": "[INFO] Versiones compatibles instaladas exitosamente.", "[INFO] Resolving project dependencies...": "[INFO] Resolviendo dependencias del proyecto...", @@ -152,11 +160,16 @@ "[INFO] Installing build environment and project dependencies ({count} packages): {pkgs}": "[INFO] Instalando dependencias ({count} paquetes): {pkgs}", "[INFO] Switching to backup PyPI source for retrieval: {url}": "[INFO] Cambiando al índice PyPI secundario: {url}", "[INFO] Starting {engine} engine to compile binary files...": "[INFO] Iniciando motor {engine} para la compilación...", + "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] Entorno MSVC local detectado, priorizando compilador C++ nativo.", + "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] Entorno Clang local detectado, priorizando compilador LLVM Clang.", + "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+ detectado: Usando el compilador Zig (--zig) como backend C.", + "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] Usando el compilador MinGW64 (--mingw64) para el backend C.", + "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Entorno GCC/MinGW-w64 local detectado, usando el compilador MinGW64.", + "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Entorno Zig local detectado, Nuitka gestionará la compilación del backend C.", + "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] No se detectó compilador C local. Nuitka descargará y gestionará automáticamente un conjunto de herramientas MinGW-w64 compatible.", "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] Evaluando memoria física (Disponible: {ram:.1f} GB). Concurrencia ajustada: {cores} -> {safe_jobs} ...", "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] Despojando parámetros de icono y reconstruyendo...", - "[INFO] Writing application icon...": "[INFO] Escribiendo icono de la aplicación...", - "[INFO] Application icon written successfully.": "[INFO] Icono de la aplicación escrito con éxito.", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] Aplicando directivas de optimización de Nuitka...", + "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Modo ligero activado, aplicando optimización de bytecode (-OO) y eliminando módulos de desarrollo...", "[INFO] Compilation completed, archiving built files...": "[INFO] Compilación finalizada, extrayendo y archivando archivos...", "[INFO] Validating output files and generating final product...": "[INFO] Validando archivos de salida y generando producto final...", "[INFO] Build log exported to: {path}": "[INFO] Registro exportado a: {path}", @@ -173,8 +186,10 @@ "[WARN] Pause code injection exception: {error}": "[WARN] Excepción al inyectar código de pausa: {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] Excepción de análisis AST: {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] Advertencia al leer requirements.txt: {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] Advertencia al analizar pipreqs: {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] Tiempo de espera de comando agotado (>{timeout}s)", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] Detectado 'requests' o 'httpx'. Empaquetando certificados 'certifi' para evitar errores SSL.", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] Detectado el uso de '__file__'. ¡En modo de archivo único, use 'sys._MEIPASS' para localizar archivos de recursos!", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] Consejo: Los ejecutables pueden ser marcados falsamente por antivirus. Se recomienda añadir exclusiones.", "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] Compilación abortada: Espacio en disco insuficiente. Libere al menos 5 GB.", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] El directorio de salida no tiene permisos de escritura: {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] No se encontró el archivo de dependencias: {path}", @@ -188,6 +203,8 @@ "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[Error de Sintaxis] El código fuente contiene errores, compilación abortada:\n - Archivo: {file}\n - Tipo: {type}\n - Línea: Línea {line}\n - Detalles: {desc}\n\nConsejo: Asegúrese de que el código funciona localmente antes de empaquetarlo.", "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] Compilación interrumpida, haga clic en 'Modo Detallado' para solucionar el problema.", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] El archivo está bloqueado por un servicio en la nube. Desbloquéelo y reintente.", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] El archivo de destino se está ejecutando o está ocupado. Por favor, cierre la aplicación.", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] Módulo 'multiprocessing' detectado. Asegúrese de llamar a 'multiprocessing.freeze_support()' para evitar bucles infinitos.", "[ERROR] Please load a valid Python source file first!": "[ERROR] ¡Por favor, cargue primero un archivo de código fuente válido!", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] Ocurrió una excepción durante el análisis AST: {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] No se pudo exportar el preajuste: {error}", @@ -196,6 +213,7 @@ "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] Compilación terminada, pero fallaron estas dependencias:\n\n - {pkgs}\n\nNota: La app puede fallar con ModuleNotFoundError al ejecutarse.", "[ERROR] Process error: command or binary missing ({error})": "[ERROR] Error de proceso: comando o binario faltante ({error})", "[ERROR] System execution exception: {error}": "[ERROR] Excepción de ejecución del sistema: {error}", + "[ERROR] I/O Exception: {err_msg}": "[ERROR] Excepción de E/S: {err_msg}", "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "Advertencia: {pkgs} fallaron al instalarse. Ver registro.", "Package mappings have been reset to defaults.": "Los mapeos se han restablecido.", "Config preset exported to: {path}": "Preajuste exportado a: {path}", @@ -217,15 +235,54 @@ "Python Environment Required": "Se requiere entorno Python", "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "¡No se detectó Python en su sistema!

Se requiere un entorno Python.
Descárguelo e instálelo (recuerde marcar 'Add Python.exe to PATH').", "Download Python": "Descargar Python", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (Experimental)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (Recomendado)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Soporte Win7)", + "Downloading Python {ver}... Please wait.": "Descargando Python {ver}... Espere por favor.", + "Configure Manually": "Configurar manualmente", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "Cambiado a [Opciones de compilación] -> [Motor], por favor, establezca la ruta de Python.", + "Python Environment Management": "Gestión de entorno Python", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": "Entorno Python requerido
La compilación depende de un intérprete de Python.
Seleccione una versión para descargar, instalar y configurar las variables de entorno automáticamente.
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": "Gestión de entorno Python
Admite el cambio de entornos de Python detectados localmente o la descarga de nuevas versiones.", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": "💡 Recomendación: Se recomienda Python 3.11.9 para una compatibilidad óptima de compilación y soporte de motor.", + "View Python": "Ver Python", + "Locally Detected Pythons": "Pythons detectados localmente", + "Download New Version": "Descargar nueva versión", + "Use Selected Environment": "Usar el entorno seleccionado", + "No local Python environments detected.": "No se detectaron entornos Python locales.", + "Select Python Version to Download:": "Seleccione la versión de Python a descargar:", + "Click to automatically download, install Python, and configure system environment variables.": "Haga clic para descargar, instalar y configurar las variables de entorno automáticamente.", + "One-Click Download & Install": "Descargar e instalar con un clic", + "Use Installed Version Directly": "✔ Usar versión instalada directamente", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": "✔ Detectado localmente:
{path}
Listo para cambiar directamente sin volver a descargar.", + "Switched to local Python environment: {path}": "Cambiado al entorno de Python local: {path}", + "Download complete. Starting Python installation...": "Descarga completa. Iniciando instalación de Python...", + "Install Complete": "Instalación completada", + "Exit Now": "Salir ahora", + "Later": "Más tarde", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": "¡Entorno Python instalado con éxito!

Variables de entorno del sistema actualizadas. Se recomienda reiniciar el software.", + "Python installed. Please restart QPyPack manually later.": "Python instalado. Por favor, reinicie QPyPack manualmente más tarde.", + "[Syntax Error] Source code syntax parsing failed, build aborted:\n - File: {file}\n - Line: Line {line}\n - Detail: {desc}\n\n💡 Tip: This is usually NOT a fault of the packaging tool.\nPlease ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\nUsing newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\nWe recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": "[Error de Sintaxis] Error de análisis sintáctico, compilación abortada:\n - Archivo: {file}\n - Línea: {line}\n - Detalles: {desc}\n\n💡 Consejo: Esto generalmente NO es un fallo de la herramienta.\nAsegúrese de que la versión de Python seleccionada coincida con la utilizada para probar el código.\nEl uso de sintaxis más nueva en un entorno de Python más antiguo desencadenará este error.\nRecomendamos ir a [Opciones de compilación] -> [Motor] para cambiar a la versión correcta de Python.", + "[FAILED] Build interrupted exceptionally!\n\n🔍 Common Troubleshooting:\n1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": "[FAILED] ¡La compilación se interrumpió de forma excepcional!\n\n🔍 Solución de problemas comunes:\n1. Incompatibilidad de entorno (Más común): La versión de Python seleccionada es incompatible con su código fuente. Vaya a [Opciones de compilación] para cambiar a la versión de Python que utiliza normalmente para este código.\n2. Dependencias faltantes: Haga clic en 'Modo Detallado' arriba para buscar ModuleNotFoundError.\n3. Bloqueo antivirus: Asegúrese de que su software de seguridad no esté bloqueando el proceso de compilación.\n\n(Nota: Esto generalmente es causado por discrepancias de entorno/código y no por el motor en sí. Consulte el registro detallado.)", + "Status: Build Cancelled": "Estado: Compilación cancelada", + "Build Cancelled": "Compilación cancelada", + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] El paquete '{pkg}' no se pudo instalar, omitiendo...", + "One-Click Install": "Instalación con un clic", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] La instalación de Python falló o fue cancelada.", + "System Default ({sys_native})": "Predeterminado del sistema ({sys_native})", + "My Studio": "My Studio", + "Python Executable": "Ejecutable Python", + "Invalid syntax": "Sintaxis no válida", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] Descargando navegadores Playwright vía espejo: {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] Reintentando la descarga del navegador Playwright a través del CDN oficial...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] La instalación del navegador Playwright falló en todas las fuentes, la compilación continuará con riesgo...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] La conversión del icono a .icns falló, construyendo sin icono.", + "OK": "OK", "Unknown": "Desconocido", - "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Arrastra y suelta el script (.py/.pyw) aquí\no Haz clic para buscar...", "System Temp Directory (Anti-Lock / Cloud-Friendly)": "Directorio temporal del sistema (Anti-bloqueo / Compatible con la nube)", - "Cancel": "Cancelar", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Doble clic para editar la ruta; Admite arrastrar y soltar. Use 'Exportar ajustes' para guardar y reutilizar.", - "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Entorno GCC/MinGW-w64 local detectado, usando el compilador MinGW64.", - "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Entorno Zig local detectado, Nuitka gestionará la compilación del backend C.", - "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] No se detectó compilador C local. Nuitka descargará y gestionará automáticamente un conjunto de herramientas MinGW-w64 compatible.", - "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Modo ligero activado, aplicando optimización de bytecode (-OO) y eliminando módulos de desarrollo...", - "[ERROR] I/O Exception: {err_msg}": "[ERROR] Excepción de E/S: {err_msg}", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} Soporte:Descargar Python
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka Detectando y gestionando automáticamente el compilador backend C" + "Script and settings retained. Ready to rebuild.": "Script y configuraciones conservados. Listo para reconstruir." } diff --git a/qpypack/locales/fr_FR.json b/qpypack/locales/fr_FR.json index d875eaf..43cc74a 100644 --- a/qpypack/locales/fr_FR.json +++ b/qpypack/locales/fr_FR.json @@ -11,6 +11,7 @@ "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "Outil GUI multiplateforme pour Python basé sur PyInstaller & Nuitka", "Python Packaging, Reimagined.": "La création de paquets Python, réinventée.", "Drop Python source code to start": "Déposez le code source Python pour commencer", + "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Faites glisser le script Python (.py/.pyw) ici\nou Cliquez pour parcourir...", "Build Settings": "Options de compilation", "Preferences": "Préférences", "About": "À propos", @@ -55,6 +56,7 @@ "Import Preset...": "Importer Préréglage...", "Reset to Default Config": "Réinitialiser la configuration", "Cancel & Return": "Annuler et revenir", + "Cancel": "Annuler", "Configure Build Settings": "Paramètres de compilation", "Toggle Execution Log": "Afficher/Masquer le journal", "Detailed Mode": "Mode Détaillé", @@ -63,6 +65,8 @@ "Select All": "Tout Sélectionner", "Clear Log": "Effacer le journal", "Export Log...": "Exporter le journal...", + "Reset": "Réinitialiser", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": "Êtes-vous sûr de vouloir réinitialiser toutes les préférences ?
Tous les paramètres seront restaurés à leur état par défaut.", "Engine & Environment": "Moteur et environnement", "Execution Mode": "Mode d'exécution", "Mirrors & Scanner": "Miroirs et analyseur", @@ -87,12 +91,14 @@ "UPX Path:": "Chemin UPX :", "PyInstaller Version:": "Version de PyInstaller :", "Nuitka Version:": "Version de Nuitka :", - "Pipreqs Version:": "Version de Pipreqs :", "Version:": "Version :", "Author/Company:": "Auteur/Organisation :", "Description:": "Description :", - "Output Rule:": "Règle de sortie :", + "Output Location:": "Règle de sortie :", "Target Directory:": "Dossier cible :", + "Temporary Directory:": "Dossier temporaire :", + "Source Directory (.qpypack_build)": "Dossier source (.qpypack_build)", + "System Temp Directory": "Dossier Temp du Système", "Source File Directory": "Dossier du fichier source", "Custom Directory": "Dossier personnalisé", "Import Name": "Nom d'import", @@ -104,10 +110,13 @@ "Import name (e.g. cv2):": "Nom d'import (ex : cv2) :", "PyPI package name for [{imp_name}]:": "Nom PyPI pour [{imp_name}] :", "One-File Mode (--onefile)": "Mode fichier unique (--onefile)", + "Folder Mode (--onedir)": "Mode Dossier (--onedir)", + "Contents Directory (--contents-directory):": "Répertoire de contenu (--contents-directory) :", + "Internal directory name for dependencies (default: _internal)": "Nom du répertoire interne pour les dépendances (par défaut : _internal)", "Hide Console (--noconsole)": "Masquer la console (--noconsole)", "Use Virtual Environment (Recommended)": "Utiliser un environnement virtuel (Recommandé)", "Install requirements.txt": "Installer requirements.txt", - "Analyze Dependencies (pipreqs)": "Analyser les dépendances (pipreqs)", + "Analyze Dependencies (AST)": "Analyser les dépendances (AST)", "Scan Entire Folder": "Analyser l'ensemble du dossier", "Enable UPX Compression": "Activer la compression UPX", "Lite Mode (Exclude Dev/Test Dependencies)": "Mode allégé (Excluir les dépendances dev/test)", @@ -124,22 +133,22 @@ "Leave blank to auto-detect from environment variables": "Laissez vide pour détecter automatiquement", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "Exclut les dépendances inutiles pour réduire la taille et accélérer la compilation.", "Double-click to edit target path; Drag & drop supported": "Double-cliquez pour modifier le chemin; Glisser-déposer pris en charge", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Double-cliquez pour modifier le chemin. Utilisez 'Exporter Préréglage' pour sauvegarder.", "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": "PyInstaller — Vitesse de compilation rapide et excellente compatibilité.", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": "Nuitka — Compile en C/C++ nativo. Meilleures performances et protège le code source.", - "
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Support Python {ver} :Télécharger Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
OS Hérités Rétrocompatibilité totale", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Support Python {ver} :Télécharger Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box": "
Support Python {ver} :Télécharger Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Support de MinGW64 intégré", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)": "
Support Python {ver} :Télécharger Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Nécessite MSVC / Clang / Zig", - "
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...": "
Interprète PythonTélécharger Python
Détection automatique de l'environnement...", + "
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Support Python {ver} :
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
OS Hérités Rétrocompatibilité totale", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Support Python {ver} :
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Support Python {ver} :
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Détection et gestion automatiques du compilateur backend C", + "
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...": "
Interprète Python
Détection automatique de l'environnement...", "[INFO] Build Cancelled.": "[INFO] Compilation annulée.", "[INFO] Performing pre-flight environment checks...": "[INFO] Vérifications de l'environnement en cours...", "[INFO] Analyzing source code and project dependencies...": "[INFO] Analyse du code source et des dépendances...", "[INFO] Initializing isolated build environment...": "[INFO] Initialisation de l'environnement isolé...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] Playwright détecté. Installation des navigateurs intégrés...", "[INFO] Python interpreter path: {path}": "[INFO] Chemin de l'interprète : {path}", "[INFO] Creating virtual environment...": "[INFO] Création de l'environnement virtuel...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] Mise à jour du gestionnaire pip...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] Analyse via pipreqs...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] Installation du moteur [{pkg}] et de ses dépendances...", + "[INFO] Scanning project source code via AST engine...": "[INFO] Analyse via moteur AST...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Astuce Nuitka : Assurez-vous d'une bonne connexion pour le téléchargement de GCC/MinGW.", "[INFO] Successfully installed compatible versions.": "[INFO] Versions compatibles installées avec succès.", "[INFO] Resolving project dependencies...": "[INFO] Résolution des dépendances du projet...", @@ -152,11 +161,16 @@ "[INFO] Installing build environment and project dependencies ({count} packages): {pkgs}": "[INFO] Installation des dépendances ({count} paquets) : {pkgs}", "[INFO] Switching to backup PyPI source for retrieval: {url}": "[INFO] Basculement vers l'index PIP secondaire : {url}", "[INFO] Starting {engine} engine to compile binary files...": "[INFO] Démarrage du moteur {engine} pour la compilation...", + "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] Environnement MSVC local trouvé, priorité au compilateur C++ natif.", + "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] Environnement Clang local trouvé, priorité au compilateur LLVM Clang.", + "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+ détecté : Utilisation du compilateur Zig (--zig) comme backend C.", + "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] Utilisation du compilateur MinGW64 (--mingw64) pour le backend C.", + "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Environnement local GCC/MinGW-w64 détecté, utilisation du compilateur MinGW64.", + "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Environnement local Zig détecté, Nuitka gérera la compilation du backend C.", + "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Aucun compilateur C local détecté. Nuitka téléchargera et gérera automatiquement une chaîne d'outils MinGW-w64 compatible.", "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] Évaluation de la mémoire (Libre : {ram:.1f} Go). Concurrence ajustée : {cores} -> {safe_jobs} ...", "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] Suppression des paramètres de l'icône et recompilation...", - "[INFO] Writing application icon...": "[INFO] Écriture de l'icône de l'application...", - "[INFO] Application icon written successfully.": "[INFO] Icône écrite avec succès.", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] Directives d'optimisation Nuitka activées...", + "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Mode allégé activé, application de l'optimisation du bytecode (-OO) et suppression des modules de développement...", "[INFO] Compilation completed, archiving built files...": "[INFO] Compilation terminée, archivage des fichiers...", "[INFO] Validating output files and generating final product...": "[INFO] Validation des fichiers et génération de l'exécutable...", "[INFO] Build log exported to: {path}": "[INFO] Journal exporté sous : {path}", @@ -173,8 +187,10 @@ "[WARN] Pause code injection exception: {error}": "[WARN] Exception d'injection de pause : {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] Exception d'analyse AST : {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] Avertissement lors de la lecture de requirements.txt : {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] Avertissement lors de l'analyse pipreqs : {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] Dépassement de délai de la commande (>{timeout}s)", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] 'requests' ou 'httpx' détecté. Inclusion automatique des certificats 'certifi' pour éviter les erreurs SSL.", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] Utilisation de '__file__' détectée. Dans le mode fichier unique, utilisez 'sys._MEIPASS' !", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] Astuce : L'exécutable peut être faussement détecté par un antivirus. L'ajout d'exclusions est recommandé.", "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] Compilation annulée : Espace disque insuffisant. Libérez au moins 5 Go.", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] Le dossier de sortie n'a pas les droits d'écriture : {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] Fichier de dépendances introuvable : {path}", @@ -188,6 +204,8 @@ "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[Erreur de syntaxe] Erreur dans le code source :\n - Fichier : {file}\n - Type : {type}\n - Ligne : {line}\n - Détail : {desc}", "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] Compilation interrompue. Consultez le 'Mode Détaillé'.", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] Le fichier est verrouillé par un service Cloud. Veuillez le déverrouiller.", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] Le fichier cible est en cours d'exécution ou occupé. Veuillez fermer l'application.", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] Module 'multiprocessing' détecté. Assurez-vous que 'multiprocessing.freeze_support()' est appelé sous 'if __name__ == \"__main__\":'.", "[ERROR] Please load a valid Python source file first!": "[ERROR] Veuillez d'abord charger un fichier Python valide !", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] Exception lors de l'analyse AST : {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] Impossible d'exporter le préréglage : {error}", @@ -196,6 +214,7 @@ "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] Compilation terminée, mais ces dépendances ont échoué :\n\n - {pkgs}", "[ERROR] Process error: command or binary missing ({error})": "[ERROR] Erreur de processus : {error}", "[ERROR] System execution exception: {error}": "[ERROR] Exception système : {error}", + "[ERROR] I/O Exception: {err_msg}": "[ERROR] Exception d'E/S : {err_msg}", "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "Avertissement : {pkgs} n'a pas pu être installé.", "Package mappings have been reset to defaults.": "Mappages réinitialisés aux valeurs par défaut.", "Config preset exported to: {path}": "Préréglage exporté vers : {path}", @@ -217,15 +236,54 @@ "Python Environment Required": "Environnement Python requis", "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "Python n'est pas détecté !
Installez Python (cochez 'Add to PATH').", "Download Python": "Télécharger Python", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (Expérimental)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (Recommandé)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Support Win7)", + "Downloading Python {ver}... Please wait.": "Téléchargement de Python {ver}... Veuillez patienter.", + "Configure Manually": "Configurer manuellement", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "Basculé vers [Options de compilation] -> [Moteur], veuillez définir le chemin Python.", + "Python Environment Management": "Gestion de l'environnement Python", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": "Environnement Python requis
La compilation dépend d'un interprète Python.
Veuillez sélectionner une version à télécharger, installer et configurer automatiquement.
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": "Gestion de l'environnement Python
Permet de basculer entre les environnements détectés localement ou de télécharger de nouvelles versions.", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": "💡 Recommandation : Python 3.11.9 est recommandé pour une compatibilité optimale.", + "View Python": "Voir Python", + "Locally Detected Pythons": "Pythons détectés localement", + "Download New Version": "Télécharger une nouvelle version", + "Use Selected Environment": "Utiliser l'environnement sélectionné", + "No local Python environments detected.": "Aucun environnement Python local détecté.", + "Select Python Version to Download:": "Sélectionnez la version de Python à télécharger :", + "Click to automatically download, install Python, and configure system environment variables.": "Cliquez pour télécharger, installer et configurer automatiquement les variables d'environnement.", + "One-Click Download & Install": "Téléchargement et installation en un clic", + "Use Installed Version Directly": "✔ Utiliser la version installée directement", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": "✔ Détecté localement :
{path}
Prêt à être utilisé directement.", + "Switched to local Python environment: {path}": "Basculé vers l'environnement Python local : {path}", + "Download complete. Starting Python installation...": "Téléchargement terminé. Démarrage de l'installation de Python...", + "Install Complete": "Installation terminée", + "Exit Now": "Quitter maintenant", + "Later": "Plus tard", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": "Environnement Python installé avec succès !

Variables d'environnement mises à jour. Il est recommandé de redémarrer le logiciel.", + "Python installed. Please restart QPyPack manually later.": "Python installé. Veuillez redémarrer QPyPack manuellement plus tard.", + "[Syntax Error] Source code syntax parsing failed, build aborted:\n - File: {file}\n - Line: Line {line}\n - Detail: {desc}\n\n💡 Tip: This is usually NOT a fault of the packaging tool.\nPlease ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\nUsing newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\nWe recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": "[Erreur de syntaxe] L'analyse syntaxique a échoué, compilation annulée :\n - Fichier : {file}\n - Ligne : {line}\n - Détail : {desc}\n\n💡 Astuce : Ce n'est généralement PAS une erreur de l'outil.\nAssurez-vous que la version de Python correspond à celle utilisée pour tester le code.\nL'utilisation d'une syntaxe plus récente dans un environnement ancien déclenchera cette erreur.\nIl est recommandé de changer de version de Python dans [Options de compilation].", + "[FAILED] Build interrupted exceptionally!\n\n🔍 Common Troubleshooting:\n1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": "[FAILED] Compilation interrompue exceptionnellement !\n\n🔍 Dépannage courant :\n1. Incompatibilité d'environnement (Fréquent) : La version Python est incompatible. Allez dans [Options de compilation] pour la changer.\n2. Dépendances manquantes : Vérifiez 'ModuleNotFoundError' dans le mode détaillé.\n3. Blocage Antivirus : Assurez-vous que votre antivirus ne bloque pas le processus.\n\n(Note : Souvent causé par des différences d'environnement/code, pas par le moteur lui-même. Consultez le journal.)", + "Status: Build Cancelled": "Statut : Compilation annulée", + "Build Cancelled": "Compilation annulée", + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] L'installation du paquet '{pkg}' a échoué, on passe...", + "One-Click Install": "Installation en un clic", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] L'installation de Python a échoué ou a été annulée.", + "System Default ({sys_native})": "Par défaut ({sys_native})", + "My Studio": "Mon Studio", + "Python Executable": "Exécutable Python", + "Invalid syntax": "Syntaxe invalide", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] Téléchargement des navigateurs Playwright via le miroir : {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] Nouvelle tentative de téléchargement du navigateur Playwright via le CDN officiel...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] L'installation du navigateur Playwright a échoué, la compilation se poursuit avec un risque...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] La conversion de l'icône en .icns a échoué, compilation sans icône.", + "OK": "OK", "Unknown": "Inconnu", - "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Glissez-déposez un script Python (.py/.pyw) ici\nou cliquez pour parcourir...", "System Temp Directory (Anti-Lock / Cloud-Friendly)": "Dossier Temp du système (Anti-verrouillage / Compatible Cloud)", - "Cancel": "Annuler", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Double-cliquez pour modifier; Glisser-déposer pris en charge. Utilisez 'Exporter Préréglage' pour sauvegarder.", - "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Environnement local GCC/MinGW-w64 détecté, utilisation du compilateur MinGW64.", - "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Environnement local Zig détecté, Nuitka gérera la compilation du backend C.", - "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Aucun compilateur C local détecté. Nuitka téléchargera et gérera automatiquement une chaîne d'outils MinGW-w64 compatible.", - "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Mode allégé activé, application de l'optimisation du bytecode (-OO) et suppression des modules de développement...", - "[ERROR] I/O Exception: {err_msg}": "[ERROR] Exception d'E/S : {err_msg}", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Support Python {ver} :Télécharger Python
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka Détection et gestion automatiques du compilateur backend C" + "Script and settings retained. Ready to rebuild.": "Script et paramètres conservés. Prêt à recompiler." } diff --git a/qpypack/locales/ja_JP.json b/qpypack/locales/ja_JP.json index a9d127c..e75fe2d 100644 --- a/qpypack/locales/ja_JP.json +++ b/qpypack/locales/ja_JP.json @@ -7,10 +7,10 @@ "Tencent Cloud (China)": "Tencent クラウド", "Huawei Cloud (China)": "Huawei クラウド", "USTC (China)": "USTC ミラー", - "Modern Cross-Platform Python Application Packager": "モダン クロスプラットフォーム Python アプリケーション パッケージャー", "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "PyInstaller および Nuitka をベースにしたモダンな Python パッケージング GUI", "Python Packaging, Reimagined.": "Pythonパッケージングの再定義。", "Drop Python source code to start": "開始するにはPythonソースコードをドロップ", + "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Python スクリプト (.py/.pyw) をここにドラッグ&ドロップ\nまたはクリックして参照...", "Build Settings": "ビルド設定", "Preferences": "環境設定", "About": "バージョン情報", @@ -55,6 +55,7 @@ "Import Preset...": "プリセットのインポート...", "Reset to Default Config": "デフォルト設定にリセット", "Cancel & Return": "変更を破棄して戻る", + "Cancel": "キャンセル", "Configure Build Settings": "ビルドパラメータの構成", "Toggle Execution Log": "実行ログの表示/非表示", "Detailed Mode": "詳細モード", @@ -63,6 +64,8 @@ "Select All": "すべて選択", "Clear Log": "ログを消去", "Export Log...": "ログを保存...", + "Reset": "リセット", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": "すべての設定をリセットしてもよろしいですか?
すべての設定がデフォルトの状態に復元されます。", "Engine & Environment": "ビルドエンジンと環境", "Execution Mode": "実行モード", "Mirrors & Scanner": "ミラーソースとスキャナー", @@ -87,12 +90,14 @@ "UPX Path:": "UPX パス:", "PyInstaller Version:": "PyInstaller バージョン:", "Nuitka Version:": "Nuitka バージョン:", - "Pipreqs Version:": "Pipreqs バージョン:", "Version:": "バージョン:", "Author/Company:": "作者/組織名:", "Description:": "詳細説明:", - "Output Rule:": "出力先ルール:", + "Output Location:": "出力先:", "Target Directory:": "保存先ディレクトリ:", + "Temporary Directory:": "一時ディレクトリ:", + "Source Directory (.qpypack_build)": "ソースディレクトリ (.qpypack_build)", + "System Temp Directory": "システム一時ディレクトリ", "Source File Directory": "ソースファイルと同じディレクトリ", "Custom Directory": "カスタムディレクトリ", "Import Name": "import 名", @@ -104,10 +109,13 @@ "Import name (e.g. cv2):": "インポート名 (例: cv2):", "PyPI package name for [{imp_name}]:": "[{imp_name}] のPyPIパッケージ名:", "One-File Mode (--onefile)": "単一ファイルモード (--onefile)", + "Folder Mode (--onedir)": "フォルダーモード (--onedir)", + "Contents Directory (--contents-directory):": "内部リソースディレクトリ:", + "Internal directory name for dependencies (default: _internal)": "依存関係とリソースの内部ディレクトリ名 (デフォルト: _internal)", "Hide Console (--noconsole)": "コンソールウィンドウを非表示 (--noconsole)", "Use Virtual Environment (Recommended)": "独立した仮想環境を使用 (推奨)", "Install requirements.txt": "requirements.txt をインストール", - "Analyze Dependencies (pipreqs)": "依存関係を自動解析 (pipreqs)", + "Analyze Dependencies (AST)": "依存関係を自動解析 (AST)", "Scan Entire Folder": "フォルダ全体をスキャン", "Enable UPX Compression": "UPX 圧縮を有効化", "Lite Mode (Exclude Dev/Test Dependencies)": "軽量化モード (開発・テスト用依存関係を除外)", @@ -124,22 +132,22 @@ "Leave blank to auto-detect from environment variables": "空欄の場合、環境変数から自動検出します", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "ビルド環境から無駄な依存関係を動的に除外し、ビルド速度とサイズを最適化します。", "Double-click to edit target path; Drag & drop supported": "ダブルクリックで展開先パスを編集。ドラッグ&ドロップ対応", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "ダブルクリックで展開先パスを編集。再利用するには「プリセットのエクスポート」をご利用ください。", "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": "PyInstaller — ビルド速度が速く、互換性に優れています。ゼロコンフィギュレーションで利用可能です。", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": "Nuitka — ネイティブ C/C++ バイナリへコンパイルします。パフォーマンスが向上し、ソースコードを保護します。", - "
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} サポート:Python をダウンロード
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
レガシー OS 完全な後方互換性", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} サポート:Python をダウンロード
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box": "
Python {ver} サポート:Python をダウンロード
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 をそのままサポート", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)": "
Python {ver} サポート:Python をダウンロード
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka MSVC / Clang / Zig が必要 (MinGW64 はサポート外)", - "
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...": "
Python インタープリターPython をダウンロード
システム環境を自動検出中...", + "
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} サポート:
✔ Windows 7    ✔ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux
レガシー OS 完全な後方互換性", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} サポート:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} サポート:
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka C バックエンドコンパイラを自動検出して管理します", + "
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...": "
Python インタープリター
システム環境を自動検出中...", "[INFO] Build Cancelled.": "[INFO] ビルドがキャンセルされました。", "[INFO] Performing pre-flight environment checks...": "[INFO] 環境の事前チェックを実行中...", "[INFO] Analyzing source code and project dependencies...": "[INFO] ソースコードと依存関係を分析中...", "[INFO] Initializing isolated build environment...": "[INFO] 隔離されたビルド環境を初期化中...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] Playwrightが検出されました。組み込みブラウザーをインストールしています...", "[INFO] Python interpreter path: {path}": "[INFO] Python インタープリターパス: {path}", "[INFO] Creating virtual environment...": "[INFO] 仮想環境を作成中...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] pip パッケージマネージャーを更新中...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] pipreqs を使用して依存関係をスキャン中...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] ビルドエンジン [{pkg}] およびコア依存関係をインストール中...", + "[INFO] Scanning project source code via AST engine...": "[INFO] ASTエンジンを使用して依存関係をスキャン中...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka ヒント: 初回ビルド時に GCC/MinGW のダウンロードが求められる場合があります。", "[INFO] Successfully installed compatible versions.": "[INFO] 互換性のあるバージョンが正常にインストールされました。", "[INFO] Resolving project dependencies...": "[INFO] プロジェクトの依存関係を解決中...", @@ -152,11 +160,16 @@ "[INFO] Installing build environment and project dependencies ({count} packages): {pkgs}": "[INFO] 依存関係 ({count} パッケージ) をインストール中: {pkgs}", "[INFO] Switching to backup PyPI source for retrieval: {url}": "[INFO] バックアップの PyPI ソースに切り替えて再試行中: {url}", "[INFO] Starting {engine} engine to compile binary files...": "[INFO] {engine} エンジンを起動してコンパイルを開始中...", + "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] ローカルのMSVC環境を検出しました。ネイティブC++コンパイラを優先します。", + "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] ローカルのClang環境を検出しました。LLVM Clangコンパイラを優先します。", + "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+ を検出しました: Zigコンパイラを使用します。", + "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] MinGW64コンパイラを使用します。", + "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] ローカルの GCC/MinGW-w64 環境を検出しました。MinGW64 コンパイラを使用します。", + "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] ローカルの Zig 環境を検出しました。Nuitka に C バックエンドのコンパイルを任せます。", + "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] ローカルの C コンパイラが検出されませんでした。Nuitka が自動的に互換性のある MinGW-w64 ツールチェーンをダウンロードして管理します。", "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] システムメモリを評価中 (空き: {ram:.1f} GB)。並行処理を調整しました: {cores} -> {safe_jobs} ...", "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] アイコンパラメータを削除して自動的に再ビルド中...", - "[INFO] Writing application icon...": "[INFO] アプリケーションアイコンを書き込み中...", - "[INFO] Application icon written successfully.": "[INFO] アイコンが正常に書き込まれました。", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] Nuitka 最適化ディレクティブを有効にしました...", + "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 軽量化モードを有効にしました。バイトコード最適化 (-OO) を適用し、開発モジュールを削除します...", "[INFO] Compilation completed, archiving built files...": "[INFO] コンパイル完了。生成ファイルをアーカイブ中...", "[INFO] Validating output files and generating final product...": "[INFO] 出力ファイルを検証し、最終成果物を生成中...", "[INFO] Build log exported to: {path}": "[INFO] ビルドログを出力しました: {path}", @@ -173,8 +186,10 @@ "[WARN] Pause code injection exception: {error}": "[WARN] ポーズコード挿入例外: {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] AST 解析例外: {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] requirements.txt の読み取り警告: {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] pipreqs 出力の解析警告: {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] コマンドがタイムアウトしました (>{timeout}s)", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] 'requests' または 'httpx' が検出されました。SSL エラーを防ぐために 'certifi' を自動バンドルします。", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] '__file__' の使用が検出されました。単一ファイルモードでは、'sys._MEIPASS' を使用してください!", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] ヒント: パッケージ化されたファイルはウイルス対策ソフトに誤検知される可能性があります。", "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] ビルド中止: ディスク容量が不足しています。容量を確保してください。", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] 出力ディレクトリに書き込み権限がありません: {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] 依存関係ファイルが見つかりません: {path}", @@ -188,6 +203,8 @@ "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[構文エラー] 構文エラーが存在します。コンパイルを中止しました:\n - 対象ファイル: {file}\n - エラー種別: {type}\n - 発生位置: {line} 行目\n - 詳細: {desc}\n\nヒント: ローカルで正常に動作することを確認してから再実行してください。", "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] 例外が発生したため中断されました。「詳細モード」でログを確認してください。", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] 対象ファイルがクラウドストレージ等によりロックされています。", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] ターゲットファイルが実行中または使用中です。アプリケーションを閉じて再試行してください。", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] 'multiprocessing' モジュールが検出されました。無限ループを防ぐために 'multiprocessing.freeze_support()' を呼び出してください。", "[ERROR] Please load a valid Python source file first!": "[ERROR] 有効な Python ソースコードファイルを先に読み込んでください!", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] AST 構文解析中に例外が発生しました: {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] プリセットのエクスポートに失敗しました: {error}", @@ -196,16 +213,9 @@ "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] ビルドは完了しましたが、以下の依存パッケージのインストールに失敗しました:\n\n - {pkgs}", "[ERROR] Process error: command or binary missing ({error})": "[ERROR] プロセスエラー: コマンドまたはバイナリがありません ({error})", "[ERROR] System execution exception: {error}": "[ERROR] システム実行例外: {error}", - "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "依存関係欠落警告: {pkgs} のインストールに失敗しました。", - "Package mappings have been reset to defaults.": "パッケージマッピングが初期設定にリセットされました。", - "Config preset exported to: {path}": "設定プリセットを出力しました: {path}", - "Config preset imported successfully.": "設定プリセットを正常に読み込みました。", - "AST scan completed, found {count} dependencies.": "AST スキャンが完了しました。{count} 個の依存関係を検出しました。", + "[ERROR] I/O Exception: {err_msg}": "[ERROR] I/O 例外: {err_msg}", "No log content.": "ログ出力がありません。", "Log saved to: {path}": "ログを保存しました: {path}", - "Attention: Please check the log for details.": "注意: 詳細はログを確認してください。", - "Are you sure you want to reset all preferences to default?": "すべての環境設定をデフォルトにリセットしますか?", - "Global configuration has been reset.": "グローバル設定がリセットされました。", "\\nProgram execution completed, press Enter to exit...": "\\n処理が完了しました。Enter キーを押して終了します...", "Project-specific. Not saved to global preferences. Use 'Export Preset' to save config.": "プロジェクト固有の設定です。「プリセットのエクスポート」を使用して保存してください。", "GitHub Repository": "GitHub リポジトリ", @@ -217,15 +227,60 @@ "Python Environment Required": "Python環境が必要です", "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "システムにPythonが検出されません!

インストールされていない場合はダウンロードしてインストールしてください('Add Python.exe to PATH'のチェックを忘れないでください)。", "Download Python": "Pythonをダウンロード", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (実験的)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (推奨)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Win7サポート)", + "Downloading Python {ver}... Please wait.": "Python {ver} をダウンロードしています... お待ちください。", + "Configure Manually": "手動で設定する", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "[ビルド設定] -> [エンジン]に切り替えました。Pythonパスを設定してください。", + "Python Environment Management": "Python 環境管理", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": "Python環境が必要です
アプリケーションのビルドにはPythonインタープリターが必要です。
バージョンを選択して、自動ダウンロード、インストール、環境変数の構成を行ってください。
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": "Python環境管理
検出されたローカルのPython環境の切り替え、または新しいバージョンのダウンロードをサポートします。", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": "💡 推奨: 最適なビルドの互換性とエンジンサポートのために、Python 3.11.9 をお勧めします。", + "View Python": "Pythonを表示", + "Locally Detected Pythons": "検出されたローカル環境", + "Download New Version": "新しいバージョンをダウンロード", + "Use Selected Environment": "選択した環境を使用する", + "No local Python environments detected.": "ローカルのPython環境が検出されませんでした。", + "Select Python Version to Download:": "ダウンロードするPythonのバージョンを選択:", + "Click to automatically download, install Python, and configure system environment variables.": "クリックすると、Pythonが自動的にダウンロード、インストールされ、システム環境変数が設定されます。", + "One-Click Download & Install": "ワンクリックでダウンロード&インストール", + "Use Installed Version Directly": "✔ ローカル環境を直接使用する", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": "✔ ローカルで検出:
{path}
再ダウンロードせずに直接切り替えることができます。", + "Switched to local Python environment: {path}": "ローカルPython環境に切り替えました: {path}", + "Download complete. Starting Python installation...": "ダウンロードが完了しました。Pythonのインストールを開始しています...", + "Install Complete": "インストール完了", + "Exit Now": "今すぐ終了", + "Later": "後で", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": "Python環境が正常にインストールされました!

システム環境変数が更新されました。変更を適用するためにソフトウェアを再起動することをお勧めします。", + "Python installed. Please restart QPyPack manually later.": "Pythonがインストールされました。後で手動でQPyPackを再起動してください。", + "[Syntax Error] Source code syntax parsing failed, build aborted:\n - File: {file}\n - Line: Line {line}\n - Detail: {desc}\n\n💡 Tip: This is usually NOT a fault of the packaging tool.\nPlease ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\nUsing newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\nWe recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": "[構文エラー] ソースコードの構文解析に失敗しました。ビルドは中止されました:\n - ファイル: {file}\n - 行: {line}行目\n - 詳細: {desc}\n\n💡ヒント: これは通常、パッケージングツールの問題ではありません。\n選択した[ビルドPythonバージョン]がコードの記述/テストに使用したバージョンと一致していることを確認してください。\n古いPython環境で新しい構文(:=, |, match-caseなど)を使用すると、このエラーが発生します。\n[ビルド設定] -> [エンジン]に移動して、適切なPythonバージョンに切り替えることをお勧めします。", + "[FAILED] Build interrupted exceptionally!\n\n🔍 Common Troubleshooting:\n1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": "[FAILED] ビルドが例外的に中断されました!\n\n🔍 一般的なトラブルシューティング:\n1. 環境の不一致(最も一般的): 選択したPythonバージョンがソースコードと互換性がありません。[ビルド設定]で、通常使用するPythonバージョンに切り替えてください。\n2. 依存関係の欠落: 上の「詳細モード」をクリックして、ModuleNotFoundErrorを確認してください。\n3. アンチウイルスのブロック: セキュリティソフトがビルドプロセスをブロックしていないか確認してください。\n\n(注: これは通常、パッケージングエンジン自体の問題ではなく、環境/コードの不一致によって発生します。詳細なログで正確な原因を確認してください。)", + "Status: Build Cancelled": "ステータス: ビルドがキャンセルされました", + "Build Cancelled": "ビルドがキャンセルされました", + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] パッケージ '{pkg}' のインストールに失敗しました。スキップします...", + "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "依存関係欠落警告: {pkgs} のインストールに失敗しました。", + "Package mappings have been reset to defaults.": "パッケージマッピングが初期設定にリセットされました。", + "Global configuration has been reset.": "グローバル設定がリセットされました。", + "Config preset exported to: {path}": "設定プリセットを出力しました: {path}", + "Config preset imported successfully.": "設定プリセットを正常に読み込みました。", + "AST scan completed, found {count} dependencies.": "AST スキャンが完了しました。{count} 個の依存関係を検出しました。", + "Attention: Please check the log for details.": "注意: 詳細はログを確認してください。", + "One-Click Install": "ワンクリック・インストール", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] Pythonのインストールが失敗したか、キャンセルされました。", + "System Default ({sys_native})": "システムデフォルト ({sys_native})", + "My Studio": "My Studio", + "Python Executable": "Python 実行ファイル", + "Invalid syntax": "無効な構文", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] ミラーからPlaywrightブラウザーをダウンロードしています: {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] 公式CDN経由でPlaywrightブラウザーのダウンロードを再試行しています...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] Playwrightブラウザーのインストールがすべてのソースで失敗しました。リスクを承知でビルドを続行します...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] .icns へのアイコン変換に失敗しました。アイコンなしでビルドします。", + "OK": "OK", "Unknown": "不明", - "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Python スクリプト (.py/.pyw) をここにドラッグ&ドロップ\nまたはクリックして参照...", - "System Temp Directory (Anti-Lock / Cloud-Friendly)": "システムの一時ディレクトリ (ロック防止 / クラウド同期対応)", - "Cancel": "キャンセル", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "ダブルクリックでパスを編集。ドラッグ&ドロップ対応。再利用するには「プリセットのエクスポート」をご利用ください。", - "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] ローカルの GCC/MinGW-w64 環境を検出しました。MinGW64 コンパイラを使用します。", - "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] ローカルの Zig 環境を検出しました。Nuitka に C バックエンドのコンパイルを任せます。", - "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] ローカルの C コンパイラが検出されませんでした。Nuitka が自動的に互換性のある MinGW-w64 ツールチェーンをダウンロードして管理します。", - "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 軽量化モードを有効にしました。バイトコード最適化 (-OO) を適用し、開発モジュールを削除します...", - "[ERROR] I/O Exception: {err_msg}": "[ERROR] I/O 例外: {err_msg}", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} サポート:Python をダウンロード
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka C バックエンドコンパイラを自動検出して管理します" + "Script and settings retained. Ready to rebuild.": "スクリプトと設定は保持されました。再ビルドの準備ができました。" } diff --git a/qpypack/locales/ko_KR.json b/qpypack/locales/ko_KR.json index 9456340..6c90782 100644 --- a/qpypack/locales/ko_KR.json +++ b/qpypack/locales/ko_KR.json @@ -11,6 +11,7 @@ "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "PyInstaller & Nuitka 기반의 모던 Python 패키징 GUI", "Python Packaging, Reimagined.": "Python 패키징, 새로운 경험.", "Drop Python source code to start": "시작하려면 Python 소스 코드를 드래그 앤 드롭하세요", + "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Python 스크립트 (.py/.pyw) 파일을 이곳에 끌어다 놓거나\n클릭하여 찾아보기...", "Build Settings": "빌드 설정", "Preferences": "환경 설정", "About": "정보", @@ -55,6 +56,7 @@ "Import Preset...": "프리셋 가져오기...", "Reset to Default Config": "기본 설정으로 리셋", "Cancel & Return": "취소 및 돌아가기", + "Cancel": "취소", "Configure Build Settings": "빌드 매개변수 구성", "Toggle Execution Log": "실행 로그 켜기/끄기", "Detailed Mode": "상세 모드", @@ -63,6 +65,8 @@ "Select All": "전체 선택", "Clear Log": "로그 지우기", "Export Log...": "로그 내보내기...", + "Reset": "재설정", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": "모든 기본 설정을 재설정하시겠습니까?
모든 설정이 기본 상태로 복원됩니다.", "Engine & Environment": "빌드 엔진 및 환경", "Execution Mode": "실행 모드", "Mirrors & Scanner": "미러 서버 및 스캐너", @@ -87,13 +91,14 @@ "UPX Path:": "UPX 경로:", "PyInstaller Version:": "PyInstaller 버전:", "Nuitka Version:": "Nuitka 버전:", - "Pipreqs Version:": "Pipreqs 버전:", "Version:": "버전:", "Author/Company:": "작성자/회사명:", "Description:": "설명:", - "Output Rule:": "출력 규칙:", + "Output Location:": "출력 규칙:", "Target Directory:": "대상 디렉터리:", - "Source File Directory": "소스 파일 디렉터리", + "Temporary Directory:": "임시 디렉터리:", + "Source Directory (.qpypack_build)": "소스 디렉터리 (.qpypack_build)", + "System Temp Directory": "시스템 임시 폴더", "Custom Directory": "사용자 지정 디렉터리", "Import Name": "import 이름", "PyPI Package Name": "PyPI 패키지 이름", @@ -104,10 +109,13 @@ "Import name (e.g. cv2):": "import 이름 (예: cv2):", "PyPI package name for [{imp_name}]:": "[{imp_name}] PyPI 패키지 이름:", "One-File Mode (--onefile)": "단일 파일 모드 (--onefile)", + "Folder Mode (--onedir)": "폴더 모드 (--onedir)", + "Contents Directory (--contents-directory):": "내부 리소스 디렉터리:", + "Internal directory name for dependencies (default: _internal)": "의존성 및 리소스를 위한 내부 디렉터리 이름 (기본값: _internal)", "Hide Console (--noconsole)": "콘솔 창 숨기기 (--noconsole)", "Use Virtual Environment (Recommended)": "가상 환경 사용 (권장)", "Install requirements.txt": "requirements.txt 설치", - "Analyze Dependencies (pipreqs)": "의존성 자동 분석 (pipreqs)", + "Analyze Dependencies (AST)": "의존성 자동 분석 (AST)", "Scan Entire Folder": "폴더 전체 스캔", "Enable UPX Compression": "UPX 압축 활성화", "Lite Mode (Exclude Dev/Test Dependencies)": "경량화 모드 (개발/테스트 제외)", @@ -124,22 +132,22 @@ "Leave blank to auto-detect from environment variables": "비워두면 자동 감지합니다", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "불필요한 의존성을 동적으로 제외하여 속도를 높이고 용량을 줄입니다.", "Double-click to edit target path; Drag & drop supported": "더블클릭하여 수정. 드래그 앤 드롭 지원", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "대상 경로를 편집하려면 더블 클릭하세요. 드래그 앤 드롭 지원. 저장을 위해 '프리셋 내보내기'를 사용하세요.", "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": "PyInstaller — 빌드 속도가 빠르고 호환성이 뛰어납니다. 컴파일러가 필요 없습니다.", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": "Nuitka — 네이티브 C/C++ 바이너리로 컴파일하여 실행 속도가 빠릅니다.", - "
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} 지원:Python 다운로드
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
레거시 OS 완벽한 하위 호환성", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} 지원:Python 다운로드
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box": "
Python {ver} 지원:Python 다운로드
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 기본 지원", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)": "
Python {ver} 지원:Python 다운로드
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka MSVC / Clang / Zig 필요", - "
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...": "
Python 인터프리터Python 다운로드
시스템 환경 자동 감지 중...", + "
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} 지원:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
레거시 OS 완벽한 하위 호환성", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} 지원:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} 지원:
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka C 백엔드 컴파일러 자동 감지 및 관리 중", + "
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...": "
Python 인터프리터
시스템 환경 자동 감지 중...", "[INFO] Build Cancelled.": "[INFO] 빌드가 취소되었습니다.", "[INFO] Performing pre-flight environment checks...": "[INFO] 환경 사전 점검 수행 중...", "[INFO] Analyzing source code and project dependencies...": "[INFO] 소스 코드 및 의존성 분석 중...", "[INFO] Initializing isolated build environment...": "[INFO] 격리된 빌드 환경 초기화 중...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] Playwright가 감지되었습니다. 내장 브라우저 드라이버를 설치하는 중...", "[INFO] Python interpreter path: {path}": "[INFO] Python 경로: {path}", "[INFO] Creating virtual environment...": "[INFO] 가상 환경 생성 중...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] pip 패키지 관리자 업데이트 중...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] pipreqs로 소스 코드 스캔 중...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] 빌드 엔진 [{pkg}] 및 코어 의존성 설치 중...", + "[INFO] Scanning project source code via AST engine...": "[INFO] AST 엔진을 통해 소스 코드 스캔 중...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka 팁: 첫 빌드 시 GCC/MinGW 다운로드 요청 시 안정적인 네트워크를 유지하세요.", "[INFO] Successfully installed compatible versions.": "[INFO] 호환 버전 설치 완료.", "[INFO] Resolving project dependencies...": "[INFO] 프로젝트 의존성 해결 중...", @@ -152,11 +160,16 @@ "[INFO] Installing build environment and project dependencies ({count} packages): {pkgs}": "[INFO] 의존성 설치 중 ({count}개): {pkgs}", "[INFO] Switching to backup PyPI source for retrieval: {url}": "[INFO] 보조 PyPI 소스로 전환: {url}", "[INFO] Starting {engine} engine to compile binary files...": "[INFO] {engine} 엔진을 시작하여 컴파일 중...", + "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] 로컬 MSVC 환경을 발견했습니다. 네이티브 C++ 컴파일러를 우선 사용합니다.", + "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] 로컬 Clang 환경을 발견했습니다. LLVM Clang 컴파일러를 우선 사용합니다.", + "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+ 감지됨: Zig 컴파일러를 사용합니다.", + "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] MinGW64 컴파일러를 사용합니다.", + "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] 로컬 GCC/MinGW-w64 환경을 감지했습니다. MinGW64 컴파일러를 사용합니다.", + "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] 로컬 Zig 환경을 감지했습니다. Nuitka가 C 백엔드 컴파일을 관리합니다.", + "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] 로컬 C 컴파일러가 감지되지 않았습니다. Nuitka가 호환되는 MinGW-w64 도구 체인을 자동으로 다운로드하고 관리합니다.", "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] 시스템 메모리 평가 (사용 가능: {ram:.1f} GB). 동시성 조정: {cores} -> {safe_jobs} ...", "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] 아이콘 매개변수를 제거하고 다시 빌드 중...", - "[INFO] Writing application icon...": "[INFO] 애플리케이션 아이콘 적용 중...", - "[INFO] Application icon written successfully.": "[INFO] 애플리케이션 아이콘 적용 완료.", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] Nuitka 최적화 적용 완료...", + "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 경량화 모드가 활성화되었습니다. 바이트코드 최적화(-OO)를 적용하고 개발 모듈을 제거하는 중...", "[INFO] Compilation completed, archiving built files...": "[INFO] 컴파일 완료, 파일 아카이빙 중...", "[INFO] Validating output files and generating final product...": "[INFO] 출력 파일 검증 및 최종 결과물 생성 중...", "[INFO] Build log exported to: {path}": "[INFO] 빌드 로그 내보냄: {path}", @@ -173,8 +186,10 @@ "[WARN] Pause code injection exception: {error}": "[WARN] 일시 정지 코드 주입 예외: {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] AST 분석 예외: {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] requirements.txt 읽기 경고: {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] pipreqs 출력 분석 경고: {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] 명령 시간 초과 (>{timeout}초)", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] 'requests' 또는 'httpx'가 감지되었습니다. SSL 오류를 방지하기 위해 'certifi' 인증서를 자동으로 번들링합니다.", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] '__file__' 사용이 감지되었습니다. 단일 파일 모드에서는 리소스 파일을 찾기 위해 'sys._MEIPASS'를 사용하세요!", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] 팁: 패키지화된 실행 파일은 백신에 의해 오탐될 수 있습니다. 예외 처리를 권장합니다.", "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] 빌드 중단됨: 디스크 공간 부족. 최소 5GB를 확보하세요.", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] 출력 디렉터리에 쓰기 권한이 없습니다: {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] 의존성 파일을 찾을 수 없음: {path}", @@ -188,6 +203,8 @@ "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[구문 오류] 소스 코드에 오류가 있습니다:\n - 파일: {file}\n - 유형: {type}\n - 라인: {line}\n - 세부 정보: {desc}", "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] 예외로 인해 컴파일이 중단되었습니다. '상세 모드'를 확인하세요.", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] 대상 파일이 클라우드 드라이브에 의해 잠겼습니다.", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] 대상 파일이 실행 중이거나 사용 중입니다. 애플리케이션을 닫고 다시 시도하세요.", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] 'multiprocessing' 모듈이 감지되었습니다. 무한 루프를 방지하려면 'multiprocessing.freeze_support()'를 호출하세요.", "[ERROR] Please load a valid Python source file first!": "[ERROR] 먼저 유효한 Python 소스 파일을 로드하세요!", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] AST 파싱 중 예외 발생: {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] 프리셋 내보내기 실패: {error}", @@ -196,6 +213,7 @@ "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] 빌드 완료되었으나 설치 실패 패키지 존재:\n\n - {pkgs}", "[ERROR] Process error: command or binary missing ({error})": "[ERROR] 프로세스 오류: {error}", "[ERROR] System execution exception: {error}": "[ERROR] 시스템 실행 예외: {error}", + "[ERROR] I/O Exception: {err_msg}": "[ERROR] I/O 예외: {err_msg}", "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "의존성 누락 경고: {pkgs} 설치 실패.", "Package mappings have been reset to defaults.": "패키지 매핑이 초기화되었습니다.", "Config preset exported to: {path}": "프리셋을 내보냈습니다: {path}", @@ -217,15 +235,56 @@ "Python Environment Required": "Python 환경 필요", "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "Python이 감지되지 않았습니다!
Python을 설치하세요. ('Add to PATH' 체크 필수)", "Download Python": "Python 다운로드", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (실험적)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (권장)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Win7 지원)", + "Downloading Python {ver}... Please wait.": "Python {ver} 버전을 다운로드하는 중... 잠시만 기다려주세요.", + "Configure Manually": "수동으로 구성", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "[빌드 설정] -> [엔진]으로 전환되었습니다. Python 경로를 설정해 주세요.", + "Python Environment Management": "Python 환경 관리", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": "Python 환경 필요
애플리케이션 빌드에는 Python 인터프리터가 필요합니다.
버전을 선택하여 환경 변수를 자동으로 다운로드, 설치 및 구성하세요.
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": "Python 환경 관리
로컬에서 감지된 Python 환경을 전환하거나 새 버전을 다운로드할 수 있습니다.", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": "💡 권장 사항: 최적의 빌드 호환성과 엔진 지원을 위해 Python 3.11.9를 권장합니다.", + "View Python": "Python 보기", + "Locally Detected Pythons": "로컬에서 감지된 Python", + "Download New Version": "새 버전 다운로드", + "Use Selected Environment": "선택한 환경 사용", + "No local Python environments detected.": "로컬 Python 환경이 감지되지 않았습니다.", + "Select Python Version to Download:": "다운로드할 Python 버전을 선택하세요:", + "Click to automatically download, install Python, and configure system environment variables.": "클릭하여 자동으로 Python을 다운로드, 설치하고 시스템 환경 변수를 구성하세요.", + "One-Click Download & Install": "원클릭 다운로드 및 설치", + "Use Installed Version Directly": "✔ 설치된 버전 직접 사용", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": "✔ 로컬에서 감지됨:
{path}
다시 다운로드하지 않고 직접 전환할 준비가 되었습니다.", + "Switched to local Python environment: {path}": "로컬 Python 환경으로 전환됨: {path}", + "Download complete. Starting Python installation...": "다운로드 완료. Python 설치 시작 중...", + "Install Complete": "설치 완료", + "Exit Now": "지금 종료", + "Later": "나중에", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": "Python 환경이 성공적으로 설치되었습니다!

시스템 환경 변수가 업데이트되었습니다. 변경 사항을 적용하려면 소프트웨어를 종료하고 다시 시작하는 것이 좋습니다.", + "Python installed. Please restart QPyPack manually later.": "Python이 설치되었습니다. 나중에 수동으로 QPyPack을 다시 시작하십시오.", + "[Syntax Error] Source code syntax parsing failed, build aborted:\n - File: {file}\n - Line: Line {line}\n - Detail: {desc}\n\n💡 Tip: This is usually NOT a fault of the packaging tool.\nPlease ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\nUsing newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\nWe recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": "[구문 오류] 소스 코드 구문 분석 실패, 빌드 중단됨:\n - 파일: {file}\n - 라인: {line}\n - 세부 정보: {desc}\n\n💡 팁: 이는 패키징 도구의 오류가 아닙니다.\n선택한 [빌드 Python 버전]이 [코드 작성/테스트]에 사용한 버전과 일치하는지 확인하세요.\n이전 Python 환경에서 최신 구문을 사용하면 이 오류가 발생합니다.\n올바른 Python 버전으로 전환하려면 [빌드 설정] -> [엔진]으로 이동하는 것이 좋습니다.", + "[FAILED] Build interrupted exceptionally!\n\n🔍 Common Troubleshooting:\n1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": "[FAILED] 예외적으로 빌드가 중단되었습니다!\n\n🔍 일반적인 문제 해결:\n1. 환경 불일치(가장 일반적): 선택한 Python 버전이 소스 코드와 호환되지 않습니다. [빌드 설정]으로 이동하여 이 코드에 사용하는 Python 버전으로 전환하세요.\n2. 누락된 종속성: 위의 '상세 모드'를 클릭하여 ModuleNotFoundError가 있는지 확인하세요.\n3. 바이러스 백신 차단: 보안 소프트웨어가 빌드 프로세스를 차단하고 있지 않은지 확인하세요.\n\n(참고: 이는 일반적으로 패키징 엔진 자체보다는 환경/코드 불일치로 인해 발생합니다. 정확한 이유는 상세 로그를 확인하세요.)", + "Status: Build Cancelled": "상태: 빌드 취소됨", + "Build Cancelled": "빌드 취소됨", + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] 패키지 '{pkg}' 설치 실패, 건너뛰는 중...", + "One-Click Install": "원클릭 설치", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] Python 설치가 실패했거나 취소되었습니다.", + "System Default ({sys_native})": "시스템 기본값 ({sys_native})", + "My Studio": "My Studio", + "Python Executable": "Python 실행 파일", + "Invalid syntax": "잘못된 구문", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] 미러를 통해 Playwright 브라우저를 다운로드하는 중: {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] 공식 CDN을 통해 Playwright 브라우저 다운로드를 재시도하는 중...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] 모든 소스에서 Playwright 브라우저 설치 실패, 위험을 감수하고 빌드를 계속합니다...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] .icns로의 아이콘 변환 실패, 아이콘 없이 빌드합니다.", + "OK": "확인", "Unknown": "알 수 없음", - "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Python 스크립트 (.py/.pyw) 파일을 이곳에 끌어다 놓거나\n클릭하여 찾아보기...", - "System Temp Directory (Anti-Lock / Cloud-Friendly)": "시스템 임시 폴더 (잠금 방지 / 클라우드 동기화 친화적)", - "Cancel": "취소", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "대상 경로를 편집하려면 더블 클릭하세요. 드래그 앤 드롭 지원. 저장을 위해 '프리셋 내보내기'를 사용하세요.", - "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] 로컬 GCC/MinGW-w64 환경을 감지했습니다. MinGW64 컴파일러를 사용합니다.", - "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] 로컬 Zig 환경을 감지했습니다. Nuitka가 C 백엔드 컴파일을 관리합니다.", - "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] 로컬 C 컴파일러가 감지되지 않았습니다. Nuitka가 호환되는 MinGW-w64 도구 체인을 자동으로 다운로드하고 관리합니다.", - "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 경량화 모드가 활성화되었습니다. 바이트코드 최적화(-OO)를 적용하고 개발 모듈을 제거하는 중...", - "[ERROR] I/O Exception: {err_msg}": "[ERROR] I/O 예외: {err_msg}", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} 지원:Python 다운로드
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka C 백엔드 컴파일러 자동 감지 및 관리 중" + "System Temp Directory (Anti-Lock / Cloud-Friendly)": "시스템 임시 디렉토리 (잠금 방지 / 클라우드 동기화 친화적)", + "Script and settings retained. Ready to rebuild.": "스크립트 및 설정이 유지되었습니다. 다시 빌드할 준비가 되었습니다." } + + diff --git a/qpypack/locales/pt_BR.json b/qpypack/locales/pt_BR.json index 9d9fa62..470c12f 100644 --- a/qpypack/locales/pt_BR.json +++ b/qpypack/locales/pt_BR.json @@ -7,10 +7,10 @@ "Tencent Cloud (China)": "Nuvem Tencent", "Huawei Cloud (China)": "Nuvem Huawei", "USTC (China)": "USTC", - "Modern Cross-Platform Python Application Packager": "Empacotador Moderno de Aplicações Python", "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "GUI de Empacotamento Python com PyInstaller & Nuitka", "Python Packaging, Reimagined.": "Empacotamento Python, reimaginado.", "Drop Python source code to start": "Solte o código fonte Python para começar", + "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Arraste e solte o script Python (.py/.pyw) aqui\nou clique para navegar...", "Build Settings": "Configurações de Build", "Preferences": "Preferências", "About": "Sobre", @@ -55,6 +55,7 @@ "Import Preset...": "Importar Predefinição...", "Reset to Default Config": "Restaurar configurações padrão", "Cancel & Return": "Cancelar e voltar", + "Cancel": "Cancelar", "Configure Build Settings": "Configurações de compilação", "Toggle Execution Log": "Exibir/Ocultar Log", "Detailed Mode": "Modo Detalhado", @@ -63,6 +64,8 @@ "Select All": "Selecionar Tudo", "Clear Log": "Limpar Log", "Export Log...": "Exportar Log...", + "Reset": "Redefinir", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": "Tem certeza de que deseja redefinir todas as preferências?
Todas as configurações serão restauradas para o estado padrão.", "Engine & Environment": "Motor e ambiente", "Execution Mode": "Modo de execução", "Mirrors & Scanner": "Espelhos e analisador", @@ -87,12 +90,14 @@ "UPX Path:": "Caminho UPX:", "PyInstaller Version:": "Versão do PyInstaller:", "Nuitka Version:": "Versão do Nuitka:", - "Pipreqs Version:": "Versão do Pipreqs:", "Version:": "Versão:", "Author/Company:": "Autor/Organização:", "Description:": "Descrição:", - "Output Rule:": "Regra de saída:", + "Output Location:": "Regra de saída:", "Target Directory:": "Diretório de destino:", + "Temporary Directory:": "Diretório Temporário:", + "Source Directory (.qpypack_build)": "Diretório Fonte (.qpypack_build)", + "System Temp Directory": "Diretório Temp do Sistema", "Source File Directory": "Diretório do arquivo fonte", "Custom Directory": "Diretório personalizado", "Import Name": "Nome de importação", @@ -104,10 +109,13 @@ "Import name (e.g. cv2):": "Nome de importação (ex: cv2):", "PyPI package name for [{imp_name}]:": "Nome do pacote PyPI para [{imp_name}]:", "One-File Mode (--onefile)": "Modo de arquivo único (--onefile)", + "Folder Mode (--onedir)": "Modo Pasta (--onedir)", + "Contents Directory (--contents-directory):": "Diretório de Conteúdo (--contents-directory):", + "Internal directory name for dependencies (default: _internal)": "Nome do diretório interno para dependências (padrão: _internal)", "Hide Console (--noconsole)": "Ocultar console (--noconsole)", "Use Virtual Environment (Recommended)": "Usar ambiente virtual (Recomendado)", "Install requirements.txt": "Instalar requirements.txt", - "Analyze Dependencies (pipreqs)": "Analisar dependências (pipreqs)", + "Analyze Dependencies (AST)": "Analisar dependências (AST)", "Scan Entire Folder": "Escanear a pasta inteira", "Enable UPX Compression": "Ativar compressão UPX", "Lite Mode (Exclude Dev/Test Dependencies)": "Modo leve (Excluir dependências dev/test)", @@ -124,22 +132,22 @@ "Leave blank to auto-detect from environment variables": "Deixe em branco para detectar automaticamente", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "Exclui dependências desnecessárias para reduzir o tamanho e acelerar.", "Double-click to edit target path; Drag & drop supported": "Clique duplo para editar; Suporta arrastar e soltar", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Clique duplo para editar o caminho de destino; Suporta arrastar e soltar. Use 'Exportar Predefinição' para salvar.", "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": "PyInstaller — Compilação rápida e excelente compatibilidade. Ideal para desenvolvimento iterativo.", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": "Nuitka — Compila para C/C++ nativo. Melhora o desempenho e protege o código-fonte.", - "
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} Suporte:Baixar Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
SO Legado Compatibilidade total", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} Suporte:Baixar Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box": "
Python {ver} Suporte:Baixar Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Suporta MinGW64", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)": "
Python {ver} Suporte:Baixar Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requer MSVC / Clang / Zig", - "
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...": "
Intérprete PythonBaixar Python
Detectando ambiente do sistema...", + "
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} Suporte:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
SO Legado Compatibilidade total", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} Suporte:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} Suporte:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Detectando e gerenciando automaticamente o compilador backend C", + "
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...": "
Intérprete Python
Detectando ambiente do sistema...", "[INFO] Build Cancelled.": "[INFO] Compilação cancelada.", "[INFO] Performing pre-flight environment checks...": "[INFO] Realizando verificações do ambiente...", "[INFO] Analyzing source code and project dependencies...": "[INFO] Analisando código fonte e dependências...", "[INFO] Initializing isolated build environment...": "[INFO] Inicializando ambiente isolado...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] Playwright detectado. Instalando navegadores integrados...", "[INFO] Python interpreter path: {path}": "[INFO] Caminho do Python: {path}", "[INFO] Creating virtual environment...": "[INFO] Criando ambiente virtual...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] Atualizando pip...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] Escaneando via pipreqs...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] Instalando motor [{pkg}] e dependências centrais...", + "[INFO] Scanning project source code via AST engine...": "[INFO] Escaneando código via motor AST...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Dica Nuitka: Mantenha conexão estável se baixar GCC/MinGW.", "[INFO] Successfully installed compatible versions.": "[INFO] Versões compatíveis instaladas com sucesso.", "[INFO] Resolving project dependencies...": "[INFO] Resolvendo dependências do projeto...", @@ -152,11 +160,16 @@ "[INFO] Installing build environment and project dependencies ({count} packages): {pkgs}": "[INFO] Instalando dependências ({count} pacotes): {pkgs}", "[INFO] Switching to backup PyPI source for retrieval: {url}": "[INFO] Alternando para servidor PIP secundário: {url}", "[INFO] Starting {engine} engine to compile binary files...": "[INFO] Iniciando motor {engine} para compilação...", + "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] Ambiente MSVC local encontrado, priorizando compilador C++ nativo.", + "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] Ambiente Clang local encontrado, priorizando compilador LLVM Clang.", + "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+ detectado: Usando compilador Zig (--zig) como backend C.", + "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] Usando compilador MinGW64 (--mingw64).", + "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Ambiente GCC/MinGW-w64 local detectado, usando o compilador MinGW64.", + "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Ambiente Zig local detectado, Nuitka gerenciará a compilação do backend C.", + "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Nenhum compilador C local detectado. O Nuitka fará o download e o gerenciamento automático de um MinGW-w64.", "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] Avaliando memória (Livre: {ram:.1f} GB). Concorrência ajustada: {cores} -> {safe_jobs} ...", "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] Removendo parâmetros de ícone e recompilando...", - "[INFO] Writing application icon...": "[INFO] Gravando ícone do aplicativo...", - "[INFO] Application icon written successfully.": "[INFO] Ícone gravado com sucesso.", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] Diretivas de otimização Nuitka ativadas...", + "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Modo leve ativado, aplicando otimização de bytecode (-OO) e removendo módulos dev...", "[INFO] Compilation completed, archiving built files...": "[INFO] Compilação concluída, arquivando arquivos...", "[INFO] Validating output files and generating final product...": "[INFO] Validando arquivos e gerando executável...", "[INFO] Build log exported to: {path}": "[INFO] Log exportado para: {path}", @@ -173,8 +186,10 @@ "[WARN] Pause code injection exception: {error}": "[WARN] Exceção de injeção de pausa: {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] Exceção de análise AST: {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] Aviso ao ler requirements.txt: {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] Aviso ao analisar pipreqs: {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] Tempo limite do comando esgotado (>{timeout}s)", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] 'requests' ou 'httpx' detectado. Agrupando certificados 'certifi' para evitar erros de SSL.", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] Uso de '__file__' detectado. No modo de arquivo único, use 'sys._MEIPASS' para localizar arquivos de recurso!", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] Dica: Executáveis podem ser sinalizados por antivírus falsamente. Adicionar exclusões é recomendado.", "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] Compilação abortada: Espaço em disco insuficiente. Limpe pelo menos 5 GB.", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] O diretório de saída não possui permissões de escrita: {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] Arquivo de dependências não encontrado: {path}", @@ -188,6 +203,8 @@ "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[Erro de Sintaxe] Erro de código, compilação abortada:\n - Arquivo: {file}\n - Tipo: {type}\n - Linha: {line}\n - Detalhe: {desc}", "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] Compilação interrompida com erros. Verifique o 'Modo Detalhado'.", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] Arquivo bloqueado ou criptografado por drive em nuvem.", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] O arquivo está em execução ou ocupado. Por favor, feche a aplicação.", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] Módulo 'multiprocessing' detectado. Chame 'multiprocessing.freeze_support()' em 'if __name__ == \"__main__\":'.", "[ERROR] Please load a valid Python source file first!": "[ERROR] Por favor, carregue um arquivo Python válido!", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] Exceção durante análise AST: {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] Falha ao exportar predefinição: {error}", @@ -196,16 +213,9 @@ "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] Compilação concluída, mas as dependências falharam:\n\n - {pkgs}", "[ERROR] Process error: command or binary missing ({error})": "[ERROR] Erro de processo: {error}", "[ERROR] System execution exception: {error}": "[ERROR] Exceção de sistema: {error}", - "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "Aviso: {pkgs} falharam ao instalar.", - "Package mappings have been reset to defaults.": "Mapeamentos redefinidos para os padrões.", - "Config preset exported to: {path}": "Predefinição exportada para: {path}", - "Config preset imported successfully.": "Predefinição importada com sucesso.", - "AST scan completed, found {count} dependencies.": "Análise AST concluída: {count} dependências encontradas.", + "[ERROR] I/O Exception: {err_msg}": "[ERROR] Exceção de E/S: {err_msg}", "No log content.": "Nenhum conteúdo de log.", "Log saved to: {path}": "Log salvo em: {path}", - "Attention: Please check the log for details.": "Atenção: Verifique o log para detalhes.", - "Are you sure you want to reset all preferences to default?": "Tem certeza que deseja redefinir todas as preferências?", - "Global configuration has been reset.": "Configuração global redefinida.", "\\nProgram execution completed, press Enter to exit...": "\\nExecução concluída. Pressione Enter para sair...", "Project-specific. Not saved to global preferences. Use 'Export Preset' to save config.": "Específico do projeto. Use 'Exportar Predefinição'.", "GitHub Repository": "Repositório GitHub", @@ -217,15 +227,60 @@ "Python Environment Required": "Ambiente Python Necessário", "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "Python não detectado!
Instale o Python (marque 'Add Python.exe to PATH').", "Download Python": "Baixar Python", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (Experimental)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (Recomendado)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Suporte Win7)", + "Downloading Python {ver}... Please wait.": "Baixando Python {ver}... Aguarde.", + "Configure Manually": "Configurar Manualmente", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "Alterado para [Configurações] -> [Motor], por favor, defina o caminho do Python.", + "Python Environment Management": "Gerenciamento de Ambiente Python", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": "Ambiente Python Necessário
A compilação depende de um intérprete Python.
Selecione uma versão para baixar, instalar e configurar variáveis de ambiente automaticamente.
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": "Gerenciamento de Ambiente Python
Suporta a troca de ambientes Python locais detectados ou o download de novas versões.", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": "💡 Recomendação: O Python 3.11.9 é recomendado para melhor compatibilidade de compilação e suporte de motor.", + "View Python": "Ver Python", + "Locally Detected Pythons": "Pythons Detectados Localmente", + "Download New Version": "Baixar Nova Versão", + "Use Selected Environment": "Usar Ambiente Selecionado", + "No local Python environments detected.": "Nenhum ambiente Python local detectado.", + "Select Python Version to Download:": "Selecione a versão do Python para baixar:", + "Click to automatically download, install Python, and configure system environment variables.": "Clique para baixar, instalar e configurar variáveis de ambiente automaticamente.", + "One-Click Download & Install": "Download e Instalação em Um Clique", + "Use Installed Version Directly": "✔ Usar Versão Instalada Diretamente", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": "✔ Detectado localmente:
{path}
Pronto para trocar diretamente sem baixar novamente.", + "Switched to local Python environment: {path}": "Trocado para o ambiente Python local: {path}", + "Download complete. Starting Python installation...": "Download concluído. Iniciando instalação do Python...", + "Install Complete": "Instalação Concluída", + "Exit Now": "Sair Agora", + "Later": "Depois", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": "Ambiente Python Instalado com Sucesso!

Variáveis de ambiente do sistema atualizadas. Recomendado reiniciar o software para aplicar as mudanças.", + "Python installed. Please restart QPyPack manually later.": "Python instalado. Por favor, reinicie o QPyPack manualmente depois.", + "[Syntax Error] Source code syntax parsing failed, build aborted:\n - File: {file}\n - Line: Line {line}\n - Detail: {desc}\n\n💡 Tip: This is usually NOT a fault of the packaging tool.\nPlease ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\nUsing newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\nWe recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": "[Erro de Sintaxe] Falha na análise sintática, compilação abortada:\n - Arquivo: {file}\n - Linha: {line}\n - Detalhe: {desc}\n\n💡 Dica: Normalmente, isso NÃO é uma falha da ferramenta.\nCertifique-se de que a [Versão do Python] selecionada corresponda à versão usada para [Escrever o Código].\nUsar sintaxe recente em um ambiente antigo causará este erro.\nRecomendamos ir em [Configurações] -> [Motor] para trocar para a versão correta do Python.", + "[FAILED] Build interrupted exceptionally!\n\n🔍 Common Troubleshooting:\n1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": "[FAILED] Compilação interrompida excepcionalmente!\n\n🔍 Solução de Problemas Comuns:\n1. Incompatibilidade de Ambiente (Mais Comum): A versão selecionada é incompatível com o código. Vá para [Configurações] para alterar a versão.\n2. Dependências Ausentes: Clique em 'Modo Detalhado' acima para verificar ModuleNotFoundError.\n3. Bloqueio de Antivírus: Certifique-se de que seu software de segurança não está bloqueando o processo.\n\n(Nota: Normalmente causado por discrepâncias de ambiente/código e não pela engine em si. Verifique o log detalhado.)", + "Status: Build Cancelled": "Status: Compilação Cancelada", + "Build Cancelled": "Compilação Cancelada", + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] Pacote '{pkg}' falhou ao instalar, pulando...", + "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "Aviso: {pkgs} falharam ao instalar.", + "Package mappings have been reset to defaults.": "Mapeamentos redefinidos para os padrões.", + "Global configuration has been reset.": "Configuração global redefinida.", + "Config preset exported to: {path}": "Predefinição exportada para: {path}", + "Config preset imported successfully.": "Predefinição importada com sucesso.", + "AST scan completed, found {count} dependencies.": "Análise AST concluída: {count} dependências encontradas.", + "Attention: Please check the log for details.": "Atenção: Verifique o log para detalhes.", + "One-Click Install": "Instalação com Um Clique", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] A instalação do Python falhou ou foi cancelada.", + "System Default ({sys_native})": "Padrão do Sistema ({sys_native})", + "My Studio": "My Studio", + "Python Executable": "Executável Python", + "Invalid syntax": "Sintaxe inválida", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] Baixando navegadores Playwright via espelho: {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] Tentando novamente baixar os navegadores Playwright via CDN oficial...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] A instalação do navegador Playwright falhou em todas as fontes, a compilação continuará com risco...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] A conversão do ícone para .icns falhou, construindo sem ícone.", + "OK": "OK", "Unknown": "Desconhecido", - "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Arraste e solte o script Python (.py/.pyw) aqui\nou clique para navegar...", - "System Temp Directory (Anti-Lock / Cloud-Friendly)": "Diretório Temporário do Sistema (Anti-bloqueio / Nuvem)", - "Cancel": "Cancelar", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Clique duplo para editar o caminho de destino; Suporta arrastar e soltar. Use 'Exportar Predefinição' para salvar.", - "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Ambiente GCC/MinGW-w64 local detectado, usando o compilador MinGW64.", - "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Ambiente Zig local detectado, Nuitka gerenciará a compilação do backend C.", - "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Nenhum compilador C local detectado. O Nuitka fará o download e o gerenciamento automático de um MinGW-w64.", - "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Modo leve ativado, aplicando otimização de bytecode (-OO) e removendo módulos dev...", - "[ERROR] I/O Exception: {err_msg}": "[ERROR] Exceção de E/S: {err_msg}", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} Suporte:Baixar Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Detectando e gerenciando automaticamente o compilador backend C" + "Script and settings retained. Ready to rebuild.": "Script e configurações mantidos. Pronto para reconstruir." } diff --git a/qpypack/locales/ru_RU.json b/qpypack/locales/ru_RU.json index 91f1d3d..5ac3b39 100644 --- a/qpypack/locales/ru_RU.json +++ b/qpypack/locales/ru_RU.json @@ -7,10 +7,10 @@ "Tencent Cloud (China)": "Tencent Cloud (Китай)", "Huawei Cloud (China)": "Huawei Cloud (Китай)", "USTC (China)": "USTC (Китай)", - "Modern Cross-Platform Python Application Packager": "Современный кроссплатформенный упаковщик Python", "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "Современный GUI-упаковщик Python на базе PyInstaller и Nuitka", "Python Packaging, Reimagined.": "Переосмысление упаковки Python.", "Drop Python source code to start": "Перетащите исходный код Python для начала", + "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Перетащите Python-скрипт (.py/.pyw) сюда\nили нажмите для обзора...", "Build Settings": "Параметры сборки", "Preferences": "Настройки", "About": "О программе", @@ -55,6 +55,7 @@ "Import Preset...": "Импортировать пресет...", "Reset to Default Config": "Сбросить настройки", "Cancel & Return": "Отменить и вернуться", + "Cancel": "Отмена", "Configure Build Settings": "Настройка параметров сборки", "Toggle Execution Log": "Переключить журнал", "Detailed Mode": "Подробный режим", @@ -63,6 +64,8 @@ "Select All": "Выделить все", "Clear Log": "Очистить журнал", "Export Log...": "Сохранить журнал...", + "Reset": "Сброс", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": "Вы уверены, что хотите сбросить все настройки?
Все настройки будут восстановлены до состояния по умолчанию.", "Engine & Environment": "Движок сборки и окружение", "Execution Mode": "Режим выполнения", "Mirrors & Scanner": "Зеркала и сканер", @@ -87,12 +90,14 @@ "UPX Path:": "Путь UPX:", "PyInstaller Version:": "Версия PyInstaller:", "Nuitka Version:": "Версия Nuitka:", - "Pipreqs Version:": "Версия Pipreqs:", "Version:": "Версия:", "Author/Company:": "Автор/Организация:", "Description:": "Описание:", - "Output Rule:": "Правило размещения:", + "Output Location:": "Правило размещения:", "Target Directory:": "Целевая папка:", + "Temporary Directory:": "Временная папка:", + "Source Directory (.qpypack_build)": "Папка источника (.qpypack_build)", + "System Temp Directory": "Системная Temp-папка", "Source File Directory": "Папка исходного файла", "Custom Directory": "Пользовательская папка", "Import Name": "Имя импорта", @@ -104,10 +109,13 @@ "Import name (e.g. cv2):": "Имя импорта (напр. cv2):", "PyPI package name for [{imp_name}]:": "Имя пакета PyPI для [{imp_name}]:", "One-File Mode (--onefile)": "Режим одного файла (--onefile)", + "Folder Mode (--onedir)": "Режим папки (--onedir)", + "Contents Directory (--contents-directory):": "Внутренний каталог (--contents-directory):", + "Internal directory name for dependencies (default: _internal)": "Имя внутренней папки для зависимостей (по умолчанию: _internal)", "Hide Console (--noconsole)": "Скрыть консоль (--noconsole)", "Use Virtual Environment (Recommended)": "Использовать виртуальное окружение", "Install requirements.txt": "Установить requirements.txt", - "Analyze Dependencies (pipreqs)": "Анализ зависимостей (pipreqs)", + "Analyze Dependencies (AST)": "Анализ зависимостей (AST)", "Scan Entire Folder": "Сканировать всю папку", "Enable UPX Compression": "Включить UPX-сжатие", "Lite Mode (Exclude Dev/Test Dependencies)": "Облегченный режим (Без dev/test)", @@ -124,22 +132,22 @@ "Leave blank to auto-detect from environment variables": "Оставьте пустым для автоопределения (PATH)", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "Динамически исключает избыточные зависимости.", "Double-click to edit target path; Drag & drop supported": "Двойной клик для редактирования. Поддерживается Drag & Drop", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Двойной клик для изменения пути. Для сохранения используйте «Экспортировать пресет».", "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": "PyInstaller — Высокая скорость сборки и совместимость.", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": "Nuitka — Компилирует в C/C++. Меньший размер, выше производительность.", - "
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} Поддержка:Скачать Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Устаревшая ОС Полная совместимость", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} Поддержка:Скачать Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box": "
Python {ver} Поддержка:Скачать Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Поддерживается MinGW64", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)": "
Python {ver} Поддержка:Скачать Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Требуется MSVC/Clang/Zig", - "
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...": "
Интерпретатор PythonСкачать Python
Автоопределение среды...", + "
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} Поддержка:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Устаревшая ОС Полная совместимость", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} Поддержка:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} Поддержка:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Автоопределение и управление C-компилятором", + "
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...": "
Интерпретатор Python
Автоопределение среды...", "[INFO] Build Cancelled.": "[INFO] Сборка отменена.", "[INFO] Performing pre-flight environment checks...": "[INFO] Выполнение проверок среды...", "[INFO] Analyzing source code and project dependencies...": "[INFO] Анализ исходного кода и зависимостей...", "[INFO] Initializing isolated build environment...": "[INFO] Инициализация изолированного окружения сборки...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] Обнаружен Playwright. Установка встроенных браузеров...", "[INFO] Python interpreter path: {path}": "[INFO] Путь Python: {path}", "[INFO] Creating virtual environment...": "[INFO] Создание виртуального окружения...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] Обновление менеджера пакетов pip...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] Сканирование через pipreqs...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] Установка движка [{pkg}] и зависимостей...", + "[INFO] Scanning project source code via AST engine...": "[INFO] Сканирование через AST-движок...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Совет Nuitka: При скачивании GCC/MinGW обеспечьте стабильный интернет.", "[INFO] Successfully installed compatible versions.": "[INFO] Успешно установлены совместимые версии.", "[INFO] Resolving project dependencies...": "[INFO] Разрешение зависимостей...", @@ -156,11 +164,12 @@ "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] Найден Clang, приоритет у LLVM Clang.", "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+: Использование Zig (--zig).", "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] Использование MinGW64 (--mingw64).", + "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Найден локальный GCC/MinGW-w64, используется MinGW64.", + "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Найдена среда Zig, Nuitka сама управляет C-бэкендом.", + "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Локальный C-компилятор не найден. Nuitka автоматически скачает и настроит MinGW-w64.", "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] Оценка памяти (Доступно: {ram:.1f} ГБ). Потоки: {cores} -> {safe_jobs} ...", "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] Удаление параметров иконки и пересборка...", - "[INFO] Writing application icon...": "[INFO] Запись иконки приложения...", - "[INFO] Application icon written successfully.": "[INFO] Иконка приложения успешно записана.", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] Включены директивы оптимизации Nuitka...", + "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Облегченный режим включен, применяется оптимизация байт-кода (-OO) и удаление dev-модулей...", "[INFO] Compilation completed, archiving built files...": "[INFO] Компиляция завершена, архивирование файлов...", "[INFO] Validating output files and generating final product...": "[INFO] Проверка выходных файлов и генерация...", "[INFO] Build log exported to: {path}": "[INFO] Журнал экспортирован в: {path}", @@ -177,8 +186,10 @@ "[WARN] Pause code injection exception: {error}": "[WARN] Исключение вставки кода паузы: {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] Исключение AST-анализа: {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] Предупреждение чтения requirements.txt: {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] Предупреждение парсинга pipreqs: {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] Превышено время ожидания команды (>{timeout}с)", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] Обнаружено 'requests' или 'httpx'. Автоматическое добавление сертификатов 'certifi' для предотвращения ошибок SSL.", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] Обнаружено использование '__file__'. В режиме одного файла используйте 'sys._MEIPASS'!", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] Подсказка: Антивирус может ошибочно реагировать на файлы. Рекомендуется добавление исключений.", "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] Сборка прервана: Недостаточно места (Очистите 5 ГБ).", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] Нет прав на запись в целевую папку: {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] Файл зависимостей не найден: {path}", @@ -192,6 +203,8 @@ "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[Синтаксическая ошибка] В коде ошибка:\n - Файл: {file}\n - Тип: {type}\n - Строка: {line}\n - Детали: {desc}", "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] Компиляция прервана с ошибками. Проверьте 'Подробный режим'.", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] Файл заблокирован облачным диском. Расшифруйте.", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] Целевой файл запущен или занят. Пожалуйста, закройте приложение.", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] Обнаружен модуль 'multiprocessing'. Обязательно вызывайте 'multiprocessing.freeze_support()'.", "[ERROR] Please load a valid Python source file first!": "[ERROR] Загрузите валидный файл Python!", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] Исключение AST-анализа: {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] Ошибка экспорта пресета: {error}", @@ -200,6 +213,7 @@ "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] Сборка завершена, но не установлены:\n\n - {pkgs}", "[ERROR] Process error: command or binary missing ({error})": "[ERROR] Ошибка процесса: {error}", "[ERROR] System execution exception: {error}": "[ERROR] Ошибка выполнения системы: {error}", + "[ERROR] I/O Exception: {err_msg}": "[ERROR] Ошибка ввода-вывода: {err_msg}", "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "Внимание: {pkgs} не установлены.", "Package mappings have been reset to defaults.": "Сопоставления сброшены.", "Config preset exported to: {path}": "Пресет экспортирован в: {path}", @@ -221,15 +235,53 @@ "Python Environment Required": "Требуется Python", "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "Python не найден!
Установите Python (с галочкой 'Add to PATH').", "Download Python": "Скачать Python", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (Экспериментальная)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (Рекомендуется)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Поддержка Win7)", + "Downloading Python {ver}... Please wait.": "Загрузка Python {ver}... Пожалуйста, подождите.", + "Configure Manually": "Настроить вручную", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "Переключено на [Параметры сборки] -> [Движок], пожалуйста, установите путь к Python.", + "Python Environment Management": "Управление окружением Python", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": "Требуется окружение Python
Сборка зависит от интерпретатора Python.
Выберите версию для автоматической загрузки, установки и настройки переменных среды.
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": "Управление окружением Python
Поддерживает переключение локально обнаруженных окружений Python или загрузку новых версий.", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": "💡 Рекомендация: Для оптимальной совместимости сборки и поддержки движка рекомендуется Python 3.11.9.", + "View Python": "Показать Python", + "Locally Detected Pythons": "Локально обнаруженные Python", + "Download New Version": "Скачать новую версию", + "Use Selected Environment": "Использовать выбранное окружение", + "No local Python environments detected.": "Локальные окружения Python не обнаружены.", + "Select Python Version to Download:": "Выберите версию Python для загрузки:", + "Click to automatically download, install Python, and configure system environment variables.": "Нажмите, чтобы автоматически скачать, установить Python и настроить системные переменные среды.", + "One-Click Download & Install": "Скачать и установить в один клик", + "Use Installed Version Directly": "✔ Использовать установленную версию напрямую", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": "✔ Обнаружено локально:
{path}
Готово к прямому переключению без повторной загрузки.", + "Switched to local Python environment: {path}": "Переключено на локальное окружение Python: {path}", + "Download complete. Starting Python installation...": "Загрузка завершена. Запуск установки Python...", + "Install Complete": "Установка завершена", + "Exit Now": "Выйти сейчас", + "Later": "Позже", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": "Окружение Python успешно установлено!

Системные переменные обновлены. Рекомендуется перезапустить программу.", + "Python installed. Please restart QPyPack manually later.": "Python установлен. Пожалуйста, перезапустите QPyPack позже вручную.", + "[Syntax Error] Source code syntax parsing failed, build aborted:\n - File: {file}\n - Line: Line {line}\n - Detail: {desc}\n\n💡 Tip: This is usually NOT a fault of the packaging tool.\nPlease ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\nUsing newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\nWe recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": "[Синтаксическая ошибка] Ошибка синтаксического анализа исходного кода, сборка прервана:\n - Файл: {file}\n - Строка: {line}\n - Детали: {desc}\n\n💡 Совет: Обычно это НЕ вина инструмента упаковки.\nУбедитесь, что выбранная [Версия Python] совпадает с той, которую вы использовали для написания кода.\nИспользование более нового синтаксиса в старом окружении Python вызовет эту ошибку.\nРекомендуется перейти в [Параметры сборки] -> [Движок], чтобы переключиться на правильную версию Python.", + "[FAILED] Build interrupted exceptionally!\n\n🔍 Common Troubleshooting:\n1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": "[FAILED] Сборка прервана с ошибкой!\n\n🔍 Часто встречающиеся проблемы:\n1. Несовпадение окружения (Чаще всего): Выбранная версия Python несовместима с исходным кодом. Перейдите в [Параметры сборки] для изменения версии Python.\n2. Отсутствующие зависимости: Нажмите 'Подробный режим' выше для проверки ModuleNotFoundError.\n3. Блокировка антивирусом: Убедитесь, что защитное ПО не блокирует процесс.\n\n(Примечание: Обычно это связано с несовпадениями среды/кода, а не с самим движком упаковки. См. журнал.)", + "Status: Build Cancelled": "Статус: Сборка отменена", + "Build Cancelled": "Сборка отменена", + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] Ошибка установки пакета '{pkg}', пропуск...", + "One-Click Install": "Установка в один клик", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] Установка Python не удалась или была отменена.", + "System Default ({sys_native})": "Системный ({sys_native})", + "My Studio": "My Studio", + "Python Executable": "Исполняемый файл Python", + "Invalid syntax": "Неверный синтаксис", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] Загрузка браузеров Playwright через зеркало: {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] Повторная попытка загрузки браузера Playwright через официальный CDN...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] Установка браузера Playwright не удалась из всех источников, сборка продолжится с риском...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] Преобразование иконки в .icns не удалось, сборка без иконки.", + "OK": "ОК", "Unknown": "Неизвестно", - "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "Перетащите Python-скрипт (.py/.pyw) сюда\nили нажмите для обзора...", - "System Temp Directory (Anti-Lock / Cloud-Friendly)": "Системная Temp-папка (Без блокировок / Для облака)", - "Cancel": "Отмена", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "Двойной клик для изменения пути. Для сохранения используйте «Экспортировать пресет».", - "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] Найден локальный GCC/MinGW-w64, используется MinGW64.", - "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] Найдена среда Zig, Nuitka сама управляет C-бэкендом.", - "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Локальный C-компилятор не найден. Nuitka автоматически скачает и настроит MinGW-w64.", - "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Облегченный режим включен, применяется оптимизация байт-кода (-OO) и удаление dev-модулей...", - "[ERROR] I/O Exception: {err_msg}": "[ERROR] Ошибка ввода-вывода: {err_msg}", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} Поддержка:Скачать Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Автоопределение и управление C-компилятором" + "Script and settings retained. Ready to rebuild.": "Скрипт и настройки сохранены. Готово к пересборке." } diff --git a/qpypack/locales/zh_TW.json b/qpypack/locales/zh_TW.json index 5c2b818..04e1fde 100644 --- a/qpypack/locales/zh_TW.json +++ b/qpypack/locales/zh_TW.json @@ -11,6 +11,7 @@ "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "基於 PyInstaller 與 Nuitka 的現代化跨平台 Python 打包工具", "Python Packaging, Reimagined.": "重新定義 Python 應用程式打包體驗", "Drop Python source code to start": "拖入 Python 原始碼,即刻啟程", + "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "將 Python 腳本 (.py/.pyw) 拖放至此\n或點擊瀏覽...", "Build Settings": "建置設定", "Preferences": "偏好設定", "About": "關於", @@ -55,6 +56,7 @@ "Import Preset...": "匯入預設...", "Reset to Default Config": "重置為預設設定", "Cancel & Return": "取消並返回", + "Cancel": "取消", "Configure Build Settings": "設定建置參數", "Toggle Execution Log": "顯示/隱藏日誌", "Detailed Mode": "詳細模式", @@ -63,6 +65,8 @@ "Select All": "全選", "Clear Log": "清除日誌", "Export Log...": "匯出日誌...", + "Reset": "重置", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": "確定重置所有偏好設定?
所有設定將恢復為預設狀態。", "Engine & Environment": "建置引擎與環境", "Execution Mode": "執行模式", "Mirrors & Scanner": "鏡像源與掃描設定", @@ -87,13 +91,15 @@ "UPX Path:": "UPX 路徑:", "PyInstaller Version:": "PyInstaller 版本:", "Nuitka Version:": "Nuitka 版本:", - "Pipreqs Version:": "Pipreqs 版本:", "Version:": "版本:", "Author/Company:": "開發者/公司:", "Description:": "描述:", - "Output Rule:": "輸出規則:", - "Target Directory:": "目標目錄:", - "Source File Directory": "原始碼檔案目錄", + "Output Location:": "儲存位置:", + "Target Directory:": "自訂路徑:", + "Temporary Directory:": "暫存目錄:", + "Source Directory (.qpypack_build)": "原始碼同級目錄 (.qpypack_build)", + "System Temp Directory": "系統 Temp 目錄", + "Source File Directory": "原始碼同級目錄", "Custom Directory": "自訂目錄", "Import Name": "匯入名", "PyPI Package Name": "PyPI 套件名", @@ -104,10 +110,13 @@ "Import name (e.g. cv2):": "匯入名 (如 cv2):", "PyPI package name for [{imp_name}]:": "[{imp_name}] 對應 PyPI 套件名:", "One-File Mode (--onefile)": "單一檔案 (--onefile)", + "Folder Mode (--onedir)": "資料夾模式 (--onedir)", + "Contents Directory (--contents-directory):": "內部資源目錄:", + "Internal directory name for dependencies (default: _internal)": "內部依賴與資源存放目錄名 (預設: _internal)", "Hide Console (--noconsole)": "隱藏主控台 (--noconsole)", "Use Virtual Environment (Recommended)": "使用虛擬環境 (推薦)", "Install requirements.txt": "安裝 requirements.txt", - "Analyze Dependencies (pipreqs)": "分析依賴 (pipreqs)", + "Analyze Dependencies (AST)": "分析依賴 (原生 AST)", "Scan Entire Folder": "掃描整個資料夾", "Enable UPX Compression": "啟用 UPX 壓縮", "Lite Mode (Exclude Dev/Test Dependencies)": "精簡模式 (排除開發與測試依賴)", @@ -124,112 +133,156 @@ "Leave blank to auto-detect from environment variables": "留空則從環境變數自動偵測", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "動態排除建置環境的冗餘依賴,提升速度並縮減產物容量。", "Double-click to edit target path; Drag & drop supported": "雙擊編輯目標路徑;支援拖放", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "雙擊編輯目標路徑;支援拖放。建議使用「匯出預設」進行儲存。", "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": "PyInstaller — 打包 Python 解譯器與位元組碼。建置快,零配置(無需 C 編譯器),相容性佳。", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": "Nuitka — 編譯原始碼為原生 C/C++ 二進位檔。體積更小,執行更快,抗反編譯(需 C 編譯器)。", - "
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} 平台支援:下載 Python
✔ Windows 7    ✔ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux
相容舊系統 支援 Windows 7 及舊版作業系統", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} 平台支援:下載 Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box": "
Python {ver} 平台支援:下載 Python
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka 開箱支援 MinGW64 編譯器", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)": "
Python {ver} 平台支援:下載 Python
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.15+    ✔ Linux
Nuitka 需 MSVC / Clang / Zig (不支援 MinGW64)", - "
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...": "
Python 解譯器下載 Python
自動偵測系統環境 (Win/macOS/Linux)...", + "
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility": "
Python {ver} 平台支援:
✔ Windows 7    ✔ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux
相容舊系統 支援 Windows 7 及舊版作業系統", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux": "
Python {ver} 平台支援:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux", + "
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} 平台支援:
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka 自動偵測並管理 C 後端編譯器", + "
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...": "
Python 解譯器
自動偵測系統環境 (Win/macOS/Linux)...", "[INFO] Build Cancelled.": "[INFO] 建置已取消。", "[INFO] Performing pre-flight environment checks...": "[INFO] 執行環境安全檢查...", "[INFO] Analyzing source code and project dependencies...": "[INFO] 分析原始碼與依賴...", "[INFO] Initializing isolated build environment...": "[INFO] 初始化隔離建置環境...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] 偵測到 Playwright。正在安裝內建瀏覽器驅動...", "[INFO] Python interpreter path: {path}": "[INFO] Python 路徑: {path}", "[INFO] Creating virtual environment...": "[INFO] 建立虛擬環境...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] 更新 pip...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] pipreqs 掃描依賴...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] 安裝建置引擎 [{pkg}] 及核心依賴...", + "[INFO] Scanning project source code via AST engine...": "[INFO] 使用原生 AST 引擎掃描依賴...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka 提示: 若首次建置需下載 GCC/MinGW,請確保網路暢通。", "[INFO] Successfully installed compatible versions.": "[INFO] 自動匹配相容版本安裝成功。", "[INFO] Resolving project dependencies...": "[INFO] 解析專案依賴...", "Declared in requirements.txt ({count}): {pkgs}": "requirements.txt 聲明 ({count}): {pkgs}", "Declared in requirements.txt: None": "requirements.txt 聲明: 無", "Discovered via scanner ({count}): {pkgs}": "掃描發現 ({count}): {pkgs}", - "Auto-patched missing ({count}): {pkgs}": "自動補全 ({count}): {pkgs}", - "Manifest complete (No missing packages)": "清單完整 (無缺失)", + "Auto-patched missing ({count}): {pkgs}": "自動補齊 ({count}): {pkgs}", + "Manifest complete (No missing packages)": "清單完整 (無缺失包)", "Build engine packages ({count}): {pkgs}": "引擎依賴 ({count}): {pkgs}", "[INFO] Installing build environment and project dependencies ({count} packages): {pkgs}": "[INFO] 安裝依賴 ({count}): {pkgs}", "[INFO] Switching to backup PyPI source for retrieval: {url}": "[INFO] 切換至備用 PyPI 源: {url}", "[INFO] Starting {engine} engine to compile binary files...": "[INFO] 啟動 {engine} 引擎編譯...", - "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] 偵測到 MSVC,優先使用原生 C++ 編譯器。", - "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] 偵測到 Clang,優先使用 LLVM Clang 編譯器。", + "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] 偵測到本地 MSVC 環境,優先使用原生 C++ 編譯器。", + "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] 偵測到本地 Clang 環境,優先使用 LLVM Clang 編譯器。", "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+: 使用 Zig 編譯器。", "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] 使用 MinGW64 編譯器。", - "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] 評估系統記憶體 (可用: {ram:.1f} GB)。調整併發: {cores} -> {safe_jobs}", + "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] 偵測到本地 GCC/MinGW-w64 環境,優先使用 MinGW64 編譯器。", + "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] 偵測到本地 Zig 環境,由 Nuitka 接管 C 後端編譯。", + "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] 未偵測到本地 C 編譯器,Nuitka 將自動下載並管理相容的 MinGW-w64 工具鏈。", + "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] 評估系統可用實體記憶體 ({ram:.1f} GB),動態調整併發數: {cores} -> {safe_jobs}", "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] 移除圖示參數並重新建置...", - "[INFO] Writing application icon...": "[INFO] 寫入應用程式圖示...", - "[INFO] Application icon written successfully.": "[INFO] 應用程式圖示寫入成功。", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] 啟用 Nuitka 優化指令...", - "[INFO] Compilation completed, archiving built files...": "[INFO] 編譯完成,歸檔產物...", + "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 啟用精簡模式,應用位元組碼優化 (-OO) 並剔除開發環境模組...", + "[INFO] Compilation completed, archiving built files...": "[INFO] 編譯完成,歸檔建置產物...", "[INFO] Validating output files and generating final product...": "[INFO] 校驗並產生最終產物...", - "[INFO] Build log exported to: {path}": "[INFO] 日志已匯出: {path}", + "[INFO] Build log exported to: {path}": "[INFO] 日誌已匯出: {path}", "[INFO] Freeing up space, cleaning temporary build environment...": "[INFO] 清理暫存建置環境...", "[SUCCESS] Compilation completed, output path: {path}": "[SUCCESS] 建置成功,輸出路徑: {path}", - "[WARN] Target project is in a Cloud Sync directory (e.g. OneDrive/Dropbox). Cloud sync may temporarily lock build files.": "[WARN] 專案位於雲端同步目錄,可能會鎖定檔案。", + "[WARN] Target project is in a Cloud Sync directory (e.g. OneDrive/Dropbox). Cloud sync may temporarily lock build files.": "[WARN] 專案位於雲端同步目錄,可能鎖定建置檔案。", "[WARN] Specified versions failed to install. Stripping version constraints for automatic compatibility match...": "[WARN] 指定版本安裝失敗,嘗試自動匹配相容版本...", "[WARN] Some dependencies failed to install, build will proceed with risk...": "[WARN] 部分依賴安裝失敗,繼續建置 (有風險)。", - "[WARN] Low disk space detected on build target drive (Available: {free:.1f} GB, >= 5.0 GB recommended). Build process may interrupt due to disk exhaustion.": "[WARN] 磁碟空間不足 (可用: {free:.1f} GB,建議 >= 5.0 GB)。", - "[WARN] Memory allocation exception caught (ZstdError / OOM). Triggering memory protection fallback: Retrying in single-thread mode...": "[WARN] 捕獲記憶體異常 (OOM)。切換單執行緒重試...", - "[WARN] System low memory detected (zstd memory allocation failed). Automatically retrying in single-thread low-memory mode...": "[WARN] 記憶體不足,切換單執行緒重試...", - "[WARN] Icon resource writing blocked (possibly locked by system/antivirus), triggering fallback protection...": "[WARN] 圖示寫入受阻,觸發降級保護...", - "[WARN] Strongly recommend checking [Virtual Environment] to maximize lite mode effect.": "[WARN] 強烈建議勾選 [虛擬環境] 以最大化精簡效果。", + "[WARN] Low disk space detected on build target drive (Available: {free:.1f} GB, >= 5.0 GB recommended). Build process may interrupt due to disk exhaustion.": "[WARN] 目標磁碟空間不足 (可用: {free:.1f} GB,建議 >= 5.0 GB)。", + "[WARN] Memory allocation exception caught (ZstdError / OOM). Triggering memory protection fallback: Retrying in single-thread mode...": "[WARN] 捕獲記憶體配置異常 (ZstdError/OOM),降級為單執行緒模式重試...", + "[WARN] System low memory detected (zstd memory allocation failed). Automatically retrying in single-thread low-memory mode...": "[WARN] 記憶體不足 (zstd 分配失敗),降級為單執行緒模式重試...", + "[WARN] Icon resource writing blocked (possibly locked by system/antivirus), triggering fallback protection...": "[WARN] 圖示資源寫入被攔截 (可能受安全軟體限制),觸發降級機制...", + "[WARN] Strongly recommend checking [Virtual Environment] to maximize lite mode effect.": "[WARN] 強烈建議啟用「虛擬環境」以最大化精簡效果。", "[WARN] Pause code injection exception: {error}": "[WARN] 注入暫停程式碼異常: {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] AST 解析異常: {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] 讀取 requirements.txt 警告: {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] 解析 pipreqs 警告: {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] 命令超時 (>{timeout}s)", - "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] 建置中止: 磁碟空間不足。請清理至少 5 GB 空間後重試。", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] 偵測到網路請求套件,自動捆綁 'certifi' 根憑證以防止 SSL 異常。", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] 偵測到 '__file__' 的使用。在單一檔案模式下,請使用 'sys._MEIPASS' 定位資源路徑!", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] 提示: 獨立執行檔可能被防毒軟體誤判。建議將其加入白名單或加上程式碼簽章。", + "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] 建置中止: 磁碟空間不足。建議保留至少 5GB 可用空間。", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] 目標輸出目錄無寫入權限: {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] 指定的依賴清單檔案不存在: {path}", - "[ERROR] Insufficient disk space (Available: {free:.1f} GB). At least 0.5 GB is required to safely initialize the build environment.": "[ERROR] 磁碟空間不足 (可用 {free:.1f} GB)。", + "[ERROR] Insufficient disk space (Available: {free:.1f} GB). At least 0.5 GB is required to safely initialize the build environment.": "[ERROR] 磁碟空間不足 (可用 {free:.1f} GB)。至少需 0.5 GB 才能安全初始化環境。", "[ERROR] Python interpreter is invalid or not found: {path}": "[ERROR] Python 解譯器無效或未找到: {path}", "[ERROR] The specified icon file does not exist: {path}": "[ERROR] 指定的應用程式圖示檔案不存在: {path}", - "[ERROR] Additional resource file/directory not found: {path}": "[ERROR] 附加資源檔案不存在: {path}", + "[ERROR] Additional resource file/directory not found: {path}": "[ERROR] 附加資源檔案/目錄不存在: {path}", "[ERROR] Failed to create virtual environment. Current Python environment might be missing necessary modules or have restricted permissions.": "[ERROR] 虛擬環境建立失敗。環境可能缺失模組或權限受限。", - "[ERROR] Product transfer failed, file might be occupied by system process or lack permission: {error}": "[ERROR] 產物轉移失敗,可能被佔用或無權限: {error}", + "[ERROR] Product transfer failed, file might be occupied by system process or lack permission: {error}": "[ERROR] 產物轉移失敗,檔案可能被佔用或無寫入權限: {error}", "[ERROR] Could not locate valid executable product in temporary build directory: {path}": "[ERROR] 暫存建置目錄未找到可執行產物: {path}", - "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[語法異常] 原始碼存在語法錯誤,建置中止:\n - 檔案: {file}\n - 類型: {type}\n - 行號: {line}\n - 細節: {desc}\n\n提示: 請確保程式碼可在本地正常執行。", - "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] 建置異常中斷,請點擊「詳細模式」排查。", + "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[語法錯誤] 原始碼包含語法錯誤,建置中止:\n - 檔案: {file}\n - 類型: {type}\n - 行號: {line}\n - 細節: {desc}\n\n提示: 請確保原始碼可在本地正常執行。", + "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] 建置異常中斷,請點擊「詳細模式」排查原因。", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] 目標檔案被雲端硬碟鎖定或加密,請解密後重試。", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] 目標檔案正在執行或被佔用。請先關閉該應用程式後再重新建置。", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] 偵測到 multiprocessing 模組。請確保在 'if __name__ == \"__main__\":' 內呼叫 'multiprocessing.freeze_support()',以防引發無限程序 (Fork Bomb)。", "[ERROR] Please load a valid Python source file first!": "[ERROR] 請先載入有效的 Python 原始碼檔案!", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] AST 解析異常: {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] 匯出預設檔失敗: {error}", "[ERROR] Preset file format error or corrupted: {error}": "[ERROR] 預設檔格式錯誤或已損壞: {error}", "[ERROR] Failed to export log file: {error}": "[ERROR] 匯出日誌失敗: {error}", - "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] 建置完成,但以下依賴安裝失敗:\n\n - {pkgs}\n\n注意: 執行時可能拋出 ModuleNotFoundError。", - "[ERROR] Process error: command or binary missing ({error})": "[ERROR] 程序錯誤: {error}", + "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": "[ERROR] 建置完成,但以下依賴安裝失敗:\n\n - {pkgs}\n\n注意: 執行時可能會拋出 ModuleNotFoundError。", + "[ERROR] Process error: command or binary missing ({error})": "[ERROR] 程序錯誤: 命令或二進位檔案缺失 ({error})", "[ERROR] System execution exception: {error}": "[ERROR] 系統執行異常: {error}", - "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "依賴缺失警告: {pkgs} 安裝失敗,詳見日誌。", - "Package mappings have been reset to defaults.": "套件名稱對映已重置為預設值。", - "Config preset exported to: {path}": "設定預設檔已匯出至: {path}", + "[ERROR] I/O Exception: {err_msg}": "[ERROR] I/O 異常: {err_msg}", + "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "依賴缺失警告: {pkgs} 安裝失敗。詳情請查看日誌。", + "Package mappings have been reset to defaults.": "套件名稱對映已恢復為預設值。", + "Config preset exported to: {path}": "設定預設檔已成功匯出至: {path}", "Config preset imported successfully.": "設定預設檔已成功匯入。", - "AST scan completed, found {count} dependencies.": "AST 解析完成,共發現 {count} 項依賴。", + "AST scan completed, found {count} dependencies.": "AST 掃描完成,發現 {count} 個隱式依賴。", "No log content.": "無日誌內容。", - "Log saved to: {path}": "日誌已儲存至: {path}", - "Attention: Please check the log for details.": "注意:發生異常,請檢視日誌細節。", + "Log saved to: {path}": "日誌已儲存: {path}", + "Attention: Please check the log for details.": "提示: 請檢查下方日誌排查詳細原因。", "Are you sure you want to reset all preferences to default?": "確定要將所有偏好設定重置為預設值嗎?", - "Global configuration has been reset.": "全域設定已重置為預設值。", + "Global configuration has been reset.": "全域設定已恢復預設。", "\\nProgram execution completed, press Enter to exit...": "\\n程式執行完畢,按下 Enter 鍵退出...", - "Project-specific. Not saved to global preferences. Use 'Export Preset' to save config.": "提示:此資源僅對當前專案生效。若需長期複用請使用「匯出預設」。", + "Project-specific. Not saved to global preferences. Use 'Export Preset' to save config.": "提示:此處設定僅對當前專案生效。若需長期複用請使用「匯出預設」。", "GitHub Repository": "GitHub 倉庫", - "Issues & Feedback": "問題與反饋", + "Issues & Feedback": "問題與回饋", "PyPI Home": "PyPI 主頁", "Sponsor": "贊助支持", - "QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!": "QPyPack 是一款免費開源工具。如果它為您提升了效率,歡迎請作者喝杯咖啡!", - "* Sponsorship is completely voluntary, serves as an unconditional encouragement to the open-source community, and involves no commercial commitments. Thank you for your support!": "* 贊助完全出於自願,屬於對開源社群的無償鼓勵。感謝您的支持!", + "QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!": "QPyPack 是一款免費開源工具。如果它為您提升了效率或解決了打包難題,歡迎贊助支持!", + "* Sponsorship is completely voluntary, serves as an unconditional encouragement to the open-source community, and involves no commercial commitments. Thank you for your support!": "* 贊助完全出於自願,屬於對開源社群的無償鼓勵,不涉及任何商業承諾。感謝您的支持!", "Python Environment Required": "需要 Python 環境", - "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "未在系統中偵測到有效的 Python!

QPyPack 需要 Python 環境才能編譯。
如果您尚未安裝,請前往官網下載(請務必勾選 'Add Python.exe to PATH')。", + "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "未在系統中偵測到有效的 Python 環境!

QPyPack 需要 Python 才能編譯代碼。
如果您尚未安裝,請前往下載安裝 (提示:安裝時請務必勾選 'Add Python.exe to PATH')。", "Download Python": "前往下載 Python", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (實驗性)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (推薦)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Win7 相容)", + "Downloading Python {ver}... Please wait.": "正在下載 Python {ver},請稍候...", + "Configure Manually": "手動設定路徑", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "已自動切換至 [建置設定] -> [建置引擎],請手動指定 Python 路徑。", + "Python Environment Management": "Python 環境管理", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": "需要 Python 建置環境
應用程式建置需要依賴 Python 解譯器。
請選擇版本以自動下載安裝與設定環境變數。
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": "Python 環境管理
支援切換本地已偵測到的 Python 環境或下載新版本。", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": "💡 建議: 推薦選擇 Python 3.11.9,該版本具備最佳的編譯相容性與引擎支援。", + "View Python": "檢視 Python", + "Locally Detected Pythons": "已偵測環境", + "Download New Version": "下載新版本", + "Use Selected Environment": "切換至選中環境", + "No local Python environments detected.": "未偵測到本地 Python 環境", + "Select Python Version to Download:": "選擇 Python 版本:", + "Click to automatically download, install Python, and configure system environment variables.": "點擊後將自動下載安裝 Python 並設定系統環境變數。", + "One-Click Download & Install": "下載並自動安裝", + "Use Installed Version Directly": "✔ 本地已存在,直接切換", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": "✔ 本地已偵測到此版本:
{path}
可直接切換使用,無需重複下載。", + "Switched to local Python environment: {path}": "已切換 Python 環境: {path}", + "Download complete. Starting Python installation...": "下載完成,正在安裝 Python,請稍候...", + "Install Complete": "安裝完成", + "Exit Now": "退出軟體", + "Later": "稍後", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": "Python 環境安裝成功!

建議退出軟體後重新打開以生效環境變數。", + "Python installed. Please restart QPyPack manually later.": "Python 已安裝,請稍後手動重啟軟體。", + "[Syntax Error] Source code syntax parsing failed, build aborted:\n - File: {file}\n - Line: Line {line}\n - Detail: {desc}\n\n💡 Tip: This is usually NOT a fault of the packaging tool.\nPlease ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\nUsing newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\nWe recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": "[語法錯誤] 原始碼語法解析失敗,建置中止:\n - 檔案: {file}\n - 行號: {line}\n - 細節: {desc}\n\n💡 提示:這通常不是打包工具的故障。\n請確認您當前選擇的 [打包 Python 版本] 與您 [編寫程式碼時的版本] 是否一致。\n高版本語法在低版本 Python 中會導致此錯誤。\n建議前往 [建置設定] -> [建置引擎] 切換至對應版本的 Python。", + "[FAILED] Build interrupted exceptionally!\n\n🔍 Common Troubleshooting:\n1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": "[FAILED] 建置異常中斷!\n\n🔍 常見原因排查:\n1. 環境不匹配 (最常見):您選擇的打包 Python 版本與您的原始碼不相容。請前往 [建置設定] 切換為您平時開發該程式碼的 Python 版本。\n2. 依賴缺失:請點擊上方切換至「詳細模式」,查看是否有 ModuleNotFoundError。\n3. 防毒軟體攔截:請檢查是否有安全軟體阻止了打包過程。\n\n(注意:這通常是環境配置與程式碼差異導致,並非打包引擎本身故障,請查閱詳細日誌獲取確切原因。)", + "Status: Build Cancelled": "狀態: 建置已取消", + "Build Cancelled": "建置已取消", + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] 套件 '{pkg}' 安裝失敗,已跳過...", + "One-Click Install": "一鍵安裝", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] Python 安裝失敗或已被主動取消。", + "System Default ({sys_native})": "系統預設 ({sys_native})", + "My Studio": "我的工作室", + "Python Executable": "Python 執行檔", + "Invalid syntax": "無效語法", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] 透過鏡像下載 Playwright 瀏覽器: {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] 透過官方 CDN 重試下載 Playwright 瀏覽器...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] 所有 Playwright 瀏覽器下載源均失敗,繼續建置 (有風險)...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] 圖示轉換為 .icns 失敗,將不使用圖示建置。", + "OK": "確定", "Unknown": "未知", - "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "將 Python 腳本 (.py/.pyw) 拖放至此\n或點擊瀏覽...", - "System Temp Directory (Anti-Lock / Cloud-Friendly)": "系統 Temp 目錄 (防鎖定 / 雲端友善)", - "Cancel": "取消", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "雙擊編輯目標路徑;支援拖放。建議使用「匯出預設」進行儲存。", - "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] 偵測到本地 GCC/MinGW-w64 環境,優先使用 MinGW64 編譯器。", - "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] 偵測到本地 Zig 環境,由 Nuitka 接管 C 後端編譯。", - "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] 未偵測到本地 C 編譯器,Nuitka 將自動下載並管理相容的 MinGW-w64 工具鏈。", - "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 啟用精簡模式,應用位元組碼優化 (-OO) 並剔除開發環境模組...", - "[ERROR] I/O Exception: {err_msg}": "[ERROR] I/O 異常: {err_msg}", - "
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler": "
Python {ver} 平台支援:下載 Python
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka 自動偵測並管理 C 後端編譯器" + "Script and settings retained. Ready to rebuild.": "已保留當前設定,就緒等待重新建置。" } diff --git a/qpypack/main.py b/qpypack/main.py index 7185b65..dc42a8a 100644 --- a/qpypack/main.py +++ b/qpypack/main.py @@ -16,6 +16,9 @@ import locale import ast from concurrent.futures import ThreadPoolExecutor from pathlib import Path +import logging + +logger = logging.getLogger(__name__) if os.name == 'nt': try: @@ -34,7 +37,7 @@ from PySide6.QtWidgets import (QApplication, QMainWindow, QVBoxLayout, QHBoxLayo QMessageBox, QInputDialog, QFileIconProvider, QSizePolicy, QScrollArea, QGraphicsDropShadowEffect, QSpinBox, QListWidget, QListWidgetItem, QListView, QStyledItemDelegate, QMenu, QTableWidget, QTableWidgetItem, - QHeaderView) + QHeaderView, QDialog, QRadioButton) from PySide6.QtCore import (Qt, QThread, Signal, QPropertyAnimation, QEasingCurve, QParallelAnimationGroup, QFileInfo, QVariantAnimation, QTimer, QPointF, QRectF, QRect, QSize, QUrl, QLocale, QObject) @@ -49,7 +52,7 @@ except ImportError: HAS_QT_AUDIO = False __app_name__ = "QPyPack" -__version__ = "2.7.2" +__version__ = "2.7.3" __author__ = "QwejayHuang" __company__ = "QwejayHuang" __description__ = "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka" @@ -70,10 +73,9 @@ ZH_CN_DICT = { "USTC (China)": "中科大镜像", # 2. 软件元数据与标语 (Metadata & Taglines) - "Modern Cross-Platform Python Application Packager": "现代化的跨平台 Python 应用打包工具", "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka": "基于 PyInstaller 与 Nuitka 的现代化跨平台 Python 打包工具", "Python Packaging, Reimagined.": "重新定义 Python 应用打包体验", - "Drop Python source code to start": "拖入 Python 源码,即刻启程", + "Drop Python source code to start": "拖拽 Python 源码至此开始", "Drag & Drop Python script (.py/.pyw) here\nor Click to Browse": "拖拽 Python 脚本 (.py/.pyw) 到此\n或点击浏览", # 3. 导航与选项卡 (Tabs & Navigation) @@ -96,7 +98,7 @@ ZH_CN_DICT = { "Build Successful": "构建成功", "Open output directory or reset workspace.": "打开输出目录或重置工作区", "Build Failed": "构建失败", - "Check log output below for troubleshooting.": "检查日志排查错误", + "Check log output below for troubleshooting.": "请查看下方日志排查问题", "Status: Ready": "状态: 就绪", "Status: Parsing {filename}...": "状态: 解析 {filename}...", "Status: Loaded {filename}{mode}": "状态: 已载入 {filename}{mode}", @@ -134,6 +136,9 @@ ZH_CN_DICT = { "Select All": "全选", "Clear Log": "清空日志", "Export Log...": "导出日志...", + "Reset": "重置", + "Are you sure you want to reset all preferences?
All settings will be restored to default state.": + "确定重置所有偏好设置?
所有设置将恢复为默认状态。", # 6. 设置分组卡片与表单标签 (Card Titles & Form Labels) "Engine & Environment": "引擎与环境", @@ -160,7 +165,6 @@ ZH_CN_DICT = { "UPX Path:": "UPX 路径:", "PyInstaller Version:": "PyInstaller 版本:", "Nuitka Version:": "Nuitka 版本:", - "Pipreqs Version:": "Pipreqs 版本:", "Version:": "版本:", "Author/Company:": "作者/公司:", "Description:": "描述:", @@ -169,7 +173,6 @@ ZH_CN_DICT = { "Temporary Directory:": "临时目录:", "Source Directory (.qpypack_build)": "源码同级目录 (.qpypack_build)", "System Temp Directory": "系统 Temp 目录", - "System Temp Directory (Anti-Lock / Cloud-Friendly)": "系统 Temp 目录 (防锁定 / 云盘友好)", "Source File Directory": "源码同级目录", "Custom Directory": "自定义目录", "Import Name": "导入名", @@ -180,14 +183,14 @@ ZH_CN_DICT = { "Target relative path:": "目标相对路径:", "Import name (e.g. cv2):": "导入名 (如 cv2):", "PyPI package name for [{imp_name}]:": "[{imp_name}] 对应 PyPI 包名:", - "Script and settings retained. Ready to rebuild.": "已保留当前脚本与配置,可直接重新构建。", + "Script and settings retained. Ready to rebuild.": "已保留当前配置,就绪等待重新构建。", # 7. 复选框、占位符与悬停提示 (Checkboxes, Placeholders & Tooltips) "One-File Mode (--onefile)": "单文件 (--onefile)", "Hide Console (--noconsole)": "隐藏控制台 (--noconsole)", "Use Virtual Environment (Recommended)": "使用虚拟环境 (推荐)", "Install requirements.txt": "安装 requirements.txt", - "Analyze Dependencies (pipreqs)": "分析依赖 (pipreqs)", + "Analyze Dependencies (AST)": "分析依赖 (原生 AST)", "Scan Entire Folder": "扫描整个文件夹", "Enable UPX Compression": "启用 UPX 压缩", "Lite Mode (Exclude Dev/Test Dependencies)": "精简模式 (排除开发/测试依赖)", @@ -196,78 +199,68 @@ ZH_CN_DICT = { "Auto Extract Icon": "自动提取图标", "Clean Temporary Cache After Build": "构建后清理缓存", "Sound Notification": "完成提示音", - "Leave blank to auto-detect system default Python": "留空自动检测系统 Python", - "Leave blank to auto-match script name": "留空自动匹配脚本名", - "Leave blank to auto-search requirements.txt in current directory": "留空自动检索 requirements.txt", + "Leave blank to auto-detect system default Python": "留空则自动检测系统 Python", + "Leave blank to auto-match script name": "留空则自动匹配脚本名", + "Leave blank to auto-search requirements.txt in current directory": "留空则自动检索当前目录 requirements.txt", "Comma separated (e.g. pandas, PyQt5)": "逗号分隔 (如 pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "逗号分隔 (如 tkinter, matplotlib)", - "Leave blank to auto-detect from environment variables": "留空从环境变量自动检测", + "Leave blank to auto-detect from environment variables": "留空则从环境变量自动检测", "Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.": "动态排除构建环境的冗余依赖,提升速度并减小体积。", "Double-click to edit target path; Drag & drop supported": "双击编辑目标路径;支持拖拽", - "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "双击编辑目标路径;支持拖拽。建议使用“导出预设”进行保存。", + "Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.": "双击编辑目标路径;支持拖拽。建议使用「导出预设」进行保存。", # 8. 引擎说明与平台兼容性矩阵 (Engine Help & Platform Matrices) "PyInstaller — Bundles Python interpreter and bytecode. Fast build speed, zero configuration (no C compiler needed), and excellent compatibility.": - "PyInstaller — 打包 Python 解释器与字节码。构建快,零配置(无需 C 编译器),兼容性好。", + "PyInstaller — 打包解释器与字节码。构建迅速,零配置 (无需 C 编译器),兼容性优异。", "Nuitka — Compiles source code into native C/C++ binary. Produces smaller package size, faster execution, and deep anti-decompilation protection (requires C compiler).": - "Nuitka — 编译源码为原生 C/C++ 二进制。体积更小,执行更快,抗反编译(需 C 编译器)。", + "Nuitka — 编译为原生 C/C++ 二进制。体积更小,执行更快,具备强抗反编译能力 (需 C 编译器)。", - '
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility': - '
Python {ver} 平台支持:下载 Python
✔ Windows 7    ✔ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux
兼容旧系统 支持 Windows 7 及旧版操作系统', + '
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility': + '
Python {ver} 平台支持:
✔ Windows 7    ✔ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux
兼容旧系统 支持 Windows 7 及旧版操作系统', - '
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux': - '
Python {ver} 平台支持:下载 Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux', + '
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux': + '
Python {ver} 平台支持:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10/11    ✔ macOS 10.9+    ✔ Linux', - '
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka MinGW64 supported out-of-the-box': - '
Python {ver} 平台支持:下载 Python
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka 开箱支持 MinGW64 编译器', + '
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler': + '
Python {ver} 平台支持:
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka 自动检测并管理 C 后端编译器', - '
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.15+    ✔ Linux
Nuitka Requires MSVC / Clang / Zig (MinGW64 unsupported)': - '
Python {ver} 平台支持:下载 Python
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.15+    ✔ Linux
Nuitka 需 MSVC / Clang / Zig (不支持 MinGW64)', - - '
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler': - '
Python {ver} 平台支持:下载 Python
✖ Windows 7    ✖ Windows 8/8.1    ✔ Windows 10/11    ✔ macOS 10.13+    ✔ Linux
Nuitka 自动检测并管理 C 后端编译器', - - '
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...': - '
Python 解释器下载 Python
自动检测系统环境 (Win/macOS/Linux)...', + '
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...': + '
Python 解释器
自动检测系统环境 (Win/macOS/Linux)...', # 9. 构建日志与异常错误提示 (Log Output, Errors & Warnings) "[INFO] Build Cancelled.": "[INFO] 构建已取消。", - "[INFO] Performing pre-flight environment checks...": "[INFO] 执行环境安全检查...", + "[INFO] Performing pre-flight environment checks...": "[INFO] 执行预构建环境检查...", "[INFO] Analyzing source code and project dependencies...": "[INFO] 分析源码与依赖...", "[INFO] Initializing isolated build environment...": "[INFO] 初始化构建环境...", + "[INFO] Playwright detected. Installing built-in browsers (PLAYWRIGHT_BROWSERS_PATH=0)...": "[INFO] 检测到 Playwright。正在安装内置浏览器驱动...", "[INFO] Python interpreter path: {path}": "[INFO] Python 路径: {path}", "[INFO] Creating virtual environment...": "[INFO] 创建虚拟环境...", "[INFO] Synchronizing and upgrading pip package manager...": "[INFO] 更新 pip...", - "[INFO] Scanning project source code via pipreqs...": "[INFO] pipreqs 扫描依赖...", - "[INFO] Installing build engine [{pkg}] and core compilation dependencies...": "[INFO] 安装构建引擎 [{pkg}] 及核心依赖...", + "[INFO] Scanning project source code via AST engine...": "[INFO] 使用原生 AST 引擎扫描依赖...", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka 提示: 首次构建如需下载 GCC/MinGW,请确保网络畅通。", - "[INFO] Successfully installed compatible versions.": "[INFO] 自动匹配兼容版本安装成功。", + "[INFO] Successfully installed compatible versions.": "[INFO] 已成功安装兼容版本。", "[INFO] Resolving project dependencies...": "[INFO] 解析项目依赖...", "Declared in requirements.txt ({count}): {pkgs}": "依赖声明 ({count}): {pkgs}", "Declared in requirements.txt: None": "依赖声明: 无", "Discovered via scanner ({count}): {pkgs}": "扫描发现 ({count}): {pkgs}", - "Auto-patched missing ({count}): {pkgs}": "自动补全 ({count}): {pkgs}", + "Auto-patched missing ({count}): {pkgs}": "自动补齐 ({count}): {pkgs}", "Manifest complete (No missing packages)": "清单完整 (无缺失包)", "Build engine packages ({count}): {pkgs}": "引擎依赖 ({count}): {pkgs}", "[INFO] Installing build environment and project dependencies ({count} packages): {pkgs}": "[INFO] 安装依赖 ({count}): {pkgs}", "[INFO] Switching to backup PyPI source for retrieval: {url}": "[INFO] 切换备用 PyPI 源: {url}", "[INFO] Starting {engine} engine to compile binary files...": "[INFO] 启动 {engine} 引擎编译...", - "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] 检测到 MSVC,优先使用原生 C++ 编译器。", - "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] 检测到 Clang,优先使用 LLVM Clang 编译器。", + "[INFO] Found local MSVC environment, prioritizing native C++ compiler.": "[INFO] 检测到本地 MSVC 环境,优先使用原生 C++ 编译器。", + "[INFO] Found local Clang environment, prioritizing LLVM Clang compiler.": "[INFO] 检测到本地 Clang 环境,优先使用 LLVM Clang 编译器。", "[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.": "[INFO] Python 3.13+: 使用 Zig 编译器。", "[INFO] Using MinGW64 compiler (--mingw64) for C backend.": "[INFO] 使用 MinGW64 编译器。", "[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.": "[INFO] 检测到本地 GCC/MinGW-w64 环境,优先使用 MinGW64 编译器。", "[INFO] Found local Zig environment, letting Nuitka manage C backend compilation.": "[INFO] 检测到本地 Zig 环境,由 Nuitka 接管 C 后端编译。", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] 未检测到本地 C 编译器,Nuitka 将自动下载并管理兼容的 MinGW-w64 工具链。", - "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] 评估系统内存 (可用: {ram:.1f} GB)。调整并发: {cores} -> {safe_jobs}", - "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] 剥离图标参数并重新构建...", - "[INFO] Writing application icon...": "[INFO] 写入应用图标...", - "[INFO] Application icon written successfully.": "[INFO] 应用图标写入成功。", - "[INFO] Lite mode enabled, excluding non-essential modules...": "[INFO] 启用精简模式,排除非必要模块...", + "[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...": "[INFO] 评估系统可用物理内存 ({ram:.1f} GB),动态调整并发数: {cores} -> {safe_jobs}", + "[INFO] Stripping icon parameters and automatically rebuilding...": "[INFO] 移除图标参数并重新构建...", "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 启用精简模式,应用字节码优化 (-OO) 并剔除开发环境模块...", - "[INFO] Enabled Nuitka optimization directives...": "[INFO] 启用 Nuitka 优化指令...", - "[INFO] Compilation completed, archiving built files...": "[INFO] 编译完成,归档产物...", + "[INFO] Compilation completed, archiving built files...": "[INFO] 编译完成,归档构建产物...", "[INFO] Validating output files and generating final product...": "[INFO] 校验并生成最终产物...", "[INFO] Build log exported to: {path}": "[INFO] 日志已导出: {path}", "[INFO] Freeing up space, cleaning temporary build environment...": "[INFO] 清理临时构建环境...", @@ -276,16 +269,18 @@ ZH_CN_DICT = { "[WARN] Specified versions failed to install. Stripping version constraints for automatic compatibility match...": "[WARN] 指定版本安装失败,尝试自动匹配兼容版本...", "[WARN] Some dependencies failed to install, build will proceed with risk...": "[WARN] 部分依赖安装失败,继续构建 (有风险)。", "[WARN] Low disk space detected on build target drive (Available: {free:.1f} GB, >= 5.0 GB recommended). Build process may interrupt due to disk exhaustion.": "[WARN] 目标磁盘空间不足 (可用: {free:.1f} GB,推荐 >= 5.0 GB)。", - "[WARN] Memory allocation exception caught (ZstdError / OOM). Triggering memory protection fallback: Retrying in single-thread mode...": "[WARN] 捕获内存分配异常 (ZstdError/OOM)。切换单线程重试...", - "[WARN] System low memory detected (zstd memory allocation failed). Automatically retrying in single-thread low-memory mode...": "[WARN] 内存不足 (zstd 分配失败),切换单线程重试...", - "[WARN] Icon resource writing blocked (possibly locked by system/antivirus), triggering fallback protection...": "[WARN] 图标写入受阻,触发降级...", - "[WARN] Strongly recommend checking [Virtual Environment] to maximize lite mode effect.": "[WARN] 强烈建议开启 [虚拟环境] 以最大化精简效果。", + "[WARN] Memory allocation exception caught (ZstdError / OOM). Triggering memory protection fallback: Retrying in single-thread mode...": "[WARN] 捕获内存分配异常 (ZstdError/OOM),降级为单线程模式重试...", + "[WARN] System low memory detected (zstd memory allocation failed). Automatically retrying in single-thread low-memory mode...": "[WARN] 内存不足 (zstd 分配失败),降级为单线程模式重试...", + "[WARN] Icon resource writing blocked (possibly locked by system/antivirus), triggering fallback protection...": "[WARN] 图标资源写入被拦截 (可能受安全软件限制),触发降级机制...", + "[WARN] Strongly recommend checking [Virtual Environment] to maximize lite mode effect.": "[WARN] 强烈建议启用「虚拟环境」以最大化精简效果。", "[WARN] Pause code injection exception: {error}": "[WARN] 注入暂停代码异常: {error}", "[WARN] AST Analysis Exception: {error}": "[WARN] AST 分析异常: {error}", "[WARN] Read requirements.txt warning: {error}": "[WARN] 读取 requirements.txt 警告: {error}", - "[WARN] Parse pipreqs output warning: {error}": "[WARN] 解析 pipreqs 警告: {error}", "[WARN] Command timeout (>{timeout}s)": "[WARN] 命令超时 (>{timeout}s)", - "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] 构建中止: 磁盘空间不足。请清理至少 5 GB 空间后重试。", + "[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.": "[WARN] 检测到网络请求库,自动捆绑 'certifi' 根证书以防止 SSL 异常。", + "[WARN] Usage of '__file__' detected. In PyInstaller One-File mode, use 'sys._MEIPASS' to reliably locate bundled resource files!": "[WARN] 侦测到 '__file__' 的使用。在 PyInstaller 单文件模式下,请使用 'sys._MEIPASS' 定位资源释放路径,以免引发文件丢失错误。", + "[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.": "[INFO] 提示: 独立可执行程序可能被安全软件误报。建议将其加入白名单,或为正式发布程序添加代码签名。", + "[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.": "[ERROR] 构建中止: 磁盘空间不足 (NoSpaceLeft / Errno 28)。建议预留至少 5GB 可用空间。", "[ERROR] Output directory is missing write permissions: {error}": "[ERROR] 目标输出目录无写入权限: {error}", "[ERROR] Requirements file not found: {path}": "[ERROR] 指定的依赖清单文件不存在: {path}", "[ERROR] Insufficient disk space (Available: {free:.1f} GB). At least 0.5 GB is required to safely initialize the build environment.": "[ERROR] 磁盘空间不足 (可用 {free:.1f} GB)。至少需 0.5 GB 才能安全初始化环境。", @@ -293,11 +288,13 @@ ZH_CN_DICT = { "[ERROR] The specified icon file does not exist: {path}": "[ERROR] 指定的应用图标文件不存在: {path}", "[ERROR] Additional resource file/directory not found: {path}": "[ERROR] 附加数据中的文件/目录不存在: {path}", "[ERROR] Failed to create virtual environment. Current Python environment might be missing necessary modules or have restricted permissions.": "[ERROR] 虚拟环境创建失败。环境可能缺失模块或权限受限。", - "[ERROR] Product transfer failed, file might be occupied by system process or lack permission: {error}": "[ERROR] 产物转移失败,可能被占用或无权限: {error}", + "[ERROR] Product transfer failed, file might be occupied by system process or lack permission: {error}": "[ERROR] 构建产物转移失败,文件可能被占用或无写入权限: {error}", "[ERROR] Could not locate valid executable product in temporary build directory: {path}": "[ERROR] 临时构建目录未找到可执行产物: {path}", "[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.": "[ERROR] 源码语法错误,构建中止:\n - 文件: {file}\n - 类型: {type}\n - 行号: {line}\n - 详情: {desc}\n\n提示: 请确保源码可在本地运行。", - "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] 构建异常中断,请查看“详细日志”。", + "[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.": "[FAILED] 构建异常中断,请切换至「详细日志」排查原因。", "[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.": "[ERROR] 目标文件被云盘锁定或加密,请解密后重试。", + "[ERROR] Target file is running or occupied. Please close the existing application and try again.": "[ERROR] 目标程序正在运行或被系统占用。请先关闭该程序后再重新构建。", + "[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).": "[WARN] 检测到 multiprocessing 模块。请确保在 'if __name__ == \"__main__\":' 块内调用 'multiprocessing.freeze_support()',以防引发无限进程 (Fork Bomb) 死机。", "[ERROR] Please load a valid Python source file first!": "[ERROR] 请加载有效的 Python 源码!", "[ERROR] Exception occurred during AST parsing: {error}": "[ERROR] AST 解析异常: {error}", "[ERROR] Failed to export preset file: {error}": "[ERROR] 导出预设失败: {error}", @@ -307,28 +304,127 @@ ZH_CN_DICT = { "[ERROR] Process error: command or binary missing ({error})": "[ERROR] 进程错误: 命令或二进制文件缺失 ({error})", "[ERROR] System execution exception: {error}": "[ERROR] 系统执行异常: {error}", "[ERROR] I/O Exception: {err_msg}": "[ERROR] I/O 异常: {err_msg}", - "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "依赖缺失警告: {pkgs} 安装失败,详情见日志。", - "Package mappings have been reset to defaults.": "包映射已重置为默认值。", - "Config preset exported to: {path}": "配置预设已导出: {path}", - "Config preset imported successfully.": "配置预设导入成功。", - "AST scan completed, found {count} dependencies.": "AST 扫描完成,发现 {count} 个依赖。", "No log content.": "无日志内容。", "Log saved to: {path}": "日志已保存: {path}", - "Attention: Please check the log for details.": "注意:发生异常,请查看日志详情。", - "Are you sure you want to reset all preferences to default?": "确定要将全局偏好设置重置为默认值吗?", - "Global configuration has been reset.": "全局配置已重置为默认值。", "\\nProgram execution completed, press Enter to exit...": "\\n程序执行完成,按回车键退出...", "Project-specific. Not saved to global preferences. Use 'Export Preset' to save config.": - "提示:此处的资源仅对当前工作区生效(不保存到全局偏好)。如需长期复用请使用【导出预设】。", + "提示:此处资源配置仅对当前项目生效。如需长期复用,请使用「导出预设」。", "GitHub Repository": "GitHub 仓库", "Issues & Feedback": "问题与反馈", "PyPI Home": "PyPI 主页", "Sponsor": "赞助支持", - "QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!": "QPyPack 是一款免费的开源工具。如果它为您提升了效率或解决了打包难题,欢迎请作者喝杯奶茶!", + "QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!": "QPyPack 是一款免费开源工具。如果它提升了您的效率或解决了打包难题,欢迎赞助支持本开源项目。", "* Sponsorship is completely voluntary, serves as an unconditional encouragement to the open-source community, and involves no commercial commitments. Thank you for your support!": "* 赞助完全出于自愿,属于对开源社区的无偿鼓励,不涉及任何商业承诺。感谢您的支持!", "Python Environment Required": "需要 Python 环境", - "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "未在系统中检测到有效的 Python!

QPyPack 需要依赖 Python 环境才能编译代码。
如果您尚未安装,请前往官网下载安装(小白提示:安装界面的底部请务必勾选 'Add Python.exe to PATH')。", + "Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).": "未在系统中检测到有效的 Python 环境

QPyPack 需要依赖 Python 才能编译代码。
如果您尚未安装,请前往官网下载安装 (提示:安装界面底部请务必勾选 'Add Python.exe to PATH')。", "Download Python": "前往下载 Python", + "Python 3.14.6 (Experimental)": "Python 3.14.6 (实验性)", + "Python 3.13.0": "Python 3.13.0", + "Python 3.12.4": "Python 3.12.4", + "Python 3.11.9 (Recommended)": "Python 3.11.9 (推荐)", + "Python 3.10.11": "Python 3.10.11", + "Python 3.9.13": "Python 3.9.13", + "Python 3.8.10 (Win7 Support)": "Python 3.8.10 (Win7 兼容)", + "Downloading Python {ver}... Please wait.": "正在下载 Python {ver},请稍候...", + "Configure Manually": "手动配置路径", + "Switched to [Build Settings] -> [Engine], please set the Python path.": "已自动切换至【构建设置】->【构建引擎】,请手动指定 Python 解释器路径。", + + # 10. Python 环境管理弹窗 (Python Environment Manager) + "Python Environment Management": "Python 环境管理", + "Python Environment Required
Application build depends on a Python interpreter.
Please select a version to automatically download, install, and configure environment variables.
": + "需要 Python 编译环境
应用构建需要依赖 Python 解释器。
请选择版本以自动下载安装与配置环境变量。
", + "Python Environment Management
Supports switching locally detected Python environments or downloading new versions.": + "Python 环境管理
支持切换本地已检测到的 Python 环境或下载新版本。", + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support.": + "💡 建议: 推荐选择 Python 3.11.9,该版本具备最佳的编译兼容性与引擎支持。", + "View Python": "查看 Python", + "Locally Detected Pythons": "已检测环境", + "Download New Version": "下载新版本", + "Use Selected Environment": "切换至选中环境", + "No local Python environments detected.": "未检测到本地 Python 环境", + "Select Python Version to Download:": "选择 Python 版本:", + "Click to automatically download, install Python, and configure system environment variables.": + "点击后将自动下载安装 Python 并配置系统环境变量。", + "One-Click Download & Install": "下载并自动安装", + "Use Installed Version Directly": "✔ 本地已存在,直接切换", + "✔ Detected locally:
{path}
Ready to switch directly without re-downloading.": + "✔ 本地已检测到此版本:
{path}
可直接切换使用,无需重复下载。", + "Switched to local Python environment: {path}": "已切换 Python 环境: {path}", + "Download complete. Starting Python installation...": "下载完成,正在安装 Python,请稍候...", + "Install Complete": "安装完成", + "Exit Now": "退出软件", + "Later": "稍后", + "Python Environment Installed Successfully!

System environment variables updated. Recommended to exit and restart the software to apply changes.": + "Python 环境安装成功!

建议退出软件后重新打开以生效环境变量。", + "Python installed. Please restart QPyPack manually later.": "Python 已安装,请稍后手动重启软件。", + + # 11. Python 版本不匹配提示: + "[Syntax Error] Source code syntax parsing failed, build aborted:\n" + " - File: {file}\n" + " - Line: Line {line}\n" + " - Detail: {desc}\n\n" + "💡 Tip: This is usually NOT a fault of the packaging tool.\n" + "Please ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\n" + "Using newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\n" + "We recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.": + "[Syntax Error] 源码语法解析失败,构建中止:\n" + " - 文件: {file}\n" + " - 行号: {line}\n" + " - 详情: {desc}\n\n" + "💡 提示:这通常不是打包工具的故障。\n" + "请确认您当前选择的【打包 Python 版本】与您【编写代码时的版本】是否一致。\n" + "高版本语法(如海象运算符 :=、类型联合 |、match-case 等)在低版本 Python 中会导致此错误。\n" + "建议前往【构建设置】->【构建引擎】切换至对应版本的 Python。", + + "[FAILED] Build interrupted exceptionally!\n\n" + "🔍 Common Troubleshooting:\n" + "1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n" + "2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n" + "3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n" + "(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)": + "[FAILED] 构建异常中断!\n\n" + "🔍 常见原因排查:\n" + "1. 环境不匹配 (最常见):您选择的打包 Python 版本与您的源码不兼容。请前往【构建设置】切换为您平时开发运行该代码的 Python 版本。\n" + "2. 依赖缺失:请点击上方切换至「详细日志」,查看是否有模块未找到 (ModuleNotFoundError)。\n" + "3. 杀毒软件拦截:请检查是否有安全软件阻止了打包过程。\n\n" + "(注意:这通常是环境配置与代码差异导致,并非打包引擎本身故障,请查阅详细日志获取确切原因。)", + + "Status: Build Cancelled": "状态: 构建已取消", + "Build Cancelled": "构建已取消", + "[INFO] Build Cancelled.": "[INFO] 构建已取消。", + + "[WARN] Package '{pkg}' failed to install, skipping...": "[WARN] 包 '{pkg}' 安装失败,已跳过...", + "Dependency Missing Warning: {pkgs} failed to install. Check log for details.": "依赖缺失警告: {pkgs} 安装失败。详情请查看日志。", + "[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.": + "[ERROR] 构建完成,但以下依赖安装失败:\n\n - {pkgs}\n\n注意: 运行时程序可能会抛出 ModuleNotFoundError。", + + "Package mappings have been reset to defaults.": "包名映射已恢复为默认设置。", + "Global configuration has been reset.": "全局偏好配置已恢复默认。", + "Config preset exported to: {path}": "配置预设已成功导出至: {path}", + "Config preset imported successfully.": "配置预设已成功导入。", + "AST scan completed, found {count} dependencies.": "AST 扫描完成,发现 {count} 个隐式依赖。", + "Attention: Please check the log for details.": "提示: 请检查下方日志排查详细原因。", + + "One-Click Install": "一键安装 Python", + "Downloading Python {ver}... Please wait.": "正在下载 Python {ver},请稍候...", + "Download complete. Starting Python installation...": "下载完成,正在后台安装 Python...", + "[ERROR] Python installation failed or was cancelled.": "[ERROR] Python 安装失败或已被主动取消。", + "Python installed. Please restart QPyPack manually later.": "Python 安装完毕。请稍后手动重启 QPyPack 以生效环境变量。", + "Switched to local Python environment: {path}": "已成功切换至本地 Python 环境: {path}", + + "One-File Mode (--onefile)": "单文件模式 (--onefile)", + "Folder Mode (--onedir)": "文件夹模式 (--onedir)", + "Contents Directory (--contents-directory):": "内部资源目录:", + "Internal directory name for dependencies (default: _internal)": "内部依赖与资源存放目录名 (默认: _internal)", + "System Default ({sys_native})": "系统默认 ({sys_native})", + "My Studio": "我的工作室", + "Python Executable": "Python 可执行程序", + "Invalid syntax": "无效语法", + "[INFO] Downloading Playwright browsers via mirror: {url}": "[INFO] 通过镜像下载 Playwright 浏览器: {url}", + "[INFO] Retrying Playwright browser download via official CDN...": "[INFO] 通过官方 CDN 重试下载 Playwright 浏览器...", + "[WARN] Playwright browser installation failed across all sources, build will proceed with risk...": "[WARN] 所有 Playwright 浏览器下载源均失败,继续构建 (有风险)...", + "[WARN] Icon conversion to .icns failed, building without icon.": "[WARN] 图标转换为 .icns 失败,将不使用图标构建。", + "OK": "确定", "Unknown": "未知" } @@ -407,7 +503,7 @@ class TranslationEngine(QObject): code = self.normalize_locale(p.stem) self.translations[code] = data except Exception as e: - print(f"[i18n] Failed to load {p.name}: {e}") + logger.warning("[i18n] Failed to load %s: %s", p.name, e) def get_available_languages(self) -> dict: sys_code = self.detect_system_language() @@ -417,7 +513,7 @@ class TranslationEngine(QObject): qloc = QLocale(sys_code) sys_native = qloc.nativeLanguageName().capitalize() or sys_code - langs = {"auto": f"System Default ({sys_native})"} + langs = {"auto": self.t("System Default ({sys_native})", sys_native=sys_native)} all_codes = set(self.translations.keys()) | {self.DEFAULT_LOCALE, "zh_CN"} for code in sorted(all_codes): @@ -544,7 +640,7 @@ def load_config(retry=True): 'temp_sandbox_mode': '0', 'sound_notify': 'True', 'auto_save_log': 'False', 'use_reqs_file': '', 'add_data_list': '', 'custom_python_path': '', - 'pyi_version': '', 'nuitka_version': '', 'pipreqs_version': '', + 'pyi_version': '6.21.0', 'nuitka_version': '4.1.3', 'lite_mode': 'False' } try: @@ -596,9 +692,8 @@ def load_config(retry=True): 'use_reqs_file': '', 'add_data_list': '', 'custom_python_path': '', - 'pyi_version': '', - 'nuitka_version': '', - 'pipreqs_version': '', + 'pyi_version': '6.21.0', + 'nuitka_version': '4.1.3', 'lite_mode': 'False' } for k, v in default_updates.items(): @@ -722,29 +817,196 @@ def is_cloud_sync_path(path_obj: Path) -> bool: ] return any(kw in path_str for kw in cloud_keywords) -def extract_imports_via_ast(script_path, python_exe=None): - code = "" +def extract_project_imports_via_ast(target_path, scan_dir: bool = False) -> set: + imports = set() + target_path = Path(target_path) + + if not scan_dir or not target_path.is_dir(): + files_to_scan = [target_path] if target_path.is_file() else [] + else: + files_to_scan = [] + for root, _, files in os.walk(target_path): + path_parts = set(Path(root).parts) + if path_parts & {'__pycache__', '.qpypack_build', '.venv', 'venv', 'build', 'dist', 'env', '.env'}: + continue + for file in files: + if file.endswith(('.py', '.pyw')): + files_to_scan.append(Path(root) / file) + + for file_p in files_to_scan: + try: + raw = file_p.read_bytes() + try: + code = raw.decode('utf-8-sig') + except Exception: + code = raw.decode(locale.getpreferredencoding(), errors='ignore') + + tree = ast.parse(code, filename=file_p.as_posix()) + for node in ast.walk(tree): + if isinstance(node, ast.Import): + imports.update(n.name.split('.')[0] for n in node.names) + elif isinstance(node, ast.ImportFrom) and node.level == 0 and node.module: + imports.add(node.module.split('.')[0]) + except Exception: + pass + return imports + + +def query_target_env_packages(python_exe: str) -> dict: + if not python_exe or not os.path.exists(python_exe): + return {} + + code = ( + "import json\n" + "try:\n" + " try:\n" + " from importlib.metadata import packages_distributions\n" + " except ImportError:\n" + " from importlib_metadata import packages_distributions\n" + " res = {k: v[0] for k, v in packages_distributions().items() if v}\n" + " print(json.dumps(res))\n" + "except Exception:\n" + " print('{}')\n" + ) try: - raw = Path(script_path).read_bytes() - try: - code = raw.decode('utf-8-sig') - except Exception: - code = raw.decode(locale.getpreferredencoding(), errors='ignore') + clean_env = os.environ.copy() + clean_env.pop("PYTHONHOME", None) + clean_env.pop("PYTHONPATH", None) + kwargs = {"capture_output": True, "text": True, "env": clean_env, "timeout": 8, "errors": "ignore"} + if os.name == 'nt': + kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW - imports = set() - tree = ast.parse(code, filename=script_path) - for node in ast.walk(tree): - if isinstance(node, ast.Import): - imports.update(n.name.split('.')[0] for n in node.names) - elif isinstance(node, ast.ImportFrom) and node.level == 0 and node.module: - imports.add(node.module.split('.')[0]) - return imports + proc = subprocess.run([python_exe, "-c", code], **kwargs) + if proc.returncode == 0 and proc.stdout.strip(): + return json.loads(proc.stdout.strip()) except Exception: + pass + return {} + +def find_system_python(): + candidates = [] + for name in ('python', 'python3', 'pythonw'): + p = shutil.which(name) + if p: candidates.append(p) + + if winreg is not None: try: - m = re.findall(r'^\s*(?:from|import)\s+([a-zA-Z0-9_]+)', code, re.M) - return set(m) - except Exception: - return set() + py = shutil.which("py") + if py: + clean_env = os.environ.copy() + clean_env.pop("PYTHONHOME", None) + clean_env.pop("PYTHONPATH", None) + clean_env["PYTHONUTF8"] = "1" + proc = subprocess.Popen( + [py, "-c", "import sys; print(sys.executable)"], + stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL, + text=True, encoding="utf-8", errors="ignore", env=clean_env, creationflags=subprocess.CREATE_NO_WINDOW + ) + out, _err = proc.communicate(timeout=3) + if out and os.path.exists(out.strip()): candidates.append(out.strip()) + except: pass + + try: + for hive in (winreg.HKEY_CURRENT_USER, winreg.HKEY_LOCAL_MACHINE): + try: + with winreg.OpenKey(hive, r"SOFTWARE\Python\PythonCore") as core_key: + for i in range(winreg.QueryInfoKey(core_key)[0]): + sub = winreg.EnumKey(core_key, i) + try: + with winreg.OpenKey(core_key, rf"{sub}\InstallPath") as pkey: + path = winreg.QueryValueEx(pkey, "")[0] + exe = os.path.join(path, "python.exe") + if os.path.exists(exe): candidates.append(exe) + except: pass + except: pass + except: pass + + search_paths = [ + os.environ.get("LOCALAPPDATA", "") + r"\Programs\Python", + os.environ.get("PROGRAMFILES", "") + r"\Python", + os.environ.get("PROGRAMFILES(X86)", "") + r"\Python", + r"C:\Python", r"C:\Program Files\Python", r"C:\Program Files (x86)\Python" + ] + for base in search_paths: + if base and os.path.exists(base): + try: + for d in os.listdir(base): + if d.lower().startswith("python"): + exe = os.path.join(base, d, "python.exe") + if os.path.exists(exe): candidates.append(exe) + except: pass + + user_profile = os.environ.get("USERPROFILE", "") + if user_profile: + for c_dir in ("miniconda3", "anaconda3", "Miniconda3", "Anaconda3"): + for base in (user_profile, "C:\\", "D:\\"): + exe = os.path.join(base, c_dir, "python.exe") + if os.path.exists(exe): candidates.append(exe) + else: + unix_bases = [ + "/usr/bin", "/usr/local/bin", "/opt/homebrew/bin", + "/Library/Frameworks/Python.framework/Versions/Current/bin", + os.path.expanduser("~/.pyenv/shims"), os.path.expanduser("~/.local/bin") + ] + user_profile = os.environ.get("HOME", "") or os.environ.get("USERPROFILE", "") + if user_profile: + for c_dir in ("miniconda3", "anaconda3", "mambaforge", ".conda"): + base_dir = os.path.join(user_profile, c_dir) + if os.path.exists(base_dir): + exe = os.path.join(base_dir, "bin", "python") + if os.path.exists(exe): unix_bases.append(os.path.join(base_dir, "bin")) + envs_dir = os.path.join(base_dir, "envs") + if os.path.exists(envs_dir): + try: + for env in os.listdir(envs_dir): + p_bin = os.path.join(envs_dir, env, "bin") + if os.path.exists(p_bin): unix_bases.append(p_bin) + except: pass + + for base in unix_bases: + if os.path.exists(base): + try: + for f in os.listdir(base): + if f.startswith("python3") or f == "python": + exe = os.path.join(base, f) + if os.path.isfile(exe) and os.access(exe, os.X_OK): candidates.append(exe) + except: pass + + seen = set() + unique_candidates = [] + for cand in candidates: + cand = os.path.normpath(cand) + if cand not in seen: + seen.add(cand) + unique_candidates.append(cand) + + for cand in unique_candidates: + if not os.path.exists(cand): continue + + if getattr(sys, 'frozen', False) or '__compiled__' in globals(): + try: + if os.path.samefile(cand, sys.executable): + continue + except Exception: + pass + + if os.name == 'nt' and "WindowsApps" in cand: + try: + if os.path.getsize(cand) == 0: continue + except: continue + + clean_env = os.environ.copy() + clean_env.pop("PYTHONHOME", None) + clean_env.pop("PYTHONPATH", None) + + try: + kwargs = {"stdout": subprocess.PIPE, "stderr": subprocess.PIPE, "text": True, "encoding": "utf-8", "errors": "ignore", "env": clean_env, "timeout": 3} + if os.name == 'nt': kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW + proc = subprocess.run([cand, "-V"], **kwargs) + if proc.returncode == 0: return cand + except: continue + + return "" def get_svg_icon(name, color="#5F6368", size=24): path_data = MATERIAL_ICONS.get(name, "") @@ -777,6 +1039,50 @@ def ensure_arrow_icon(): except Exception: pass +class CustomInputDialog(QDialog): + def __init__(self, parent, title, label_text, text=""): + super().__init__(parent) + self.setWindowTitle(title) + self.setMinimumWidth(320) + self.setStyleSheet(""" + QDialog { background-color: #ffffff; } + QLabel { font-size: 12px; color: #111827; } + QLineEdit { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; } + QLineEdit:focus { border: 1px solid #2563eb; } + QPushButton { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; font-weight: bold; padding: 6px 16px; min-width: 70px; } + QPushButton:hover { background-color: #e2e8f0; } + QPushButton#btnOk { background-color: #2563eb; color: #ffffff; border: none; } + QPushButton#btnOk:hover { background-color: #1d4ed8; } + """) + + lay = QVBoxLayout(self) + lay.setSpacing(10) + lay.setContentsMargins(20, 20, 20, 20) + + lay.addWidget(QLabel(label_text)) + + self.edit = QLineEdit(text) + lay.addWidget(self.edit) + + lay.addSpacing(10) + + btn_lay = QHBoxLayout() + btn_lay.addStretch() + + self.btn_ok = QPushButton(_("OK")) + self.btn_ok.setObjectName("btnOk") + self.btn_ok.clicked.connect(self.accept) + + self.btn_cancel = QPushButton(_("Cancel")) + self.btn_cancel.clicked.connect(self.reject) + + btn_lay.addWidget(self.btn_ok) + btn_lay.addWidget(self.btn_cancel) + lay.addLayout(btn_lay) + + def get_text(self): + return self.edit.text() + class ComboItemDelegate(QStyledItemDelegate): def sizeHint(self, option, index): s = super().sizeHint(option, index) @@ -860,29 +1166,52 @@ class DropListWidget(QListWidget): if paths: self.itemsDropped.emit(paths) def get_stdlib_names(): - libs = {'os', 'sys', 're', 'math', 'time', 'datetime', 'json', 'urllib', 'sqlite3', 'csv', - 'subprocess', 'shutil', 'threading', 'multiprocessing', 'queue', 'socket', - 'collections', 'itertools', 'functools', 'random', 'hashlib', 'base64', - 'binascii', 'xml', 'logging', 'argparse', 'typing', 'pathlib', 'traceback', - 'warnings', 'tempfile', 'platform', 'zipfile', 'tarfile', 'gzip', 'bz2', - 'lzma', 'hmac', 'ssl', 'email', 'http', 'uuid', 'io', 'contextlib', 'winreg', - 'concurrent', 'ctypes', 'dataclasses', 'enum', 'importlib', 'inspect', - 'pickle', 'copy', 'ast', 'asyncio', 'calendar', 'configparser', - 'curses', 'decimal', 'difflib', 'getopt', 'getpass', 'glob', 'html', - 'mimetypes', 'numbers', 'operator', 'pdb', 'pprint', 'profile', 'pstats', - 'runpy', 'sched', 'secrets', 'selectors', 'shelve', 'shlex', - 'signal', 'site', 'smtpd', 'smtplib', 'sndhdr', 'socketserver', - 'stat', 'statistics', 'string', 'struct', 'symtable', 'sysconfig', - 'syslog', 'tabnanny', 'telnetlib', 'termios', 'future', - 'textwrap', 'timeit', 'tkinter', 'token', 'tokenize', 'trace', - 'tracemalloc', 'tty', 'turtle', 'turtledemo', 'types', - 'unittest', 'uu', 'venv', 'wave', '__future__', - 'weakref', 'webbrowser', 'winsound', 'wsgiref', 'xdrlib', - 'xmlrpc', 'zipapp', 'zipimport', 'zlib', 'zoneinfo', - 'tomllib', 'graphlib', 'ipaddress', 'builtins', 'gc', 'faulthandler', - 'plistlib', 'select', 'unicodedata', 'ensurepip', 'rlcompleter', 'msvcrt'} - if sys.version_info >= (3, 10): + libs = set(sys.builtin_module_names) + + if hasattr(sys, 'stdlib_module_names'): libs.update(sys.stdlib_module_names) + + try: + import sysconfig + stdlib_dir = sysconfig.get_path('stdlib') + if stdlib_dir and os.path.exists(stdlib_dir): + for f in os.listdir(stdlib_dir): + if f.endswith('.py'): + libs.add(f[:-3]) + elif os.path.isdir(os.path.join(stdlib_dir, f)) and os.path.exists(os.path.join(stdlib_dir, f, '__init__.py')): + libs.add(f) + except Exception: + pass + + known_std = { + 'abc', 'aifc', 'argparse', 'array', 'ast', 'asynchat', 'asyncio', 'asyncore', 'atexit', + 'audioop', 'base64', 'bdb', 'binascii', 'binhex', 'bisect', 'builtins', 'bz2', + 'calendar', 'cgi', 'cgitb', 'chunk', 'cmap', 'cmath', 'cmd', 'code', 'codecs', 'codeop', + 'collections', 'colorsys', 'compileall', 'concurrent', 'configparser', 'contextlib', + 'contextvars', 'copy', 'copyreg', 'crypt', 'csv', 'ctypes', 'curses', 'dataclasses', + 'datetime', 'dbm', 'decimal', 'difflib', 'dis', 'distutils', 'doctest', 'dummy_threading', + 'email', 'encodings', 'ensurepip', 'enum', 'errno', 'faulthandler', 'fcntl', 'filecmp', + 'fileinput', 'fnmatch', 'formatter', 'fractions', 'ftplib', 'functools', 'gc', 'genericpath', + 'getopt', 'getpass', 'gettext', 'glob', 'graphlib', 'grp', 'gzip', 'hashlib', 'heapq', + 'hmac', 'html', 'http', 'imaplib', 'imghdr', 'imp', 'importlib', 'inspect', 'io', + 'ipaddress', 'itertools', 'json', 'keyword', 'lib2to3', 'linecache', 'locale', 'logging', + 'lzma', 'macpath', 'mailbox', 'mailcap', 'marshal', 'math', 'mimetypes', 'mmap', 'modulefinder', + 'msvcrt', 'multiprocessing', 'netrc', 'nis', 'nntplib', 'numbers', 'opcode', 'operator', + 'optparse', 'os', 'ossaudiodev', 'pathlib', 'pdb', 'pickle', 'pickletools', 'pipes', + 'pkgutil', 'platform', 'plistlib', 'poplib', 'posix', 'posixpath', 'pprint', 'profile', + 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'queue', 'quopri', 'random', + 're', 'readline', 'reprlib', 'resource', 'rlcompleter', 'runpy', 'sched', 'secrets', + 'select', 'selectors', 'shelve', 'shlex', 'shutil', 'signal', 'site', 'smtpd', 'smtplib', + 'sndhdr', 'socket', 'socketserver', 'spwd', 'sqlite3', 'ssl', 'stat', 'statistics', + 'string', 'stringprep', 'struct', 'subprocess', 'sunau', 'symbol', 'symtable', 'sys', + 'sysconfig', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', 'textwrap', + 'threading', 'time', 'timeit', 'tkinter', 'token', 'tokenize', 'tomllib', 'trace', + 'tracemalloc', 'tty', 'turtle', 'turtledemo', 'types', 'typing', 'unicodedata', 'unittest', + 'urllib', 'uu', 'uuid', 'venv', 'wave', 'weakref', 'webbrowser', 'winreg', 'winsound', + 'wsgiref', 'xdrlib', 'xml', 'xmlrpc', 'zipapp', 'zipfile', 'zipimport', 'zlib', 'zoneinfo', + '__future__', '_thread', '_asyncio' + } + libs.update(known_std) return libs STD_LIBS = get_stdlib_names() @@ -896,123 +1225,6 @@ def get_resource_path(relative_path): base_path = os.path.dirname(os.path.abspath(__file__)) return os.path.join(base_path, relative_path) -def find_system_python(): - candidates = [] - for name in ('python', 'python3', 'pythonw'): - p = shutil.which(name) - if p: candidates.append(p) - - if winreg is not None: - try: - py = shutil.which("py") - if py: - clean_env = os.environ.copy() - clean_env.pop("PYTHONHOME", None) - clean_env.pop("PYTHONPATH", None) - clean_env["PYTHONUTF8"] = "1" - proc = subprocess.Popen( - [py, "-c", "import sys; print(sys.executable)"], - stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL, - text=True, encoding="utf-8", env=clean_env, creationflags=subprocess.CREATE_NO_WINDOW - ) - out, _err = proc.communicate(timeout=3) - if out and os.path.exists(out.strip()): candidates.append(out.strip()) - except: pass - - try: - for hive in (winreg.HKEY_CURRENT_USER, winreg.HKEY_LOCAL_MACHINE): - try: - with winreg.OpenKey(hive, r"SOFTWARE\Python\PythonCore") as core_key: - for i in range(winreg.QueryInfoKey(core_key)[0]): - sub = winreg.EnumKey(core_key, i) - try: - with winreg.OpenKey(core_key, rf"{sub}\InstallPath") as pkey: - path = winreg.QueryValueEx(pkey, "")[0] - exe = os.path.join(path, "python.exe") - if os.path.exists(exe): candidates.append(exe) - except: pass - except: pass - except: pass - - search_paths = [ - os.environ.get("LOCALAPPDATA", "") + r"\Programs\Python", - os.environ.get("PROGRAMFILES", "") + r"\Python", - os.environ.get("PROGRAMFILES(X86)", "") + r"\Python", - r"C:\Python", r"C:\Program Files\Python", r"C:\Program Files (x86)\Python" - ] - for base in search_paths: - if base and os.path.exists(base): - try: - for d in os.listdir(base): - if d.lower().startswith("python"): - exe = os.path.join(base, d, "python.exe") - if os.path.exists(exe): candidates.append(exe) - except: pass - - user_profile = os.environ.get("USERPROFILE", "") - if user_profile: - for c_dir in ("miniconda3", "anaconda3", "Miniconda3", "Anaconda3"): - for base in (user_profile, "C:\\", "D:\\"): - exe = os.path.join(base, c_dir, "python.exe") - if os.path.exists(exe): candidates.append(exe) - else: - unix_bases = [ - "/usr/bin", "/usr/local/bin", "/opt/homebrew/bin", - "/Library/Frameworks/Python.framework/Versions/Current/bin", - os.path.expanduser("~/.pyenv/shims"), os.path.expanduser("~/.local/bin") - ] - user_profile = os.environ.get("HOME", "") or os.environ.get("USERPROFILE", "") - if user_profile: - for c_dir in ("miniconda3", "anaconda3", "mambaforge", ".conda"): - base_dir = os.path.join(user_profile, c_dir) - if os.path.exists(base_dir): - exe = os.path.join(base_dir, "bin", "python") - if os.path.exists(exe): unix_bases.append(os.path.join(base_dir, "bin")) - envs_dir = os.path.join(base_dir, "envs") - if os.path.exists(envs_dir): - try: - for env in os.listdir(envs_dir): - p_bin = os.path.join(envs_dir, env, "bin") - if os.path.exists(p_bin): unix_bases.append(p_bin) - except: pass - - for base in unix_bases: - if os.path.exists(base): - try: - for f in os.listdir(base): - if f.startswith("python3") or f == "python": - exe = os.path.join(base, f) - if os.path.isfile(exe) and os.access(exe, os.X_OK): candidates.append(exe) - except: pass - - seen = set() - unique_candidates = [] - for cand in candidates: - cand = os.path.normpath(cand) - if cand not in seen: - seen.add(cand) - unique_candidates.append(cand) - - for cand in unique_candidates: - if not os.path.exists(cand): continue - if os.name == 'nt' and "WindowsApps" in cand: - try: - if os.path.getsize(cand) == 0: continue - except: continue - - clean_env = os.environ.copy() - clean_env.pop("PYTHONHOME", None) - clean_env.pop("PYTHONPATH", None) - - try: - kwargs = {"stdout": subprocess.PIPE, "stderr": subprocess.PIPE, "text": True, "encoding": "utf-8", "env": clean_env, "timeout": 3} - if os.name == 'nt': kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW - proc = subprocess.run([cand, "-V"], **kwargs) - if proc.returncode == 0: return cand - except: continue - - return "python" - def get_python_executable(): try: config = load_config() @@ -1128,16 +1340,21 @@ def get_free_ram_gb(): except Exception: pass elif sys.platform == 'darwin': try: - out = subprocess.check_output(["sysctl", "-n", "hw.memsize"], text=True) - return int(out.strip()) / (1024 ** 3) - except Exception: pass - else: - try: - with open('/proc/meminfo', 'r') as f: - for line in f: - if line.startswith('MemAvailable:'): - kb = int(line.split()[1]) - return kb / (1024 ** 2) + out = subprocess.check_output(["vm_stat"], text=True, errors="ignore") + pages_free = 0 + pages_inactive = 0 + page_size = 16384 + for line in out.splitlines(): + if "page size of" in line: + m = re.search(r'(\d+)', line) + if m: page_size = int(m.group(1)) + elif "Pages free" in line: + m = re.search(r'(\d+)', line) + if m: pages_free = int(m.group(1)) + elif "Pages inactive" in line: + m = re.search(r'(\d+)', line) + if m: pages_inactive = int(m.group(1)) + return ((pages_free + pages_inactive) * page_size) / (1024 ** 3) except Exception: pass return 8.0 @@ -1607,6 +1824,13 @@ class PythonScannerThread(QThread): valid_pythons = {} def check_candidate(cand): + if getattr(sys, 'frozen', False) or '__compiled__' in globals(): + try: + if os.path.samefile(cand, sys.executable): + return None + except Exception: + pass + if os.name == 'nt' and "WindowsApps" in cand: try: if os.path.getsize(cand) == 0: return None @@ -1617,7 +1841,7 @@ class PythonScannerThread(QThread): clean_env.pop("PYTHONPATH", None) clean_env["PYTHONUTF8"] = "1" clean_env["PYTHONIOENCODING"] = "utf-8" - kwargs = {"stdout": subprocess.PIPE, "stderr": subprocess.PIPE, "text": True, "encoding": "utf-8", "env": clean_env, "timeout": 2} + kwargs = {"stdout": subprocess.PIPE, "stderr": subprocess.PIPE, "text": True, "encoding": "utf-8", "errors": "ignore", "env": clean_env, "timeout": 2} if os.name == 'nt': kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW proc = subprocess.run([cand, "-c", "import sys; print(sys.version.split()[0])"], **kwargs) if proc.returncode == 0: @@ -1651,6 +1875,10 @@ class SettingsPanel(QWidget): QCheckBox::indicator { width: 16px; height: 16px; border: 1px solid #d1d5db; border-radius: 4px; background: #ffffff; } QCheckBox::indicator:hover { border-color: #2563eb; } QCheckBox::indicator:checked { background: #2563eb; border-color: #2563eb; } + QRadioButton { font-size: 13px; color: #1f2937; spacing: 8px; background: transparent; } + QRadioButton::indicator { width: 16px; height: 16px; border: 1px solid #d1d5db; border-radius: 8px; background: #ffffff; } + QRadioButton::indicator:hover { border-color: #2563eb; } + QRadioButton::indicator:checked { background: #2563eb; border-color: #2563eb; } QFrame#SettingCard { background-color: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; } QFrame#SettingCard:hover { border-color: #cbd5e1; } QPushButton.ToolBtn { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; padding: 6px 12px; color: #374151; font-weight: 600; font-size: 12px; min-width: 68px; } @@ -1716,6 +1944,10 @@ class SettingsPanel(QWidget): scroll.setWidget(content) return scroll, content, lay + def on_mode_type_changed(self): + is_folder = self.rb_onedir.isChecked() + self.contents_dir_container.setVisible(is_folder) + def _get_url_from_combo(self, combo): idx = combo.currentIndex() if idx >= 0 and combo.currentText() == combo.itemText(idx): @@ -1723,7 +1955,11 @@ class SettingsPanel(QWidget): if data: return data text = combo.currentText().strip() m = re.search(r'https?://[^\s]+', text) - return m.group(0) if m else text + if m: + return m.group(0).rstrip('/') + if not text.startswith(('http://', 'https://')): + return '' + return text def _set_combo_value(self, combo, url_val): url_val = (url_val or '').strip() @@ -1866,6 +2102,11 @@ class SettingsPanel(QWidget): self.btn_python_path = QPushButton(_("Browse")) self.btn_python_path.setProperty("class", "ToolBtn") self.btn_python_path.clicked.connect(self.select_python_path) + + self.btn_download_py = QPushButton(_("View Python")) + self.btn_download_py.setProperty("class", "ToolBtn") + self.btn_download_py.setToolTip("") + self.btn_download_py.clicked.connect(self.on_download_python_clicked) py_cont = QWidget() lay_py = QVBoxLayout(py_cont) @@ -1876,6 +2117,7 @@ class SettingsPanel(QWidget): h_py_input.setContentsMargins(0, 0, 0, 0) h_py_input.addWidget(self.python_path_combo, 1) h_py_input.addWidget(self.btn_python_path) + h_py_input.addWidget(self.btn_download_py) lay_py.addLayout(h_py_input) lay_py.addWidget(self.python_desc_lbl) @@ -1912,13 +2154,35 @@ class SettingsPanel(QWidget): c_lay_engine.addLayout(self.form_engine) self.card_mode, c_lay_mode = self._create_card(_("Execution Mode")) - h_mode = QHBoxLayout() - self.onefile_check = QCheckBox(_("One-File Mode (--onefile)")) + v_mode = QVBoxLayout() + h_radio = QHBoxLayout() + + self.rb_onefile = QRadioButton(_("One-File Mode (--onefile)")) + self.rb_onedir = QRadioButton(_("Folder Mode (--onedir)")) self.noconsole_check = QCheckBox(_("Hide Console (--noconsole)")) - h_mode.addWidget(self.onefile_check) - h_mode.addWidget(self.noconsole_check) - h_mode.addStretch() - c_lay_mode.addLayout(h_mode) + + h_radio.addWidget(self.rb_onefile) + h_radio.addWidget(self.rb_onedir) + h_radio.addStretch() + h_radio.addWidget(self.noconsole_check) + + self.lbl_contents_dir = QLabel(_("Contents Directory (--contents-directory):")) + self.contents_dir_edit = QLineEdit("_internal") + self.contents_dir_edit.setPlaceholderText(_("Internal directory name for dependencies (default: _internal)")) + + self.contents_dir_container = QWidget() + h_contents = QHBoxLayout(self.contents_dir_container) + h_contents.setContentsMargins(0, 5, 0, 0) + h_contents.addWidget(self.lbl_contents_dir) + h_contents.addWidget(self.contents_dir_edit, 1) + self.contents_dir_container.setVisible(False) + + self.rb_onefile.toggled.connect(self.on_mode_type_changed) + self.rb_onedir.toggled.connect(self.on_mode_type_changed) + + v_mode.addLayout(h_radio) + v_mode.addWidget(self.contents_dir_container) + c_lay_mode.addLayout(v_mode) lay_sub1.addWidget(self.card_engine) lay_sub1.addWidget(self.card_mode) @@ -1991,7 +2255,7 @@ class SettingsPanel(QWidget): self.venv_check = QCheckBox(_("Use Virtual Environment (Recommended)")) self.reqs_check = QCheckBox(_("Install requirements.txt")) - self.pipreqs_check = QCheckBox(_("Analyze Dependencies (pipreqs)")) + self.pipreqs_check = QCheckBox(_("Analyze Dependencies (AST)")) self.pipreqs_dir_check = QCheckBox(_("Scan Entire Folder")) g_dep.addWidget(self.venv_check, 0, 0) @@ -2097,15 +2361,12 @@ class SettingsPanel(QWidget): self.pyi_ver_edit = QLineEdit() self.nuitka_ver_edit = QLineEdit() - self.pipreqs_ver_edit = QLineEdit() self.lbl_pyi_ver = QLabel(_("PyInstaller Version:")) self.lbl_nuitka_ver = QLabel(_("Nuitka Version:")) - self.lbl_pipreqs_ver = QLabel(_("Pipreqs Version:")) self.form_ver.addRow(self.lbl_pyi_ver, self.pyi_ver_edit) self.form_ver.addRow(self.lbl_nuitka_ver, self.nuitka_ver_edit) - self.form_ver.addRow(self.lbl_pipreqs_ver, self.pipreqs_ver_edit) c_lay_ver.addLayout(self.form_ver) lay_sub4.addWidget(self.card_opt) @@ -2117,6 +2378,9 @@ class SettingsPanel(QWidget): self.mapping_table.setItemDelegate(TableItemDelegate(self.mapping_table)) self.mapping_table.setColumnCount(2) self.mapping_table.setHorizontalHeaderLabels([_("Import Name"), _("PyPI Package Name")]) + + self.mapping_table.verticalHeader().setVisible(False) + self.mapping_table.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch) self.mapping_table.setSelectionBehavior(QTableWidget.SelectionBehavior.SelectRows) self.mapping_table.setMinimumHeight(150) @@ -2167,8 +2431,8 @@ class SettingsPanel(QWidget): self.form_meta.setSpacing(15) self.ver_ver = QLineEdit("1.0.0") - self.ver_comp = QLineEdit("My Studio") - self.ver_desc = QLineEdit("Python Executable") + self.ver_comp = QLineEdit(_("My Studio")) + self.ver_desc = QLineEdit(_("Python Executable")) self.lbl_ver_title = QLabel(_("Version:")) self.lbl_company_title = QLabel(_("Author/Company:")) @@ -2257,7 +2521,8 @@ class SettingsPanel(QWidget): def build_about_tab(self): main_lay = self.lay_about - main_lay.setContentsMargins(40, 20, 40, 20) + # 缩小上下边距,节省垂直空间,避免出现滚动条 + main_lay.setContentsMargins(40, 10, 40, 10) main_lay.setSpacing(15) main_lay.addStretch(1) @@ -2266,32 +2531,46 @@ class SettingsPanel(QWidget): if os.path.exists(icon_path): high_res_pixmap = QIcon(icon_path).pixmap(256, 256) if not high_res_pixmap.isNull(): - logo_pixmap = high_res_pixmap.scaled(110, 110, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation) + logo_pixmap = high_res_pixmap.scaled(96, 96, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation) logo_lbl.setPixmap(logo_pixmap) else: - logo_lbl.setPixmap(get_svg_pixmap('package', color="#1A73E8", size=110)) + logo_lbl.setPixmap(get_svg_pixmap('package', color="#1A73E8", size=96)) else: - logo_lbl.setPixmap(get_svg_pixmap('package', color="#1A73E8", size=110)) + logo_lbl.setPixmap(get_svg_pixmap('package', color="#1A73E8", size=96)) logo_lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) main_lay.addWidget(logo_lbl) - title_lbl = QLabel(__app_name__) - title_lbl.setStyleSheet("font-size: 36px; font-weight: 900; color: #202124; letter-spacing: -1px; margin-top: 10px;") - title_lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) - main_lay.addWidget(title_lbl) + # 顶部文字块布局 + text_vlay = QVBoxLayout() + # 1. 缩小全局基础间距,让“标题”和“一句话标语”紧密贴合 + text_vlay.setSpacing(6) + text_vlay.setAlignment(Qt.AlignmentFlag.AlignCenter) - ver_lbl = QLabel(f"Version {__version__} · GPL-3.0") - ver_lbl.setStyleSheet("font-size: 14px; font-weight: bold; color: #1A73E8; margin-bottom: 5px;") - ver_lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) - main_lay.addWidget(ver_lbl) + title_lbl = QLabel(__app_name__) + title_lbl.setStyleSheet("font-size: 32px; font-weight: 900; color: #202124; letter-spacing: -1px;") + title_lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) + text_vlay.addWidget(title_lbl) self.about_desc_lbl = QLabel(_("Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka")) - self.about_desc_lbl.setStyleSheet("font-size: 14px; color: #5f6368;") + self.about_desc_lbl.setStyleSheet("font-size: 14px; color: #3c4043;") self.about_desc_lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) - main_lay.addWidget(self.about_desc_lbl) - main_lay.addSpacing(25) + text_vlay.addWidget(self.about_desc_lbl) + # 2. 在标语和版权之间额外插入一点空隙,巧妙地拉开层次感 + text_vlay.addSpacing(6) + + current_year = time.localtime().tm_year + year_str = f"2024-{current_year}" if current_year > 2024 else "2024" + ver_lbl = QLabel(f"Version {__version__} · GPL-3.0 · Copyright © {year_str} {__author__}") + ver_lbl.setStyleSheet("font-size: 12px; color: #8b929a; font-weight: bold;") + ver_lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) + text_vlay.addWidget(ver_lbl) + + main_lay.addLayout(text_vlay) + # 3. 将整个文字块与下方四个按钮的距离适当拉大,增加呼吸感 + main_lay.addSpacing(25) + btn_lay = QHBoxLayout() btn_lay.setSpacing(12) btn_lay.setAlignment(Qt.AlignmentFlag.AlignCenter) @@ -2322,49 +2601,42 @@ class SettingsPanel(QWidget): p_github = "M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.603-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.831.092-.646.35-1.086.636-1.336-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0112 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.747-1.025 2.747-1.025.546 1.379.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.161 22 16.416 22 12c0-5.523-4.477-10-10-10z" p_issue = "M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z" - p_pypi = "M12.06,1.48c-3.14,0-3.52,0.67-3.52,0.67l-0.01,2.44h3.63v0.52H7.43C5.12,5.11,4.5,6.58,4.5,8.81c0,2.34,0.38,3.48,2.3,3.48 h1.14v-1.62c0-1.48,1.23-2.65,2.7-2.65h3.69c1.47,0,2.66-1.19,2.66-2.65V3.88C16.99,1.83,14.67,1.48,12.06,1.48z M10.22,2.83 c0.41,0,0.73,0.33,0.73,0.74c0,0.41-0.33,0.74-0.73,0.74c-0.4,0-0.73-0.33-0.73-0.74C9.49,3.16,9.82,2.83,10.22,2.83z M16.71,9.89 v1.62c0,1.48-1.23,2.65-2.7,2.65H10.3c-1.47,0-2.66,1.19-2.66,2.65v1.49c0,2.05,2.32,2.41,4.92,2.41c3.14,0,3.52-0.67,3.52-0.67 l0.01-2.44h-3.63v-0.52h4.73c2.31,0,2.93-1.47,2.93-3.7c0-2.34-0.38-3.48-2.3-3.48H16.71z M13.88,18.96c0.41,0,0.73,0.33,0.73,0.74c0,0.41-0.33,0.74-0.73,0.74c-0.4,0-0.73-0.33-0.73-0.74C13.15,19.29,13.48,18.96,13.88,18.96z" + p_pypi = "M12.06,1.48c-3.14,0-3.52,0.67-3.52,0.67l-0.01,2.44h3.63v0.52H7.43C5.12,5.11,4.5,6.58,4.5,8.81c0,2.34,0.38,3.48,2.3,3.48 h1.14v-1.62c0-1.48,1.23-2.65,2.7-2.65h3.69c1.47,0,2.66-1.19,2.66-2.65V3.88C16.99,1.83,14.67,1.48,12.06,1.48z M10.22,2.83 c0.41,0,0.73,0.33,0.73,0.74c0,0.41-0.33,0.74-0.73,0.74C9.49,3.16,9.82,2.83,10.22,2.83z M16.71,9.89 v1.62c0,1.48-1.23,2.65-2.7,2.65H10.3c-1.47,0-2.66,1.19-2.66,2.65v1.49c0,2.05,2.32,2.41,4.92,2.41c3.14,0,3.52-0.67,3.52-0.67 l0.01-2.44h-3.63v-0.52h4.73c2.31,0,2.93-1.47,2.93-3.7c0-2.34-0.38-3.48-2.3-3.48H16.71z M13.88,18.96c0.41,0,0.73,0.33,0.73,0.74c0,0.41-0.33,0.74-0.73,0.74c-0.4,0-0.73-0.33-0.73-0.74C13.15,19.29,13.48,18.96,13.88,18.96z" p_heart = "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" - btn_github = create_link_btn(_("GitHub Repository"), "https://github.com/qwejay/QPyPack", p_github, "#24292e", "#f1f3f4", "#e8eaed", "#dadce0") - btn_issue = create_link_btn(_("Issues & Feedback"), "https://github.com/qwejay/QPyPack/issues", p_issue, "#d93025", "#f1f3f4", "#e8eaed", "#dadce0") - btn_pypi = create_link_btn(_("PyPI Home"), "https://pypi.org/project/qpypack/", p_pypi, "#1A73E8", "#f1f3f4", "#e8eaed", "#dadce0") + self.btn_github = create_link_btn(_("GitHub Repository"), "https://github.com/qwejay/QPyPack", p_github, "#24292e", "#f1f3f4", "#e8eaed", "#dadce0") + self.btn_issue = create_link_btn(_("Issues & Feedback"), "https://github.com/qwejay/QPyPack/issues", p_issue, "#d93025", "#f1f3f4", "#e8eaed", "#dadce0") + self.btn_pypi = create_link_btn(_("PyPI Home"), "https://pypi.org/project/qpypack/", p_pypi, "#1A73E8", "#f1f3f4", "#e8eaed", "#dadce0") - btn_sponsor = create_link_btn(_("Sponsor"), "https://www.ifdian.net/a/qwejay", p_heart, "#d93025", "#fce8e6", "#fad2cf", "#f6aea9") - btn_sponsor.setStyleSheet(btn_sponsor.styleSheet().replace("color: #3c4043;", "color: #d93025;")) + self.btn_sponsor = create_link_btn(_("Sponsor"), "https://www.ifdian.net/a/qwejay", p_heart, "#d93025", "#fce8e6", "#fad2cf", "#f6aea9") + self.btn_sponsor.setStyleSheet(self.btn_sponsor.styleSheet().replace("color: #3c4043;", "color: #d93025;")) - btn_lay.addWidget(btn_github) - btn_lay.addWidget(btn_issue) - btn_lay.addWidget(btn_pypi) - btn_lay.addWidget(btn_sponsor) + btn_lay.addWidget(self.btn_github) + btn_lay.addWidget(self.btn_issue) + btn_lay.addWidget(self.btn_pypi) + btn_lay.addWidget(self.btn_sponsor) main_lay.addLayout(btn_lay) main_lay.addSpacing(20) - self.sponsor_desc = QLabel() - self.sponsor_desc.setWordWrap(True) - self.sponsor_desc.setAlignment(Qt.AlignmentFlag.AlignCenter) + sponsor_vlay = QVBoxLayout() + sponsor_vlay.setSpacing(12) - text_p1 = _("QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!") - text_p2 = _("* Sponsorship is completely voluntary, serves as an unconditional encouragement to the open-source community, and involves no commercial commitments. Thank you for your support!") + self.sponsor_desc_p1 = QLabel(_("QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!")) + self.sponsor_desc_p1.setWordWrap(True) + self.sponsor_desc_p1.setStyleSheet("font-size: 12px; color: #5f6368;") + self.sponsor_desc_p1.setAlignment(Qt.AlignmentFlag.AlignCenter) + sponsor_vlay.addWidget(self.sponsor_desc_p1) - self.sponsor_desc.setText( - f"
" - f"

" - f" {text_p1}" - f"

" - f"

" - f" {text_p2}" - f"

" - f"
" - ) - main_lay.addWidget(self.sponsor_desc) + self.sponsor_desc_p2 = QLabel(_("* Sponsorship is completely voluntary, serves as an unconditional encouragement to the open-source community, and involves no commercial commitments. Thank you for your support!")) + self.sponsor_desc_p2.setWordWrap(True) + self.sponsor_desc_p2.setStyleSheet("font-size: 11px; color: #9aa0a6;") + self.sponsor_desc_p2.setAlignment(Qt.AlignmentFlag.AlignCenter) + sponsor_vlay.addWidget(self.sponsor_desc_p2) + + main_lay.addLayout(sponsor_vlay) + main_lay.addStretch(1) - main_lay.addStretch(1) - - rights_lbl = QLabel(f"Copyright © {__company__}.") - rights_lbl.setStyleSheet("font-size: 12px; color: #bdc1c6; font-weight: bold;") - rights_lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) - main_lay.addWidget(rights_lbl) def retranslate_ui(self): self.tabs.setTabText(0, _("Build Settings")) @@ -2402,7 +2674,6 @@ class SettingsPanel(QWidget): self.lbl_upx_path.setText(_("UPX Path:")) self.lbl_pyi_ver.setText(_("PyInstaller Version:")) self.lbl_nuitka_ver.setText(_("Nuitka Version:")) - self.lbl_pipreqs_ver.setText(_("Pipreqs Version:")) self.lbl_lang_title.setText(_("UI Language:")) self.lbl_ver_title.setText(_("Version:")) self.lbl_company_title.setText(_("Author/Company:")) @@ -2436,6 +2707,8 @@ class SettingsPanel(QWidget): self.btn_save.setText(_("Save & Return")) self.btn_python_path.setText(_("Browse")) + self.btn_download_py.setText(_("View Python")) + self.btn_download_py.setToolTip("") self.btn_icon.setText(_("Browse")) self.btn_reqs.setText(_("Browse")) self.btn_scan.setText(_("AST Scan")) @@ -2459,11 +2732,14 @@ class SettingsPanel(QWidget): self.exclude_edit.setPlaceholderText(_("Comma separated (e.g. tkinter, matplotlib)")) self.upx_path_edit.setPlaceholderText(_("Leave blank to auto-detect from environment variables")) - self.onefile_check.setText(_("One-File Mode (--onefile)")) + self.rb_onefile.setText(_("One-File Mode (--onefile)")) + self.rb_onedir.setText(_("Folder Mode (--onedir)")) + self.lbl_contents_dir.setText(_("Contents Directory (--contents-directory):")) + self.contents_dir_edit.setPlaceholderText(_("Internal directory name for dependencies (default: _internal)")) self.noconsole_check.setText(_("Hide Console (--noconsole)")) self.venv_check.setText(_("Use Virtual Environment (Recommended)")) self.reqs_check.setText(_("Install requirements.txt")) - self.pipreqs_check.setText(_("Analyze Dependencies (pipreqs)")) + self.pipreqs_check.setText(_("Analyze Dependencies (AST)")) self.pipreqs_dir_check.setText(_("Scan Entire Folder")) self.upx_check.setText(_("Enable UPX Compression")) self.lite_mode_check.setText(_("Lite Mode (Exclude Dev/Test Dependencies)")) @@ -2479,15 +2755,9 @@ class SettingsPanel(QWidget): self.mapping_table.setHorizontalHeaderLabels([_("Import Name"), _("PyPI Package Name")]) self.about_desc_lbl.setText(_("Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka")) - text_p1 = _("QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!") - text_p2 = _("* Sponsorship is completely voluntary, serves as an unconditional encouragement to the open-source community, and involves no commercial commitments. Thank you for your support!") - self.sponsor_desc.setText( - f"
" - f"

{text_p1}

" - f"

{text_p2}

" - f"
" - ) - + if hasattr(self, 'sponsor_desc_p1'): + self.sponsor_desc_p1.setText(_("QPyPack is a free and open-source tool. If it has improved your efficiency or solved packaging problems, consider buying the author a coffee!")) + self.sponsor_desc_p2.setText(_("* Sponsorship is completely voluntary, serves as an unconditional encouragement to the open-source community, and involves no commercial commitments. Thank you for your support!")) self.btn_reset.setToolTip(_("Reset to Default Config")) self.btn_back.setToolTip(_("Cancel & Return")) @@ -2495,6 +2765,13 @@ class SettingsPanel(QWidget): self.lbl_res_hint.setText(_("Project-specific. Not saved to global preferences. Use 'Export Preset' to save config.")) self.add_data_list.setToolTip(_("Double-click to edit target path; Drag & drop supported. Use 'Export Preset' to save for reuse.")) self.lite_mode_check.setToolTip(_("Dynamically exclude redundant dependencies in build environment, improving speed and reducing size.")) + + if hasattr(self, 'btn_github'): + self.btn_github.setText(" " + _("GitHub Repository")) + self.btn_issue.setText(" " + _("Issues & Feedback")) + self.btn_pypi.setText(" " + _("PyPI Home")) + self.btn_sponsor.setText(" " + _("Sponsor")) + self.on_engine_changed() self.on_python_path_changed() @@ -2541,15 +2818,20 @@ class SettingsPanel(QWidget): self.mapping_table.setItem(row, 1, QTableWidgetItem(pypi_name)) def add_mapping_item(self): - imp_name, ok1 = QInputDialog.getText(self, _("Add Mapping"), _("Import name (e.g. cv2):")) - if not ok1 or not imp_name.strip(): return - pypi_name, ok2 = QInputDialog.getText(self, _("Add Mapping"), _("PyPI package name for [{imp_name}]:", imp_name=imp_name.strip())) - if not ok2 or not pypi_name.strip(): return + dlg1 = CustomInputDialog(self, _("Add Mapping"), _("Import name (e.g. cv2):")) + if dlg1.exec() != QDialog.DialogCode.Accepted: return + imp_name = dlg1.get_text().strip() + if not imp_name: return + + dlg2 = CustomInputDialog(self, _("Add Mapping"), _("PyPI package name for [{imp_name}]:", imp_name=imp_name), imp_name) + if dlg2.exec() != QDialog.DialogCode.Accepted: return + pypi_name = dlg2.get_text().strip() + if not pypi_name: return row = self.mapping_table.rowCount() self.mapping_table.insertRow(row) - self.mapping_table.setItem(row, 0, QTableWidgetItem(imp_name.strip())) - self.mapping_table.setItem(row, 1, QTableWidgetItem(pypi_name.strip())) + self.mapping_table.setItem(row, 0, QTableWidgetItem(imp_name)) + self.mapping_table.setItem(row, 1, QTableWidgetItem(pypi_name)) def delete_mapping_item(self): rows = set(item.row() for item in self.mapping_table.selectedItems()) @@ -2566,8 +2848,8 @@ class SettingsPanel(QWidget): try: data = { "engine": self.engine_combo.currentText(), - "onefile": self.onefile_check.isChecked(), - "noconsole": self.noconsole_check.isChecked(), + "onefile": self.rb_onefile.isChecked(), + "contents_dir": self.contents_dir_edit.text().strip(), "icon": self.icon_edit.text(), "app_name": self.name_edit.text(), "ver_ver": self.ver_ver.text(), @@ -2598,7 +2880,14 @@ class SettingsPanel(QWidget): try: data = json.loads(Path(fp).read_text(encoding='utf-8')) if "engine" in data: self.engine_combo.setCurrentText(data["engine"]) - if "onefile" in data: self.onefile_check.setChecked(bool(data["onefile"])) + if "onefile" in data: + if data["onefile"]: + self.rb_onefile.setChecked(True) + else: + self.rb_onedir.setChecked(True) + if "contents_dir" in data: + self.contents_dir_edit.setText(data["contents_dir"]) + self.on_mode_type_changed() if "noconsole" in data: self.noconsole_check.setChecked(bool(data["noconsole"])) if "icon" in data: self.icon_edit.setText(data["icon"]) if "app_name" in data: self.name_edit.setText(data["app_name"]) @@ -2636,7 +2925,13 @@ class SettingsPanel(QWidget): self.lang_combo.setCurrentIndex(i); break self.engine_combo.setCurrentText(s.get('engine', 'PyInstaller')) - self.onefile_check.setChecked(s.getboolean('onefile', True)) + is_onefile = s.getboolean('onefile', True) + if is_onefile: + self.rb_onefile.setChecked(True) + else: + self.rb_onedir.setChecked(True) + self.contents_dir_edit.setText(s.get('contents_dir', '_internal')) + self.on_mode_type_changed() self.noconsole_check.setChecked(s.getboolean('noconsole', True)) self.clean_all_check.setChecked(s.getboolean('clean_all', True)) self.auto_icon_check.setChecked(s.getboolean('auto_icon', True)) @@ -2670,9 +2965,8 @@ class SettingsPanel(QWidget): self.auto_save_log_check.setChecked(s.getboolean('auto_save_log', False)) self.lite_mode_check.setChecked(s.getboolean('lite_mode', False)) - self.pyi_ver_edit.setText(s.get('pyi_version', '')) - self.nuitka_ver_edit.setText(s.get('nuitka_version', '')) - self.pipreqs_ver_edit.setText(s.get('pipreqs_version', '')) + self.pyi_ver_edit.setText(s.get('pyi_version', '6.21.0')) + self.nuitka_ver_edit.setText(s.get('nuitka_version', '4.1.3')) self.add_data_list.clear() @@ -2689,7 +2983,8 @@ class SettingsPanel(QWidget): s['language'] = new_lang s['engine'] = self.engine_combo.currentText() - s['onefile'] = str(self.onefile_check.isChecked()) + s['onefile'] = str(self.rb_onefile.isChecked()) + s['contents_dir'] = self.contents_dir_edit.text().strip() or '_internal' s['noconsole'] = str(self.noconsole_check.isChecked()) s['clean_all'] = str(self.clean_all_check.isChecked()) s['auto_icon'] = str(self.auto_icon_check.isChecked()) @@ -2721,9 +3016,7 @@ class SettingsPanel(QWidget): s['pyi_version'] = self.pyi_ver_edit.text().strip() s['nuitka_version'] = self.nuitka_ver_edit.text().strip() - s['pipreqs_version'] = self.pipreqs_ver_edit.text().strip() - res_list = [] s['add_data_list'] = '' config['Mappings'] = {} @@ -2737,24 +3030,18 @@ class SettingsPanel(QWidget): def _check_pip_mirrors(self): sender = self.sender() - src_text = self.pip_source_combo.currentText() - bak_text = self.pip_backup_combo.currentText() + src_url = self._get_url_from_combo(self.pip_source_combo) + bak_url = self._get_url_from_combo(self.pip_backup_combo) - if src_text == bak_text and src_text.strip() != "": - if sender == self.pip_source_combo: - for i in range(self.pip_backup_combo.count()): - if self.pip_backup_combo.itemText(i) != src_text: - self.pip_backup_combo.blockSignals(True) - self.pip_backup_combo.setCurrentIndex(i) - self.pip_backup_combo.blockSignals(False) - break - elif sender == self.pip_backup_combo: - for i in range(self.pip_source_combo.count()): - if self.pip_source_combo.itemText(i) != bak_text: - self.pip_source_combo.blockSignals(True) - self.pip_source_combo.setCurrentIndex(i) - self.pip_source_combo.blockSignals(False) - break + if src_url and bak_url and src_url.rstrip('/') == bak_url.rstrip('/'): + target_combo = self.pip_backup_combo if sender == self.pip_source_combo else self.pip_source_combo + for i in range(target_combo.count()): + item_url = target_combo.itemData(i) or target_combo.itemText(i) + if item_url and item_url.rstrip('/') != src_url.rstrip('/'): + target_combo.blockSignals(True) + target_combo.setCurrentIndex(i) + target_combo.blockSignals(False) + break def on_engine_changed(self): engine = self.engine_combo.currentText() @@ -2784,33 +3071,16 @@ class SettingsPanel(QWidget): major, minor = parts[0], parts[1] if (major, minor) <= (3, 8): - self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility', ver=ver_str)) + self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility', ver=ver_str)) elif (major, minor) <= (3, 10): - self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux', ver=ver_str)) + self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux', ver=ver_str)) else: - self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler', ver=ver_str)) + self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler', ver=ver_str)) return except Exception: pass - self.python_desc_lbl.setText(_('
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...')) - - if ver_str: - try: - parts = [int(x) for x in ver_str.split('.')] - major, minor = parts[0], parts[1] - - if (major, minor) <= (3, 8): - self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:Download Python
✔ Windows 7    ✔ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux
Legacy OS Full backward compatibility', ver=ver_str)) - elif (major, minor) <= (3, 10): - self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✔ Windows 8.1    ✔ Windows 10 / 11    ✔ macOS 10.9+    ✔ Linux', ver=ver_str)) - else: - self.python_desc_lbl.setText(_('
Python {ver} Platform Matrix:Download Python
✖ Windows 7    ✖ Windows 8 / 8.1    ✔ Windows 10 / 11    ✔ macOS 10.13+    ✔ Linux
Nuitka Auto-detecting and managing C backend compiler', ver=ver_str)) - return - except Exception: - pass - - self.python_desc_lbl.setText(_('
Python InterpreterDownload Python
Auto-detecting system environment for Windows, macOS & Linux...')) + self.python_desc_lbl.setText(_('
Python Interpreter
Auto-detecting system environment for Windows, macOS & Linux...')) def on_upx_toggled(self, checked): if getattr(self, 'upx_path_container', None) is not None: @@ -2838,6 +3108,10 @@ class SettingsPanel(QWidget): f, _filter = QFileDialog.getOpenFileName(self, _("Python Interpreter:"), "", exe_filter) if f: self.python_path_combo.setCurrentText(Path(f).resolve().as_posix()) + def on_download_python_clicked(self): + if hasattr(self, 'parent_win') and hasattr(self.parent_win, "_trigger_python_download_dialog"): + self.parent_win._trigger_python_download_dialog(is_missing_mode=False) + def update_icon_preview(self, path): if path and Path(path).exists(): pixmap = QPixmap(path) @@ -2860,8 +3134,7 @@ class SettingsPanel(QWidget): return self.parent_win.show_error_log(_("[ERROR] Target file is locked or encrypted by cloud drive. Please decrypt and try again.")) try: - python_exe = get_python_executable() - hidden = extract_imports_via_ast(script_path, python_exe) + hidden = extract_project_imports_via_ast(Path(script_path), False) hidden = [m for m in hidden if m not in STD_LIBS] self.hidden_edit.setText(','.join(hidden)) self.parent_win.show_notification(_("AST scan completed, found {count} dependencies.", count=len(hidden))) @@ -2900,9 +3173,10 @@ class SettingsPanel(QWidget): if not item: item = self.add_data_list.currentItem() if not item: return r_type, src, dst = item.data(Qt.ItemDataRole.UserRole) - new_dst, ok = QInputDialog.getText(self, _("Edit Path"), _("Target relative path:"), text=dst) - if ok and new_dst: - new_dst = new_dst.strip().replace('\\', '/') + + dlg = CustomInputDialog(self, _("Edit Path"), _("Target relative path:"), text=dst) + if dlg.exec() == QDialog.DialogCode.Accepted: + new_dst = dlg.get_text().strip().replace('\\', '/') if not new_dst: new_dst = "." item.setData(Qt.ItemDataRole.UserRole, (r_type, src, new_dst)) tag = _("File") if r_type == 'file' else _("Directory") @@ -2916,28 +3190,60 @@ class SettingsPanel(QWidget): self.add_data_list.clear() def reset_global_config(self): - reply = QMessageBox.question(self, _("Reset to Default Config"), - _("Are you sure you want to reset all preferences to default?"), - QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No) - if reply == QMessageBox.StandardButton.Yes: + msg_box = QMessageBox(self) + msg_box.setWindowTitle(_("Reset to Default Config")) + msg_box.setText(_( + "Are you sure you want to reset all preferences?
" + "" + "All settings will be restored to default state." + "" + )) + msg_box.setIcon(QMessageBox.Icon.Warning) + + btn_confirm = msg_box.addButton(_("Reset"), QMessageBox.ButtonRole.AcceptRole) + btn_cancel = msg_box.addButton(_("Cancel"), QMessageBox.ButtonRole.RejectRole) + + msg_box.setStyleSheet(""" + QMessageBox { background-color: #ffffff; } + QLabel { color: #111827; font-size: 13px; line-height: 1.4; } + QPushButton { + background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; + border-radius: 6px; font-size: 12px; font-weight: bold; + padding: 6px 16px; min-width: 70px; + } + QPushButton:hover { background-color: #e2e8f0; } + """) + btn_confirm.setStyleSheet(""" + QPushButton { + background-color: #D93025; color: #ffffff; border: none; + border-radius: 6px; font-size: 12px; font-weight: bold; + padding: 6px 16px; min-width: 70px; + } + QPushButton:hover { background-color: #C5221F; } + QPushButton:pressed { background-color: #A50E0E; } + """) + + msg_box.exec() + + if msg_box.clickedButton() == btn_confirm: if os.path.exists(CONFIG_FILE): try: os.remove(CONFIG_FILE) - except: pass - + except Exception: + pass + load_config() self.load_from_config() - + if hasattr(self.parent_win, "show_notification"): self.parent_win.show_notification(_("Global configuration has been reset.")) class ScriptAnalysisThread(QThread): analysis_done = Signal(str, str, str, str, set) - def __init__(self, path, python_exe=None): + def __init__(self, path): super().__init__() self.path = path - self.python_exe = python_exe or get_python_executable() def run(self): if self.isInterruptionRequested(): return @@ -2972,7 +3278,7 @@ class ScriptAnalysisThread(QThread): if self.isInterruptionRequested(): return try: - script_imports = extract_imports_via_ast(self.path, self.python_exe) + script_imports = extract_project_imports_via_ast(Path(self.path), False) except: pass if self.isInterruptionRequested(): return @@ -3018,6 +3324,12 @@ class PackingThread(QThread): clean_env["LANG"] = "en_US.UTF-8" clean_env["LC_ALL"] = "en_US.UTF-8" clean_env["PYTHONUNBUFFERED"] = "1" + clean_env["PLAYWRIGHT_BROWSERS_PATH"] = "0" + + primary_idx = self.params.get('pip_index_url', '') + if any(domain in primary_idx for domain in ['tsinghua', 'aliyun', 'tencent', 'huawei', 'ustc']) or I18N.current_lang == 'zh_CN': + clean_env["PLAYWRIGHT_DOWNLOAD_HOST"] = "https://npmmirror.com/mirrors/playwright/" + try: kwargs = {"stdout": subprocess.PIPE, "stderr": subprocess.STDOUT, "cwd": cwd, "text": True, "encoding": "utf-8", "errors": "replace", "env": clean_env} @@ -3043,7 +3355,11 @@ class PackingThread(QThread): for line in self.process.stdout: if self._is_cancelled: - self.process.terminate() + try: + if self.process: + self.process.terminate() + except Exception: + pass return False stripped = line.rstrip('\r\n') @@ -3133,6 +3449,7 @@ class PackingThread(QThread): except PermissionError: temp_file = Path(tempfile.gettempdir()) / f"_qpypack_temp_{orig_path.name}" temp_file.write_text(pause_code + code, encoding='utf-8') + os.environ["PYTHONPATH"] = orig_path.parent.as_posix() + os.pathsep + os.environ.get("PYTHONPATH", "") return temp_file, True, "" except Exception as e: @@ -3188,6 +3505,9 @@ class PackingThread(QThread): failed_packages = [] try: + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) + self.progress.emit(_("[INFO] Analyzing source code and project dependencies...")) script_path = Path(self.params['script_path']).resolve() script_dir = script_path.parent @@ -3196,10 +3516,22 @@ class PackingThread(QThread): compile(script_path.read_bytes(), script_path.name, 'exec') except SyntaxError as e: err_type = type(e).__name__ - msg = _("[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.", - file=script_path.name, type=err_type, line=e.lineno or _("Unknown"), desc=e.msg or "Invalid syntax") + msg = _( + "[Syntax Error] Source code syntax parsing failed, build aborted:\n" + " - File: {file}\n" + " - Line: Line {line}\n" + " - Detail: {desc}\n\n" + "💡 Tip: This is usually NOT a fault of the packaging tool.\n" + "Please ensure the [Build Python Version] you selected matches the version you used to [Write/Test the Code].\n" + "Using newer syntax (e.g., walrus operator :=, type unions |, match-case) in an older Python environment will trigger this error.\n" + "We recommend going to [Build Settings] -> [Engine] to switch to the correct Python version.", + file=script_path.name, type=err_type, line=e.lineno or _("Unknown"), desc=e.msg or _("Invalid syntax") + ) return self.build_finished.emit(False, msg, []) + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) + self.progress.emit(_("[INFO] Performing pre-flight environment checks...")) out_mode = int(self.params.get('out_mode', 0) or 0) @@ -3226,9 +3558,9 @@ class PackingThread(QThread): if free_disk < 0.5: return self.build_finished.emit(False, _("[ERROR] Insufficient disk space (Available: {free:.1f} GB). At least 0.5 GB is required to safely initialize the build environment.", free=free_disk), []) - system_python_exe = get_python_executable() - if not system_python_exe or not shutil.which(system_python_exe): - return self.build_finished.emit(False, _("[ERROR] Python interpreter is invalid or not found: {path}", path=system_python_exe), []) + system_python_exe = self.params.get('python_exe') + if not system_python_exe: + return self.build_finished.emit(False, _("[ERROR] Python interpreter is invalid or not found: {path}", path="None"), []) if is_cloud_sync_path(script_dir): self.progress.emit(_("[WARN] Target project is in a Cloud Sync directory (e.g. OneDrive/Dropbox). Cloud sync may temporarily lock build files.")) @@ -3238,12 +3570,9 @@ class PackingThread(QThread): return self.build_finished.emit(False, _("[ERROR] I/O Exception: {err_msg}", err_msg=err_msg), []) script_posix = build_script_path.as_posix() - - system_python_exe = get_python_executable() - script_imports = set() try: - script_imports = extract_imports_via_ast(script_posix, system_python_exe) + script_imports = extract_project_imports_via_ast(Path(script_posix), False) except Exception as e: self.progress.emit(_("[WARN] AST Analysis Exception: {error}", error=str(e))) @@ -3254,6 +3583,17 @@ class PackingThread(QThread): clean = raw_name.strip().lower().replace('_', '-') return known_mappings_lower.get(clean, clean).lower() + target_std_libs = set(STD_LIBS) + try: + cmd_std = [system_python_exe, "-c", "import sys; print(','.join(getattr(sys, 'stdlib_module_names', [])))"] + kw = {"capture_output": True, "text": True, "timeout": 3, "errors": "ignore"} + if os.name == 'nt': kw["creationflags"] = subprocess.CREATE_NO_WINDOW + res = subprocess.run(cmd_std, **kw) + if res.returncode == 0 and res.stdout.strip(): + target_std_libs.update(res.stdout.strip().split(',')) + except Exception: + pass + def parse_req_line(line): line = line.strip() if not line or line.startswith('#') or line.startswith('-'): @@ -3262,7 +3602,8 @@ class PackingThread(QThread): if m: pkg_raw = m.group(1) canon_name = get_canonical_pypi_name(pkg_raw) - + if canon_name.lower() in target_std_libs: + return None, None if canon_name.lower() != pkg_raw.lower(): full_spec = canon_name else: @@ -3287,7 +3628,7 @@ class PackingThread(QThread): for line in req_content.splitlines(): canon_name, full_spec = parse_req_line(line) - if canon_name: + if canon_name and canon_name.lower() not in target_std_libs: final_dependencies[canon_name] = full_spec reqs_declared_pkgs.add(canon_name) except Exception as e: @@ -3297,73 +3638,70 @@ class PackingThread(QThread): if (p.is_file() and p.suffix.lower() in ('.py', '.pyw', '.pyd', '.so')) or (p.is_dir() and (p / '__init__.py').exists())} for m in script_imports: - if m in STD_LIBS or m.lower() in local_modules: continue + if m.lower() in target_std_libs or m.lower() in local_modules: continue canon_name = get_canonical_pypi_name(m) + if canon_name.lower() in target_std_libs: continue auto_detected_pkgs.add(canon_name) if canon_name not in final_dependencies: final_dependencies[canon_name] = canon_name auto_added_supplements.add(canon_name) + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) + self.progress.emit(_("[INFO] Initializing isolated build environment...")) self.progress.emit(_("[INFO] Python interpreter path: {path}", path=system_python_exe)) if self.params['use_venv']: + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) self.progress.emit(_("[INFO] Creating virtual environment...")) self.venv_dir = Path(tempfile.mkdtemp(prefix="qpypack_env_")).resolve() if not self.run_cmd([system_python_exe, "-m", "venv", self.venv_dir.as_posix()]): + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) return self.build_finished.emit(False, _("[ERROR] Failed to create virtual environment. Current Python environment might be missing necessary modules or have restricted permissions."), []) python_exe = (self.venv_dir / ("Scripts/python.exe" if os.name == "nt" else "bin/python")).as_posix() + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) self.progress.emit(_("[INFO] Synchronizing and upgrading pip package manager...")) self.run_pip_install(python_exe, ["--upgrade", "pip", "-q"]) else: python_exe = system_python_exe + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) + if self.params.get('use_pipreqs'): - self.progress.emit(_("[INFO] Scanning project source code via pipreqs...")) - sandbox_dir = Path(tempfile.mkdtemp(prefix="qpypack_sandbox_")).resolve() if not self.params.get('use_pipreqs_dir', False) else script_dir - if not self.params.get('use_pipreqs_dir', False): - shutil.copy2(build_script_path, sandbox_dir / build_script_path.name) + self.progress.emit(_("[INFO] Scanning project source code via AST engine...")) + + scan_dir_mode = self.params.get('use_pipreqs_dir', False) + scan_target = script_dir if scan_dir_mode else build_script_path + + ast_discovered_imports = extract_project_imports_via_ast(scan_target, scan_dir=scan_dir_mode) + env_pkg_map = query_target_env_packages(system_python_exe) + + for m in ast_discovered_imports: + if m.lower() in target_std_libs or m.lower() in local_modules: + continue + canon_name = env_pkg_map.get(m) or get_canonical_pypi_name(m) + if canon_name.lower() not in target_std_libs: + auto_detected_pkgs.add(canon_name) + if canon_name not in final_dependencies: + final_dependencies[canon_name] = canon_name + auto_added_supplements.add(canon_name) - pipreqs_pkg = f"pipreqs=={self.params['pipreqs_version']}" if self.params.get('pipreqs_version') else "pipreqs" - self.run_pip_install(python_exe, [pipreqs_pkg, "-q"]) - temp_pipreqs = Path(tempfile.gettempdir()) / f"qpypack_pipreqs_{int(time.time())}.txt" - - pypi_server = re.sub(r'/simple/?$', '/pypi', pip_idx, flags=re.I).rstrip('/') if pip_idx else None - pipreqs_cmd = [ - python_exe, "-m", "pipreqs.pipreqs", sandbox_dir.as_posix(), - "--encoding", "utf-8", "--force", "--savepath", temp_pipreqs.as_posix() - ] - if pypi_server: pipreqs_cmd.extend(["--pypi-server", pypi_server]) - - success_pipreqs = self.run_cmd(pipreqs_cmd, timeout=120, silent_error=True) - - if success_pipreqs and temp_pipreqs.exists(): - try: - pipreqs_lines = temp_pipreqs.read_text(encoding='utf-8', errors='ignore').splitlines() - for line in pipreqs_lines: - canon_name, unused_spec = parse_req_line(line) - if canon_name: - auto_detected_pkgs.add(canon_name) - if canon_name not in final_dependencies: - final_dependencies[canon_name] = unused_spec - auto_added_supplements.add(canon_name) - except Exception as e: - self.progress.emit(_("[WARN] Parse pipreqs output warning: {error}", error=str(e))) - temp_pipreqs.unlink(missing_ok=True) - - if not self.params.get('use_pipreqs_dir', False) and sandbox_dir.exists(): - robust_rmtree(sandbox_dir) - - engine_pkg = "nuitka" if engine == "Nuitka" else "pyinstaller" - if engine == "Nuitka" and self.params.get('nuitka_version'): - engine_pkg = f"nuitka=={self.params['nuitka_version']}" - elif engine == "PyInstaller" and self.params.get('pyi_version'): + engine_pkg = "pyinstaller" if engine == "PyInstaller" else "nuitka" + if engine == "PyInstaller" and self.params.get('pyi_version'): engine_pkg = f"pyinstaller=={self.params['pyi_version']}" + elif engine == "Nuitka" and self.params.get('nuitka_version'): + engine_pkg = f"nuitka=={self.params['nuitka_version']}" engine_pkgs = [engine_pkg] if engine == "PyInstaller": engine_pkgs.append("pillow") + engine_pkgs.append("pyinstaller-hooks-contrib") elif engine == "Nuitka": engine_pkgs.append("zstandard") @@ -3393,10 +3731,10 @@ class PackingThread(QThread): if existing_has_ver and not has_ver: continue final_install_dict[base_name] = spec - dedup_install_list = list(final_install_dict.values()) + + dedup_install_list = [pkg for pkg in list(final_install_dict.values()) if re.split(r'[=>= (3, 13): cmd.append("--zig") self.progress.emit(_("[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as C backend.")) - elif has_gcc: - cmd.append("--mingw64") - self.progress.emit(_("[INFO] Found local GCC/MinGW-w64 environment, using MinGW64 compiler.")) else: cmd.append("--mingw64") - self.progress.emit(_("[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.")) + self.progress.emit(_("[INFO] Using MinGW64 compiler.")) free_disk = get_free_disk_gb(script_dir.as_posix()) if free_disk < 3.0: self.progress.emit(_("[WARN] Low disk space detected on build target drive (Available: {free:.1f} GB, >= 5.0 GB recommended). Build process may interrupt due to disk exhaustion.", free=free_disk)) cores = self.params.get('cpu_cores', os.cpu_count() or 2) + free_ram = get_free_ram_gb() + if free_ram < 4.0 and cores > 2: + safe_jobs = max(1, min(cores, int(free_ram / 1.5))) + self.progress.emit(_("[INFO] Evaluating system physical memory (Available: {ram:.1f} GB). Adaptive concurrency adjusted: {cores} -> {safe_jobs} ...", ram=free_ram, cores=cores, safe_jobs=safe_jobs)) + cores = safe_jobs + cmd.append("--low-memory") cmd.append(f"--jobs={cores}") if self.params.get('upx'): @@ -3583,10 +4014,9 @@ class PackingThread(QThread): if os.name == "nt": cmd.append("--windows-console-mode=force") - is_mac_bundle = (sys.platform == "darwin" and self.params['noconsole']) - if self.params['onefile'] and not is_mac_bundle: + if self.params['onefile']: cmd.append("--onefile") - elif not is_mac_bundle: + else: cmd.append("--standalone") if icon_path: @@ -3622,10 +4052,25 @@ class PackingThread(QThread): if 'matplotlib' in imports_lower: cmd.append("--enable-plugin=matplotlib") if any(tk in imports_lower for tk in ('tkinter', 'pysimplegui', 'customtkinter', 'turtle', 'easygui', 'ttkbootstrap')): cmd.append("--enable-plugin=tk-inter") - + if 'multiprocessing' in imports_lower: + cmd.append("--enable-plugin=multiprocessing") + if os.name == "nt": + self.progress.emit(_("[WARN] 'multiprocessing' module detected. Ensure 'multiprocessing.freeze_support()' is called under 'if __name__ == \"__main__\":' to prevent infinite process loops (fork bombs).")) if 'ttkbootstrap' in imports_lower: cmd.append("--include-package=ttkbootstrap") cmd.append("--include-package-data=ttkbootstrap") + if 'playwright' in imports_lower or has_playwright_pkg: + cmd.append("--include-package=playwright") + cmd.append("--include-package-data=playwright") + + if any(lib in imports_lower for lib in ('requests', 'httpx', 'urllib3', 'aiohttp')): + cmd.append("--include-package-data=certifi") + self.progress.emit(_("[WARN] Detected 'requests' or 'httpx'. Auto-bundling 'certifi' certificates to prevent SSL errors.")) + + for web_fw in ('fastapi', 'uvicorn', 'flask', 'streamlit', 'pywebio', 'dash'): + if web_fw in imports_lower: + cmd.append(f"--include-package={web_fw}") + cmd.append(f"--include-package-data={web_fw}") if 'numpy' in imports_lower: cmd.append("--enable-plugin=numpy") @@ -3658,23 +4103,30 @@ class PackingThread(QThread): elif engine == "Nuitka": cmd.append("--python-flag=-OO") cmd.append("--enable-plugin=anti-bloat") - cmd.append("--lto=yes") + nuitka_dev_excludes = ['unittest', 'doctest', 'pdb', 'pydoc', 'test', 'pytest', 'IPython', 'binder', 'tkinter.test', 'pip', 'setuptools', 'wheel'] + for ex in nuitka_dev_excludes: + cmd.append(f"--nofollow-import-to={ex}") cmd.append(script_posix) + + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) - success = self.run_cmd(cmd, cwd=script_dir.as_posix()) + success = self.run_cmd(cmd, cwd=script_dir.as_posix(), timeout=3600) - if not success: + if not success and not self._is_cancelled: log_text = "\n".join(self.all_raw_logs) if any(kw in log_text for kw in ["NoSpaceLeft", "No space left on device", "[Errno 28]"]): self.progress.emit(_("[ERROR] Build aborted: Insufficient disk space (NoSpaceLeft / Errno 28). Please clean up drive space (at least 5 GB free space recommended) and try again.")) elif any(kw in log_text for kw in ["Allocation error", "not enough memory", "ZstdError", "out of memory"]): self.progress.emit(_("[WARN] Memory allocation exception caught (ZstdError / OOM). Triggering memory protection fallback: Retrying in single-thread mode...")) clean_cmd = [arg if not arg.startswith("--jobs=") else "--jobs=1" for arg in cmd] + if "--low-memory" not in clean_cmd: + clean_cmd.append("--low-memory") self.all_raw_logs.clear() success = self.run_cmd(clean_cmd, cwd=script_dir.as_posix()) - if not success and icon_path: + if not success and icon_path and not self._is_cancelled: log_text = "\n".join(self.all_raw_logs) icon_err_keywords = ["Failed to add resources", "error code 22", "UpdateResource", "Resource modification failed", "Failed to add"] if any(kw in log_text for kw in icon_err_keywords): @@ -3699,9 +4151,9 @@ class PackingThread(QThread): self.all_raw_logs.clear() success = self.run_cmd(clean_cmd, cwd=script_dir.as_posix()) - if self._is_cancelled: return self.build_finished.emit(False, _("[INFO] Build Cancelled."), failed_packages) + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) - self.progress.emit(_("[INFO] Compilation completed, archiving built files...")) src_out = None if engine == "PyInstaller": if sys.platform == "darwin" and self.params['noconsole']: @@ -3740,17 +4192,28 @@ class PackingThread(QThread): final_out = final_out_dir / app_name if success and src_out and src_out.exists(): + self.progress.emit(_("[INFO] Compilation completed, archiving built files...")) try: - if final_out.exists(): - if final_out.is_dir(): shutil.rmtree(final_out, onerror=remove_readonly) - else: final_out.unlink(missing_ok=True) - shutil.move(src_out.as_posix(), final_out.as_posix()) + if src_out.resolve() != final_out.resolve(): + if final_out.exists(): + if final_out.is_dir(): + robust_rmtree(final_out) + else: + try: + final_out.unlink() + except PermissionError: + time.sleep(1) + final_out.unlink(missing_ok=True) + shutil.move(src_out.as_posix(), final_out.as_posix()) + except PermissionError: + success = False + self.progress.emit(_("[ERROR] Target file is running or occupied. Please close the existing application and try again.")) except Exception as e: success = False self.progress.emit(_("[ERROR] Product transfer failed, file might be occupied by system process or lack permission: {error}", error=str(e))) else: - success = False - self.progress.emit(_("[ERROR] Could not locate valid executable product in temporary build directory: {path}", path=str(src_out))) + if not success and not self._is_cancelled: + self.progress.emit(_("[ERROR] Could not locate valid executable product in temporary build directory: {path}", path=str(src_out))) if success and final_out.exists(): self.progress.emit(_("[INFO] Validating output files and generating final product...")) @@ -3760,19 +4223,39 @@ class PackingThread(QThread): log_file.write_text('\n'.join(self.all_raw_logs), encoding='utf-8') self.progress.emit(_("[INFO] Build log exported to: {path}", path=log_file.as_posix())) except: pass + + if self.params['onefile'] and os.name == 'nt': + self.progress.emit(_("[INFO] Tip: Packaged executables might be falsely flagged by Windows Defender/Antivirus. Adding exclusions or code-signing is recommended.")) self.build_finished.emit(True, _("[SUCCESS] Compilation completed, output path: {path}", path=final_out.resolve().as_posix()), failed_packages) else: + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) err_info = self.detect_python_syntax_errors() if err_info["is_code_error"]: msg = _("[Syntax Error] Source code contains syntax errors, compilation aborted:\n - File: {file}\n - Type: {type}\n - Line: Line {line}\n - Detail: {desc}\n\nTip: Please ensure the source code runs locally before packaging.", file=err_info['file'], type=err_info['type'], line=err_info['line'], desc=err_info['desc']) else: - msg = _("[FAILED] Compilation interrupted with exceptions, please click 'Detailed Mode' above the log window for troubleshooting.") + msg = _( + "[FAILED] Build interrupted exceptionally!\n\n" + "🔍 Common Troubleshooting:\n" + "1. Environment Mismatch (Most Common): The selected Python version is incompatible with your source code. Please go to [Build Settings] to switch to the Python version you normally use for this code.\n" + "2. Missing Dependencies: Click 'Detailed Mode' above to check for ModuleNotFoundError.\n" + "3. Antivirus Block: Ensure your security software is not blocking the build process.\n\n" + "(Note: This is usually caused by environment/code discrepancies rather than the packaging engine itself. Please check the detailed log for exact reasons.)" + ) self.build_finished.emit(False, msg, failed_packages) except Exception as e: + if self._is_cancelled: + return self.build_finished.emit(False, _("[INFO] Build Cancelled."), []) self.build_finished.emit(False, f"[ERROR] {str(e)}", failed_packages) finally: + if "PYTHONPATH" in os.environ and "_qpypack_temp_" in os.environ.get("PYTHONPATH", ""): + parts = os.environ["PYTHONPATH"].split(os.pathsep) + os.environ["PYTHONPATH"] = os.pathsep.join(p for p in parts if "_qpypack_temp_" not in p) + if not os.environ["PYTHONPATH"]: + os.environ.pop("PYTHONPATH", None) + if is_temp and build_script_path and build_script_path.exists(): try: build_script_path.unlink() @@ -3806,6 +4289,269 @@ class PackingThread(QThread): try: spec_file.unlink() except: pass +class PythonInstallMonitorThread(QThread): + finished_signal = Signal(bool) + + def __init__(self, exe_path): + super().__init__() + self.exe_path = exe_path + + def run(self): + try: + cmd = [self.exe_path, "/passive", "PrependPath=1", "Include_pip=1", "SimpleInstall=1"] + kwargs = {} + if os.name == 'nt': + kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW + + res = subprocess.run(cmd, **kwargs) + self.finished_signal.emit(res.returncode == 0) + except Exception: + self.finished_signal.emit(False) + +class PythonInstallerDialog(QDialog): + def __init__(self, parent=None, is_missing_mode=True): + super().__init__(parent) + self.parent_win = parent + self.is_missing_mode = is_missing_mode + self.selected_local_path = None + self.is_selected_ver_local = False + self.current_local_target_path = None + + self.setWindowTitle(_("Python Environment Required") if is_missing_mode else _("Python Environment Management")) + self.setMinimumWidth(580) + self.setMinimumHeight(440) + self.setStyleSheet("QDialog { background-color: #ffffff; }") + + layout = QVBoxLayout(self) + layout.setSpacing(12) + layout.setContentsMargins(22, 22, 22, 22) + + if is_missing_mode: + header_html = _( + "Python Environment Required
" + "" + "Application build depends on a Python interpreter.
" + "Please select a version to automatically download, install, and configure environment variables." + "
" + ) + else: + header_html = _( + "Python Environment Management
" + "" + "Supports switching locally detected Python environments or downloading new versions." + "" + ) + + lbl_title = QLabel(header_html) + lbl_title.setWordWrap(True) + lbl_title.setStyleSheet("font-size: 13px; color: #1e293b;") + layout.addWidget(lbl_title) + + if is_missing_mode: + tip_card = QLabel(_( + "💡 Recommendation: Python 3.11.9 is recommended for optimal build compatibility and engine support." + )) + tip_card.setWordWrap(True) + tip_card.setStyleSheet(""" + QLabel { + background-color: #eff6ff; + border: 1px solid #bfdbfe; + border-radius: 6px; + padding: 10px 14px; + color: #1e40af; + font-size: 12px; + line-height: 1.5; + } + """) + layout.addWidget(tip_card) + + self.tab_widget = QTabWidget() + self.tab_widget.setStyleSheet(""" + QTabWidget::pane { border: 1px solid #e2e8f0; border-radius: 8px; background: #ffffff; } + QTabBar::tab { background: #f8fafc; border: 1px solid #e2e8f0; padding: 8px 16px; font-weight: bold; font-size: 12px; color: #64748b; margin-right: 4px; border-top-left-radius: 6px; border-top-right-radius: 6px; } + QTabBar::tab:selected { background: #ffffff; color: #2563eb; border-bottom-color: #ffffff; } + """) + + self.tab_local = QWidget() + lay_local = QVBoxLayout(self.tab_local) + lay_local.setContentsMargins(12, 12, 12, 12) + lay_local.setSpacing(8) + + self.local_list = QListWidget() + self.local_list.setStyleSheet(""" + QListWidget { border: 1px solid #e2e8f0; border-radius: 6px; outline: none; background: #fafafa; } + QListWidget::item { padding: 10px; border-bottom: 1px solid #f1f5f9; color: #1e293b; font-family: Consolas, monospace; font-size: 12px; } + QListWidget::item:selected { background-color: #eff6ff; color: #2563eb; font-weight: bold; } + """) + lay_local.addWidget(self.local_list) + + self.btn_use_local = QPushButton(_("Use Selected Environment")) + self.btn_use_local.setStyleSheet("QPushButton { background-color: #16a34a; color: white; border: none; border-radius: 6px; font-size: 13px; font-weight: bold; padding: 8px 16px; } QPushButton:hover { background-color: #15803d; }") + self.btn_use_local.clicked.connect(self._on_use_local_clicked) + lay_local.addWidget(self.btn_use_local) + + self.tab_widget.addTab(self.tab_local, _("Locally Detected Pythons")) + + self.tab_download = QWidget() + lay_dl = QVBoxLayout(self.tab_download) + lay_dl.setContentsMargins(12, 12, 12, 12) + lay_dl.setSpacing(10) + + self.versions = [ + ("3.14.6", _("Python 3.14.6 (Experimental)")), + ("3.13.0", _("Python 3.13.0")), + ("3.12.4", _("Python 3.12.4")), + ("3.11.9", _("Python 3.11.9 (Recommended)")), + ("3.10.11", _("Python 3.10.11")), + ("3.9.13", _("Python 3.9.13")), + ("3.8.10", _("Python 3.8.10 (Win7 Support)")), + ] + + self.dl_combo = QComboBox() + setup_combo_white_theme(self.dl_combo) + for ver, desc in self.versions: + self.dl_combo.addItem(desc, ver) + self.dl_combo.setCurrentIndex(3) + + lay_dl.addWidget(QLabel(_("Select Python Version to Download:"))) + lay_dl.addWidget(self.dl_combo) + + self.lbl_dl_hint = QLabel() + self.lbl_dl_hint.setWordWrap(True) + self.lbl_dl_hint.setStyleSheet("font-size: 12px; color: #64748b; line-height: 1.4;") + lay_dl.addWidget(self.lbl_dl_hint) + + lay_dl.addStretch() + + self.btn_dl_install = QPushButton() + self.btn_dl_install.clicked.connect(self._on_action_btn_clicked) + lay_dl.addWidget(self.btn_dl_install) + + self.tab_widget.addTab(self.tab_download, _("Download New Version")) + + layout.addWidget(self.tab_widget) + + btn_lay = QHBoxLayout() + self.btn_manual_config = QPushButton(_("Configure Manually")) + self.btn_manual_config.setStyleSheet("QPushButton { background-color: #f8fafc; color: #2563eb; border: 1px solid #bfdbfe; border-radius: 6px; font-size: 12px; font-weight: bold; padding: 6px 14px; } QPushButton:hover { background-color: #eff6ff; }") + self.btn_manual_config.clicked.connect(lambda: self.done(2)) + btn_lay.addWidget(self.btn_manual_config) + + btn_lay.addStretch() + self.btn_cancel = QPushButton(_("Cancel")) + self.btn_cancel.setStyleSheet("QPushButton { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; font-weight: bold; padding: 6px 14px; } QPushButton:hover { background-color: #e2e8f0; }") + self.btn_cancel.clicked.connect(self.reject) + btn_lay.addWidget(self.btn_cancel) + layout.addLayout(btn_lay) + + self.installed_map = self._scan_installed_map() + self.dl_combo.currentIndexChanged.connect(self._on_download_ver_changed) + self._load_local_environments() + self._on_download_ver_changed() + + if is_missing_mode: + self.tab_widget.setCurrentIndex(1) + else: + self.tab_widget.setCurrentIndex(0) + + def _scan_installed_map(self): + installed = {} + if self.parent_win and hasattr(self.parent_win, 'settings_panel'): + combo = self.parent_win.settings_panel.python_path_combo + for i in range(combo.count()): + text = combo.itemText(i) + path = combo.itemData(i) or text + m = re.search(r'Python\s+(\d+\.\d+)', text, re.I) + if m and path and os.path.exists(path): + installed[m.group(1)] = path + + if not installed: + sys_py = find_system_python() + if sys_py and os.path.exists(sys_py): + installed["default"] = sys_py + + return installed + + def _on_download_ver_changed(self): + ver_full = self.dl_combo.currentData() + parts = ver_full.split('.') + major_minor = f"{parts[0]}.{parts[1]}" if len(parts) >= 2 else ver_full + + local_path = self.installed_map.get(major_minor) or self.installed_map.get(ver_full) + + if local_path: + self.is_selected_ver_local = True + self.current_local_target_path = local_path + self.lbl_dl_hint.setText(_( + "✔ Detected locally:
" + "{path}
" + "Ready to switch directly without re-downloading.", + path=local_path + )) + self.btn_dl_install.setText(_("Use Installed Version Directly")) + self.btn_dl_install.setStyleSheet(""" + QPushButton { background-color: #16a34a; color: white; border: none; border-radius: 6px; font-size: 13px; font-weight: bold; padding: 10px 16px; } + QPushButton:hover { background-color: #15803d; } + """) + else: + self.is_selected_ver_local = False + self.current_local_target_path = None + self.lbl_dl_hint.setText(_("Click to automatically download, install Python, and configure system environment variables.")) + self.btn_dl_install.setText(_("One-Click Download & Install")) + self.btn_dl_install.setStyleSheet(""" + QPushButton { background-color: #1A73E8; color: white; border: none; border-radius: 6px; font-size: 13px; font-weight: bold; padding: 10px 16px; } + QPushButton:hover { background-color: #1B66C9; } + """) + + def _on_action_btn_clicked(self): + if self.is_selected_ver_local and self.current_local_target_path: + self.selected_local_path = self.current_local_target_path + self.done(3) + else: + self.accept() + + def _load_local_environments(self): + self.local_list.clear() + found_any = False + if self.parent_win and hasattr(self.parent_win, 'settings_panel'): + combo = self.parent_win.settings_panel.python_path_combo + for i in range(combo.count()): + text = combo.itemText(i) + path = combo.itemData(i) or text + if path and os.path.exists(path): + item = QListWidgetItem(f"🐍 {text}") + item.setData(Qt.ItemDataRole.UserRole, path) + self.local_list.addItem(item) + found_any = True + + if not found_any: + sys_py = find_system_python() + if sys_py and os.path.exists(sys_py): + item = QListWidgetItem(f"🐍 {sys_py}") + item.setData(Qt.ItemDataRole.UserRole, sys_py) + self.local_list.addItem(item) + found_any = True + + if found_any: + self.local_list.setCurrentRow(0) + else: + self.local_list.addItem(_("No local Python environments detected.")) + self.btn_use_local.setEnabled(False) + + def _on_use_local_clicked(self): + item = self.local_list.currentItem() + if item: + path = item.data(Qt.ItemDataRole.UserRole) + if path: + self.selected_local_path = path + self.done(3) + + def get_selected_version(self): + return self.dl_combo.currentData() + + def get_selected_local_path(self): + return getattr(self, 'selected_local_path', None) + class MainWindow(QMainWindow): def __init__(self): super().__init__() @@ -3822,8 +4568,6 @@ class MainWindow(QMainWindow): I18N.language_changed.connect(self.retranslate_ui) self.retranslate_ui() - - def init_style(self): self.setWindowTitle(f"{__app_name__} {__version__}") self.setMinimumSize(560, 460) @@ -3944,7 +4688,10 @@ class MainWindow(QMainWindow): self.status_label = QLabel(_("Status: Ready")) self.status_bar.addWidget(self.status_label) - self.copyright_label = QLabel(f"Copyright © {__company__}. ") + current_year = time.localtime().tm_year + year_str = f"2026-{current_year}" if current_year > 2026 else "2026" + self.copyright_label = QLabel(f"Copyright © {year_str} {__author__}. ") + self.copyright_label.setStyleSheet("color: #bdc1c6; font-size: 11px; font-weight: bold; background: transparent; padding-right: 5px;") self.status_bar.addPermanentWidget(self.copyright_label) @@ -3954,6 +4701,48 @@ class MainWindow(QMainWindow): msg = msg.replace('\n', ' ') self.statusBar().showMessage(msg, timeout) + def _on_python_install_completed(self, success): + if success: + msg_box = QMessageBox(self) + msg_box.setWindowTitle(_("Install Complete")) + msg_box.setText(_( + "Python Environment Installed Successfully!

" + "System environment variables updated. Recommended to exit and restart the software to apply changes." + )) + msg_box.setIcon(QMessageBox.Icon.Information) + + btn_exit = msg_box.addButton(_("Exit Now"), QMessageBox.ButtonRole.AcceptRole) + btn_later = msg_box.addButton(_("Later"), QMessageBox.ButtonRole.RejectRole) + + btn_exit.setStyleSheet(""" + QPushButton { + background-color: #1A73E8; color: #ffffff; border: none; + border-radius: 6px; font-size: 13px; font-weight: bold; + padding: 8px 16px; min-width: 80px; + } + QPushButton:hover { background-color: #1B66C9; } + QPushButton:pressed { background-color: #174EA6; } + """) + + btn_later.setStyleSheet(""" + QPushButton { + background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; + border-radius: 6px; font-size: 13px; font-weight: bold; + padding: 8px 16px; min-width: 80px; + } + QPushButton:hover { background-color: #e2e8f0; } + QPushButton:pressed { background-color: #cbd5e1; } + """) + + msg_box.exec() + + if msg_box.clickedButton() == btn_exit: + QApplication.quit() + else: + self.show_notification(_("Python installed. Please restart QPyPack manually later."), 6000) + else: + self.show_error_log(_("[ERROR] Python installation failed or was cancelled.")) + def show_error_log(self, msg): if not self.log_container.isVisible(): self.toggle_log() @@ -4019,13 +4808,6 @@ class MainWindow(QMainWindow): self.drop_area.label.setText(_("Build Failed")) self.drop_area.sub_label.setText(_("Check log output below for troubleshooting.")) - elif self.current_state == "building": - self.set_status(_("Status: Packaging ({engine}) ...", engine=self.settings_panel.engine_combo.currentText())) - elif self.current_state == "done": - self.set_status(_("Status: Build Completed")) - elif self.current_state == "failed": - self.set_status(_("Status: Build Failed")) - def resizeEvent(self, event): super().resizeEvent(event) self.adjust_status_bar() @@ -4033,7 +4815,7 @@ class MainWindow(QMainWindow): def closeEvent(self, event): if self.thread and self.thread.isRunning(): self.thread.cancel() - self.thread.wait() + self.thread.wait(2000) if self.analysis_thread and self.analysis_thread.isRunning(): self.analysis_thread.requestInterruption() @@ -4168,6 +4950,67 @@ class MainWindow(QMainWindow): self.anim_group.finished.connect(cleanup) self.anim_group.start() + def _trigger_python_download_dialog(self, is_missing_mode=False): + dialog = PythonInstallerDialog(self, is_missing_mode=is_missing_mode) + result = dialog.exec() + if result == QDialog.DialogCode.Accepted: + selected_version = dialog.get_selected_version() + self._auto_install_python(selected_version) + elif result == 3: + local_path = dialog.get_selected_local_path() + if local_path and os.path.exists(local_path): + self.settings_panel.python_path_combo.setCurrentText(local_path) + self.show_notification(_("Switched to local Python environment: {path}", path=local_path)) + elif result == 2: + self.show_settings() + self.settings_panel.tabs.setCurrentIndex(0) + self.settings_panel.sub_tabs.setCurrentIndex(0) + self.settings_panel.python_path_combo.setFocus() + self.show_notification(_("Switched to [Build Settings] -> [Engine], please set the Python path."), 6000) + + def _auto_install_python(self, version): + import urllib.request + from urllib.error import URLError + from PySide6.QtWidgets import QProgressDialog + + url_hw = f"https://repo.huaweicloud.com/python/{version}/python-{version}-amd64.exe" + url_off = f"https://www.python.org/ftp/python/{version}/python-{version}-amd64.exe" + + exe_path = Path(tempfile.gettempdir()) / f"python-{version}-amd64.exe" + + progress = QProgressDialog(_("Downloading Python {ver}... Please wait.", ver=version), _("Cancel"), 0, 100, self) + progress.setWindowTitle(_("One-Click Install")) + progress.setWindowModality(Qt.WindowModality.WindowModal) + progress.setMinimumDuration(0) + progress.setValue(0) + + def report(block_num, block_size, total_size): + if total_size > 0: + percent = int(block_num * block_size * 100 / total_size) + progress.setValue(min(percent, 100)) + QApplication.processEvents() + if progress.wasCanceled(): + raise Exception("Cancelled") + + try: + target_url = url_hw if I18N.current_lang == "zh_CN" else url_off + try: + urllib.request.urlretrieve(target_url, exe_path.as_posix(), reporthook=report) + except URLError: + progress.setValue(0) + urllib.request.urlretrieve(url_off, exe_path.as_posix(), reporthook=report) + + progress.setValue(100) + self.show_notification(_("Download complete. Starting Python installation..."), 5000) + + self.install_monitor_thread = PythonInstallMonitorThread(exe_path.as_posix()) + self.install_monitor_thread.finished_signal.connect(self._on_python_install_completed) + self.install_monitor_thread.start() + + except Exception as e: + if str(e) != "Cancelled": + self.show_error_log(f"[ERROR] Python download failed: {e}") + def on_script_selected(self, path): path = Path(path).resolve().as_posix() if is_cloud_locked(path): @@ -4190,7 +5033,7 @@ class MainWindow(QMainWindow): self.analysis_thread.requestInterruption() self.analysis_thread.wait(1000) - self.analysis_thread = ScriptAnalysisThread(self.script_path, get_python_executable()) + self.analysis_thread = ScriptAnalysisThread(self.script_path) self.analysis_thread.analysis_done.connect(self.on_analysis_finished) self.analysis_thread.start() @@ -4201,8 +5044,8 @@ class MainWindow(QMainWindow): if version: self.settings_panel.ver_ver.setText(version) else: self.settings_panel.ver_ver.setText("1.0.0") - self.settings_panel.ver_comp.setText(author) - self.settings_panel.ver_desc.setText(desc) + self.settings_panel.ver_comp.setText(_(author) if author == "My Studio" else author) + self.settings_panel.ver_desc.setText(_(desc) if desc == "Python Executable" else desc) gui_libs = { 'pyqt5', 'pyqt6', 'pyside2', 'pyside6', 'tkinter', 'wx', 'kivy', 'libavg', @@ -4254,11 +5097,22 @@ class MainWindow(QMainWindow): def cancel_pack(self): if self.thread and self.thread.isRunning(): self.thread.cancel() - self.set_status(_("Status: Workspace Reset")) - self.drop_area.stop_build_anim() - self.update_ui_state("ready") + self.thread.wait(1000) + + self.append_log(_("[INFO] Build Cancelled.")) + self.set_status(_("Status: Build Cancelled")) + + if self.script_path and Path(self.script_path).exists(): + self.reset_to_ready() + else: + self.reset_all() + + self.show_notification(_("Build Cancelled")) def start_pack(self): + if self.current_state == "building": + return + if not self.script_path or not Path(self.script_path).exists(): self.show_error_log(_("[ERROR] Please load a valid Python source file first!")) return @@ -4270,19 +5124,41 @@ class MainWindow(QMainWindow): raw_py = raw_py.split(" (Python ")[0].strip() if not raw_py: raw_py = get_python_executable() + + if raw_py: + resolved_py = shutil.which(raw_py) + if resolved_py: + raw_py = Path(resolved_py).resolve().as_posix() + - if not raw_py or not shutil.which(raw_py): - msg = QMessageBox(self) - msg.setIcon(QMessageBox.Icon.Warning) - msg.setWindowTitle(_("Python Environment Required")) - msg.setText(_("Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it (remember to check 'Add Python.exe to PATH' during installation).")) - - btn_down = msg.addButton(_("Download Python"), QMessageBox.ButtonRole.ActionRole) - btn_cancel = msg.addButton(_("Cancel"), QMessageBox.ButtonRole.RejectRole) - - msg.exec() - if msg.clickedButton() == btn_down: - __import__('webbrowser').open("https://www.python.org/downloads/") + is_valid_py = False + if raw_py: + try: + clean_env = os.environ.copy() + clean_env.pop("PYTHONHOME", None) + clean_env.pop("PYTHONPATH", None) + kwargs = {"stdout": subprocess.PIPE, "stderr": subprocess.PIPE, "text": True, "env": clean_env, "timeout": 3} + if os.name == 'nt': kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW + + proc = subprocess.run([raw_py, "-c", "import sys; print(sys.version_info.major)"], **kwargs) + if proc.returncode == 0 and "3" in proc.stdout: + is_valid_py = True + except Exception: + pass + + if not is_valid_py: + if os.name == 'nt': + self._trigger_python_download_dialog(is_missing_mode=True) + else: + msg = QMessageBox(self) + msg.setIcon(QMessageBox.Icon.Warning) + msg.setWindowTitle(_("Python Environment Required")) + msg.setText(_("Python is not detected on your system!

QPyPack requires a Python environment to compile your code.
If you haven't installed Python, please download and install it.")) + btn_down = msg.addButton(_("Download Python"), QMessageBox.ButtonRole.ActionRole) + msg.addButton(_("Cancel"), QMessageBox.ButtonRole.RejectRole) + msg.exec() + if msg.clickedButton() == btn_down: + __import__('webbrowser').open("https://www.python.org/downloads/") return app_name = sp.name_edit.text().strip() or Path(self.script_path).stem @@ -4295,9 +5171,9 @@ class MainWindow(QMainWindow): v_nums = re.findall(r'\d+', v_str) v_tuple = ",".join((v_nums + ['0', '0', '0', '0'])[:4]) - comp_escaped = sp.ver_comp.text().replace("'", "\\'") - desc_escaped = sp.ver_desc.text().replace("'", "\\'") - v_str_escaped = v_str.replace("'", "\\'") + comp_escaped = sp.ver_comp.text().replace("\\", "\\\\").replace("'", "\\'") + desc_escaped = sp.ver_desc.text().replace("\\", "\\\\").replace("'", "\\'") + v_str_escaped = v_str.replace("\\", "\\\\").replace("'", "\\'") content = f'''VSVersionInfo(ffi=FixedFileInfo(filevers=({v_tuple}),prodvers=({v_tuple}),mask=0x3f,flags=0x0,OS=0x40004,fileType=0x1,subtype=0x0,date=(0,0)),kids=[StringFileInfo([StringTable('040904B0',[StringStruct('CompanyName','{comp_escaped}'),StringStruct('FileDescription','{desc_escaped}'),StringStruct('FileVersion','{v_str_escaped}'),StringStruct('ProductVersion','{v_str_escaped}'),StringStruct('OriginalFilename','{app_name}.exe')])]),VarFileInfo([VarStruct('Translation',[1033,1200])])])''' version_file = Path(tempfile.gettempdir()) / f"qpypack_{app_name}_version.txt" @@ -4336,7 +5212,11 @@ class MainWindow(QMainWindow): icon_path_str = temp_ico.as_posix() temp_icon_file = temp_ico.as_posix() else: - icon_path_str = icon_path.as_posix() + if needed_ext == "icns": + icon_path_str = "" + self.show_notification(_("[WARN] Icon conversion to .icns failed, building without icon.")) + else: + icon_path_str = icon_path.as_posix() add_data_items = [sp.add_data_list.item(i).data(Qt.ItemDataRole.UserRole) for i in range(sp.add_data_list.count())] main_pip = sp._get_url_from_combo(sp.pip_source_combo) @@ -4350,10 +5230,11 @@ class MainWindow(QMainWindow): params = { 'engine': engine, - 'mappings': mappings, + 'python_exe': raw_py, 'script_path': self.script_path, 'app_name': app_name, - 'onefile': sp.onefile_check.isChecked(), + 'onefile': sp.rb_onefile.isChecked(), + 'contents_dir': sp.contents_dir_edit.text().strip() or '_internal', 'noconsole': sp.noconsole_check.isChecked(), 'icon': icon_path_str, 'use_reqs': sp.reqs_check.isChecked(), @@ -4383,7 +5264,6 @@ class MainWindow(QMainWindow): 'lite_mode': sp.lite_mode_check.isChecked(), 'pyi_version': sp.pyi_ver_edit.text().strip(), 'nuitka_version': sp.nuitka_ver_edit.text().strip(), - 'pipreqs_version': sp.pipreqs_ver_edit.text().strip() } self.log_concise.clear() @@ -4402,6 +5282,16 @@ class MainWindow(QMainWindow): def on_pack_finished(self, success, msg, failed_pkgs=None): self.append_log("\n" + msg) self.drop_area.stop_build_anim() + + if self.thread and getattr(self.thread, '_is_cancelled', False): + if self.script_path and Path(self.script_path).exists(): + self.reset_to_ready() + else: + self.drop_area.reset() + self.update_ui_state("idle") + self.set_status(_("Status: Build Cancelled")) + return + play_alert(success) if success: @@ -4414,7 +5304,7 @@ class MainWindow(QMainWindow): self.set_status(_("Status: Build Failed")) self.update_ui_state("failed") - if failed_pkgs: + if failed_pkgs and not (self.thread and getattr(self.thread, '_is_cancelled', False)): warn_msg = _("Dependency Missing Warning: {pkgs} failed to install. Check log for details.", pkgs=", ".join(failed_pkgs)) self.show_notification(warn_msg, 6000) err_log = _("[ERROR] Build completed, but the following dependencies failed to install:\n\n - {pkgs}\n\nNote: The application might raise ModuleNotFoundError at runtime.", pkgs=", ".join(failed_pkgs)) @@ -4451,8 +5341,8 @@ class MainWindow(QMainWindow): self.settings_panel.reqs_file_edit.clear() self.settings_panel.out_dir_edit.clear() self.settings_panel.ver_ver.setText("1.0.0") - self.settings_panel.ver_comp.setText("My Studio") - self.settings_panel.ver_desc.setText("Python Executable") + self.settings_panel.ver_comp.setText(_("My Studio")) + self.settings_panel.ver_desc.setText(_("Python Executable")) self.log_concise.clear() self.log_detailed.clear() @@ -4484,7 +5374,11 @@ class MainWindow(QMainWindow): "•", "---", "━", "!" ) - if any(line_strip.startswith(p) for p in valid_prefixes): + is_critical_engine_log = any(kw in line for kw in ( + "FATAL:", "Disable Anti-Virus", "Failed to delete", "PermissionError", "Access is denied" + )) + + if any(line_strip.startswith(p) for p in valid_prefixes) or is_critical_engine_log: concise_lines.append(line) is_concise_kept = True @@ -4521,7 +5415,6 @@ class MainWindow(QMainWindow): self._render_text_edit(self.log_detailed, msg, is_error) - def _render_text_edit(self, text_edit, msg, is_error): if is_error: safe_msg = msg.replace('<', '<').replace('>', '>').replace('\n', '
')