From c6fbab2609fa025e48076354f6fd9e95d791586c Mon Sep 17 00:00:00 2001 From: QwejayHuang Date: Thu, 17 Sep 2026 20:50:06 +0800 Subject: [PATCH] v2.9.1 - fix: resolve build size bloat, relax compiler check & remove UPX conflict - Re-enable anti-bloat mechanism to prevent bloated builds with Pandas and other libraries - Restrict UPX compression to eliminate packing warnings and conflicts in Nuitka single-file mode - Remove strict MSVC fallback logic to prevent build failures on systems without Visual Studio - Relax compiler rules to let Nuitka automatically select and download suitable toolchains - Switch default packaging strategy to Lite Mode with bytecode and link-time optimizations enabled --- CHANGELOG.md | 13 ++++++++++ CHANGELOG_EN.md | 13 ++++++++++ pyproject.toml | 2 +- qpypack/locales/ar_SA.json | 2 ++ qpypack/locales/de_DE.json | 2 ++ qpypack/locales/es_ES.json | 2 ++ qpypack/locales/fr_FR.json | 2 ++ qpypack/locales/it_IT.json | 2 ++ qpypack/locales/ja_JP.json | 2 ++ qpypack/locales/ko_KR.json | 2 ++ qpypack/locales/nl_NL.json | 2 ++ qpypack/locales/pl_PL.json | 2 ++ qpypack/locales/pt_BR.json | 2 ++ qpypack/locales/ru_RU.json | 2 ++ qpypack/locales/th_TH.json | 2 ++ qpypack/locales/tr_TR.json | 2 ++ qpypack/locales/vi_VN.json | 2 ++ qpypack/locales/zh_TW.json | 2 ++ qpypack/main.py | 49 ++++++++++++-------------------------- 19 files changed, 72 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33b0a0e..cd5349e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,19 @@ QPyPack 项目的所有重要变更都将记录在此文件中。 -- +## [2.9.1] - 2026-09-17 + +### 修复 +- 修复使用 Nuitka 单文件打包时调用 UPX 产生的压缩失败警告与报错问题,恢复 UPX 仅对 PyInstaller 启用的安全策略 +- 修复 Nuitka 防膨胀插件未生效导致打包 Pandas 等第三方库时依赖扩散、生成文件体积异常暴增的问题 +- 修复未安装 Visual Studio 时因编译器判断失误强行指定 MSVC 导致的构建中断问题 + +### 优化 +- 放开 C 编译器选择限制,无本地 MSVC 环境时交由 Nuitka 自动匹配并下载适用的轻量编译工具链(如 Zig),大幅降低打包失败率并避免文件锁死 +- 将默认打包策略调整为精简模式,默认开启字节码与链接优化,并自动剔除测试与调试等冗余模块,显著缩减最终文件体积 + +-- + ## [2.9.0] - 2026-09-13 ### 新增 diff --git a/CHANGELOG_EN.md b/CHANGELOG_EN.md index 7a9d363..4cae978 100644 --- a/CHANGELOG_EN.md +++ b/CHANGELOG_EN.md @@ -6,6 +6,19 @@ All notable changes to the **QPyPack** project will be documented in this file. --- +## [2.9.1] - 2026-09-17 + +### Fixed +- Fixed compression failure warnings and errors when invoking UPX during Nuitka standalone builds; restored policy ensuring UPX only applies to PyInstaller +- Fixed abnormal binary size bloat when packaging third-party libraries like Pandas caused by disabled anti-bloat mechanisms +- Fixed build failures on systems without Visual Studio caused by incorrect compiler fallback logic enforcing MSVC + +### Improved +- Relaxed C compiler restrictions to let Nuitka automatically match and download appropriate lightweight toolchains (such as Zig) when local MSVC is missing, reducing build failures and file lock issues +- Set Lite Mode as the default packaging strategy, enabling bytecode and link-time optimizations while excluding redundant test and debug modules to significantly reduce output size + +--- + ## [2.9.0] - 2026-09-13 ### Added diff --git a/pyproject.toml b/pyproject.toml index 7b1b55c..a74e654 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qpypack" -version = "2.9.0" +version = "2.9.1" description = "A cross-platform GUI packaging and compilation suite based on PyInstaller and Nuitka." readme = "README_EN.md" authors = [ diff --git a/qpypack/locales/ar_SA.json b/qpypack/locales/ar_SA.json index b853d5c..52c0d13 100644 --- a/qpypack/locales/ar_SA.json +++ b/qpypack/locales/ar_SA.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "مفصولة بفواصل (مثل pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "مفصولة بفواصل (مثل tkinter, matplotlib)", "Commercial PFX File:": "ملف PFX تجاري:", + "Compatibility Mode": "وضع التوافق", "Compatibility Mode (Default)": "وضع التوافق (الافتراضي)", "Compatibility depends on build environment glibc version.": "يعتمد التوافق على إصدار glibc في بيئة البناء.", "Concise Log Output": "إخراج سجل موجز", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] تم تمكين الوضع الخفيف، تطبيق تحسين البايت كود (-OO) وإزالة وحدات التطوير...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] لم يتم اكتشاف MSVC 14.3+. سيستخدم Nuitka سلسلة أدوات MinGW64 أو يقوم بتنزيلها (Python {v}).", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] لم يتم اكتشاف مترجم C محلي. سيقوم Nuitka تلقائيًا بتنزيل وإدارة مجموعة أدوات MinGW-w64 المتوافقة.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] لم يتم اكتشاف MSVC محلي. سيقوم Nuitka بإدارة وتنزيل سلسلة أدوات مترجم C المثلى تلقائيًا.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] نصيحة Nuitka: إذا طُلب منك تنزيل مترجم GCC/MinGW في البناء الأول، فيرجى التأكد من استقرار اتصال الشبكة.", "[INFO] Old venv renamed to: {name}": "[INFO] تمت إعادة تسمية البيئة الافتراضية القديمة إلى: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] إجراء فحوصات بيئية أولية...", diff --git a/qpypack/locales/de_DE.json b/qpypack/locales/de_DE.json index 12cd83c..e38e98b 100644 --- a/qpypack/locales/de_DE.json +++ b/qpypack/locales/de_DE.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Durch Kommas getrennt (z. B. pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Durch Kommas getrennt (z. B. tkinter, matplotlib)", "Commercial PFX File:": "Kommerzielle PFX-Datei:", + "Compatibility Mode": "Kompatibilitätsmodus", "Compatibility Mode (Default)": "Kompatibilitätsmodus (Standard)", "Compatibility depends on build environment glibc version.": "Kompatibilität hängt von der glibc-Version der Build-Umgebung ab.", "Concise Log Output": "Kompakte Protokollausgabe", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Lite-Modus aktiviert, wende Bytecode-Optimierung (-OO) an und entferne Entwicklungsmodule...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+ nicht erkannt. Nuitka wird die MinGW64-Toolchain verwenden/herunterladen (Python {v}).", "[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] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Kein lokales MSVC erkannt. Nuitka wird die optimale C-Compiler-Toolchain automatisch verwalten und herunterladen.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka-Tipp: Wenn beim ersten Build zum Herunterladen des GCC/MinGW-Compilers aufgefordert wird, stellen Sie bitte eine stabile Netzwerkverbindung sicher.", "[INFO] Old venv renamed to: {name}": "[INFO] Alte Venv umbenannt in: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Führe Vorab-Umgebungsprüfungen durch...", diff --git a/qpypack/locales/es_ES.json b/qpypack/locales/es_ES.json index 8d6aa39..7669b7b 100644 --- a/qpypack/locales/es_ES.json +++ b/qpypack/locales/es_ES.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Separados por comas (ej. pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Separados por comas (ej. tkinter, matplotlib)", "Commercial PFX File:": "Archivo PFX comercial:", + "Compatibility Mode": "Modo de compatibilidad", "Compatibility Mode (Default)": "Modo de compatibilidad (predeterminado)", "Compatibility depends on build environment glibc version.": "La compatibilidad depende de la versión de glibc del entorno de compilación.", "Concise Log Output": "Salida de registro concisa", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Modo ligero habilitado, aplicando optimización de bytecode (-OO) y eliminando módulos de desarrollo...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+ no detectado. Nuitka usará/descargará la cadena de herramientas MinGW64 (Python {v}).", "[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 kit de herramientas MinGW-w64 compatible.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] No se detectó MSVC local. Nuitka gestionará y descargará automáticamente la cadena de herramientas del compilador C óptima.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Consejo de Nuitka: Si se le solicita descargar el compilador GCC/MinGW en la primera compilación, asegúrese de tener una conexión de red estable.", "[INFO] Old venv renamed to: {name}": "[INFO] El venv antiguo se renombró a: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Realizando comprobaciones previas del entorno...", diff --git a/qpypack/locales/fr_FR.json b/qpypack/locales/fr_FR.json index 51bb05c..53fd828 100644 --- a/qpypack/locales/fr_FR.json +++ b/qpypack/locales/fr_FR.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Séparés par des virgules (ex. pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Séparés par des virgules (ex. tkinter, matplotlib)", "Commercial PFX File:": "Fichier PFX commercial :", + "Compatibility Mode": "Mode de compatibilité", "Compatibility Mode (Default)": "Mode de compatibilité (par défaut)", "Compatibility depends on build environment glibc version.": "La compatibilité dépend de la version de glibc de l'environnement de construction.", "Concise Log Output": "Sortie de journal concise", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Mode léger activé, application de l'optimisation du bytecode (-OO) et suppression des modules de développement...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+ non détecté. Nuitka utilisera/téléchargera la chaîne d'outils MinGW64 (Python {v}).", "[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] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Aucun MSVC local détecté. Nuitka gérera et téléchargera automatiquement la chaîne d'outils de compilateur C optimale.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Astuce Nuitka : Si vous êtes invité à télécharger le compilateur GCC/MinGW lors de la première construction, assurez-vous d'avoir une connexion réseau stable.", "[INFO] Old venv renamed to: {name}": "[INFO] Ancien venv renommé en : {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Exécution des vérifications préalables de l'environnement...", diff --git a/qpypack/locales/it_IT.json b/qpypack/locales/it_IT.json index dec7395..c176b11 100644 --- a/qpypack/locales/it_IT.json +++ b/qpypack/locales/it_IT.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Separati da virgola (es. pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Separati da virgola (es. tkinter, matplotlib)", "Commercial PFX File:": "File PFX commerciale:", + "Compatibility Mode": "Modalità di compatibilità", "Compatibility Mode (Default)": "Modalità compatibilità (predefinita)", "Compatibility depends on build environment glibc version.": "La compatibilità dipende dalla versione di glibc dell'ambiente di build.", "Concise Log Output": "Output di log conciso", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Modalità Lite attivata, applicazione ottimizzazione bytecode (-OO) e rimozione moduli di sviluppo...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+ non rilevato. Nuitka userà/scaricherà la toolchain MinGW64 (Python {v}).", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Nessun compilatore C locale rilevato. Nuitka scaricherà e gestirà automaticamente una toolchain MinGW-w64 compatibile.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Nessun MSVC locale rilevato. Nuitka gestirà automaticamente e scaricherà la toolchain del compilatore C ottimale.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Suggerimento Nuitka: Se al primo build viene richiesto di scaricare il compilatore GCC/MinGW, assicurarsi di avere una connessione di rete stabile.", "[INFO] Old venv renamed to: {name}": "[INFO] Vecchio venv rinominato in: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Esecuzione controlli ambientali preliminari...", diff --git a/qpypack/locales/ja_JP.json b/qpypack/locales/ja_JP.json index 2ea0dc7..6de008e 100644 --- a/qpypack/locales/ja_JP.json +++ b/qpypack/locales/ja_JP.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "逗号分隔(例如:pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "逗号分隔(例如:tkinter, matplotlib)", "Commercial PFX File:": "商用PFXファイル::", + "Compatibility Mode": "互換モード", "Compatibility Mode (Default)": "互換モード(デフォルト)", "Compatibility depends on build environment glibc version.": "互換性はビルド環境のglibcバージョンに依存します。", "Concise Log Output": "簡潔なログ出力", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] ライトモードが有効です。バイトコード最適化 (-OO) を適用し、開発モジュールを削除しています...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+が検出されませんでした。NuitkaはMinGW64ツールチェーンを使用/ダウンロードします(Python {v})。", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] ローカルのCコンパイラが検出されませんでした。Nuitkaが互換性のあるMinGW-w64ツールチェーンを自動的にダウンロードして管理します。", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] ローカルのMSVCが検出されませんでした。Nuitkaが最適なCコンパイラツールチェーンを自動管理してダウンロードします。", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitkaのヒント: 初回ビルド時にGCC/MinGWコンパイラのダウンロードを求められた場合は、安定したネットワーク接続を確保してください。", "[INFO] Old venv renamed to: {name}": "[INFO] 古いvenvは次の名前に変更されました: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] 事前環境チェックを実行中...", diff --git a/qpypack/locales/ko_KR.json b/qpypack/locales/ko_KR.json index c74cccc..8df682f 100644 --- a/qpypack/locales/ko_KR.json +++ b/qpypack/locales/ko_KR.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "쉼표로 구분 (예: pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "쉼표로 구분 (예: tkinter, matplotlib)", "Commercial PFX File:": "상업용 PFX 파일:", + "Compatibility Mode": "호환 모드", "Compatibility Mode (Default)": "호환 모드 (기본값)", "Compatibility depends on build environment glibc version.": "호환성은 빌드 환경의 glibc 버전에 따라 달라집니다.", "Concise Log Output": "간결한 로그 출력", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 라이트 모드가 활성화되어 바이트코드 최적화(-OO) 및 개발 모듈 제거를 적용하는 중...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+가 감지되지 않았습니다. Nuitka는 MinGW64 툴체인을 사용/다운로드합니다(Python {v}).", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] 로컬 C 컴파일러가 감지되지 않았습니다. Nuitka가 호환되는 MinGW-w64 툴체인을 자동으로 다운로드하고 관리합니다.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] 로컬 MSVC가 감지되지 않았습니다. Nuitka가 최적의 C 컴파일러 툴체인을 자동으로 관리하고 다운로드합니다.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka 팁: 첫 빌드 시 GCC/MinGW 컴파일러 다운로드가 요청되면 안정적인 네트워크 연결을 확인하세요.", "[INFO] Old venv renamed to: {name}": "[INFO] 이전 venv가 다음 이름으로 변경되었습니다: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] 사전 환경 점검을 수행하는 중...", diff --git a/qpypack/locales/nl_NL.json b/qpypack/locales/nl_NL.json index 7add1b4..cabfaa8 100644 --- a/qpypack/locales/nl_NL.json +++ b/qpypack/locales/nl_NL.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Komma gescheiden (bijv. pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Komma gescheiden (bijv. tkinter, matplotlib)", "Commercial PFX File:": "Commercieel PFX-bestand:", + "Compatibility Mode": "Compatibiliteitsmodus", "Compatibility Mode (Default)": "Compatibiliteitsmodus (standaard)", "Compatibility depends on build environment glibc version.": "Compatibiliteit hangt af van de glibc-versie van de buildomgeving.", "Concise Log Output": "Beknopte loguitvoer", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Lite-modus ingeschakeld, bytecode-optimalisatie (-OO) toepassen en dev-modules strippen...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+ niet gedetecteerd. Nuitka zal MinGW64-toolchain gebruiken/downloaden (Python {v}).", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Geen lokale C-compiler gedetecteerd. Nuitka zal automatisch een compatibele MinGW-w64-toolchain downloaden en beheren.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Geen lokale MSVC gedetecteerd. Nuitka beheert en downloadt automatisch de optimale C-compiler-toolchain.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka-tip: Als u bij de eerste build wordt gevraagd om GCC/MinGW-compiler te downloaden, zorg dan voor een stabiele netwerkverbinding.", "[INFO] Old venv renamed to: {name}": "[INFO] Oude venv hernoemd naar: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Pre-flight-omgevingscontroles uitvoeren...", diff --git a/qpypack/locales/pl_PL.json b/qpypack/locales/pl_PL.json index fd02f30..02294bc 100644 --- a/qpypack/locales/pl_PL.json +++ b/qpypack/locales/pl_PL.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Oddzielone przecinkami (np. pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Oddzielone przecinkami (np. tkinter, matplotlib)", "Commercial PFX File:": "Komercyjny plik PFX:", + "Compatibility Mode": "Tryb zgodności", "Compatibility Mode (Default)": "Tryb zgodności (domyślny)", "Compatibility depends on build environment glibc version.": "Zgodność zależy od wersji glibc środowiska budowania.", "Concise Log Output": "Zwięzłe wyjście dziennika", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Tryb Lite włączony, stosowanie optymalizacji bytecode (-OO) i usuwanie modułów deweloperskich...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] Nie wykryto MSVC 14.3+. Nuitka użyje/pobierze narzędzia MinGW64 (Python {v}).", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Nie wykryto lokalnego kompilatora C. Nuitka automatycznie pobierze i zarządza kompatybilnym zestawem narzędzi MinGW-w64.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Nie wykryto lokalnego MSVC. Nuitka automatycznie zarządza i pobiera optymalny zestaw narzędzi kompilatora C.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Wskazówka Nuitka: Jeśli przy pierwszym budowaniu pojawi się monit o pobranie kompilatora GCC/MinGW, upewnij się, że masz stabilne połączenie sieciowe.", "[INFO] Old venv renamed to: {name}": "[INFO] Stare venv zostało przemianowane na: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Wykonywanie wstępnych kontroli środowiska...", diff --git a/qpypack/locales/pt_BR.json b/qpypack/locales/pt_BR.json index 369b845..ca5e05b 100644 --- a/qpypack/locales/pt_BR.json +++ b/qpypack/locales/pt_BR.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Separados por vírgula (ex.: pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Separados por vírgula (ex.: tkinter, matplotlib)", "Commercial PFX File:": "Arquivo PFX Comercial:", + "Compatibility Mode": "Modo de Compatibilidade", "Compatibility Mode (Default)": "Modo de Compatibilidade (Padrão)", "Compatibility depends on build environment glibc version.": "A compatibilidade depende da versão do glibc do ambiente de compilação.", "Concise Log Output": "Saída de Log Concisa", @@ -357,6 +358,7 @@ "[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 de desenvolvimento...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+ não detectado. Nuitka usará/baixará a ferramenta MinGW64 (Python {v}).", "[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 baixará e gerenciará automaticamente um toolchain MinGW-w64 compatível.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Nenhum MSVC local detectado. O Nuitka irá gerenciar e baixar automaticamente o conjunto de ferramentas de compilador C ideal.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Dica do Nuitka: Se for solicitado o download do compilador GCC/MinGW na primeira compilação, garanta uma conexão de rede estável.", "[INFO] Old venv renamed to: {name}": "[INFO] Venv antigo renomeado para: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Executando verificações de ambiente pré-voo...", diff --git a/qpypack/locales/ru_RU.json b/qpypack/locales/ru_RU.json index d9e0e8c..3e89acf 100644 --- a/qpypack/locales/ru_RU.json +++ b/qpypack/locales/ru_RU.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Через запятую (например, pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Через запятую (например, tkinter, matplotlib)", "Commercial PFX File:": "Коммерческий PFX-файл:", + "Compatibility Mode": "Режим совместимости", "Compatibility Mode (Default)": "Режим совместимости (по умолчанию)", "Compatibility depends on build environment glibc version.": "Совместимость зависит от версии glibc в среде сборки.", "Concise Log Output": "Краткий вывод журнала", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Включен облегченный режим, применяется оптимизация байт-кода (-OO) и удаление dev-модулей...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+ не обнаружен. Nuitka будет использовать/загружать набор инструментов MinGW64 (Python {v}).", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Локальный компилятор C не обнаружен. Nuitka автоматически загрузит и установит совместимый инструментарий MinGW-w64.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Локальный MSVC не обнаружен. Nuitka автоматически управляет и загружает оптимальный набор инструментов компилятора C.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Совет Nuitka: Если при первой сборке появится запрос на загрузку компилятора GCC/MinGW, убедитесь в стабильном сетевом соединении.", "[INFO] Old venv renamed to: {name}": "[INFO] Старая виртуальная среда переименована в: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Выполнение предварительных проверок окружения...", diff --git a/qpypack/locales/th_TH.json b/qpypack/locales/th_TH.json index 0ca36cc..053bee1 100644 --- a/qpypack/locales/th_TH.json +++ b/qpypack/locales/th_TH.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "คั่นด้วยเครื่องหมายจุลภาค (เช่น pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "คั่นด้วยเครื่องหมายจุลภาค (เช่น tkinter, matplotlib)", "Commercial PFX File:": "ไฟล์ PFX เชิงพาณิชย์:", + "Compatibility Mode": "โหมดความเข้ากันได้", "Compatibility Mode (Default)": "โหมดความเข้ากันได้ (ค่าเริ่มต้น)", "Compatibility depends on build environment glibc version.": "ความเข้ากันได้ขึ้นอยู่กับเวอร์ชัน glibc ของสภาพแวดล้อมการสร้าง", "Concise Log Output": "เอาต์พุตบันทึกแบบกระชับ", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] เปิดใช้โหมด Lite ใช้การปรับไบต์โค้ด (-OO) และลบโมดูล dev...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] ไม่พบ MSVC 14.3+ Nuitka จะใช้/ดาวน์โหลดชุดเครื่องมือ MinGW64 (Python {v})", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] ไม่พบคอมไพเลอร์ C ในเครื่อง Nuitka จะดาวน์โหลดและจัดการชุดเครื่องมือ MinGW-w64 ที่เข้ากันได้โดยอัตโนมัติ", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] ไม่ตรวจพบ MSVC ในเครื่อง Nuitka จะจัดการและดาวน์โหลดชุดเครื่องมือคอมไพเลอร์ C ที่เหมาะสมที่สุดโดยอัตโนมัติ", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] เคล็ดลับ Nuitka: หากได้รับแจ้งให้ดาวน์โหลดคอมไพเลอร์ GCC/MinGW ในการสร้างครั้งแรก โปรดตรวจสอบการเชื่อมต่อเครือข่ายที่เสถียร", "[INFO] Old venv renamed to: {name}": "[INFO] เปลี่ยนชื่อ venv เก่าเป็น: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] กำลังตรวจสอบสภาพแวดล้อมก่อนเริ่มต้น...", diff --git a/qpypack/locales/tr_TR.json b/qpypack/locales/tr_TR.json index 608970d..87848ef 100644 --- a/qpypack/locales/tr_TR.json +++ b/qpypack/locales/tr_TR.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Virgülle ayrılmış (ör. pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Virgülle ayrılmış (ör. tkinter, matplotlib)", "Commercial PFX File:": "Ticari PFX Dosyası:", + "Compatibility Mode": "Uyumluluk Modu", "Compatibility Mode (Default)": "Uyumluluk Modu (Varsayılan)", "Compatibility depends on build environment glibc version.": "Uyumluluk, derleme ortamının glibc sürümüne bağlıdır.", "Concise Log Output": "Öz Günlük Çıktısı", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Hafif mod etkin, bayt kodu optimizasyonu (-OO) uygulanıyor ve geliştirici modülleri kaldırılıyor...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] MSVC 14.3+ algılanmadı. Nuitka, MinGW64 araç setini kullanacak/indirecek (Python {v}).", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Yerel C derleyicisi algılanmadı. Nuitka otomatik olarak uyumlu bir MinGW-w64 araç zincirini indirip yönetecek.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Yerel MSVC algılanmadı. Nuitka en uygun C derleyici araç zincirini otomatik olarak yönetip indirecek.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka İpucu: İlk derlemede GCC/MinGW derleyicisini indirmeniz istenirse, lütfen istikrarlı bir ağ bağlantısı sağlayın.", "[INFO] Old venv renamed to: {name}": "[INFO] Eski venv şu şekilde yeniden adlandırıldı: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Ön kontrol ortam kontrolleri yapılıyor...", diff --git a/qpypack/locales/vi_VN.json b/qpypack/locales/vi_VN.json index 3ff506f..00da0da 100644 --- a/qpypack/locales/vi_VN.json +++ b/qpypack/locales/vi_VN.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "Phân tách bằng dấu phẩy (ví dụ: pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "Phân tách bằng dấu phẩy (ví dụ: tkinter, matplotlib)", "Commercial PFX File:": "Tệp PFX thương mại:", + "Compatibility Mode": "Chế độ tương thích", "Compatibility Mode (Default)": "Chế độ tương thích (Mặc định)", "Compatibility depends on build environment glibc version.": "Khả năng tương thích phụ thuộc vào phiên bản glibc của môi trường xây dựng.", "Concise Log Output": "Đầu ra nhật ký ngắn gọn", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] Chế độ Lite được bật, áp dụng tối ưu hóa bytecode (-OO) và loại bỏ các mô-đun dev...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] Không phát hiện MSVC 14.3+. Nuitka sẽ sử dụng/tải xuống bộ công cụ MinGW64 (Python {v}).", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] Không phát hiện trình biên dịch C cục bộ. Nuitka sẽ tự động tải xuống và quản lý bộ công cụ MinGW-w64 tương thích.", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] Không phát hiện MSVC cục bộ. Nuitka sẽ tự động quản lý và tải xuống bộ công cụ trình biên dịch C tối ưu.", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Mẹo Nuitka: Nếu được nhắc tải xuống trình biên dịch GCC/MinGW trong lần xây dựng đầu tiên, vui lòng đảm bảo kết nối mạng ổn định.", "[INFO] Old venv renamed to: {name}": "[INFO] Venv cũ đã được đổi tên thành: {name}", "[INFO] Performing pre-flight environment checks...": "[INFO] Đang thực hiện kiểm tra môi trường sơ bộ...", diff --git a/qpypack/locales/zh_TW.json b/qpypack/locales/zh_TW.json index d5d7e0b..9444143 100644 --- a/qpypack/locales/zh_TW.json +++ b/qpypack/locales/zh_TW.json @@ -63,6 +63,7 @@ "Comma separated (e.g. pandas, PyQt5)": "逗號分隔(例如 pandas, PyQt5)", "Comma separated (e.g. tkinter, matplotlib)": "逗號分隔(例如 tkinter, matplotlib)", "Commercial PFX File:": "商業 PFX 檔案::", + "Compatibility Mode": "相容模式", "Compatibility Mode (Default)": "相容性模式(預設)", "Compatibility depends on build environment glibc version.": "相容性取決於建置環境的 glibc 版本。", "Concise Log Output": "簡潔日誌輸出", @@ -357,6 +358,7 @@ "[INFO] Lite mode enabled, applying bytecode optimization (-OO) and stripping dev modules...": "[INFO] 已啟用精簡模式,套用位元組碼最佳化 (-OO) 並移除開發模組...", "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).": "[INFO] 未偵測到 MSVC 14.3+。Nuitka 將使用/下載 MinGW64 工具鏈(Python {v})。", "[INFO] No local C compiler detected. Nuitka will automatically download and manage a compatible MinGW-w64 toolchain.": "[INFO] 未偵測到本機 C 編譯器。Nuitka 將自動下載並管理相容的 MinGW-w64 工具鏈。", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] 未偵測到本機 MSVC。Nuitka 將自動管理並下載最佳的 C 編譯器工具鏈。", "[INFO] Nuitka Tip: If prompted to download GCC/MinGW compiler on first build, please ensure stable network connection.": "[INFO] Nuitka 提示:若首次建置時提示下載 GCC/MinGW 編譯器,請確保網路連線穩定。", "[INFO] Old venv renamed to: {name}": "[INFO] 舊的虛擬環境已重新命名為:{name}", "[INFO] Performing pre-flight environment checks...": "[INFO] 正在執行前置環境檢查...", diff --git a/qpypack/main.py b/qpypack/main.py index b531f62..86fe651 100644 --- a/qpypack/main.py +++ b/qpypack/main.py @@ -125,7 +125,7 @@ except ImportError: HAS_QT_AUDIO = False __app_name__ = "QPyPack" -__version__ = "2.9.0" +__version__ = "2.9.1" __author__ = "QwejayHuang" __company__ = "Qwesoft" __description__ = "Modern Cross-Platform Python Packaging GUI Powered by PyInstaller & Nuitka" @@ -596,6 +596,8 @@ ZH_CN_DICT = { "[SUCCESS] Corrupted cache cleared. Please add Nuitka cache to antivirus whitelist, or switch to PyInstaller engine and retry.": "[SUCCESS] 损坏缓存已清空。请将 Nuitka 缓存目录加入杀软白名单,或切换至 PyInstaller 引擎后重试。", "[CRITICAL] Paddle detected! Call 'multiprocessing.freeze_support()' under 'if __name__ == \"__main__\":' in your entry script, or the packaged app will spawn infinite processes and exhaust memory.": "[严重警告] 检测到使用了 Paddle 库!请务必在入口脚本的 'if __name__ == \"__main__\":' 下调用 'multiprocessing.freeze_support()',否则打包后的程序运行会导致无限弹窗派生并耗尽内存。", + "Compatibility Mode": "兼容模式", + "[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.": "[INFO] 未检测到本地 MSVC。Nuitka 将自动管理并下载最优的 C 编译器工具链。", "Unknown": "未知" } @@ -944,7 +946,7 @@ def load_config(retry=True): "pyi_version": "6.21.0", "nuitka_version": "4.1.3", "enable_backport_shield": "True", - "lite_mode": "False", + "lite_mode": "True", } for k, v in settings_defaults.items(): config.set("Settings", k, v) @@ -3137,9 +3139,9 @@ class SettingsPanel(QWidget): h_icon.addWidget(self.icon_preview) h_icon.addWidget(self.btn_icon) - self.rb_compat_mode = QRadioButton(_("Compatibility Mode (Default)")) + self.rb_compat_mode = QRadioButton(_("Compatibility Mode")) self.rb_lite_mode = QRadioButton(_("Lite Mode (Smaller size)")) - self.rb_compat_mode.setChecked(True) + self.rb_lite_mode.setChecked(True) pack_mode_cont = QWidget() h_pack_mode = QHBoxLayout(pack_mode_cont) @@ -4394,7 +4396,7 @@ class SettingsPanel(QWidget): self.engine_combo.setCurrentText(s.get("engine", "PyInstaller")) - is_lite = s.getboolean("lite_mode", False) + is_lite = s.getboolean("lite_mode", True) self.rb_lite_mode.setChecked(is_lite) self.rb_compat_mode.setChecked(not is_lite) @@ -4579,8 +4581,9 @@ class SettingsPanel(QWidget): ) if getattr(self, "upx_check", None) is not None and getattr(self, "upx_path_container", None) is not None: - self.upx_check.setVisible(True) - self.upx_path_container.setVisible(self.upx_check.isChecked()) + is_pyi = (engine == "PyInstaller") + self.upx_check.setVisible(is_pyi) + self.upx_path_container.setVisible(is_pyi and self.upx_check.isChecked()) def on_python_path_changed(self, text=""): raw_text = text or self.python_path_combo.currentText().strip() @@ -6310,7 +6313,7 @@ class PackingThread(QThread): "-m", "nuitka", "--assume-yes-for-downloads", - # "--enable-plugin=anti-bloat", + "--enable-plugin=anti-bloat", f"--output-dir={self.temp_out_dir.as_posix()}", f"--output-filename={app_name}{ext}", ] @@ -6393,30 +6396,8 @@ class PackingThread(QThread): if has_suitable_msvc and has_win_sdk: cmd.append("--msvc=latest") self.progress.emit(_("[INFO] Found compatible MSVC + Windows SDK environment, using native compiler.")) - - elif py_ver_num >= (3, 13) and is_64bit: - cmd.append("--zig") - self.progress.emit(_("[INFO] Python 3.13+ detected: Using Zig compiler (--zig) as native backend.")) - - elif py_ver_num <= (3, 12): - cmd.append("--mingw64") - if not has_suitable_msvc and py_ver_num >= (3, 11): - self.progress.emit( - _( - "[INFO] MSVC 14.3+ not detected. Nuitka will use/download MinGW64 toolchain (Python {v}).", - v=f"{py_ver_num[0]}.{py_ver_num[1]}", - ) - ) - else: - self.progress.emit(_("[INFO] Using MinGW64 compiler.")) - else: - cmd.append("--msvc=latest") - self.progress.emit( - _( - "[WARN] Python 3.13+ (32-bit) requires Visual Studio 2022 with Windows SDK. Build will attempt with current environment." - ) - ) + self.progress.emit(_("[INFO] No local MSVC detected. Nuitka will auto-manage and download the optimal C compiler toolchain.")) if free_disk < 3.0: self.progress.emit( @@ -6467,7 +6448,7 @@ class PackingThread(QThread): cores = safe_jobs cmd.append(f"--jobs={cores}") - if self.params.get("upx"): + if self.params.get("upx") and not self.params.get("onefile"): cmd.append("--enable-plugin=upx") upx_dir_custom = (self.params.get("upx_path") or "").strip() if upx_dir_custom and Path(upx_dir_custom).exists(): @@ -8140,7 +8121,7 @@ class MainWindow(QMainWindow): "reqs_file": sp.reqs_file_edit.text().strip(), "hidden_imports": sp.hidden_edit.text(), "add_data_list": add_data_items, - "upx": sp.upx_check.isChecked(), + "upx": sp.upx_check.isChecked() if engine == "PyInstaller" else False, "upx_path": sp.upx_path_edit.text().strip(), "cpu_cores": sp.cores_spin.value(), "exclude_modules": sp.exclude_edit.text().strip(), @@ -8565,4 +8546,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main()