Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
295558836b | ||
|
|
98a1e9d371 | ||
|
|
09d2244dbe | ||
|
|
7340ecd283 | ||
|
|
d0a96ad578 | ||
|
|
cb840992ef | ||
|
|
a99dad2116 |
@@ -1,24 +1,66 @@
|
|||||||
*.pyc
|
# Python 缓存/编译产物
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
**/__pycache__/
|
||||||
|
*.py[cod]
|
||||||
*.pyd
|
*.pyd
|
||||||
*.pyo
|
*.pyo
|
||||||
|
|
||||||
# 打包产物
|
# PyInstaller / Cython / 打包产物
|
||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
dist_cy/
|
dist_cy/
|
||||||
dist_obf/
|
dist_obf/
|
||||||
|
**/build/
|
||||||
|
**/dist/
|
||||||
|
**/dist_cy/
|
||||||
|
**/dist_obf/
|
||||||
|
*.spec
|
||||||
|
_core.*
|
||||||
|
launcher.py
|
||||||
|
setup_cython.py
|
||||||
|
|
||||||
# APK文件夹
|
# 打包好的安装器,不提交 exe 成品
|
||||||
apks/
|
*.exe
|
||||||
|
*.dll
|
||||||
|
*Installer*.exe
|
||||||
|
*安装*.exe
|
||||||
|
*刷入工具*.exe
|
||||||
|
*推送工具*.exe
|
||||||
|
*Pusher*.exe
|
||||||
|
UNIZ-*.exe
|
||||||
|
|
||||||
# 资源包
|
# 资源包/车机文件/临时拉取文件
|
||||||
package.bin
|
package.bin
|
||||||
|
*package*.bin
|
||||||
|
*.apk
|
||||||
|
*.img
|
||||||
|
*.dat
|
||||||
|
*.zip
|
||||||
|
*.7z
|
||||||
|
*.rar
|
||||||
|
apks/
|
||||||
|
**/apks/
|
||||||
|
diag_apk/
|
||||||
|
pull_list.txt
|
||||||
|
unit.bat
|
||||||
|
|
||||||
|
# 本地工具链副本;只提交需要维护的脚本/说明,不提交二进制
|
||||||
|
tools/*.exe
|
||||||
|
tools/*.dll
|
||||||
|
tools/__pycache__/
|
||||||
|
Q05-Lidar/app.ico
|
||||||
|
Q05-Lidar/tools/*
|
||||||
|
!Q05-Lidar/tools/
|
||||||
|
!Q05-Lidar/tools/encrypt_q05_lidar_resource.py
|
||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# 临时文件
|
# 本地日志/临时文件
|
||||||
*.log
|
*.log
|
||||||
*.tmp
|
*.tmp
|
||||||
|
*.bak
|
||||||
|
*.old
|
||||||
|
*.swp
|
||||||
|
~$*
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
|||||||
|
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['app-yidong.py'],
|
['app.py'],
|
||||||
pathex=[],
|
pathex=[],
|
||||||
binaries=binaries,
|
binaries=binaries,
|
||||||
datas=datas,
|
datas=datas,
|
||||||
|
|||||||
|
After Width: | Height: | Size: 116 KiB |
@@ -1,7 +1,11 @@
|
|||||||
@echo off
|
@echo off
|
||||||
chcp 65001 >nul
|
chcp 65001 >nul
|
||||||
set NAME=X5plus刷入工具
|
cd /d "%~dp0"
|
||||||
set SRC=X5plusTool.py
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=Qiyuan_07_Multi-lan-installer"
|
||||||
|
set "SRC=Qiyuan_A07_Multi-lan-installer.py"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
title %NAME% - Build
|
title %NAME% - Build
|
||||||
|
|
||||||
echo ============================================================
|
echo ============================================================
|
||||||
@@ -15,6 +19,11 @@ if errorlevel 1 (
|
|||||||
pause
|
pause
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] app.ico not found in A07 folder: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
for /f "delims=" %%i in ('where python') do set PY=%%i
|
for /f "delims=" %%i in ('where python') do set PY=%%i
|
||||||
echo Python: %PY%
|
echo Python: %PY%
|
||||||
|
|
||||||
@@ -55,14 +64,14 @@ copy "%PYD%" _core.pyd >nul
|
|||||||
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
|
||||||
echo [4/6] Copy resources...
|
echo [4/6] Copy resources...
|
||||||
copy ..\adb.exe . >nul
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
copy ..\AdbWinApi.dll . >nul
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
copy ..\AdbWinUsbApi.dll . >nul
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
copy ..\7za.exe . >nul
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
if exist "..\app.ico" copy "..\app.ico" . >nul
|
copy "%ICON%" . >nul
|
||||||
|
|
||||||
echo [5/6] PyInstaller...
|
echo [5/6] PyInstaller...
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin launcher.py
|
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ICON%" --add-data "%ICON%;." --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin launcher.py
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
cd ..
|
cd ..
|
||||||
echo [ERROR] PyInstaller failed
|
echo [ERROR] PyInstaller failed
|
||||||
@@ -77,9 +86,8 @@ cd ..
|
|||||||
goto :DONE
|
goto :DONE
|
||||||
|
|
||||||
:NORMAL
|
:NORMAL
|
||||||
cd /d "%~dp0"
|
|
||||||
echo [INFO] Normal PyInstaller...
|
echo [INFO] Normal PyInstaller...
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin %SRC%
|
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ICON%" --add-data "%ICON%;." --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin %SRC%
|
||||||
|
|
||||||
:DONE
|
:DONE
|
||||||
echo.
|
echo.
|
||||||
@@ -0,0 +1,284 @@
|
|||||||
|
# 长安语言刷入工具 (Changan Language Flashing Tool)
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Windows GUI tool suite (Python 3.6+ / tkinter) for flashing or pushing multi-language APKs to Android-based vehicle infotainment systems. Built by 宜宾科宜科技有限公司.
|
||||||
|
|
||||||
|
Most tools are single-file tkinter apps with the same rough architecture: GUI, VIN authorization, package extraction, ADB commands, logging, and worker threads live in one class. Preserve that style unless the user explicitly asks for a larger refactor.
|
||||||
|
|
||||||
|
## Tool Variants
|
||||||
|
|
||||||
|
| Tool file | Vehicle / purpose | Window title | Pack script |
|
||||||
|
|-----------|-------------------|--------------|-------------|
|
||||||
|
| `Q07/Qiyuan_Q07-multi-lan-installer.py` | 启源Q07 | 适用于启源Q07多语言安装 | `Q07/pack_q07.bat` |
|
||||||
|
| `S05/S05.py` | 深蓝S05 original | 深蓝S05多语言安装 | `S05/pack_s05.bat` |
|
||||||
|
| `S05/S05_fixed.py` | 深蓝S05 fixed/experimental copy | 长安语言安装工具 | `S05/pack_s05_fixed.bat` |
|
||||||
|
| `X5plus/X5plusTool.py` | X5plus | 适用于X5plus多语言安装 | `X5plus/pack_x5plus.bat` |
|
||||||
|
| `CS55-Q05/CS55-Q05_Installer.py` | CS55Plus/Q05 通用 | CS55Plus/Q05 语言刷入工具 | `CS55-Q05/pack_cs55_q05.bat` |
|
||||||
|
| `CS75Pro/CS75Pro_Installer.py` | CS75Pro | CS75Pro 语言刷入工具 | `CS75Pro/pack_cs75pro.bat` |
|
||||||
|
| `Yidong/app-yidong.py` | 长安逸动 | 长安逸动语言刷入工具 | `Yidong/pack_yidong.bat` |
|
||||||
|
| `UNIZ/UNIZ.py` | UNI-Z file pusher | UNI-Z语言文件推送工具 | `UNIZ/pack_uniz.bat` |
|
||||||
|
| `UNI-T/UNI-T-multi-lan-installer.py` | UNI-T | 适用于UNI-T多语言安装 | `UNI-T/pack_unit.bat` |
|
||||||
|
| `Mazda-EZ60/Mazda-EZ60_1.2.py` | Mazda-EZ60 OS 1.2 | Mazda-EZ60_OS-1.2适用 | `Mazda-EZ60/pack_mazda_ez60_1.2.bat` |
|
||||||
|
| `Mazda-EZ60/Mazda_EZ60-Language-Install_v1.0.py` | Mazda-EZ60 OS 1.0 | 马自达EZ60刷机工具_OS-1.0 | `Mazda-EZ60/pack_mazda_ez60_1.0.bat` |
|
||||||
|
| `Q05-Lidar/Q05-Lidar_Installer.py` | Q05_Lidar permission/bootstrap + language installer | Q05_Lidar | `Q05-Lidar/pack_q05_lidar.bat` |
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
├── Q07/ # Q07 script, pack scripts, ignored build outputs
|
||||||
|
├── S05/ # S05 original and fixed copy
|
||||||
|
├── X5plus/ # X5plus tool
|
||||||
|
├── CS55-Q05/ # CS55Plus/Q05 common installer and icon
|
||||||
|
├── CS75Pro/ # CS75Pro installer copied from CS55-Q05 flow
|
||||||
|
├── Yidong/ # Yidong-specific tool
|
||||||
|
├── UNIZ/ # UNI-Z file pusher
|
||||||
|
├── UNI-T/ # UNI-T installer cloned from Q07 flow
|
||||||
|
├── Mazda-EZ60/ # Mazda-EZ60 tool
|
||||||
|
├── A07/ # Qiyuan A07 tool
|
||||||
|
├── Q05-Lidar/ # Q05_Lidar tool plus resource.dat/tools
|
||||||
|
├── app.ico
|
||||||
|
├── package.bin # encrypted package, not committed; shared from root
|
||||||
|
└── tools/ # shared adb/fastboot/7za dependencies for pack scripts
|
||||||
|
├── adb.exe
|
||||||
|
├── AdbWinApi.dll
|
||||||
|
├── AdbWinUsbApi.dll
|
||||||
|
├── fastboot.exe
|
||||||
|
└── 7za.exe # 7-Zip Extra 26.01, bundled by pack scripts
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture Notes
|
||||||
|
|
||||||
|
- Most tools use class `ADKAPKGUI`; `UNIZ/UNIZ.py` uses `UNIZLanguageGUI`.
|
||||||
|
- Worker actions run in `threading.Thread(..., daemon=True)`.
|
||||||
|
- Tkinter calls from workers must go through `run_on_ui_thread(...)`.
|
||||||
|
- Prefer `self.root.after(0, lambda: func(*args, **kwargs))` in `run_on_ui_thread`; direct `after(0, func, *args, **kwargs)` breaks when kwargs such as `text=` or `fg=` are passed.
|
||||||
|
- Background `messagebox.*` calls should be scheduled with `run_on_ui_thread`.
|
||||||
|
- Keep files UTF-8 with `# -*- coding: utf-8 -*-`.
|
||||||
|
|
||||||
|
## ADB And Auth
|
||||||
|
|
||||||
|
- `run_adb_command(command)` handles normal ADB commands such as `adb devices`, `adb push`, and non-shell install calls.
|
||||||
|
- `run_adb_shell(shell_command)` exists in the 逸动-family tools and Mazda copy; it shells into the device and automatically sends password `adb36987`.
|
||||||
|
- All `adb shell` operations in `CS55-Q05/CS55-Q05_Installer.py`, `CS75Pro/CS75Pro_Installer.py`, `Yidong/app-yidong.py`, and `Mazda-EZ60/Mazda-EZ60_1.2.py` should go through `run_adb_shell()`.
|
||||||
|
- `UNIZ/UNIZ.py` must not use `adb shell`; it only checks devices and pushes APKs to `/storage/emulated/0/Download/`.
|
||||||
|
- Standard auth flow uses:
|
||||||
|
- `auth-check?vin=...` for authorization.
|
||||||
|
- `package-key?vin=...` for `package.bin` extraction password.
|
||||||
|
- VIN keys:
|
||||||
|
- Q07/S05/X5plus: `ca_vin_info` or `VIN`.
|
||||||
|
- UNI-T: try `persist.vendor.car.VIN`, then `settings get global VIN`, then legacy system VIN keys.
|
||||||
|
- 逸动/Mazda: `settings get system ca.car.vin` via auto-password shell.
|
||||||
|
- UNI-Z: user manually enters VIN.
|
||||||
|
|
||||||
|
## Package Extraction
|
||||||
|
|
||||||
|
- `package.bin`-style encrypted resources are extracted under `%LOCALAPPDATA%\.cache\system\.android\...`.
|
||||||
|
- Current cache directories:
|
||||||
|
- `Q07/Qiyuan_Q07-multi-lan-installer.py` -> `apps_cache_Q07`
|
||||||
|
- `S05/S05.py` / `S05/S05_fixed.py` -> `apps_cache_S05`
|
||||||
|
- `X5plus/X5plusTool.py` -> `apps_cache_X5plus`
|
||||||
|
- `CS55-Q05/CS55-Q05_Installer.py` -> `apps_cache_common`
|
||||||
|
- `CS75Pro/CS75Pro_Installer.py` -> `apps_cache_CS75Pro`
|
||||||
|
- `Yidong/app-yidong.py` -> `apps_cache_yidong`
|
||||||
|
- `UNIZ/UNIZ.py` -> `apps_cache_UNIZ`
|
||||||
|
- `UNI-T/UNI-T-multi-lan-installer.py` -> `apps_cache_UNI_T`
|
||||||
|
- `Mazda-EZ60/Mazda-EZ60_1.2.py` -> `apps_cache_Mazda_EZ60`
|
||||||
|
- Shared binaries are managed under root `tools/`: `adb.exe`, `AdbWinApi.dll`, `AdbWinUsbApi.dll`, `fastboot.exe`, and `7za.exe`. Vehicle pack scripts in subfolders should copy from `%ROOT%\tools`, not from each vehicle folder.
|
||||||
|
- For progress display, detect support for `-bsp1` by checking for `-bs{o|e|p}` in 7za help output.
|
||||||
|
- If `Incorrect command line` appears, retry with the basic compatible command: `x PACKAGE -pPASSWORD -oDIR -y`.
|
||||||
|
- Decode 7za output with GBK first, then UTF-8 fallback.
|
||||||
|
- 7za progress must parse streamed output cumulatively. Do not read one byte and regex that single byte; percentages such as `42%` span multiple bytes and will otherwise jump from 0 to 100.
|
||||||
|
- User-facing resource extraction text should say `资源准备中` / `Preparing resources`, not `资源解压` / `Extracting package`, unless the UI is an explicit debug test.
|
||||||
|
- Cache cleanup should be best effort in three places when feasible: before a new extraction, during normal window close, and via `atexit` for ordinary process exit. A forced process kill cannot be guaranteed, so also clear stale caches at next extraction/startup.
|
||||||
|
|
||||||
|
## Shared UX And Safety Rules
|
||||||
|
|
||||||
|
- Hosts update logic should replace conflicting entries for the managed domain. If the hosts file already contains the target domain with a different IP, delete that line and write the expected `IP domain` entry instead of appending duplicates.
|
||||||
|
- VIN authorization logs should be explicit for operator-facing flows: print the current VIN, print `data.vehicleName` when `auth-check` returns it, print authorization success, and print a clear unauthorized/failure log when denied.
|
||||||
|
- `package-key` requests should use the vehicle name returned by `auth-check` (`data.vehicleName`) whenever available. Do not hardcode a model name if the authorization API already returned the exact vehicle name for the VIN.
|
||||||
|
- Normal users should not see low-level sensitive process details such as `fastboot`, `init_boot`, boot keys, or image names during permission/bootstrap flows. Use black-box text such as `正在获取权限中`, `获取成功`, and `获取失败`; leave command details for debug mode only.
|
||||||
|
- Process logs should stay minimal in normal mode. Detailed ADB/7za/API command logs belong behind debug mode.
|
||||||
|
- All Tkinter UI updates and `messagebox.*` calls from workers must go through `run_on_ui_thread(...)`.
|
||||||
|
|
||||||
|
## Model-Specific Behavior
|
||||||
|
|
||||||
|
### Q07
|
||||||
|
|
||||||
|
- Main script is `Q07/Qiyuan_Q07-multi-lan-installer.py`; keep `Q07/app.py` retired unless explicitly asked to restore the old name.
|
||||||
|
- Q07 release resource package is `Q07_package.bin`, not shared root `package.bin`. The tool may keep a compatibility fallback for old local `package.bin`, but user-facing errors/logs should name `Q07_package.bin`.
|
||||||
|
- Q07 cache directory is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_Q07`. Clean it before extraction, on normal window close, and through `atexit`.
|
||||||
|
- Q07 `package-key` requests must include both `vin` and `vehicleName`; `vehicleName` comes from `auth-check` (`data.vehicleName`) and should be cached when available.
|
||||||
|
- Q07 `安装App` must also verify the current VIN is authorized before installing selected APK files. Debug mode may skip this check; normal mode must not.
|
||||||
|
- Q07 debug mode uses `Ctrl+Shift+D` and verifies the password through `POST /api/authorizations/verify-debug-mode-password`; do not restore hardcoded local debug passwords.
|
||||||
|
- Q07 debug mode exposes `解压测试` / `Ctrl+Shift+E`; it fetches `package-key` and extracts `Q07_package.bin`. The success log should only say `资源准备完成` / `Resources ready`, not app or priv-app counts.
|
||||||
|
- Q07 normal logs should keep the resource structure black-box: do not show app/priv-app counts or the current APK name during `刷入语言包`. `安装App` may show the selected APK filename currently being installed.
|
||||||
|
- Q07 UI has only language switching. Do not reintroduce dark/light theme switching or company/about subtitle text.
|
||||||
|
- Q07 window/taskbar icon should use `Q07/app.ico` at runtime: call `iconbitmap`, set a Windows AppUserModelID before creating `Tk()`, and set big/small Win32 window icons when possible. The pack scripts must include `--icon="%ICON%"` and `--add-data "%ICON%;."`.
|
||||||
|
- Q07 pack scripts (`Q07/pack_q07.bat` and `Q07/pack.bat`) are Cython-only. If Cython fails or no `_core*.pyd` is generated, stop with an error; do not fallback to normal PyInstaller.
|
||||||
|
- Q07 pack scripts use ASCII output name `Qiyuan_Q07-multi-lan-installer`, compile `Qiyuan_Q07-multi-lan-installer.py` into `_core.pyd`, use a tiny launcher, and bundle `adb.exe`, `AdbWinApi.dll`, `AdbWinUsbApi.dll`, `7za.exe`, and `Q07/app.ico`.
|
||||||
|
|
||||||
|
### S05
|
||||||
|
|
||||||
|
- Keep `S05/S05.py` as original unless explicitly asked.
|
||||||
|
- Use `S05/S05_fixed.py` for experimental/fixed S05 changes.
|
||||||
|
- Do not add `chmod`, `chown`, or `restorecon` to the S05 system-app push path unless explicitly requested; the target system inherits permissions.
|
||||||
|
- `S05/S05_fixed.py` includes debug extract test `Ctrl+Shift+E` and 7za progress support.
|
||||||
|
|
||||||
|
### UNI-Z
|
||||||
|
|
||||||
|
- Endpoint for visible passwords: `/api/authorizations/get-uni-z-pwd`.
|
||||||
|
- Display `factoryPwd` as factory mode password and `password` as debug password.
|
||||||
|
- If `authorized == false` or `password` is empty, show unauthorized state and do not proceed.
|
||||||
|
- `password` from `get-uni-z-pwd` is not the package extraction password.
|
||||||
|
- Before push, call `/api/authorizations/package-key?vin=...` to get the real `package.bin` password.
|
||||||
|
- Push only to `/storage/emulated/0/Download/`; no `adb shell`.
|
||||||
|
- Language selection: RU/FR/ES/EN. Only the selected language Settings APK is pushed; other language Settings APKs are skipped silently.
|
||||||
|
- Hidden debug mode: `Ctrl+Shift+D`, password `zxch5200`, logs full ADB/7za/API details.
|
||||||
|
|
||||||
|
### UNI-T
|
||||||
|
|
||||||
|
- Main script is `UNI-T/UNI-T-multi-lan-installer.py`; it is cloned from the Q07 installer flow and preserves Q07-style VIN authorization, package extraction, system app push/install logic, language settings, debug password verification, and Cython-only packaging.
|
||||||
|
- UNI-T VIN should be read with fallbacks: `adb shell getprop persist.vendor.car.VIN`, then `settings get global VIN`, then legacy `settings get system VIN` / `settings get system ca_vin_info`. On the connected S202_MCA device, the live VIN is currently in `settings global VIN`.
|
||||||
|
- UNI-T `获取权限` must run `adb shell setenforce 0` before `adb root` and `adb remount`; without this pre-step, `adb root` may not open on this vehicle.
|
||||||
|
- UNI-T release resource package is `UNI-T_package.bin`, with legacy `package.bin` fallback only for local compatibility. User-facing errors/logs should name `UNI-T_package.bin`.
|
||||||
|
- UNI-T cache directory is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_UNI_T`. Clean it before extraction, on normal window close, and through `atexit`.
|
||||||
|
- Before UNI-T `刷入语言包` pushes files, run `pm disable-user --user 10` for: `com.wt.roadbook`, `com.thunder.carplay`, `com.tencent.wecarmas`, `com.tencent.qqlive.audiobox`, `com.incall.apps.softmanager`, `com.changan.appmarket`, and `com.bytedance.byteautoservice`.
|
||||||
|
- UNI-T package root may contain `CarSystemUI.apk`; during `刷入语言包`, push it separately and copy it with `cp -f` to `/system/system_ext/priv-app/CarSystemUI/CarSystemUI.apk`.
|
||||||
|
- UNI-T `package-key` requests must include both `vin` and `vehicleName`; `vehicleName` comes from `auth-check` (`data.vehicleName`) and should be cached when available.
|
||||||
|
- `UNI-T/pack_unit.bat` is Cython-only. If Cython fails or no `_core*.pyd` is generated, stop the build; do not fallback to normal PyInstaller.
|
||||||
|
|
||||||
|
### CS55-Q05
|
||||||
|
|
||||||
|
- CS55Plus/Q05 common installer lives in `CS55-Q05/CS55-Q05_Installer.py`, with icon `CS55-Q05/cs55-q05.ico` and pack script `CS55-Q05/pack_cs55_q05.bat`.
|
||||||
|
- `pack_cs55_q05.bat` is Cython-only. If Cython fails or no `_core*.pyd` is generated, stop the build; do not fall back to normal PyInstaller.
|
||||||
|
- `刷入语言包` must verify VIN authorization before resource flashing. After authorization passes and before APK flashing, run both `pm disable-user <package>` and `pm uninstall -k --user 0 <package>` through `run_adb_shell()` for `com.wtcl.electronicdirections`, `com.tinnove.netease.music`, and `com.changan.appmarket`.
|
||||||
|
- All CS55/Q05 language package and manual APK installs should use `pm install -d -f -r <apk>` through `run_adb_shell()` so older/different app versions can install reliably.
|
||||||
|
- After CS55/Q05 language flashing or APK installation, do not reset `setprop vecentek.model` back to `0`; keep it at `1` so users can continue installing APKs manually.
|
||||||
|
- Normal `刷入语言包` logs should not reveal APK names; show generic current/total progress only. `安装App` may show each APK result and current APK name.
|
||||||
|
|
||||||
|
### CS75Pro
|
||||||
|
|
||||||
|
- CS75Pro installer lives in `CS75Pro/CS75Pro_Installer.py`, copied from the CS55-Q05 flow, with icon `CS75Pro/cs75pro.ico` and pack script `CS75Pro/pack_cs75pro.bat`.
|
||||||
|
- Keep the CS75Pro flashing flow aligned with CS55-Q05 unless explicitly requested.
|
||||||
|
- CS75Pro cache directory is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_CS75Pro`.
|
||||||
|
- CS75Pro `package-key` requests must include both `vin` and `vehicleName`, but `vehicleName` is intentionally hardcoded to `CS75Pro`. This is an explicit exception to the general auth-returned `vehicleName` rule; do not replace it with `auth-check` `data.vehicleName` in future edits.
|
||||||
|
- Before CS75Pro `刷入语言包`, run `pm disable-user <package>` first and then `pm uninstall -k --user 0 <package>` through `run_adb_shell()` for `com.wtcl.electronicdirections`, `com.tinnove.netease.music`, `com.incall.apps.softmanager`, and `com.tencent.qqlive.audiobox`.
|
||||||
|
- CS75Pro language package installs should use `pm install -d -f -r <apk>` through `run_adb_shell()`.
|
||||||
|
|
||||||
|
### Mazda-EZ60
|
||||||
|
|
||||||
|
- Based on `CS55-Q05/CS55-Q05_Installer.py` / 逸动 flow.
|
||||||
|
- Uses auto-password shell (`adb36987`) for VIN reads, `pm install`, overlay enable, disable commands, settings, and reboot.
|
||||||
|
- Installs APKs from extracted `apps` via push to `/data/local/tmp` then `pm install -r -d`.
|
||||||
|
- `Mazda-EZ60/Mazda-EZ60_1.2.py` should show 7za extraction progress with stream parsing.
|
||||||
|
- Mazda 1.2 resource package is `package_voice-assistant.bin`, not the old `package.bin`; `package-key` still supplies the extraction password.
|
||||||
|
- Mazda 1.2 package cache is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_Mazda_EZ60`; clean it on startup, before extraction, on normal window close, and through `atexit`.
|
||||||
|
- Mazda `package-key` requests must include both `vin` and `vehicleName`; cache `data.vehicleName` from `auth-check`, and query `auth-check` before `package-key` if it is missing.
|
||||||
|
- Mazda 1.2 has a first-row `语音助理补丁` button that installs Magisk modules from the same extracted package. The package should contain `enable_install.zip` and `MazdaEZ60VoiceEnglish-1.2-Aemeth.zip` beside `apps/` (the tool also tolerates them inside `apps/`), and each zip must contain a valid `module.prop`.
|
||||||
|
- Mazda 1.2 `获取权限` uses a separate `boot-challenge` -> `boot-key` flow and must only use `data.sessionKey` / BOOT_KEY to decrypt `EZ60_resource.dat`; do not reuse `package-key` as the init_boot resource key.
|
||||||
|
- Mazda 1.2 `EZ60_resource.dat` is an AES-256-GCM init_boot resource with `EZ60R2` header / `ez60-resource-v2` format and default AAD `Mazda-EZ60 init_boot resource v1`. Generate it with `tools/encrypt_q05_lidar_resource.py --vehicle ez60 -o EZ60_resource.dat ...` using the EZ60 patched `init_boot.img`.
|
||||||
|
- Mazda 1.2 `EZ60_resource.dat` is optional at build time: `pack_mazda_ez60_1.2.bat` should embed it into the exe only when the file exists, and should not fail the build when it is absent. The permission feature still needs it at runtime to complete init_boot flashing.
|
||||||
|
- Mazda 1.2 `获取权限` follows the Q05_Lidar bootstrap shape: extract `runtime.dat` to `base.apk` using the package-key password when needed, run `setprop vecentek.model 1` through `run_adb_shell()` so the `adb36987` auto-password is sent, push/install `base.apk`, then fetch the boot key, reboot to fastboot through `run_adb_shell('reboot fastboot')`, wait for a real `<serial> fastboot` row, flash `init_boot`, immediately reboot, clear the temporary img, and keep normal logs black-box (`正在获取权限中` / `获取成功` / `获取失败`).
|
||||||
|
- Mazda 1.2 `runtime.dat` is copied next to the release exe by `pack_mazda_ez60_1.2.bat`, and its temporary cache is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_Mazda_EZ60_runtime`.
|
||||||
|
- Mazda 1.2 detects the bootloader driver environment like Q05_Lidar. If missing, prompt once and install automatically; keep a manual `安装驱动` button in the status bar. Bundle `tools/usb_driver/` into the onefile exe via PyInstaller `--add-data`, resolving it from `_MEIPASS` at runtime.
|
||||||
|
- After Mazda 1.2 voice patch root authorization succeeds, clean the Magisk manager/stub launcher entry with the tested `pm uninstall -k com.topjohnwu.magisk` path first, then optional per-user uninstall/disable and manager/stub apk cache cleanup. Because the icon can reappear after reboot, also install a tiny Magisk module under `/data/adb/modules/ez60_magisk_manager_cleanup` whose `service.sh` repeats the same manager/stub cleanup after boot. Do not remove `/data/adb/modules` or the voice modules.
|
||||||
|
- `Mazda-EZ60/Mazda_EZ60-Language-Install_v1.0.py` is the exception: its `package-key` `vehicleName` is fixed to `EZ60_1.0`. Do not replace it with the authorization-returned vehicle name.
|
||||||
|
- Mazda hosts setup should keep exactly one target mapping for `spm.auto-pai.com`: replace mismatched IPs with `103.236.55.140 spm.auto-pai.com` instead of appending a conflicting duplicate. If hosts setup fails, tell the user `环境配置失败`.
|
||||||
|
- Mazda UI should not show the company/about subtitle.
|
||||||
|
- Mazda language switching should cover all operator-facing buttons, labels, dialogs, logs, progress text, hotspot status, password query UI, and quick-language popup text. The right-side usage tips should render from translated `hint_lines` with wrapping so English text does not overlap or overflow.
|
||||||
|
- Mazda normal logs/prompts should keep only key operator-facing outcomes and fuzzy resource/environment errors. Do not show package names, language package APK names, raw commands, paths, or command output during `刷入语言包`; manual `安装App` may show selected APK filenames. VIN and `vehicleName` are not sensitive and may remain visible.
|
||||||
|
- Mazda debug mode uses `Ctrl+Shift+D` and verifies the password through `POST /api/authorizations/verify-debug-mode-password`; detailed ADB/7za/API output belongs in debug mode only.
|
||||||
|
- Mazda pack scripts `pack_mazda_ez60_1.0.bat` and `pack_mazda_ez60_1.2.bat` are Cython-only. If dependencies, Cython compilation, PYD generation, resource copy, PyInstaller, or final exe output fail, stop immediately with an `[ERROR]` reason; do not fall back to normal PyInstaller.
|
||||||
|
- Regardless of APK install failures, run post-install configuration after the install loop.
|
||||||
|
- Post-install overlays to enable:
|
||||||
|
- `com.tinnove.launcher.overlay`
|
||||||
|
- `com.tinnove.scenemode.overlay`
|
||||||
|
- `com.incall.dvr.overlay`
|
||||||
|
- Post-install packages to disable:
|
||||||
|
- `com.carinno.p1`
|
||||||
|
- `com.wtcl.electronicdirections`
|
||||||
|
- `com.ximalaya.ting.android.car`
|
||||||
|
- `com.tinnove.netease.music`
|
||||||
|
- `com.migu.miguplay.car`
|
||||||
|
- `cn.cmvideo.car.play`
|
||||||
|
- `com.tinnove.carshow`
|
||||||
|
- `com.tinnove.changba`
|
||||||
|
- `com.qiyi.video.iv`
|
||||||
|
- User cancelled the `Ctrl+Shift+E` direct extract test request for Mazda; do not add it unless asked again.
|
||||||
|
|
||||||
|
### Q05_Lidar
|
||||||
|
|
||||||
|
- This is the Q05_Lidar-specific tool and must not be confused with any ordinary Q05 variant or package.
|
||||||
|
- Based on the shared installer visual style, but its resource structure and flashing flow are Q05_Lidar-specific.
|
||||||
|
- The first-row `获取权限` button installs `runtime.dat` -> `base.apk`, reboots to fastboot, waits for a real `fastboot devices` row like `<serial> fastboot` with a non-aggressive interval, then fetches a boot key through `POST /api/authorizations/boot-challenge` then `POST /api/authorizations/boot-key`, decrypts embedded `resource.dat`, flashes `init_boot`, immediately reboots, and deletes the temporary img. Keep the decrypted img lifetime as short as possible.
|
||||||
|
- `resource.dat` is AES-GCM encrypted and must match the server `BOOT_KEY`; the tool only accepts `data.sessionKey` from `boot-key`.
|
||||||
|
- Device fingerprint data sent to the server includes ADB serial, `ro.serialno`, `ro.boot.serialno`, manufacturer, model, device, build fingerprint, and VIN.
|
||||||
|
- `刷入语言包` installs Magisk modules, not APKs. It opens `com.topjohnwu.magisk`, warns the user to grant Shell/root permission, verifies `/debug_ramdisk/su -c "id"` returns `uid=0`, silently uninstalls `com.topjohnwu.magisk` for user 0, extracts `Q05_Lidar-package.bin`, reads each module zip's root `module.prop` on the PC to get `id=`, pushes each zip to `/data/local/tmp/q05_lidar_modules/<MODID>.zip`, then root-unzips it into `/data/adb/modules/<MODID>`.
|
||||||
|
- If Magisk shows its first-run environment repair/additional setup prompt, do not automate UI clicking in the tool; the operator should confirm it manually and reboot once before retrying.
|
||||||
|
- Before installing Q05_Lidar language resources, disable OTA with `pm disable-user com.incall.apps.softmanager`, then for `com.carcontrolhome.app`, `com.tinnove.netease.music`, and `com.wtcl.electronicdirections` run both `pm disable-user <package>` and `pm uninstall --user 0 <package>`. These commands must go through `run_adb_shell()`.
|
||||||
|
- `Q05_Lidar-package.bin` should unpack to module zip files, preferably under `modules/`, for example `modules/Qiyuan_Q05-multi_lan.zip` and `modules/disable_wireless_adb_vecentek.zip`. Each module zip must contain `module.prop` at zip root, plus scripts and `system/` as needed. Do not wrap `module.prop` inside an extra outer folder.
|
||||||
|
- Q05_Lidar package cache is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_Q05_Lidar`; the tool cleans it on startup/extraction and on normal/atexit shutdown.
|
||||||
|
- Q05_Lidar `runtime.dat` cache is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_q05_lidar_runtime`; treat it as temporary and clean stale contents before extraction.
|
||||||
|
- `Q05_Lidar-package.bin` is an external release file next to the exe because it is large. `resource.dat` is embedded in the exe; `runtime.dat` should be copied next to the exe by the pack script.
|
||||||
|
- Q05_Lidar checks driver environment on startup. If the driver environment already exists, stay silent and do not log a success/info message for the operator.
|
||||||
|
- If the startup check finds the driver environment missing, show a single simple prompt such as `驱动缺失,即将自动安装驱动。`; after the user clicks confirm, start installation immediately. Do not show a second `是否继续` confirmation in that startup flow.
|
||||||
|
- User-facing driver logs/prompts should say only `驱动环境` / `Driver environment`; do not mention `USB/Fastboot` or `Android/Fastboot`.
|
||||||
|
- Manual `安装驱动` remains available in the status bar, but `检查` should appear before it visually because it is more directly related to device status/refresh actions.
|
||||||
|
- `usb_driver/` is bundled inside the Q05_Lidar onefile exe via PyInstaller `--add-data`, and runtime driver installation should resolve files from the extracted temporary resource directory (for frozen builds, `_MEIPASS`) instead of requiring a sidecar `usb_driver` folder next to the exe.
|
||||||
|
- `package-key` must include the `vehicleName` returned by `auth-check` for the VIN. The tool caches `data.vehicleName` from password query / authorization check and uses it for package-key; if missing, query `auth-check` first rather than falling back to a hardcoded Q05_Lidar value.
|
||||||
|
- All `adb shell` commands in Q05_Lidar, including Magisk launch and `/debug_ramdisk/su -c ...`, must go through `run_adb_shell()` so the tool silently sends `adb36987`.
|
||||||
|
- The `安装App` button remains the APK install path: file picker -> `adb push` -> `setprop vecentek.model 1` -> `pm install -r -d -f` -> cleanup. Do not replace it with the Magisk module flow.
|
||||||
|
- Temporary debug mode exists only for development and should be removed before release when requested. Press `Ctrl+Shift+D`; the password is verified through `POST /api/authorizations/verify-debug-mode-password`.
|
||||||
|
- In Q05_Lidar debug mode, hidden buttons appear for:
|
||||||
|
- `指纹测试`: collect and log device fingerprint fields plus local SHA256 summary.
|
||||||
|
- `解密测试`: if VIN/device is available, fetch boot key; otherwise prompt for a pasted `BOOT_KEY`/`sessionKey`, decrypt `resource.dat` locally to a temporary img, log size/SHA256, then delete it.
|
||||||
|
- `解压测试`: fetch `package-key`, extract `Q05_Lidar-package.bin`, and verify the main Magisk module plus `disable_wireless_adb_vecentek` module can be identified.
|
||||||
|
- Do not log the actual boot key/session key in debug mode.
|
||||||
|
|
||||||
|
### Yidong/app-yidong.py
|
||||||
|
|
||||||
|
- Uses `apps_cache_yidong`.
|
||||||
|
- Has 7za compatibility handling for progress switches and `Incorrect command line` fallback.
|
||||||
|
- `Yidong/pack_yidong.bat` output name is ASCII: `Changan-Yidong-Language-Installer.exe`, to avoid CMD codepage issues with Chinese `NAME`.
|
||||||
|
|
||||||
|
## Build Notes
|
||||||
|
|
||||||
|
- Pack scripts install/use `pyinstaller`, `cython`, and usually `pyzipper`.
|
||||||
|
- Cython success requires Microsoft C++ Build Tools.
|
||||||
|
- Cython success signs in logs:
|
||||||
|
- `building '_core' extension`
|
||||||
|
- `_core.cpXXX-win_amd64.pyd`
|
||||||
|
- `PYD: _core...pyd`
|
||||||
|
- output under `dist_cy\dist\...exe`
|
||||||
|
- If logs show `[WARN] Cython failed, fallback` and `[INFO] Normal PyInstaller`, the exe still builds but is normal PyInstaller and easier to reverse.
|
||||||
|
- For security-sensitive tools like Q05_Lidar and Q07, do not keep a normal PyInstaller fallback. If Cython fails or no `_core*.pyd` is generated, stop the build and show an error.
|
||||||
|
- A Cython onefile PyInstaller build should use a tiny `launcher.py` that imports `main` from compiled `_core.pyd`, and the exe archive should contain `_core*.pyd`. Confirm with PyInstaller archive viewer when in doubt.
|
||||||
|
- `UNIZ/pack_uniz.bat` and Mazda-EZ60 pack scripts use ASCII output names to avoid CMD encoding problems.
|
||||||
|
- Generated `.exe`, `.spec`, `build/`, `dist/`, and `dist_cy/` are build artifacts and should not be committed unless explicitly requested.
|
||||||
|
|
||||||
|
## Key Behaviors To Preserve
|
||||||
|
|
||||||
|
1. Keep original tools untouched when a fixed or model-specific copy exists.
|
||||||
|
2. Preserve VIN-based authorization for normal flashing tools.
|
||||||
|
3. Fetch `package-key` from the server instead of hardcoding package passwords.
|
||||||
|
4. Keep all shell commands in 逸动/Mazda tools behind `run_adb_shell()`.
|
||||||
|
5. Keep UNI-Z shell-free.
|
||||||
|
6. Use `run_on_ui_thread()` for all tkinter UI updates from worker threads.
|
||||||
|
7. Keep shared Android/7za binaries under root `tools/` and have pack scripts copy from there.
|
||||||
|
|
||||||
|
## Current Local State (2026-05-28)
|
||||||
|
|
||||||
|
- `UNIZ/UNIZ.py` and `UNIZ/pack_uniz.bat` exist locally. Cython build has succeeded after installing Microsoft C++ Build Tools, producing `dist_cy\dist\UNIZ-Language-Pusher.exe`.
|
||||||
|
- `Mazda-EZ60/Mazda-EZ60_1.2.py` with `pack_mazda_ez60_1.2.bat`, and `Mazda-EZ60/Mazda_EZ60-Language-Install_v1.0.py` with `pack_mazda_ez60_1.0.bat`, exist locally. Mazda has 7za progress extraction, Cython-only packaging, and version-specific output names.
|
||||||
|
- `Yidong/app-yidong.py` has been updated for 7za progress compatibility and `Incorrect command line` fallback.
|
||||||
|
- `Yidong/pack_yidong.bat` has been updated with quoted paths, `cd /d "%~dp0"`, and ASCII output name.
|
||||||
|
- `.gitignore` has been expanded to ignore generated exe/spec artifacts.
|
||||||
|
- There may be untracked local build outputs and generated specs; inspect `git status --ignored` before committing.
|
||||||
|
|
||||||
|
## Known Issues
|
||||||
|
|
||||||
|
- Some older tools still have minimal exception handling and bare `except: pass`.
|
||||||
|
- `test_extract.py` hardcodes a password and should not be treated as production flow.
|
||||||
|
- `on_disable_upgrade` behavior is Windows/vehicle specific.
|
||||||
|
- Pure PyInstaller fallback is easy to reverse; prefer successful Cython builds for release.
|
||||||
@@ -1,151 +1,221 @@
|
|||||||
# 长安语言刷入工具 (Changan Language Flashing Tool)
|
# 长安语言刷入工具 (Changan Language Flashing Tool)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
A Windows GUI tool suite (Python 3.6+ / tkinter) for flashing multi-language APKs onto Android-based vehicle infotainment systems. Built by 宜宾科宜科技有限公司.
|
Windows GUI tool suite (Python 3.6+ / tkinter) for flashing or pushing multi-language APKs to Android-based vehicle infotainment systems. Built by 宜宾科宜科技有限公司.
|
||||||
|
|
||||||
The suite contains **5 tool variants**, each targeting a different vehicle model. All share the same `ADKAPKGUI` class architecture with model-specific customizations. Authorization is VIN-based via a cloud API.
|
Most tools are single-file tkinter apps with the same rough architecture: GUI, VIN authorization, package extraction, ADB commands, logging, and worker threads live in one class. Preserve that style unless the user explicitly asks for a larger refactor.
|
||||||
|
|
||||||
| Tool file | Vehicle | Window title | Pack script |
|
## Tool Variants
|
||||||
|-----------|---------|-------------|-------------|
|
|
||||||
| `app.py` | 启源Q07 | 长安语言安装工具 | `pack_q07.bat` |
|
|
||||||
| `S05.py` | 深蓝S05 | 深蓝S05多语言安装 | `pack_s05.bat` |
|
|
||||||
| `X5plusTool.py` | X5plus | 适用于X5plus多语言安装 | `pack_x5plus.bat` |
|
|
||||||
| `app-install.py` | 长安逸动 (通用) | 长安语言刷入工具 | `pack_common.bat` |
|
|
||||||
| `app-yidong.py` | 长安逸动 | 长安逸动语言刷入工具 | `pack_yidong.bat` |
|
|
||||||
|
|
||||||
## Project structure
|
| Tool file | Vehicle / purpose | Window title | Pack script |
|
||||||
|
|-----------|-------------------|--------------|-------------|
|
||||||
|
| `Q07/app.py` | 启源Q07 | 长安语言安装工具 | `Q07/pack_q07.bat` |
|
||||||
|
| `S05/S05.py` | 深蓝S05 original | 深蓝S05多语言安装 | `S05/pack_s05.bat` |
|
||||||
|
| `S05/S05_fixed.py` | 深蓝S05 fixed/experimental copy | 长安语言安装工具 | `S05/pack_s05_fixed.bat` |
|
||||||
|
| `X5plus/X5plusTool.py` | X5plus | 适用于X5plus多语言安装 | `X5plus/pack_x5plus.bat` |
|
||||||
|
| `CS55-Q05/CS55-Q05_Installer.py` | CS55Plus/Q05 通用 | CS55Plus/Q05 语言刷入工具 | `CS55-Q05/pack_cs55_q05.bat` |
|
||||||
|
| `Yidong/app-yidong.py` | 长安逸动 | 长安逸动语言刷入工具 | `Yidong/pack_yidong.bat` |
|
||||||
|
| `UNIZ/UNIZ.py` | UNI-Z file pusher | UNI-Z语言文件推送工具 | `UNIZ/pack_uniz.bat` |
|
||||||
|
| `Mazda-EZ60/Mazda-EZ60_1.2.py` | Mazda-EZ60 OS 1.2 | Mazda-EZ60_OS-1.2适用 | `Mazda-EZ60/pack_mazda_ez60_1.2.bat` |
|
||||||
|
| `Mazda-EZ60/Mazda_EZ60-Language-Install_v1.0.py` | Mazda-EZ60 OS 1.0 | 马自达EZ60刷机工具_OS-1.0 | `Mazda-EZ60/pack_mazda_ez60_1.0.bat` |
|
||||||
|
| `Q05-Lidar/Q05-Lidar_Installer.py` | Q05_Lidar permission/bootstrap + language installer | Q05_Lidar | `Q05-Lidar/pack_q05_lidar.bat` |
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
├── app.py # 启源Q07 tool
|
├── Q07/ # Q07 script, pack scripts, ignored build outputs
|
||||||
├── S05.py # 深蓝S05 tool
|
├── S05/ # S05 original and fixed copy
|
||||||
├── X5plusTool.py # X5plus tool
|
├── X5plus/ # X5plus tool
|
||||||
├── app-install.py # 逸动通用 tool
|
├── CS55-Q05/ # CS55Plus/Q05 common installer and icon
|
||||||
├── app-yidong.py # 逸动 tool
|
├── Yidong/ # Yidong-specific tool
|
||||||
├── pack_q07.bat # Q07 pack script
|
├── UNIZ/ # UNI-Z file pusher
|
||||||
├── pack_s05.bat # S05 pack script
|
├── Mazda-EZ60/ # Mazda-EZ60 tool
|
||||||
├── pack_x5plus.bat # X5plus pack script
|
├── A07/ # Qiyuan A07 tool
|
||||||
├── pack_common.bat # 逸动通用 pack script
|
├── Q05-Lidar/ # Q05_Lidar tool plus resource.dat/tools
|
||||||
├── pack_yidong.bat # 逸动 pack script
|
├── app.ico
|
||||||
├── test_extract.py # Standalone test for package.bin extraction
|
├── package.bin # encrypted package, not committed; shared from root
|
||||||
├── app.ico # Application icon
|
└── tools/ # shared adb/fastboot/7za dependencies for pack scripts
|
||||||
├── package.bin # Encrypted ZIP (not in repo)
|
├── adb.exe
|
||||||
├── adb.exe # Bundled ADB
|
├── AdbWinApi.dll
|
||||||
├── AdbWinApi.dll # ADB dependency
|
├── AdbWinUsbApi.dll
|
||||||
├── AdbWinUsbApi.dll # ADB dependency
|
├── fastboot.exe
|
||||||
└── .vscode/
|
└── 7za.exe # 7-Zip Extra 26.01, bundled by pack scripts
|
||||||
└── settings.json
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Architecture
|
## Architecture Notes
|
||||||
|
|
||||||
### Single-file design
|
- Most tools use class `ADKAPKGUI`; `UNIZ/UNIZ.py` uses `UNIZLanguageGUI`.
|
||||||
|
- Worker actions run in `threading.Thread(..., daemon=True)`.
|
||||||
|
- Tkinter calls from workers must go through `run_on_ui_thread(...)`.
|
||||||
|
- Prefer `self.root.after(0, lambda: func(*args, **kwargs))` in `run_on_ui_thread`; direct `after(0, func, *args, **kwargs)` breaks when kwargs such as `text=` or `fg=` are passed.
|
||||||
|
- Background `messagebox.*` calls should be scheduled with `run_on_ui_thread`.
|
||||||
|
- Keep files UTF-8 with `# -*- coding: utf-8 -*-`.
|
||||||
|
|
||||||
Each tool is a single Python file under the `ADKAPKGUI` class. No MVC separation — the class handles GUI, business logic, ADB operations, network calls, and file extraction.
|
## ADB And Auth
|
||||||
|
|
||||||
### Threading model
|
- `run_adb_command(command)` handles normal ADB commands such as `adb devices`, `adb push`, and non-shell install calls.
|
||||||
|
- `run_adb_shell(shell_command)` exists in the 逸动-family tools and Mazda copy; it shells into the device and automatically sends password `adb36987`.
|
||||||
|
- All `adb shell` operations in `CS55-Q05/CS55-Q05_Installer.py`, `Yidong/app-yidong.py`, and `Mazda-EZ60/Mazda-EZ60_1.2.py` should go through `run_adb_shell()`.
|
||||||
|
- `UNIZ/UNIZ.py` must not use `adb shell`; it only checks devices and pushes APKs to `/storage/emulated/0/Download/`.
|
||||||
|
- Standard auth flow uses:
|
||||||
|
- `auth-check?vin=...` for authorization.
|
||||||
|
- `package-key?vin=...` for `package.bin` extraction password.
|
||||||
|
- VIN keys:
|
||||||
|
- Q07/S05/X5plus: `ca_vin_info` or `VIN`.
|
||||||
|
- 逸动/Mazda: `settings get system ca.car.vin` via auto-password shell.
|
||||||
|
- UNI-Z: user manually enters VIN.
|
||||||
|
|
||||||
- **Main thread**: tkinter event loop (`root.mainloop()`)
|
## Package Extraction
|
||||||
- **Background threads**: All user-triggered operations spawn `threading.Thread(target=..., daemon=True)`
|
|
||||||
- **Thread-safety**: UI mutations via `self.run_on_ui_thread(func, ...)` → `self.root.after(0, func, ...)`. Internal `_impl` methods are the actual tkinter-touching implementations.
|
|
||||||
|
|
||||||
### ADB operations
|
- `package.bin` is extracted under `%LOCALAPPDATA%\.cache\system\.android\...`.
|
||||||
|
- Current cache directories:
|
||||||
|
- `Q07/app.py` -> `apps_cache_Q07`
|
||||||
|
- `S05/S05.py` / `S05/S05_fixed.py` -> `apps_cache_S05`
|
||||||
|
- `X5plus/X5plusTool.py` -> `apps_cache_X5plus`
|
||||||
|
- `CS55-Q05/CS55-Q05_Installer.py` -> `apps_cache_common`
|
||||||
|
- `Yidong/app-yidong.py` -> `apps_cache_yidong`
|
||||||
|
- `UNIZ/UNIZ.py` -> `apps_cache_UNIZ`
|
||||||
|
- `Mazda-EZ60/Mazda-EZ60_1.2.py` -> `apps_cache_Mazda_EZ60`
|
||||||
|
- Shared binaries are managed under root `tools/`: `adb.exe`, `AdbWinApi.dll`, `AdbWinUsbApi.dll`, `fastboot.exe`, and `7za.exe`. Vehicle pack scripts in subfolders should copy from `%ROOT%\tools`, not from each vehicle folder.
|
||||||
|
- For progress display, detect support for `-bsp1` by checking for `-bs{o|e|p}` in 7za help output.
|
||||||
|
- If `Incorrect command line` appears, retry with the basic compatible command: `x package.bin -pPASSWORD -oDIR -y`.
|
||||||
|
- Decode 7za output with GBK first, then UTF-8 fallback.
|
||||||
|
- 7za progress must parse streamed output cumulatively. Do not read one byte and regex that single byte; percentages such as `42%` span multiple bytes and will otherwise jump from 0 to 100.
|
||||||
|
- User-facing resource extraction text should say `资源准备中` / `Preparing resources`, not `资源解压` / `Extracting package`, unless the UI is an explicit debug test.
|
||||||
|
- Cache cleanup should be best effort in three places when feasible: before a new extraction, during normal window close, and via `atexit` for ordinary process exit. A forced process kill cannot be guaranteed, so also clear stale caches at next extraction/startup.
|
||||||
|
|
||||||
- `run_adb_command(command)` — standard ADB commands; auto-substitutes `adb` with bundled `adb.exe` path when frozen
|
## Shared UX And Safety Rules
|
||||||
- `run_adb_shell(shell_command)` — only in app-install.py / app-yidong.py; shells into device with auto-password `adb36987`
|
|
||||||
|
|
||||||
ADB path is portable: `self.adb` resolves to `sys._MEIPASS/adb.exe` when frozen (PyInstaller bundle), or `'adb'` in development.
|
- Hosts update logic should replace conflicting entries for the managed domain. If the hosts file already contains the target domain with a different IP, delete that line and write the expected `IP domain` entry instead of appending duplicates.
|
||||||
|
- VIN authorization logs should be explicit for operator-facing flows: print the current VIN, print `data.vehicleName` when `auth-check` returns it, print authorization success, and print a clear unauthorized/failure log when denied.
|
||||||
|
- `package-key` requests should use the vehicle name returned by `auth-check` (`data.vehicleName`) whenever available. Do not hardcode a model name if the authorization API already returned the exact vehicle name for the VIN.
|
||||||
|
- Normal users should not see low-level sensitive process details such as `fastboot`, `init_boot`, boot keys, or image names during permission/bootstrap flows. Use black-box text such as `正在获取权限中`, `获取成功`, and `获取失败`; leave command details for debug mode only.
|
||||||
|
- Process logs should stay minimal in normal mode. Detailed ADB/7za/API command logs belong behind debug mode.
|
||||||
|
- All Tkinter UI updates and `messagebox.*` calls from workers must go through `run_on_ui_thread(...)`.
|
||||||
|
|
||||||
### Authentication flow
|
## Model-Specific Behavior
|
||||||
|
|
||||||
1. ADB detects device → reads VIN (`ca_vin_info` or `VIN`; 逸动 uses `ca.car.vin`)
|
### S05
|
||||||
2. VIN sent to `https://api.changan.softwindy.cn/api/authorizations/auth-check?vin=...`
|
|
||||||
3. Package password from `https://api.changan.softwindy.cn/api/authorizations/package-key?vin=...`
|
|
||||||
4. Password used to decrypt `package.bin`
|
|
||||||
|
|
||||||
### Package extraction
|
- Keep `S05/S05.py` as original unless explicitly asked.
|
||||||
|
- Use `S05/S05_fixed.py` for experimental/fixed S05 changes.
|
||||||
|
- Do not add `chmod`, `chown`, or `restorecon` to the S05 system-app push path unless explicitly requested; the target system inherits permissions.
|
||||||
|
- `S05/S05_fixed.py` includes debug extract test `Ctrl+Shift+E` and 7za progress support.
|
||||||
|
|
||||||
- `package.bin` is a password-protected ZIP (AES via pyzipper, fallback to zipfile)
|
### UNI-Z
|
||||||
- Extracted to `%LOCALAPPDATA%\.cache\system\.android\apps_cache_{variant}` (hidden via `attrib +h`)
|
|
||||||
- Each tool has its own cache folder to avoid conflicts:
|
|
||||||
- app.py → `apps_cache_Q07`
|
|
||||||
- S05.py → `apps_cache_S05`
|
|
||||||
- X5plusTool.py → `apps_cache_X5plus`
|
|
||||||
- app-install.py → `apps_cache_common`
|
|
||||||
- app-yidong.py → `apps_cache_common` (default)
|
|
||||||
- Extracted APKs in `app/` pushed to `/system/app/`, `priv-app/` to `/system/priv-app/`
|
|
||||||
|
|
||||||
### Device status monitoring
|
- Endpoint for visible passwords: `/api/authorizations/get-uni-z-pwd`.
|
||||||
|
- Display `factoryPwd` as factory mode password and `password` as debug password.
|
||||||
|
- If `authorized == false` or `password` is empty, show unauthorized state and do not proceed.
|
||||||
|
- `password` from `get-uni-z-pwd` is not the package extraction password.
|
||||||
|
- Before push, call `/api/authorizations/package-key?vin=...` to get the real `package.bin` password.
|
||||||
|
- Push only to `/storage/emulated/0/Download/`; no `adb shell`.
|
||||||
|
- Language selection: RU/FR/ES/EN. Only the selected language Settings APK is pushed; other language Settings APKs are skipped silently.
|
||||||
|
- Hidden debug mode: `Ctrl+Shift+D`, password `zxch5200`, logs full ADB/7za/API details.
|
||||||
|
|
||||||
Background daemon thread runs `adb devices` every 5 seconds to detect connect/disconnect events.
|
### CS55-Q05
|
||||||
|
|
||||||
## GUI layout (650x640 dark theme for most; 650x550 for 逸动)
|
- CS55Plus/Q05 common installer lives in `CS55-Q05/CS55-Q05_Installer.py`, with icon `CS55-Q05/cs55-q05.ico` and pack script `CS55-Q05/pack_cs55_q05.bat`.
|
||||||
|
- `pack_cs55_q05.bat` is Cython-only. If Cython fails or no `_core*.pyd` is generated, stop the build; do not fall back to normal PyInstaller.
|
||||||
|
- Normal `刷入语言包` logs should not reveal APK names; show generic current/total progress only. `安装App` may show each APK result and current APK name.
|
||||||
|
|
||||||
| Section | Contents |
|
### Mazda-EZ60
|
||||||
|---------|----------|
|
|
||||||
| Title bar | Vehicle model + company subtitle |
|
|
||||||
| Password query | Hidden VIN→password lookup (S05, app-install only) |
|
|
||||||
| Button row 1 | 获取权限 (Q07/S05), 刷入语言包, 安装App, 语言设置 |
|
|
||||||
| Button row 2 | 时区设置, 安卓设置, 重启设备, 禁用升级 |
|
|
||||||
| Status bar | Connection dot, VIN, Auth status, Refresh button |
|
|
||||||
| Tips | Usage warnings |
|
|
||||||
| Progress | Extraction + push progress (hidden by default) |
|
|
||||||
| Log area | ScrolledText with tags (INFO/SUCCESS/ERROR/WARNING/CMD), 清空日志 button in title bar |
|
|
||||||
|
|
||||||
## Key features
|
- Based on `CS55-Q05/CS55-Q05_Installer.py` / 逸动 flow.
|
||||||
|
- Uses auto-password shell (`adb36987`) for VIN reads, `pm install`, overlay enable, disable commands, settings, and reboot.
|
||||||
|
- Installs APKs from extracted `apps` via push to `/data/local/tmp` then `pm install -r -d`.
|
||||||
|
- `Mazda-EZ60/Mazda-EZ60_1.2.py` should show 7za extraction progress with stream parsing.
|
||||||
|
- Mazda 1.2 package cache is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_Mazda_EZ60`; clean it on startup, before extraction, on normal window close, and through `atexit`.
|
||||||
|
- Mazda `package-key` requests must include both `vin` and `vehicleName`; cache `data.vehicleName` from `auth-check`, and query `auth-check` before `package-key` if it is missing.
|
||||||
|
- Mazda hosts setup should keep exactly one target mapping for `spm.auto-pai.com`: replace mismatched IPs with `103.236.55.140 spm.auto-pai.com` instead of appending a conflicting duplicate. If hosts setup fails, tell the user `环境配置失败`.
|
||||||
|
- Mazda UI should not show the company/about subtitle.
|
||||||
|
- Mazda language switching should cover all operator-facing buttons, labels, dialogs, logs, progress text, hotspot status, password query UI, and quick-language popup text. The right-side usage tips should render from translated `hint_lines` with wrapping so English text does not overlap or overflow.
|
||||||
|
- Mazda normal logs/prompts should keep only key operator-facing outcomes and fuzzy resource/environment errors. Do not show package names, language package APK names, raw commands, paths, or command output during `刷入语言包`; manual `安装App` may show selected APK filenames. VIN and `vehicleName` are not sensitive and may remain visible.
|
||||||
|
- Mazda debug mode uses `Ctrl+Shift+D` and verifies the password through `POST /api/authorizations/verify-debug-mode-password`; detailed ADB/7za/API output belongs in debug mode only.
|
||||||
|
- Mazda pack scripts `pack_mazda_ez60_1.0.bat` and `pack_mazda_ez60_1.2.bat` are Cython-only. If dependencies, Cython compilation, PYD generation, resource copy, PyInstaller, or final exe output fail, stop immediately with an `[ERROR]` reason; do not fall back to normal PyInstaller.
|
||||||
|
- Regardless of APK install failures, run post-install configuration after the install loop.
|
||||||
|
- Post-install overlays to enable:
|
||||||
|
- `com.tinnove.launcher.overlay`
|
||||||
|
- `com.tinnove.scenemode.overlay`
|
||||||
|
- `com.incall.dvr.overlay`
|
||||||
|
- Post-install packages to disable:
|
||||||
|
- `com.carinno.p1`
|
||||||
|
- `com.wtcl.electronicdirections`
|
||||||
|
- `com.ximalaya.ting.android.car`
|
||||||
|
- `com.tinnove.netease.music`
|
||||||
|
- `com.migu.miguplay.car`
|
||||||
|
- `cn.cmvideo.car.play`
|
||||||
|
- `com.tinnove.carshow`
|
||||||
|
- `com.tinnove.changba`
|
||||||
|
- `com.qiyi.video.iv`
|
||||||
|
- User cancelled the `Ctrl+Shift+E` direct extract test request for Mazda; do not add it unless asked again.
|
||||||
|
|
||||||
### Install App (unified single/batch)
|
### Q05_Lidar
|
||||||
"安装App" button uses `filedialog.askopenfilenames` for multi-file selection, replacing old separate "单个安装" and "批量安装" buttons. Select 1 or more APKs and installs all in one pass (`adb install -r`).
|
|
||||||
|
|
||||||
### Debug mode (hidden)
|
- This is the Q05_Lidar-specific tool and must not be confused with any ordinary Q05 variant or package.
|
||||||
Press `Ctrl+Shift+D` → password `zxch5200` to enter debug mode:
|
- Based on the shared installer visual style, but its resource structure and flashing flow are Q05_Lidar-specific.
|
||||||
- Bypasses device connection and authorization checks (UI shows "已连接" / "已授权")
|
- The first-row `获取权限` button installs `runtime.dat` -> `base.apk`, reboots to fastboot, waits for a real `fastboot devices` row like `<serial> fastboot` with a non-aggressive interval, then fetches a boot key through `POST /api/authorizations/boot-challenge` then `POST /api/authorizations/boot-key`, decrypts embedded `resource.dat`, flashes `init_boot`, immediately reboots, and deletes the temporary img. Keep the decrypted img lifetime as short as possible.
|
||||||
- Logs all raw ADB commands and output to the log panel
|
- `resource.dat` is AES-GCM encrypted and must match the server `BOOT_KEY`; the tool only accepts `data.sessionKey` from `boot-key`.
|
||||||
- Exiting debug mode auto-refreshes real device state
|
- Device fingerprint data sent to the server includes ADB serial, `ro.serialno`, `ro.boot.serialno`, manufacturer, model, device, build fingerprint, and VIN.
|
||||||
|
- `刷入语言包` installs Magisk modules, not APKs. It opens `com.topjohnwu.magisk`, warns the user to grant Shell/root permission, verifies `/debug_ramdisk/su -c "id"` returns `uid=0`, extracts `Q05_Lidar-package.bin`, then pushes module files to `/data/local/tmp/q05_lidar_modules/<MODID>/` and root-copies them into `/data/adb/modules/<MODID>`.
|
||||||
|
- `Q05_Lidar-package.bin` should unpack with module files at archive root: `module.prop`, scripts, `system/`, and `disable-wireless-adb-vecentek-magisk.zip`; do not wrap them in an outer `Q05_LIDAR_DATA/` directory.
|
||||||
|
- Q05_Lidar package cache is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_Q05_Lidar`; the tool cleans it on startup/extraction and on normal/atexit shutdown.
|
||||||
|
- Q05_Lidar `runtime.dat` cache is `%LOCALAPPDATA%\.cache\system\.android\apps_cache_q05_lidar_runtime`; treat it as temporary and clean stale contents before extraction.
|
||||||
|
- `Q05_Lidar-package.bin` is an external release file next to the exe because it is large. `resource.dat` is embedded in the exe; `runtime.dat` should be copied next to the exe by the pack script.
|
||||||
|
- `package-key` must include the `vehicleName` returned by `auth-check` for the VIN. The tool caches `data.vehicleName` from password query / authorization check and uses it for package-key; if missing, query `auth-check` first rather than falling back to a hardcoded Q05_Lidar value.
|
||||||
|
- All `adb shell` commands in Q05_Lidar, including Magisk launch and `/debug_ramdisk/su -c ...`, must go through `run_adb_shell()` so the tool silently sends `adb36987`.
|
||||||
|
- The `安装App` button remains the APK install path: file picker -> `adb push` -> `setprop vecentek.model 1` -> `pm install -r -d -f` -> cleanup. Do not replace it with the Magisk module flow.
|
||||||
|
- Temporary debug mode exists only for development and should be removed before release when requested. Press `Ctrl+Shift+D`; the password is verified through `POST /api/authorizations/verify-debug-mode-password`.
|
||||||
|
- In Q05_Lidar debug mode, hidden buttons appear for:
|
||||||
|
- `指纹测试`: collect and log device fingerprint fields plus local SHA256 summary.
|
||||||
|
- `解密测试`: if VIN/device is available, fetch boot key; otherwise prompt for a pasted `BOOT_KEY`/`sessionKey`, decrypt `resource.dat` locally to a temporary img, log size/SHA256, then delete it.
|
||||||
|
- `解压测试`: fetch `package-key`, extract `Q05_Lidar-package.bin`, and verify the main Magisk module plus `disable_wireless_adb_vecentek` module can be identified.
|
||||||
|
- Do not log the actual boot key/session key in debug mode.
|
||||||
|
|
||||||
### Language quick-set
|
### Yidong/app-yidong.py
|
||||||
Popup with 8 one-click locale switches (zh-CN, en-US, ru-RU, fr-FR, es-ES, pt-BR, it-IT, ar-SA). Also links to native Android language settings. Changes take effect after reboot.
|
|
||||||
|
|
||||||
### Model-specific behaviors
|
- Uses `apps_cache_yidong`.
|
||||||
|
- Has 7za compatibility handling for progress switches and `Incorrect command line` fallback.
|
||||||
|
- `Yidong/pack_yidong.bat` output name is ASCII: `Changan-Yidong-Language-Installer.exe`, to avoid CMD codepage issues with Chinese `NAME`.
|
||||||
|
|
||||||
| Feature | Q07 (app.py) | S05 (S05.py) | X5plus (X5plusTool.py) | 逸动 (app-install/yidong) |
|
## Build Notes
|
||||||
|---------|-------------|-------------|------------------------|---------------------------|
|
|
||||||
| Root perm | Y | Y | N (no btn_root) | N |
|
|
||||||
| priv-app | Y | Y | Y | N (app only) |
|
|
||||||
| ADB shell | Standard | Standard | Standard | Auto-password `adb36987` |
|
|
||||||
| VIN key | ca_vin_info/VIN | ca_vin_info/VIN | ca_vin_info/VIN | ca.car.vin |
|
|
||||||
| Old app cleanup | N | N | Y (5 packages) | N |
|
|
||||||
| Font push | N | N | Y (FZLTHPro) | N |
|
|
||||||
| Overlay enable | N | N | N | N (removed) |
|
|
||||||
| Password query | N | Y | N | Y |
|
|
||||||
| Factory hints | N | Y | Y (dynamic pwd) | Y |
|
|
||||||
|
|
||||||
## Build process
|
- Pack scripts install/use `pyinstaller`, `cython`, and usually `pyzipper`.
|
||||||
|
- Cython success requires Microsoft C++ Build Tools.
|
||||||
|
- Cython success signs in logs:
|
||||||
|
- `building '_core' extension`
|
||||||
|
- `_core.cpXXX-win_amd64.pyd`
|
||||||
|
- `PYD: _core...pyd`
|
||||||
|
- output under `dist_cy\dist\...exe`
|
||||||
|
- If logs show `[WARN] Cython failed, fallback` and `[INFO] Normal PyInstaller`, the exe still builds but is normal PyInstaller and easier to reverse.
|
||||||
|
- For security-sensitive tools like Q05_Lidar, do not keep a normal PyInstaller fallback. If Cython fails or no `_core*.pyd` is generated, stop the build and show an error.
|
||||||
|
- A Cython onefile PyInstaller build should use a tiny `launcher.py` that imports `main` from compiled `_core.pyd`, and the exe archive should contain `_core*.pyd`. Confirm with PyInstaller archive viewer when in doubt.
|
||||||
|
- `UNIZ/pack_uniz.bat` and Mazda-EZ60 pack scripts use ASCII output names to avoid CMD encoding problems.
|
||||||
|
- Generated `.exe`, `.spec`, `build/`, `dist/`, and `dist_cy/` are build artifacts and should not be committed unless explicitly requested.
|
||||||
|
|
||||||
Each `pack_*.bat` follows the same pipeline:
|
## Key Behaviors To Preserve
|
||||||
1. Install deps: `pyinstaller`, `cython`, `pyzipper`
|
|
||||||
2. Clean old build dirs
|
|
||||||
3. Cython compile: `{source}.py` → `_core.pyd`
|
|
||||||
4. Copy resources: `adb.exe`, DLLs, `app.ico`
|
|
||||||
5. PyInstaller: single `.exe` with `--uac-admin`, bundling `_core.pyd` + ADB + DLLs
|
|
||||||
6. Fallback to normal PyInstaller if Cython fails
|
|
||||||
|
|
||||||
Output exe is self-contained — bundles `adb.exe` and DLLs via `sys._MEIPASS`, no external ADB needed.
|
1. Keep original tools untouched when a fixed or model-specific copy exists.
|
||||||
|
2. Preserve VIN-based authorization for normal flashing tools.
|
||||||
|
3. Fetch `package-key` from the server instead of hardcoding package passwords.
|
||||||
|
4. Keep all shell commands in 逸动/Mazda tools behind `run_adb_shell()`.
|
||||||
|
5. Keep UNI-Z shell-free.
|
||||||
|
6. Use `run_on_ui_thread()` for all tkinter UI updates from worker threads.
|
||||||
|
7. Keep shared Android/7za binaries under root `tools/` and have pack scripts copy from there.
|
||||||
|
|
||||||
## Key behaviors to preserve
|
## Current Local State (2026-05-28)
|
||||||
|
|
||||||
1. **Thread safety**: Never call tkinter from background threads — always use `run_on_ui_thread`
|
- `UNIZ/UNIZ.py` and `UNIZ/pack_uniz.bat` exist locally. Cython build has succeeded after installing Microsoft C++ Build Tools, producing `dist_cy\dist\UNIZ-Language-Pusher.exe`.
|
||||||
2. **VIN-based auth**: Authorization required before push; flow must remain intact
|
- `Mazda-EZ60/Mazda-EZ60_1.2.py` with `pack_mazda_ez60_1.2.bat`, and `Mazda-EZ60/Mazda_EZ60-Language-Install_v1.0.py` with `pack_mazda_ez60_1.0.bat`, exist locally. Mazda has 7za progress extraction, Cython-only packaging, and version-specific output names.
|
||||||
3. **Silent extraction**: Auto-extract `package.bin` without user step
|
- `Yidong/app-yidong.py` has been updated for 7za progress compatibility and `Incorrect command line` fallback.
|
||||||
4. **ADB portability**: `self.adb` resolves to bundled exe path; all commands go through `run_adb_command`
|
- `Yidong/pack_yidong.bat` has been updated with quoted paths, `cd /d "%~dp0"`, and ASCII output name.
|
||||||
5. **vecentek.model**: Set to 1 before install, 0 after
|
- `.gitignore` has been expanded to ignore generated exe/spec artifacts.
|
||||||
6. **Chinese encoding**: `# -*- coding: utf-8 -*-` throughout
|
- There may be untracked local build outputs and generated specs; inspect `git status --ignored` before committing.
|
||||||
7. **Debug mode**: `self.debug_mode` flag gates auth/connection bypass and verbose logging
|
|
||||||
8. **Separate cache dirs**: Each tool extracts to its own cache folder
|
|
||||||
|
|
||||||
## Known issues
|
## Known Issues
|
||||||
|
|
||||||
- `test_extract.py` hardcodes password — should fetch from API
|
- Some older tools still have minimal exception handling and bare `except: pass`.
|
||||||
- `on_disable_upgrade` uses `findstr` (Windows-specific)
|
- `test_extract.py` hardcodes a password and should not be treated as production flow.
|
||||||
- Exception handling is minimal in many places (bare `except: pass`)
|
- `on_disable_upgrade` behavior is Windows/vehicle specific.
|
||||||
- 逸动 tools (app-install/yidong) use `subprocess.Popen` with stdin password injection — fragile
|
- Pure PyInstaller fallback is easy to reverse; prefer successful Cython builds for release.
|
||||||
|
|||||||
|
After Width: | Height: | Size: 135 KiB |
@@ -0,0 +1 @@
|
|||||||
|
Q1DLEsRw96XfzeCXtWG5PlTP10PpL8HbHQvr4YUqDzhUCzSboW924hT5xhjKu78S5ZZGGhxqjyPDh3GHf9L4cqCwpeg2tfKlsl/b7bmUWVVY5KfpwhRQuJlhQn7VJkycYe+TNb89n56mLYIV7DhNLhgGENXdMjHWPdUXQhNanpata8n920J2GGe71dONPRh/Ljeab2sv8SJprCaUYaSwxtkXXz5OS/9L5CRGJ13YDuu+aEIQp5R4i25mqqL4KD+zSkjkyHfQzzemIolfueVya27xZYULSBnQCYL/39GjdTM5btZ7OL9FCjzXROfQyyZ21HZIZgKo/p1wuRH7j4Ne0g==
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=CS55-Q05-Installer"
|
||||||
|
set "SRC=CS55-Q05_Installer.py"
|
||||||
|
set "ICON=cs55-q05.ico"
|
||||||
|
title %NAME% - Cython Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
if not exist "%SRC%" (
|
||||||
|
echo [ERROR] Source not found: %SRC%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] Icon not found: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] adb.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] 7za.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
%PY% -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Dependency install failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
if exist "%NAME%.spec" del /q "%NAME%.spec" 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" dist_cy\_core.py >nul
|
||||||
|
|
||||||
|
%PY% -c "open('dist_cy/setup_cython.py','w',encoding='utf-8').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
%PY% setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython failed. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set "PYD="
|
||||||
|
for %%f in (_core*.pyd) do set "PYD=%%f"
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] No Cython PYD generated. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to copy Cython PYD
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
%PY% -c "open('launcher.py','w',encoding='utf-8').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "..\%ICON%" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy resources failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ICON%" --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-data "%ICON%;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py "%ICON%" 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo [ERROR] Output exe was not generated
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
pause
|
||||||
|
After Width: | Height: | Size: 135 KiB |
@@ -0,0 +1,133 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=CS75Pro-Installer"
|
||||||
|
set "SRC=CS75Pro_Installer.py"
|
||||||
|
set "ICON=cs75pro.ico"
|
||||||
|
title %NAME% - Cython Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
if not exist "%SRC%" (
|
||||||
|
echo [ERROR] Source not found: %SRC%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] Icon not found: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] adb.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] 7za.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
%PY% -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Dependency install failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
if exist "%NAME%.spec" del /q "%NAME%.spec" 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" dist_cy\_core.py >nul
|
||||||
|
|
||||||
|
%PY% -c "open('dist_cy/setup_cython.py','w',encoding='utf-8').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
%PY% setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython failed. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set "PYD="
|
||||||
|
for %%f in (_core*.pyd) do set "PYD=%%f"
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] No Cython PYD generated. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to copy Cython PYD
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
%PY% -c "open('launcher.py','w',encoding='utf-8').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "..\%ICON%" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy resources failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ICON%" --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-data "%ICON%;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py "%ICON%" 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo [ERROR] Output exe was not generated
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
pause
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
.Language=English,English
|
||||||
|
.PluginContents=7-Zip Plugin
|
||||||
|
|
||||||
|
@Contents
|
||||||
|
$^#7-Zip Plugin 26.01#
|
||||||
|
$^#Copyright (c) 1999-2026 Igor Pavlov#
|
||||||
|
This FAR module performs transparent #archive# processing.
|
||||||
|
Files in the archive are handled in the same manner as if they
|
||||||
|
were in a folder.
|
||||||
|
|
||||||
|
~Extracting from the archive~@Extract@
|
||||||
|
|
||||||
|
~Add files to the archive~@Update@
|
||||||
|
|
||||||
|
~7-Zip Plugin configuration~@Config@
|
||||||
|
|
||||||
|
|
||||||
|
Web site: #www.7-zip.org#
|
||||||
|
|
||||||
|
@Extract
|
||||||
|
$ #Extracting from the archive#
|
||||||
|
|
||||||
|
In this dialog you may enter extracting mode.
|
||||||
|
|
||||||
|
Path mode
|
||||||
|
|
||||||
|
#Full pathnames# Extract files with full pathnames.
|
||||||
|
|
||||||
|
#Current pathnames# Extract files with all relative paths.
|
||||||
|
|
||||||
|
#No pathnames# Extract files without folder paths.
|
||||||
|
|
||||||
|
|
||||||
|
Overwrite mode
|
||||||
|
|
||||||
|
#Ask before overwrite# Ask before overwriting existing files.
|
||||||
|
|
||||||
|
#Overwrite without prompt# Overwrite existing files without prompt.
|
||||||
|
|
||||||
|
#Skip existing files# Skip extracting of existing files.
|
||||||
|
|
||||||
|
|
||||||
|
Files
|
||||||
|
|
||||||
|
#Selected files# Extract only selected files.
|
||||||
|
|
||||||
|
#All files# Extract all files from archive.
|
||||||
|
|
||||||
|
@Update
|
||||||
|
$ #Add files to the archive#
|
||||||
|
|
||||||
|
This dialog allows you to specify options for process of updating archive.
|
||||||
|
|
||||||
|
|
||||||
|
Compression method
|
||||||
|
|
||||||
|
#Store# Files will be copied to archive without compression.
|
||||||
|
|
||||||
|
#Normal# Files will be compressed.
|
||||||
|
|
||||||
|
#Maximum# Files will be compressed with method that gives
|
||||||
|
maximum compression ratio.
|
||||||
|
|
||||||
|
|
||||||
|
Update mode
|
||||||
|
|
||||||
|
#Add and replace files# Add all specified files to the archive.
|
||||||
|
|
||||||
|
#Update and add files# Update older files in the archive and add
|
||||||
|
files that are new to the archive.
|
||||||
|
|
||||||
|
#Freshen existing files# Update specified files in the archive that
|
||||||
|
are older than the selected disk files.
|
||||||
|
|
||||||
|
#Synchronize files# Replace specified files only if
|
||||||
|
added files are newer. Always add those
|
||||||
|
files, which are not present in the
|
||||||
|
archive. Delete from archive those files,
|
||||||
|
which are not present on the disk.
|
||||||
|
|
||||||
|
@Config
|
||||||
|
$ #7-Zip Plugin configuration#
|
||||||
|
In this dialog you may change following parameters:
|
||||||
|
|
||||||
|
#Plugin is used by default# Plugin is used by default.
|
||||||
@@ -0,0 +1,220 @@
|
|||||||
|
.Language=English,English
|
||||||
|
|
||||||
|
"Ok"
|
||||||
|
"&Cancel"
|
||||||
|
|
||||||
|
"Warning"
|
||||||
|
"Error"
|
||||||
|
|
||||||
|
"Format"
|
||||||
|
|
||||||
|
"Properties"
|
||||||
|
|
||||||
|
"Yes"
|
||||||
|
"No"
|
||||||
|
|
||||||
|
"Get password"
|
||||||
|
"Enter password"
|
||||||
|
|
||||||
|
"Extract"
|
||||||
|
"&Extract to"
|
||||||
|
|
||||||
|
"Path mode"
|
||||||
|
"&Full pathnames"
|
||||||
|
"C&urrent pathnames"
|
||||||
|
"&No pathnames"
|
||||||
|
|
||||||
|
"Overwrite mode"
|
||||||
|
"As&k before overwrite"
|
||||||
|
"&Overwrite without prompt"
|
||||||
|
"Sk&ip existing files"
|
||||||
|
"A&uto rename"
|
||||||
|
"A&uto rename existing files"
|
||||||
|
|
||||||
|
"Extract"
|
||||||
|
"&Selected files"
|
||||||
|
"A&ll files"
|
||||||
|
|
||||||
|
"&Password"
|
||||||
|
|
||||||
|
"Extr&act"
|
||||||
|
"&Cancel"
|
||||||
|
|
||||||
|
"Can not open output file '%s'."
|
||||||
|
|
||||||
|
"Unsupported compression method for '%s'."
|
||||||
|
"CRC failed in '%s'."
|
||||||
|
"Data error in '%s'."
|
||||||
|
"CRC failed in encrypted file '%s'. Wrong password?"
|
||||||
|
"Data error in encrypted file '%s'. Wrong password?"
|
||||||
|
|
||||||
|
"Confirm File Replace"
|
||||||
|
"Destination folder already contains processed file."
|
||||||
|
"Would you like to replace the existing file"
|
||||||
|
"with this one"
|
||||||
|
|
||||||
|
"bytes"
|
||||||
|
"modified on"
|
||||||
|
|
||||||
|
|
||||||
|
"&Yes"
|
||||||
|
"Yes to &All"
|
||||||
|
"&No"
|
||||||
|
"No to A&ll"
|
||||||
|
"A&uto rename"
|
||||||
|
"&Cancel"
|
||||||
|
|
||||||
|
|
||||||
|
"Update operations are not supported for this archive."
|
||||||
|
|
||||||
|
|
||||||
|
"Delete from archive"
|
||||||
|
"Delete \"%.40s\" from the archive"
|
||||||
|
"Delete selected files from the archive"
|
||||||
|
"Delete %d files from the archive"
|
||||||
|
"Delete"
|
||||||
|
"Cancel"
|
||||||
|
|
||||||
|
"Add files to archive"
|
||||||
|
|
||||||
|
"Add to %s a&rchive:"
|
||||||
|
|
||||||
|
"Compression method"
|
||||||
|
"&Store"
|
||||||
|
"Fas&test"
|
||||||
|
"&Fast"
|
||||||
|
"&Normal"
|
||||||
|
"&Maximum"
|
||||||
|
"&Ultra"
|
||||||
|
|
||||||
|
"Update mode"
|
||||||
|
"A&dd and replace files"
|
||||||
|
"&Update and add files"
|
||||||
|
"&Freshen existing files"
|
||||||
|
"S&ynchronize files"
|
||||||
|
|
||||||
|
"&Add"
|
||||||
|
"Se&lect archiver"
|
||||||
|
|
||||||
|
"Select archive format"
|
||||||
|
|
||||||
|
"Wait"
|
||||||
|
"Reading the archive"
|
||||||
|
"Extracting from the archive"
|
||||||
|
"Deleting from the archive"
|
||||||
|
"Updating the archive"
|
||||||
|
|
||||||
|
"Move operation is not supported"
|
||||||
|
|
||||||
|
"7-Zip"
|
||||||
|
"7-Zip (add to archive)"
|
||||||
|
|
||||||
|
"7-Zip"
|
||||||
|
|
||||||
|
"Plugin is used by default"
|
||||||
|
|
||||||
|
"0"
|
||||||
|
"1"
|
||||||
|
"2"
|
||||||
|
"Path"
|
||||||
|
"Name"
|
||||||
|
"Extension"
|
||||||
|
"Is Folder"
|
||||||
|
"Size"
|
||||||
|
"Packed Size"
|
||||||
|
"Attributes"
|
||||||
|
"Created"
|
||||||
|
"Accessed"
|
||||||
|
"Modified"
|
||||||
|
"Solid"
|
||||||
|
"Commented"
|
||||||
|
"Encrypted"
|
||||||
|
"Splited Before"
|
||||||
|
"Splited After"
|
||||||
|
"Dictionary Size"
|
||||||
|
"CRC"
|
||||||
|
"Type"
|
||||||
|
"Anti"
|
||||||
|
"Method"
|
||||||
|
"Host OS"
|
||||||
|
"File System"
|
||||||
|
"User"
|
||||||
|
"Group"
|
||||||
|
"Block"
|
||||||
|
"Comment"
|
||||||
|
"Position"
|
||||||
|
"Path Prefix"
|
||||||
|
"Folders"
|
||||||
|
"Files"
|
||||||
|
"Version"
|
||||||
|
"Volume"
|
||||||
|
"Multivolume"
|
||||||
|
"Offset"
|
||||||
|
"Links"
|
||||||
|
"Blocks"
|
||||||
|
"Volumes"
|
||||||
|
"Time Type"
|
||||||
|
"64-bit"
|
||||||
|
"Big-endian"
|
||||||
|
"CPU"
|
||||||
|
"Physical Size"
|
||||||
|
"Headers Size"
|
||||||
|
"Checksum"
|
||||||
|
"Characteristics"
|
||||||
|
"Virtual Address"
|
||||||
|
"ID"
|
||||||
|
"Short Name"
|
||||||
|
"Creator Application"
|
||||||
|
"Sector Size"
|
||||||
|
"Mode"
|
||||||
|
"Symbolic Link"
|
||||||
|
"Error"
|
||||||
|
"Total Size"
|
||||||
|
"Free Space"
|
||||||
|
"Cluster Size"
|
||||||
|
"Label"
|
||||||
|
"Local Name"
|
||||||
|
"Provider"
|
||||||
|
"NT Security"
|
||||||
|
"Alternate Stream"
|
||||||
|
"Aux"
|
||||||
|
"Deleted"
|
||||||
|
"Tree"
|
||||||
|
"SHA-1"
|
||||||
|
"SHA-256"
|
||||||
|
"Error Type"
|
||||||
|
"Errors"
|
||||||
|
"Errors"
|
||||||
|
"Warnings"
|
||||||
|
"Warning"
|
||||||
|
"Streams"
|
||||||
|
"Alternate Streams"
|
||||||
|
"Alternate Streams Size"
|
||||||
|
"Virtual Size"
|
||||||
|
"Unpack Size"
|
||||||
|
"Total Physical Size"
|
||||||
|
"Volume Index"
|
||||||
|
"SubType"
|
||||||
|
"Short Comment"
|
||||||
|
"Code Page"
|
||||||
|
"Is not archive type"
|
||||||
|
"Physical Size can't be detected"
|
||||||
|
"Zeros Tail Is Allowed"
|
||||||
|
"Tail Size"
|
||||||
|
"Embedded Stub Size"
|
||||||
|
"Link"
|
||||||
|
"Hard Link"
|
||||||
|
"iNode"
|
||||||
|
"Stream ID"
|
||||||
|
"Read-only"
|
||||||
|
"Out Name"
|
||||||
|
"Copy Link"
|
||||||
|
"Arc File Name"
|
||||||
|
"Is Hash"
|
||||||
|
"Metadata Changed"
|
||||||
|
"User ID"
|
||||||
|
"Group ID"
|
||||||
|
"Device Major"
|
||||||
|
"Device Minor"
|
||||||
|
"Dev Major"
|
||||||
|
"Dev Minor"
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
.Language=Russian,Russian (�ãá᪨©)
|
||||||
|
.PluginContents=�« £¨ 7-Zip
|
||||||
|
|
||||||
|
@Contents
|
||||||
|
$^#7-Zip Plugin 26.01#
|
||||||
|
$^#Copyright (c) 1999-2026 Igor Pavlov#
|
||||||
|
�â®â ¬®¤ã«ì FAR ¯®§¢®«ï¥â à ¡®â âì á # à娢 ¬¨#. „«ï ¯®«ì§®¢ ⥫ï
|
||||||
|
ä ©«ë ¢ à娢 å ¥ ®â«¨ç îâáï ®â ä ©«®¢ ¢ ¯ ¯ª å.
|
||||||
|
|
||||||
|
|
||||||
|
~� ᯠª®¢ª ä ©«®¢ ¨§ à娢 ~@Extract@
|
||||||
|
|
||||||
|
~„®¡ ¢«¥¨¥ ä ©«®¢ ª à娢ã~@Update@
|
||||||
|
|
||||||
|
~� à ¬¥âàë à ¡®âë á à娢 ¬¨~@Config@
|
||||||
|
|
||||||
|
|
||||||
|
Web site: #www.7-zip.org#
|
||||||
|
|
||||||
|
@Extract
|
||||||
|
$ #� ᯠª®¢ª ä ©«®¢ ¨§ à娢 #
|
||||||
|
‚ í⮬ ¤¨ «®£¥ ¢ë ¬®¦¥â¥ ¢¢¥á⨠¯ãâì ¤«ï à ᯠª®¢ª¨ ä ©«®¢ ¨ § ¤ âì
|
||||||
|
०¨¬ à ᯠª®¢ª¨.
|
||||||
|
|
||||||
|
�ãâ¨
|
||||||
|
|
||||||
|
#�®«ë¥ ¯ãâ¨# � ᯠª®¢ âì ä ©«ë á ¯®«ë¬¨ ¯ãâﬨ.
|
||||||
|
|
||||||
|
#Žâ®á¨â¥«ìë¥ ¯ãâ¨# � ᯠª®¢ âì á ®â®á¨â¥«ì묨 ¯ãâﬨ.
|
||||||
|
|
||||||
|
#�¥§ ¯ã⥩# � ᯠª®¢ âì ¡¥§ ¯ã⥩.
|
||||||
|
|
||||||
|
|
||||||
|
�¥à¥§ ¯¨áì
|
||||||
|
|
||||||
|
#‘¯à 訢 âì ¯®¤â¢¥à¦¤¥¨¥# ‘¯à 訢 âì ¯®¤â¢¥à¦¤¥¨¥
|
||||||
|
¯¥à¥§ ¯¨áì áãé¥áâ¢ãî饣® ä ©« .
|
||||||
|
|
||||||
|
#�¥§ ¯®¤â¢¥à¦¤¥¨ï# ‡ ¬¥é âì áãé¥áâ¢ãî騩 ä ©«
|
||||||
|
¡¥§ ¯®¤â¢¥à¦¤¥¨ï.
|
||||||
|
|
||||||
|
#�யã᪠âì# �யã᪠âì áãé¥áâ¢ãî騥 ä ©«ë.
|
||||||
|
|
||||||
|
|
||||||
|
� ᯠª®¢ âì
|
||||||
|
|
||||||
|
#‚ë¡à ë¥ ä ©«ë# � ᯠª®¢ âì ⮫쪮 ¢ë¤¥«¥ë¥ ä ©«ë ¨§ à娢 .
|
||||||
|
|
||||||
|
#‚á¥ ä ©«ë# � ᯠª®¢ âì ¢á¥ ä ©«ë ¨§ à娢 .
|
||||||
|
|
||||||
|
@Update
|
||||||
|
$ #„®¡ ¢«¥¨¥ ä ©«®¢ ª à娢ã#
|
||||||
|
|
||||||
|
‚ í⮬ ¤¨ «®£¥ ¢ë ¬®¦¥â¥ § ¤ âì ०¨¬ 㯠ª®¢ª¨.
|
||||||
|
|
||||||
|
|
||||||
|
Œ¥â®¤ ᦠâ¨ï:
|
||||||
|
|
||||||
|
#�¥§ ᦠâ¨ï# ” ©«ë ¡ã¤ãâ ᪮¯¨à®¢ ë ¡¥§ ᦠâ¨ï.
|
||||||
|
|
||||||
|
#�®à¬ «ì®¥ ᦠ⨥# ” ©«ë ¡ã¤ãâ ᦠâë.
|
||||||
|
|
||||||
|
#Œ ªá¨¬ «ì®¥ ᦠ⨥# ” ©«ë ¡ã¤ãâ ᦠâë á ¬ ªá¨¬ «ì®©
|
||||||
|
á⥯¥ìî ᦠâ¨ï.
|
||||||
|
|
||||||
|
|
||||||
|
�¥¦¨¬ ¨§¬¥¥¨ï:
|
||||||
|
|
||||||
|
#„®¡ ¢¨âì ¨ § ¬¥¨âì# „®¡ ¢¨âì ¢á¥ ¢ë¡à ë¥ ä ©«ë ¢ à娢.
|
||||||
|
|
||||||
|
#Ž¡®¢¨âì ¨ ¤®¡ ¢¨âì# Ž¡®¢¨âì ãáâ ॢ訥 ä ©«ë ¢ à娢¥ ¨
|
||||||
|
¤®¡ ¢¨âì ä ©«ë, ª®â®àëå ¥â ¢ à娢¥.
|
||||||
|
|
||||||
|
#Ž¡®¢¨âì# Ž¡®¢¨âì ãáâ ॢ訥 ä ©«ë ¢ à娢¥.
|
||||||
|
|
||||||
|
#‘¨åந§¨à®¢ âì# ‘¨åந§¨à®¢ âì ᮤ¥à¦¨¬®¥ à娢
|
||||||
|
á ¢ë¡à 묨 ä ©« ¬¨.
|
||||||
|
|
||||||
|
|
||||||
|
@Config
|
||||||
|
$ #� à ¬¥âàë à ¡®âë á ¯« £¨®¬ 7-Zip#
|
||||||
|
‚ í⮬ ¤¨ «®£¥ ¢ë ¬®¦¥â¥ ¨§¬¥¨âì á«¥¤ãî騥 ¯ à ¬¥âàë:
|
||||||
|
|
||||||
|
#�« £¨ ¨á¯®«ì§ã¥âáï ¯® 㬮«ç ¨î# �« £¨ ¨á¯®«ì§ã¥âáï ¯® 㬮«ç ¨î
|
||||||
@@ -0,0 +1,220 @@
|
|||||||
|
.Language=Russian,Russian (�ãá᪨©)
|
||||||
|
|
||||||
|
"�த®«¦¨âì"
|
||||||
|
"&Žâ¬¥¨âì"
|
||||||
|
|
||||||
|
"�।ã¯à¥¦¤¥¨¥"
|
||||||
|
"Žè¨¡ª "
|
||||||
|
|
||||||
|
"”®à¬ â"
|
||||||
|
|
||||||
|
"‘¢®©á⢠"
|
||||||
|
|
||||||
|
"„ "
|
||||||
|
"�¥â"
|
||||||
|
|
||||||
|
"‚¢®¤ ¯ ஫ï"
|
||||||
|
"‚¢¥¤¨â¥ ¯ ஫ì"
|
||||||
|
|
||||||
|
"� ᯠª®¢ª "
|
||||||
|
"&� ᯠª®¢ âì ¢"
|
||||||
|
|
||||||
|
"�ãâ¨"
|
||||||
|
"�®&«ë¥ ¯ãâ¨"
|
||||||
|
"Ž&â®á¨â¥«ìë¥ ¯ãâ¨"
|
||||||
|
"&�¥§ ¯ã⥩"
|
||||||
|
|
||||||
|
"�¥à¥§ ¯¨áì"
|
||||||
|
"&‘¯à 訢 âì ¯®¤â¢¥à¦¤¥¨¥"
|
||||||
|
"�&¥§ ¯®¤â¢¥à¦¤¥¨ï"
|
||||||
|
"�ய&ã᪠âì"
|
||||||
|
"�¥à¥¨¬¥®¢ âì ¢â®¬."
|
||||||
|
"�¥à¥¨¬. ¢â®¬. áãé¥áâ¢."
|
||||||
|
|
||||||
|
"� ᯠª®¢ âì"
|
||||||
|
"‚&ë¡à ë¥ ä ©«ë"
|
||||||
|
"‚ᥠ&ä ©«ë"
|
||||||
|
|
||||||
|
"&� ஫ì"
|
||||||
|
|
||||||
|
"�& ᯠª®¢ âì"
|
||||||
|
"&Žâ¬¥¨âì"
|
||||||
|
|
||||||
|
"�¥¢®§¬®¦® ®âªàëâì ä ©« '%s'."
|
||||||
|
|
||||||
|
"�¥¯®¤¤¥à¦¨¢ ¥¬ë© ¬¥â®¤ ᦠâ¨ï ¤«ï ä ©« '%s'."
|
||||||
|
"Žè¨¡ª CRC ¢ '%s'."
|
||||||
|
"Žè¨¡ª ¢ ¤ ëå ¢ '%s'."
|
||||||
|
"Žè¨¡ª CRC ¤«ï § è¨ä஢ ®£® ä ©« '%s'. �¥¢¥àë© ¯ ஫ì?"
|
||||||
|
"Žè¨¡ª ¢ ¤ ëå § è¨ä஢ ®£® ä ©« '%s'. �¥¢¥àë© ¯ ஫ì?"
|
||||||
|
|
||||||
|
"�®¤â¢¥à¤¨â¥ § ¬¥ã ä ©« "
|
||||||
|
"� ¯ª 㦥 ᮤ¥à¦¨â ®¡à ¡ âë¢ ¥¬ë© ä ©«."
|
||||||
|
"‡ ¬¥¨âì áãé¥áâ¢ãî騩 ä ©«"
|
||||||
|
"á«¥¤ãî騬 ä ©«®¬"
|
||||||
|
|
||||||
|
"¡ ©â"
|
||||||
|
"¨§¬¥¥"
|
||||||
|
|
||||||
|
|
||||||
|
"&„ "
|
||||||
|
"„ ¤«ï &¢á¥å"
|
||||||
|
"&�¥â"
|
||||||
|
"�¥â ¤«ï ¢&á¥å"
|
||||||
|
"�¥à¥¨¬¥®¢ âì ¢â®¬ â¨ç¥áª¨"
|
||||||
|
"&Žâ¬¥¨âì"
|
||||||
|
|
||||||
|
|
||||||
|
"„«ï í⮣® à娢 ®¯¥à 樨 ¨§¬¥¥¨ï ¥ ¯®¤¤¥à¦¨¢ îâáï."
|
||||||
|
|
||||||
|
|
||||||
|
"“¤ «¥¨¥ ¨§ à娢 "
|
||||||
|
"“¤ «¨âì \"%.40s\" ¨§ à娢 "
|
||||||
|
"“¤ «¨âì ¢ë¡à ë¥ ä ©«ë ¨§ à娢 "
|
||||||
|
"“¤ «¨âì %d ä ©«®¢ ¨§ à娢 "
|
||||||
|
"“¤ «¥¨¥"
|
||||||
|
"Žâ¬¥ "
|
||||||
|
|
||||||
|
"„®¡ ¢¨âì ä ©«ë ª à娢ã"
|
||||||
|
|
||||||
|
"„®¡ ¢¨âì ª %s & à娢ã"
|
||||||
|
|
||||||
|
"Œ¥â®¤ ᦠâ¨ï"
|
||||||
|
"�¥§ ᦠâ¨ï"
|
||||||
|
"‘ª®à®á⮩"
|
||||||
|
"�ëáâàë©"
|
||||||
|
"�®à¬ «ìë©"
|
||||||
|
"Œ ªá¨¬ «ìë©"
|
||||||
|
"“«ìâà "
|
||||||
|
|
||||||
|
"�¥¦¨¬ ¨§¬¥¥¨ï"
|
||||||
|
"„®¡ ¢¨âì ¨ § ¬¥¨âì"
|
||||||
|
"Ž¡®¢¨âì ¨ ¤®¡ ¢¨âì"
|
||||||
|
"Ž¡®¢¨âì"
|
||||||
|
"‘¨åந§¨à®¢ âì"
|
||||||
|
|
||||||
|
"&„®¡ ¢¨âì"
|
||||||
|
"€&à娢 â®à"
|
||||||
|
|
||||||
|
"‚ë¡®à à娢®£® ä®à¬ â "
|
||||||
|
|
||||||
|
"�®¤®¦¤¨â¥"
|
||||||
|
"—⥨¥ à娢 "
|
||||||
|
"� ᯠª®¢ª "
|
||||||
|
"“¤ «¥¨¥"
|
||||||
|
"ˆ§¬¥¥¨¥"
|
||||||
|
|
||||||
|
"�¥à¥¬¥é¥¨¥ ä ©«®¢ ¥ ¯®¤¤¥à¦¨¢ ¥âáï"
|
||||||
|
|
||||||
|
"7-Zip"
|
||||||
|
"7-Zip (¤®¡ ¢¨âì ¢ à娢)"
|
||||||
|
|
||||||
|
"7-Zip configuration"
|
||||||
|
|
||||||
|
"�« £¨ ¨á¯®«ì§ã¥âáï ¯® 㬮«ç ¨î"
|
||||||
|
|
||||||
|
"0"
|
||||||
|
"1"
|
||||||
|
"2"
|
||||||
|
"�ãâì"
|
||||||
|
"ˆ¬ï"
|
||||||
|
"� áè¨à¥¨¥"
|
||||||
|
"� ¯ª "
|
||||||
|
"� §¬¥à"
|
||||||
|
"‘¦ âë©"
|
||||||
|
"€âਡãâë"
|
||||||
|
"‘®§¤ "
|
||||||
|
"Žâªàëâ"
|
||||||
|
"ˆ§¬¥¥"
|
||||||
|
"�¥¯à¥àë¢ë©"
|
||||||
|
"Š®¬¬¥â ਩"
|
||||||
|
"‡ è¨ä஢ "
|
||||||
|
"� §¡¨â „®"
|
||||||
|
"� §¡¨â �®á«¥"
|
||||||
|
"‘«®¢ àì"
|
||||||
|
"CRC"
|
||||||
|
"’¨¯"
|
||||||
|
"€â¨"
|
||||||
|
"Œ¥â®¤"
|
||||||
|
"‘¨á⥬ "
|
||||||
|
"” ©«®¢ ï ‘¨á⥬ "
|
||||||
|
"�®«ì§®¢ ⥫ì"
|
||||||
|
"ƒà㯯 "
|
||||||
|
"�«®ª"
|
||||||
|
"Š®¬¬¥â ਩"
|
||||||
|
"�®§¨æ¨ï"
|
||||||
|
"�ãâì"
|
||||||
|
"� ¯®ª"
|
||||||
|
"” ©«®¢"
|
||||||
|
"‚¥àá¨ï"
|
||||||
|
"’®¬"
|
||||||
|
"Œ®£®â®¬ë©"
|
||||||
|
"‘¬¥é¥¨¥"
|
||||||
|
"‘áë«®ª"
|
||||||
|
"�«®ª®¢"
|
||||||
|
"’®¬®¢"
|
||||||
|
"Time Type"
|
||||||
|
"64-bit"
|
||||||
|
"Big-endian"
|
||||||
|
"�à®æ¥áá®à"
|
||||||
|
"”¨§¨ç¥áª¨© � §¬¥à"
|
||||||
|
"� §¬¥à ‡ £®«®¢ª®¢"
|
||||||
|
"Š®âà. ‘㬬 "
|
||||||
|
"• à ªâ¥à¨á⨪¨"
|
||||||
|
"‚¨àâã «ìë© €¤à¥á"
|
||||||
|
"ID"
|
||||||
|
"Š®à®âª®¥ ¨¬ï"
|
||||||
|
"�à®£à ¬¬ "
|
||||||
|
"� §¬¥à ᥪâ®à "
|
||||||
|
"�¥¦¨¬"
|
||||||
|
"‘¨¬¢®«ì ï ‘á뫪 "
|
||||||
|
"Žè¨¡ª "
|
||||||
|
"…¬ª®áâì"
|
||||||
|
"‘¢®¡®¤®"
|
||||||
|
"� §¬¥à ª« áâ¥à "
|
||||||
|
"Œ¥âª "
|
||||||
|
"‹®ª «ì®¥ ¨¬ï"
|
||||||
|
"�஢ ©¤¥à"
|
||||||
|
"NT �¥§®¯ á®áâì"
|
||||||
|
"€«ìâ¥à â¨¢ë© �®â®ª"
|
||||||
|
"Aux"
|
||||||
|
"“¤ «¥ë©"
|
||||||
|
"„¥à¥¢®"
|
||||||
|
"SHA-1"
|
||||||
|
"SHA-256"
|
||||||
|
"’¨¯ Žè¨¡ª¨"
|
||||||
|
"Žè¨¡ª¨"
|
||||||
|
"Žè¨¡ª¨"
|
||||||
|
"�।ã¯à¥¦¤¥¨ï"
|
||||||
|
"�।ã¯à¥¦¤¥¨¥"
|
||||||
|
"�®â®ª¨"
|
||||||
|
"€«ìâ¥à â¨¢ë¥ �®â®ª¨"
|
||||||
|
"� §¬¥à €«ìâ¥à ⨢ëå ¯®â®ª®¢"
|
||||||
|
"‚¨àâã «ìë© � §¬¥à"
|
||||||
|
"� ᯠª®¢ ë© � §¬¥à"
|
||||||
|
"ޡ鍩 ”¨§¨ç¥áª¨© � §¬¥à"
|
||||||
|
"�®¬¥à ’®¬ "
|
||||||
|
"�®¤â¨¯"
|
||||||
|
"Š®à®âª¨© Š®¬¬¥â ਩"
|
||||||
|
"Š®¤®¢ ï ‘âà ¨æ "
|
||||||
|
"Is not archive type"
|
||||||
|
"Physical Size can't be detected"
|
||||||
|
"Zeros Tail Is Allowed"
|
||||||
|
"� §¬¥à Žáâ ⪠"
|
||||||
|
"� §¬¥à ‚áâ஥®£® �«®ª "
|
||||||
|
"‘á뫪 "
|
||||||
|
"†¥áâª ï ‘á뫪 "
|
||||||
|
"iNode"
|
||||||
|
"ID �®â®ª "
|
||||||
|
"’®«ìª® ¤«ï ç⥨ï"
|
||||||
|
"Out Name"
|
||||||
|
"‘á뫪 ª®¯¨à®¢ ¨ï"
|
||||||
|
"Arc File Name"
|
||||||
|
"Is Hash"
|
||||||
|
"ˆ§¬¥¥ë ¬¥â ¤ ë¥"
|
||||||
|
"User ID"
|
||||||
|
"Group ID"
|
||||||
|
"Device Major"
|
||||||
|
"Device Minor"
|
||||||
|
"Dev Major"
|
||||||
|
"Dev Minor"
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
; 7z supporting for MutiArc in Far
|
||||||
|
; Append the following strings to file
|
||||||
|
; ..\Program Files\Far\Plugins\MultiArc\Formats\Custom.ini
|
||||||
|
|
||||||
|
[7z]
|
||||||
|
TypeName=7z
|
||||||
|
ID=37 7A BC AF 27 1C
|
||||||
|
IDPos=
|
||||||
|
IDOnly=1
|
||||||
|
Extension=7z
|
||||||
|
List=7z l -- %%AQ
|
||||||
|
Start="^-----"
|
||||||
|
End="^-----"
|
||||||
|
Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
|
||||||
|
Extract=7z x {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A
|
||||||
|
ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A
|
||||||
|
Test=7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A
|
||||||
|
Delete=7z d {-p%%P} -r0 -ms=off -scsDOS -i@%%LQMN -- %%A
|
||||||
|
Add=7z a {-p%%P} -r0 -t7z {%%S} -scsDOS -i@%%LQMN -- %%A
|
||||||
|
AddRecurse=7z a {-p%%P} -r0 -t7z {%%S} -scsDOS -i@%%LQMN -- %%A
|
||||||
|
AllFilesMask="*"
|
||||||
|
|
||||||
|
[rpm]
|
||||||
|
TypeName=rpm
|
||||||
|
ID=ED AB EE DB
|
||||||
|
IDPos=
|
||||||
|
IDOnly=1
|
||||||
|
Extension=rpm
|
||||||
|
List=7z l -- %%AQ
|
||||||
|
Start="^-----"
|
||||||
|
End="^-----"
|
||||||
|
Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
|
||||||
|
Extract=7z x {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A
|
||||||
|
ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A
|
||||||
|
Test=7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A
|
||||||
|
AllFilesMask="*"
|
||||||
|
|
||||||
|
[cpio]
|
||||||
|
TypeName=cpio
|
||||||
|
ID=
|
||||||
|
IDPos=
|
||||||
|
IDOnly=0
|
||||||
|
Extension=cpio
|
||||||
|
List=7z l -- %%AQ
|
||||||
|
Start="^-----"
|
||||||
|
End="^-----"
|
||||||
|
Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
|
||||||
|
Extract=7z x {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A
|
||||||
|
ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A
|
||||||
|
Test=7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A
|
||||||
|
AllFilesMask="*"
|
||||||
|
|
||||||
|
[deb]
|
||||||
|
TypeName=deb
|
||||||
|
ID=
|
||||||
|
IDPos=
|
||||||
|
IDOnly=0
|
||||||
|
Extension=deb
|
||||||
|
List=7z l -- %%AQ
|
||||||
|
Start="^-----"
|
||||||
|
End="^-----"
|
||||||
|
Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
|
||||||
|
Extract=7z x {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A
|
||||||
|
ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A
|
||||||
|
Test=7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A
|
||||||
|
AllFilesMask="*"
|
||||||
|
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
REGEDIT4
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\ZIP]
|
||||||
|
"Extract"="7z x {-p%%P} -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e {-p%%P} -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Delete"="7z d {-p%%P} -r0 {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Add"="7z a {-p%%P} -r0 -tzip {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AddRecurse"="7z a {-p%%P} -r0 -tzip {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\TAR]
|
||||||
|
"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Delete"="7z d -r0 {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Add"="7z a -r0 -y -ttar {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AddRecurse"="7z a -r0 -y -ttar {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\GZIP]
|
||||||
|
"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Delete"="7z d -r0 {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Add"="7z a -r0 -tgzip {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AddRecurse"="7z a -r0 -tgzip {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\BZIP]
|
||||||
|
"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Delete"="7z d -r0 {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Add"="7z a -r0 -tbzip2 {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AddRecurse"="7z a -r0 -tbzip2 {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\ARJ]
|
||||||
|
"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\CAB]
|
||||||
|
"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\LZH]
|
||||||
|
"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\RAR]
|
||||||
|
"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\Z(Unix)]
|
||||||
|
"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A"
|
||||||
|
"AllFilesMask"="*"
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
7-Zip Plugin for FAR Manager
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
FAR Manager is a file manager working in text mode.
|
||||||
|
You can download "FAR Manager" from site:
|
||||||
|
http://www.farmanager.com
|
||||||
|
|
||||||
|
Files:
|
||||||
|
|
||||||
|
far7z.txt - This file
|
||||||
|
far7z.reg - Regisrty file for MultiArc Plugin
|
||||||
|
7zToFar.ini - Supporting 7z for MultiArc Plugin
|
||||||
|
7-ZipFar.dll - 7-Zip Plugin for FAR Manager
|
||||||
|
7-ZipEng.hlf - Help file in English for FAR Manager
|
||||||
|
7-ZipRus.hlf - Help file in Russian for FAR Manager
|
||||||
|
7-ZipEng.lng - Plugin message strings in English for FAR Manager
|
||||||
|
7-ZipRus.lng - Plugin message strings in Russian for FAR Manager
|
||||||
|
|
||||||
|
There are two ways to use 7-Zip with FAR Manager:
|
||||||
|
|
||||||
|
1) Via 7-Zip FAR Plugin (it's recommended way).
|
||||||
|
2) Via standard MultiArc Plugin.
|
||||||
|
|
||||||
|
|
||||||
|
7-Zip FAR Plugin
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
7-Zip FAR Plugin is first level plugin for FAR Manager, like MultiArc plugin.
|
||||||
|
It very fast extracts and updates files in archive, since it doesn't use
|
||||||
|
external programs. It supports all formats supported by 7-Zip:
|
||||||
|
7z, ZIP, RAR, CAB, ARJ, GZIP, BZIP2, Z, TAR, CPIO, RPM and DEB.
|
||||||
|
|
||||||
|
To install 7-Zip FAR Plugin:
|
||||||
|
1) Create "7-Zip" folder in ...\Program Files\Far\Plugins folder.
|
||||||
|
2) Copy all files from "FAR" folder of this package to created folder.
|
||||||
|
3) Install 7-Zip, or copy 7z.dll from 7-Zip to Program Files\Far\Plugins\7-Zip\
|
||||||
|
4) Restart FAR.
|
||||||
|
|
||||||
|
Also you must enable "OEM plugin support" option in FAR Manager:
|
||||||
|
|
||||||
|
1) F9 / Options / Plugins manager settings / check on "OEM plugin support".
|
||||||
|
2) F9 / Options / Save setup.
|
||||||
|
4) Restart FAR
|
||||||
|
|
||||||
|
You can open archives with one of the following ways:
|
||||||
|
* Pressing Enter.
|
||||||
|
* Pressing Ctrl-PgDown.
|
||||||
|
* Pressing F11 and selecting 7-Zip item.
|
||||||
|
|
||||||
|
|
||||||
|
You can create new archives with 7-Zip by pressing F11 and
|
||||||
|
selecting 7-Zip (add to archive) item.
|
||||||
|
|
||||||
|
If you think that some operations with archives is better to do with MultiArc Plugin,
|
||||||
|
you can disable 7-Zip plugin via Options / Pligin configuration / 7-Zip. In such mode
|
||||||
|
opening archives by pressing Enter and Ctrl-PgDown will start MultiArc Plugin. And
|
||||||
|
if you want to open archive with 7-Zip, press F11 and select 7-Zip item.
|
||||||
|
|
||||||
|
|
||||||
|
Using command line 7-Zip via MultiArc Plugin
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
If you want to use 7-Zip via MultiArc Plugin, you must
|
||||||
|
register file far7z.reg.
|
||||||
|
|
||||||
|
If you want to use 7z archives via MultiArc Plugin, you must
|
||||||
|
append contents of file Far\7zToFar.ini to file
|
||||||
|
..\Program Files\Far\Plugins\MultiArc\Formats\Custom.ini.
|
||||||
|
|
||||||
|
|
||||||
|
If you want to cancel using 7-Zip by MultiArc, just remove lines that contain
|
||||||
|
7-Zip (7z) program name from HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\ZIP
|
||||||
|
registry key.
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
7-Zip Extra
|
||||||
|
~~~~~~~~~~~
|
||||||
|
License for use and distribution
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Copyright (C) 1999-2026 Igor Pavlov.
|
||||||
|
|
||||||
|
The licenses for files are:
|
||||||
|
|
||||||
|
- 7za.exe:
|
||||||
|
- The "GNU LGPL" as main license for most of the code
|
||||||
|
- The "BSD 3-clause License" for some code
|
||||||
|
- The "BSD 2-clause License" for some code
|
||||||
|
- All other files: the "GNU LGPL".
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce related license information from this file.
|
||||||
|
|
||||||
|
Note:
|
||||||
|
You can use 7-Zip Extra on any computer, including a computer in a commercial
|
||||||
|
organization. You don't need to register or pay for 7-Zip.
|
||||||
|
|
||||||
|
It is allowed to digitally sign DLL and EXE files included into this package
|
||||||
|
with arbitrary signatures of third parties.
|
||||||
|
|
||||||
|
|
||||||
|
GNU LGPL information
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You can receive a copy of the GNU Lesser General Public License from
|
||||||
|
http://www.gnu.org/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BSD 3-clause License in 7-Zip code
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
The "BSD 3-clause License" is used for the following code in 7za.exe
|
||||||
|
- ZSTD data decompression.
|
||||||
|
that code was developed using original zstd decoder code as reference code.
|
||||||
|
The original zstd decoder code was developed by Facebook Inc,
|
||||||
|
that also uses the "BSD 3-clause License".
|
||||||
|
|
||||||
|
Copyright (c) Facebook, Inc. All rights reserved.
|
||||||
|
Copyright (c) 2023-2025 Igor Pavlov.
|
||||||
|
|
||||||
|
Text of the "BSD 3-clause License"
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors may
|
||||||
|
be used to endorse or promote products derived from this software without
|
||||||
|
specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BSD 2-clause License in 7-Zip code
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
The "BSD 2-clause License" is used for the XXH64 code in 7za.exe.
|
||||||
|
|
||||||
|
XXH64 code in 7-Zip was derived from the original XXH64 code developed by Yann Collet.
|
||||||
|
|
||||||
|
Copyright (c) 2012-2021 Yann Collet.
|
||||||
|
Copyright (c) 2023-2025 Igor Pavlov.
|
||||||
|
|
||||||
|
Text of the "BSD 2-clause License"
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
---
|
||||||
|
After Width: | Height: | Size: 48 KiB |
@@ -0,0 +1,153 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=Mazda-EZ6-Installer"
|
||||||
|
set "SRC=Mazda-EZ6_Installer.py"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
|
title %NAME% - Cython Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
if not exist "%SRC%" (
|
||||||
|
echo [ERROR] Source not found: %SRC%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] Icon not found: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] adb.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinApi.dll" (
|
||||||
|
echo [ERROR] AdbWinApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinUsbApi.dll" (
|
||||||
|
echo [ERROR] AdbWinUsbApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Dependency install failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
if exist "%NAME%.spec" del /q "%NAME%.spec" 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" "dist_cy\_core.py" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy source failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w',encoding='utf-8').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Failed to create Cython setup script
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
"%PY%" setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython failed. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set "PYD="
|
||||||
|
for %%f in (_core*.pyd) do set "PYD=%%f"
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] No Cython PYD generated. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" "_core.pyd" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to copy Cython PYD
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w',encoding='utf-8').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to create launcher.py
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%ICON%" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy resources failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="app.ico" --add-data "app.ico;." --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.filedialog --hidden-import=tkinter.messagebox --hidden-import=tkinter.scrolledtext --hidden-import=tkinter.ttk --hidden-import=json --hidden-import=urllib --hidden-import=urllib.error --hidden-import=urllib.parse --hidden-import=urllib.request --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py adb.exe AdbWinApi.dll AdbWinUsbApi.dll app.ico 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo [ERROR] Output exe was not generated
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
pause
|
||||||
|
After Width: | Height: | Size: 48 KiB |
@@ -0,0 +1,209 @@
|
|||||||
|
param(
|
||||||
|
[string]$AppsDir = "",
|
||||||
|
[string]$AdbPath = "",
|
||||||
|
[string]$ShellPassword = "adb36987"
|
||||||
|
)
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
if (-not $AppsDir) {
|
||||||
|
$AppsDir = Join-Path $ScriptDir "apps"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Find-AdbPath {
|
||||||
|
param(
|
||||||
|
[string]$BaseDir
|
||||||
|
)
|
||||||
|
|
||||||
|
$candidates = @(
|
||||||
|
(Join-Path $BaseDir "adb.exe"),
|
||||||
|
(Join-Path $BaseDir "tools\adb.exe"),
|
||||||
|
(Join-Path $BaseDir "..\adb.exe"),
|
||||||
|
(Join-Path $BaseDir "..\tools\adb.exe"),
|
||||||
|
(Join-Path $BaseDir "..\..\tools\adb.exe"),
|
||||||
|
"D:\Code\language-installer\tools\adb.exe",
|
||||||
|
"D:\apk_tools\platform-tools\adb.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach ($candidate in $candidates) {
|
||||||
|
try {
|
||||||
|
$resolved = Resolve-Path -LiteralPath $candidate -ErrorAction Stop
|
||||||
|
if ($resolved) {
|
||||||
|
return $resolved.Path
|
||||||
|
}
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
|
||||||
|
$pathAdb = Get-Command adb.exe -ErrorAction SilentlyContinue
|
||||||
|
if ($pathAdb) {
|
||||||
|
return $pathAdb.Source
|
||||||
|
}
|
||||||
|
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $AdbPath) {
|
||||||
|
$AdbPath = Find-AdbPath -BaseDir $ScriptDir
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path -LiteralPath $AdbPath)) {
|
||||||
|
throw "adb.exe not found. Put adb.exe next to this script or run with -AdbPath `"D:\path\adb.exe`""
|
||||||
|
}
|
||||||
|
if (-not (Test-Path -LiteralPath $AppsDir)) {
|
||||||
|
throw "apps directory not found: $AppsDir"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Quote-ProcessArgument {
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Value
|
||||||
|
)
|
||||||
|
|
||||||
|
if ($Value -notmatch '[\s"]') {
|
||||||
|
return $Value
|
||||||
|
}
|
||||||
|
|
||||||
|
return '"' + $Value.Replace('"', '\"') + '"'
|
||||||
|
}
|
||||||
|
|
||||||
|
function Invoke-Adb {
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string[]]$Arguments
|
||||||
|
)
|
||||||
|
|
||||||
|
$psi = New-Object System.Diagnostics.ProcessStartInfo
|
||||||
|
$psi.FileName = $AdbPath
|
||||||
|
$psi.Arguments = (($Arguments | ForEach-Object { Quote-ProcessArgument $_ }) -join " ")
|
||||||
|
$psi.RedirectStandardOutput = $true
|
||||||
|
$psi.RedirectStandardError = $true
|
||||||
|
$psi.UseShellExecute = $false
|
||||||
|
$psi.CreateNoWindow = $true
|
||||||
|
|
||||||
|
$proc = [System.Diagnostics.Process]::Start($psi)
|
||||||
|
$stdout = $proc.StandardOutput.ReadToEnd()
|
||||||
|
$stderr = $proc.StandardError.ReadToEnd()
|
||||||
|
$proc.WaitForExit()
|
||||||
|
|
||||||
|
return [pscustomobject]@{
|
||||||
|
Code = $proc.ExitCode
|
||||||
|
Out = ($stdout + $stderr).Trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Invoke-AdbShellWithPassword {
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Command,
|
||||||
|
[int]$TimeoutMs = 60000
|
||||||
|
)
|
||||||
|
|
||||||
|
$psi = New-Object System.Diagnostics.ProcessStartInfo
|
||||||
|
$psi.FileName = $AdbPath
|
||||||
|
$psi.Arguments = "-d shell"
|
||||||
|
$psi.RedirectStandardInput = $true
|
||||||
|
$psi.RedirectStandardOutput = $true
|
||||||
|
$psi.RedirectStandardError = $true
|
||||||
|
$psi.UseShellExecute = $false
|
||||||
|
$psi.CreateNoWindow = $true
|
||||||
|
|
||||||
|
$proc = New-Object System.Diagnostics.Process
|
||||||
|
$proc.StartInfo = $psi
|
||||||
|
[void]$proc.Start()
|
||||||
|
|
||||||
|
Start-Sleep -Milliseconds 500
|
||||||
|
$proc.StandardInput.WriteLine($ShellPassword)
|
||||||
|
Start-Sleep -Milliseconds 300
|
||||||
|
$proc.StandardInput.WriteLine($Command)
|
||||||
|
$proc.StandardInput.WriteLine("exit")
|
||||||
|
$proc.StandardInput.Close()
|
||||||
|
|
||||||
|
if (-not $proc.WaitForExit($TimeoutMs)) {
|
||||||
|
try { $proc.Kill() } catch {}
|
||||||
|
return [pscustomobject]@{
|
||||||
|
Code = -1
|
||||||
|
Out = "shell command timeout: $Command"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$stdout = $proc.StandardOutput.ReadToEnd()
|
||||||
|
$stderr = $proc.StandardError.ReadToEnd()
|
||||||
|
return [pscustomobject]@{
|
||||||
|
Code = $proc.ExitCode
|
||||||
|
Out = ($stdout + $stderr).Trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "ADB: $AdbPath"
|
||||||
|
Write-Host "Apps: $AppsDir"
|
||||||
|
|
||||||
|
$devices = Invoke-Adb -Arguments @("-d", "devices")
|
||||||
|
if ($devices.Code -ne 0 -or $devices.Out -notmatch "`tdevice") {
|
||||||
|
Write-Host "[ERROR] No adb device connected." -ForegroundColor Red
|
||||||
|
if ($devices.Out) { Write-Host $devices.Out }
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$root = Invoke-Adb -Arguments @("-d", "root")
|
||||||
|
if ($root.Out) {
|
||||||
|
Write-Host $root.Out
|
||||||
|
}
|
||||||
|
Start-Sleep -Seconds 2
|
||||||
|
|
||||||
|
$apks = Get-ChildItem -LiteralPath $AppsDir -Filter "*.apk" -File | Sort-Object Name
|
||||||
|
if (-not $apks) {
|
||||||
|
Write-Host "[ERROR] No APK files found in apps directory." -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$total = $apks.Count
|
||||||
|
$index = 0
|
||||||
|
$success = 0
|
||||||
|
|
||||||
|
foreach ($apk in $apks) {
|
||||||
|
$index++
|
||||||
|
$apkName = [System.IO.Path]::GetFileNameWithoutExtension($apk.Name)
|
||||||
|
$targetDir = "/system/app/$apkName"
|
||||||
|
$targetApk = "$targetDir/$($apk.Name)"
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "[$index/$total] $($apk.Name)" -ForegroundColor Cyan
|
||||||
|
|
||||||
|
$mkdir = Invoke-AdbShellWithPassword -Command "mkdir -p '$targetDir'"
|
||||||
|
if ($mkdir.Code -ne 0) {
|
||||||
|
Write-Host "[ERROR] mkdir failed: $targetDir" -ForegroundColor Red
|
||||||
|
if ($mkdir.Out) { Write-Host $mkdir.Out }
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$push = Invoke-Adb -Arguments @("-d", "push", $apk.FullName, $targetApk)
|
||||||
|
if ($push.Code -ne 0) {
|
||||||
|
Write-Host "[ERROR] push failed: $($apk.Name)" -ForegroundColor Red
|
||||||
|
if ($push.Out) { Write-Host $push.Out }
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
if ($push.Out) {
|
||||||
|
Write-Host $push.Out
|
||||||
|
}
|
||||||
|
|
||||||
|
$chmodDir = Invoke-AdbShellWithPassword -Command "chmod 755 '$targetDir'"
|
||||||
|
if ($chmodDir.Code -ne 0) {
|
||||||
|
Write-Host "[ERROR] chmod 755 failed: $targetDir" -ForegroundColor Red
|
||||||
|
if ($chmodDir.Out) { Write-Host $chmodDir.Out }
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$chmodApk = Invoke-AdbShellWithPassword -Command "chmod 644 '$targetApk'"
|
||||||
|
if ($chmodApk.Code -ne 0) {
|
||||||
|
Write-Host "[ERROR] chmod 644 failed: $targetApk" -ForegroundColor Red
|
||||||
|
if ($chmodApk.Out) { Write-Host $chmodApk.Out }
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$success++
|
||||||
|
Write-Host "[OK] $($apk.Name)" -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "[DONE] Pushed $success/$total APK files." -ForegroundColor Green
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=Mazda_EZ60-Language-Install_v1.0"
|
||||||
|
set "SRC=Mazda_EZ60-Language-Install_v1.0.py"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
|
title %NAME% - Cython Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
if not exist "%SRC%" (
|
||||||
|
echo [ERROR] Source not found: %SRC%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] Icon not found: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] adb.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinApi.dll" (
|
||||||
|
echo [ERROR] AdbWinApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinUsbApi.dll" (
|
||||||
|
echo [ERROR] AdbWinUsbApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] 7za.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Dependency install failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
if exist "%NAME%.spec" del /q "%NAME%.spec" 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" dist_cy\_core.py >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy source failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w',encoding='utf-8').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Failed to create Cython setup script
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
"%PY%" setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython failed. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set "PYD="
|
||||||
|
for %%f in (_core*.pyd) do set "PYD=%%f"
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] No Cython PYD generated. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to copy Cython PYD
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w',encoding='utf-8').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to create launcher.py
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "%ICON%" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy resources failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="app.ico" --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-data "app.ico;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py app.ico 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo [ERROR] Output exe was not generated
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
pause
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=Mazda_EZ60-Language-Install_v1.0-direct-push"
|
||||||
|
set "SRC=Mazda_EZ60-Language-Install_v1.0_direct_push.py"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
|
title %NAME% - Cython Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
if not exist "%SRC%" (
|
||||||
|
echo [ERROR] Source not found: %SRC%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] Icon not found: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] adb.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinApi.dll" (
|
||||||
|
echo [ERROR] AdbWinApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinUsbApi.dll" (
|
||||||
|
echo [ERROR] AdbWinUsbApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] 7za.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Dependency install failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
if exist "%NAME%.spec" del /q "%NAME%.spec" 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" dist_cy\_core.py >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy source failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w',encoding='utf-8').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Failed to create Cython setup script
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
"%PY%" setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython failed. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set "PYD="
|
||||||
|
for %%f in (_core*.pyd) do set "PYD=%%f"
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] No Cython PYD generated. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to copy Cython PYD
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w',encoding='utf-8').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to create launcher.py
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "%ICON%" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy resources failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="app.ico" --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-data "app.ico;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py app.ico 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo [ERROR] Output exe was not generated
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
pause
|
||||||
@@ -0,0 +1,194 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=Mazda-EZ60-Language-Installer_v1.2"
|
||||||
|
set "SRC=Mazda-EZ60_1.2.py"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
|
title %NAME% - Cython Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
if not exist "%SRC%" (
|
||||||
|
echo [ERROR] Source not found: %SRC%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] Icon not found: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] adb.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinApi.dll" (
|
||||||
|
echo [ERROR] AdbWinApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinUsbApi.dll" (
|
||||||
|
echo [ERROR] AdbWinUsbApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] 7za.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\fastboot.exe" (
|
||||||
|
echo [ERROR] fastboot.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\usb_driver\android_winusb.inf" (
|
||||||
|
echo [ERROR] usb_driver not found at %TOOLS%\usb_driver
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%~dp0runtime.dat" (
|
||||||
|
echo [ERROR] runtime.dat not found at %~dp0runtime.dat
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper cryptography -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper cryptography -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Dependency install failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
if exist "%NAME%.spec" del /q "%NAME%.spec" 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" dist_cy\_core.py >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy source failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w',encoding='utf-8').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Failed to create Cython setup script
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
"%PY%" setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython failed. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set "PYD="
|
||||||
|
for %%f in (_core*.pyd) do set "PYD=%%f"
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] No Cython PYD generated. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to copy Cython PYD
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w',encoding='utf-8').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Failed to create launcher.py
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "%TOOLS%\fastboot.exe" . >nul
|
||||||
|
copy "%ICON%" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy resources failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if exist "%~dp0EZ60_resource.dat" copy "%~dp0EZ60_resource.dat" . >nul
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
set ADD_PERMISSION_RESOURCE=
|
||||||
|
if exist "EZ60_resource.dat" set ADD_PERMISSION_RESOURCE=--add-data "EZ60_resource.dat;."
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="app.ico" --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-data "fastboot.exe;." --add-data "app.ico;." --add-data "%TOOLS%\usb_driver;usb_driver" %ADD_PERMISSION_RESOURCE% --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --hidden-import=cryptography --collect-all tkinter --collect-all cryptography --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py app.ico fastboot.exe EZ60_resource.dat 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
if not exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo [ERROR] Output exe was not generated
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
copy "runtime.dat" "dist_cy\dist\runtime.dat" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy runtime.dat failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "package_voice-assistant.bin" (
|
||||||
|
copy "package_voice-assistant.bin" "dist_cy\dist\package_voice-assistant.bin" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy package_voice-assistant.bin failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
pause
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "NAME=Q05-Lidar_Installer"
|
||||||
|
set "SRC=Q05-Lidar_Installer.py"
|
||||||
|
set "APPDIR=%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
title %NAME% - Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
set "PY=C:\Users\31770\AppData\Local\Programs\Python\Python313\python.exe"
|
||||||
|
if not exist "%PY%" (
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
)
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper cryptography -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper cryptography -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" "dist_cy\_core.py" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy source failed. Cython build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
"%PY%" setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython build failed. Normal PyInstaller fallback is disabled.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%f in (_core*.pyd) do set PYD=%%f
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] No Cython pyd generated. Normal PyInstaller fallback is disabled.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] tools\adb.exe not found
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinApi.dll" (
|
||||||
|
echo [ERROR] tools\AdbWinApi.dll not found
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinUsbApi.dll" (
|
||||||
|
echo [ERROR] tools\AdbWinUsbApi.dll not found
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\fastboot.exe" (
|
||||||
|
echo [ERROR] tools\fastboot.exe not found
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] tools\7za.exe not found at %TOOLS%\7za.exe
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%APPDIR%app.ico" (
|
||||||
|
echo [ERROR] app.ico not found at %APPDIR%app.ico
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "%TOOLS%\fastboot.exe" . >nul
|
||||||
|
copy "%APPDIR%app.ico" . >nul
|
||||||
|
if exist "%APPDIR%resource.dat" copy "%APPDIR%resource.dat" . >nul
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
set ADD_RESOURCE=
|
||||||
|
if exist "resource.dat" set ADD_RESOURCE=--add-data "resource.dat;."
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="app.ico" --add-data "app.ico;." --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-data "fastboot.exe;." --add-data "%APPDIR%usb_driver;usb_driver" %ADD_RESOURCE% --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=cryptography --collect-all tkinter --collect-all cryptography --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/7] Copy release data...
|
||||||
|
if not exist "dist\%NAME%.exe" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Build output exe not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%APPDIR%runtime.dat" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] runtime.dat not found at %APPDIR%runtime.dat
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%APPDIR%Q05_Lidar-package.bin" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Q05_Lidar-package.bin not found at %APPDIR%Q05_Lidar-package.bin
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
copy "%APPDIR%runtime.dat" "dist\runtime.dat" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy runtime.dat failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
copy "%APPDIR%Q05_Lidar-package.bin" "dist\Q05_Lidar-package.bin" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy Q05_Lidar-package.bin failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%APPDIR%usb_driver\android_winusb.inf" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] usb_driver\android_winusb.inf not found at %APPDIR%usb_driver
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [7/7] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py adb.exe AdbWinApi.dll AdbWinUsbApi.dll 7za.exe fastboot.exe resource.dat 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
goto :DONE
|
||||||
|
|
||||||
|
:DONE
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else if exist "dist\%NAME%.exe" (
|
||||||
|
echo Output: dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo Check dist folder
|
||||||
|
)
|
||||||
|
pause
|
||||||
|
After Width: | Height: | Size: 151 KiB |
@@ -0,0 +1,121 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
|
set NAME=Qiyuan_Q07-multi-lan-installer
|
||||||
|
set SRC=Qiyuan_Q07-multi-lan-installer.py
|
||||||
|
title %NAME% - Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set PY=%%i
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
%PY% -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/7] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
|
||||||
|
echo [3/7] Checking resources...
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] app.ico not found in Q07 folder: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] Missing ADB file: %TOOLS%\adb.exe
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinApi.dll" (
|
||||||
|
echo [ERROR] Missing ADB file: %TOOLS%\AdbWinApi.dll
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinUsbApi.dll" (
|
||||||
|
echo [ERROR] Missing ADB file: %TOOLS%\AdbWinUsbApi.dll
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] Missing 7za file: %TOOLS%\7za.exe
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [4/7] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy %SRC% dist_cy\_core.py >nul
|
||||||
|
set "PYD="
|
||||||
|
|
||||||
|
%PY% -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
%PY% setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython build failed. Install Microsoft C++ Build Tools and retry.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%f in (_core*.pyd) do set PYD=%%f
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython build did not generate _core*.pyd. Stop.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
|
||||||
|
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
|
||||||
|
echo [5/7] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "%ICON%" . >nul
|
||||||
|
|
||||||
|
echo [6/7] PyInstaller...
|
||||||
|
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ICON%" --add-data "%ICON%;." --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [7/7] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
goto :DONE
|
||||||
|
|
||||||
|
:DONE
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo Check dist folder
|
||||||
|
)
|
||||||
|
pause
|
||||||
@@ -1,3 +1,24 @@
|
|||||||
# language_installer
|
# language_installer
|
||||||
|
|
||||||
长安语言刷入工具 — 适用于启源Q07、深蓝S05、X5plus、长安逸动等多车型的Android车机多语言APK刷入工具套件。
|
长安语言刷入工具套件,适用于启源Q07、深蓝S05、X5plus、长安逸动、UNI-Z、Mazda-EZ60 等 Android 车机多语言 APK 刷入/推送场景。
|
||||||
|
|
||||||
|
## 常用入口
|
||||||
|
|
||||||
|
| 文件 | 用途 | 打包脚本 |
|
||||||
|
|------|------|----------|
|
||||||
|
| `Q07/app.py` | 启源Q07 | `Q07/pack_q07.bat` |
|
||||||
|
| `S05/S05.py` | 深蓝S05原版 | `S05/pack_s05.bat` |
|
||||||
|
| `S05/S05_fixed.py` | 深蓝S05修复版 | `S05/pack_s05_fixed.bat` |
|
||||||
|
| `X5plus/X5plusTool.py` | X5plus | `X5plus/pack_x5plus.bat` |
|
||||||
|
| `CS55-Q05/CS55-Q05_Installer.py` | CS55Plus/Q05 通用 | `CS55-Q05/pack_cs55_q05.bat` |
|
||||||
|
| `CS75Pro/CS75Pro_Installer.py` | CS75Pro | `CS75Pro/pack_cs75pro.bat` |
|
||||||
|
| `Yidong/app-yidong.py` | 长安逸动 | `Yidong/pack_yidong.bat` |
|
||||||
|
| `UNIZ/UNIZ.py` | UNI-Z 文件推送 | `UNIZ/pack_uniz.bat` |
|
||||||
|
| `Mazda-EZ60/Mazda-EZ60_1.2.py` | Mazda-EZ60 OS 1.2 | `Mazda-EZ60/pack_mazda_ez60_1.2.bat` |
|
||||||
|
| `Mazda-EZ60/Mazda_EZ60-Language-Install_v1.0.py` | Mazda-EZ60 OS 1.0 | `Mazda-EZ60/pack_mazda_ez60_1.0.bat` |
|
||||||
|
| `A07/Qiyuan_A07_Multi-lan-installer.py` | 启源A07 | `A07/pack_a07.bat` |
|
||||||
|
| `Q05-Lidar/Q05-Lidar_Installer.py` | Q05_Lidar | `Q05-Lidar/pack_q05_lidar.bat` |
|
||||||
|
|
||||||
|
公共工具如 `adb.exe`、`fastboot.exe`、`7za.exe` 及相关 DLL 统一放在根目录 `tools/` 管理;`app.ico`、`package.bin` 保留在仓库根目录。各车型脚本会自动回退查找这些资源。
|
||||||
|
|
||||||
|
详细维护说明见 `AGENTS.md` / `CLAUDE.md`。
|
||||||
|
|||||||
|
After Width: | Height: | Size: 158 KiB |
@@ -0,0 +1,160 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal EnableExtensions
|
||||||
|
cd /d "%~dp0"
|
||||||
|
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=Deepal_S05_Installer"
|
||||||
|
set "SRC=Deepal_S05.py"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
|
title %NAME% - Cython Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
if not exist "%SRC%" (
|
||||||
|
echo [ERROR] Source not found: %SRC%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] Icon not found: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] adb.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinApi.dll" (
|
||||||
|
echo [ERROR] AdbWinApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinUsbApi.dll" (
|
||||||
|
echo [ERROR] AdbWinUsbApi.dll not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] 7za.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Dependency install failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q "dist_cy" 2>nul
|
||||||
|
if exist "build" rmdir /s /q "build" 2>nul
|
||||||
|
if exist "dist" rmdir /s /q "dist" 2>nul
|
||||||
|
if exist "%NAME%.spec" del /q "%NAME%.spec" 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir "dist_cy" 2>nul
|
||||||
|
copy "%SRC%" "dist_cy\_core.py" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy source failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w',encoding='utf-8').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Failed to create Cython setup script
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
cd /d "dist_cy"
|
||||||
|
"%PY%" "setup_cython.py" build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd /d "%~dp0"
|
||||||
|
echo [ERROR] Cython failed. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set "PYD="
|
||||||
|
for %%f in (_core*.pyd) do set "PYD=%%f"
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd /d "%~dp0"
|
||||||
|
echo [ERROR] No Cython PYD generated. Build stopped.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" "_core.pyd" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd /d "%~dp0"
|
||||||
|
echo [ERROR] Failed to copy Cython PYD
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w',encoding='utf-8').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd /d "%~dp0"
|
||||||
|
echo [ERROR] Failed to create launcher.py
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "%ICON%" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd /d "%~dp0"
|
||||||
|
echo [ERROR] Copy resources failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="app.ico" --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-data "app.ico;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin "launcher.py"
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd /d "%~dp0"
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q "_core.py" "_core.c" "_core.pyd" "%PYD%" "launcher.py" "setup_cython.py" "app.ico" 2>nul
|
||||||
|
rmdir /s /q "build" 2>nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo [ERROR] Output exe was not generated
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
pause
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
|
set NAME=UNI-T-multi-lan-installer
|
||||||
|
set SRC=UNI-T-multi-lan-installer.py
|
||||||
|
title %NAME% - Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set PY=%%i
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
%PY% -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/7] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
|
||||||
|
echo [3/7] Checking resources...
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] app.ico not found in UNI-T folder: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\adb.exe" (
|
||||||
|
echo [ERROR] Missing ADB file: %TOOLS%\adb.exe
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinApi.dll" (
|
||||||
|
echo [ERROR] Missing ADB file: %TOOLS%\AdbWinApi.dll
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\AdbWinUsbApi.dll" (
|
||||||
|
echo [ERROR] Missing ADB file: %TOOLS%\AdbWinUsbApi.dll
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not exist "%TOOLS%\7za.exe" (
|
||||||
|
echo [ERROR] Missing 7za file: %TOOLS%\7za.exe
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [4/7] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy %SRC% dist_cy\_core.py >nul
|
||||||
|
set "PYD="
|
||||||
|
|
||||||
|
%PY% -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
%PY% setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython build failed. Install Microsoft C++ Build Tools and retry.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%f in (_core*.pyd) do set PYD=%%f
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython build did not generate _core*.pyd. Stop.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
|
||||||
|
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
|
||||||
|
echo [5/7] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "%ICON%" . >nul
|
||||||
|
|
||||||
|
echo [6/7] PyInstaller...
|
||||||
|
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ICON%" --add-data "%ICON%;." --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [7/7] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
goto :DONE
|
||||||
|
|
||||||
|
:DONE
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo Check dist folder
|
||||||
|
)
|
||||||
|
pause
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=UNIZ-Language-Pusher"
|
||||||
|
set "SRC=UNIZ.py"
|
||||||
|
title %NAME% - Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set PY=%%i
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" "dist_cy\_core.py" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [WARN] Copy source failed, fallback
|
||||||
|
goto :NORMAL
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
"%PY%" setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [WARN] Cython failed, fallback
|
||||||
|
goto :NORMAL
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%f in (_core*.pyd) do set PYD=%%f
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [WARN] No pyd, fallback
|
||||||
|
goto :NORMAL
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
if exist "%ROOT%\app.ico" copy "%ROOT%\app.ico" . >nul
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ROOT%\app.ico" --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
goto :DONE
|
||||||
|
|
||||||
|
:NORMAL
|
||||||
|
echo [INFO] Normal PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ROOT%\app.ico" --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter "%SRC%"
|
||||||
|
|
||||||
|
:DONE
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else if exist "dist\%NAME%.exe" (
|
||||||
|
echo Output: dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo Check dist folder
|
||||||
|
)
|
||||||
|
pause
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,157 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
setlocal
|
||||||
|
cd /d "%~dp0"
|
||||||
|
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "ICON=%~dp0app.ico"
|
||||||
|
set "NAME=Changan_X5Plus-Installer"
|
||||||
|
set "SRC=X5plusTool.py"
|
||||||
|
title %NAME% - Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
set "PY="
|
||||||
|
where python >nul 2>&1
|
||||||
|
if not errorlevel 1 (
|
||||||
|
for /f "delims=" %%i in ('where python') do (
|
||||||
|
if not defined PY set "PY=%%i"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if not defined PY (
|
||||||
|
where py >nul 2>&1
|
||||||
|
if not errorlevel 1 set "PY=py"
|
||||||
|
)
|
||||||
|
if not defined PY (
|
||||||
|
if exist "%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe" set "PY=%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe"
|
||||||
|
)
|
||||||
|
if not defined PY (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
if not exist "%SRC%" (
|
||||||
|
echo [ERROR] Source not found: %SRC%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%ICON%" (
|
||||||
|
echo [ERROR] app.ico not found: %ICON%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Dependency installation failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" "dist_cy\_core.py" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Copy source failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w',encoding='utf-8').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Generate Cython setup failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
"%PY%" setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Cython compile failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set "PYD="
|
||||||
|
for %%f in (_core*.pyd) do set "PYD=%%f"
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] No Cython pyd generated
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" "_core.pyd" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy Cython pyd failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w',encoding='utf-8').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Generate launcher failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] adb.exe not found in %TOOLS%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
copy "%ICON%" . >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] Copy resources failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ICON%" --add-data "%ICON%;." --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=tkinter.simpledialog --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --hidden-import=urllib.parse --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q "_core.py" "_core.c" "_core.pyd" "%PYD%" "launcher.py" "setup_cython.py" 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo [ERROR] Build output not found
|
||||||
|
)
|
||||||
|
pause
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
set "TOOLS=%ROOT%\tools"
|
||||||
|
set "NAME=Changan-Yidong-Language-Installer"
|
||||||
|
set "SRC=app-yidong.py"
|
||||||
|
title %NAME% - Build
|
||||||
|
|
||||||
|
echo ============================================================
|
||||||
|
echo %NAME% - Cython Build
|
||||||
|
echo ============================================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
where python >nul 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [ERROR] Python not found
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
for /f "delims=" %%i in ('where python') do set "PY=%%i"
|
||||||
|
echo Python: %PY%
|
||||||
|
|
||||||
|
echo [1/6] Installing deps...
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q
|
||||||
|
if errorlevel 1 (
|
||||||
|
"%PY%" -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [2/6] Clean...
|
||||||
|
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
||||||
|
if exist "build" rmdir /s /q build 2>nul
|
||||||
|
if exist "dist" rmdir /s /q dist 2>nul
|
||||||
|
|
||||||
|
echo [3/6] Cython compile...
|
||||||
|
mkdir dist_cy 2>nul
|
||||||
|
copy "%SRC%" dist_cy\_core.py >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [WARN] Copy source failed, fallback
|
||||||
|
goto :NORMAL
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PY%" -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
||||||
|
|
||||||
|
cd dist_cy
|
||||||
|
"%PY%" setup_cython.py build_ext --inplace
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [WARN] Cython failed, fallback
|
||||||
|
goto :NORMAL
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%f in (_core*.pyd) do set PYD=%%f
|
||||||
|
if "%PYD%"=="" (
|
||||||
|
cd ..
|
||||||
|
echo [WARN] No pyd, fallback
|
||||||
|
goto :NORMAL
|
||||||
|
)
|
||||||
|
echo PYD: %PYD%
|
||||||
|
copy "%PYD%" _core.pyd >nul
|
||||||
|
|
||||||
|
"%PY%" -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
||||||
|
|
||||||
|
echo [4/6] Copy resources...
|
||||||
|
copy "%TOOLS%\adb.exe" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\AdbWinUsbApi.dll" . >nul
|
||||||
|
copy "%TOOLS%\7za.exe" . >nul
|
||||||
|
if exist "%ROOT%\app.ico" copy "%ROOT%\app.ico" . >nul
|
||||||
|
|
||||||
|
echo [5/6] PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ROOT%\app.ico" --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin launcher.py
|
||||||
|
if errorlevel 1 (
|
||||||
|
cd ..
|
||||||
|
echo [ERROR] PyInstaller failed
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
echo [6/6] Cleanup...
|
||||||
|
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
||||||
|
rmdir /s /q build 2>nul
|
||||||
|
cd ..
|
||||||
|
goto :DONE
|
||||||
|
|
||||||
|
:NORMAL
|
||||||
|
echo [INFO] Normal PyInstaller...
|
||||||
|
"%PY%" -m PyInstaller --onefile --windowed --name="%NAME%" --icon="%ROOT%\app.ico" --add-data "%TOOLS%\adb.exe;." --add-data "%TOOLS%\AdbWinApi.dll;." --add-data "%TOOLS%\AdbWinUsbApi.dll;." --add-data "%TOOLS%\7za.exe;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin "%SRC%"
|
||||||
|
|
||||||
|
:DONE
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
if exist "dist_cy\dist\%NAME%.exe" (
|
||||||
|
echo Output: dist_cy\dist\%NAME%.exe
|
||||||
|
) else if exist "dist\%NAME%.exe" (
|
||||||
|
echo Output: dist\%NAME%.exe
|
||||||
|
) else (
|
||||||
|
echo Check dist folder
|
||||||
|
)
|
||||||
|
pause
|
||||||
@@ -0,0 +1,368 @@
|
|||||||
|
7-Zip Extra history
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
This file contains only information about changes related to that package exclusively.
|
||||||
|
The full history of changes is listed in history.txt in main 7-Zip program.
|
||||||
|
|
||||||
|
26.01 2026-04-27
|
||||||
|
-------------------------
|
||||||
|
- new -spo[d|c|r] switch specifies the path generation mode for the output directory
|
||||||
|
for archive extraction. The output directory path is generated from the path specified
|
||||||
|
in the -o{dir_path} switch and the name of the archive being unpacked.
|
||||||
|
-spod : for Linux/Posix/macOS: -o{dir_path} specifies the direct path to the output directory.
|
||||||
|
The asterisk (*) character in {dir_path} will not be replaced by the archive name.
|
||||||
|
-spoc : 7-Zip will concatenate the path specified in -o{dir_path} with the archive name
|
||||||
|
to form the final path to the output directory.
|
||||||
|
-spor : 7-Zip will replace asterisk (*) character in the path specified in the -o{dir_path}
|
||||||
|
with the archive name. This is the default option.
|
||||||
|
- some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
26.00 2026-02-12
|
||||||
|
-------------------------
|
||||||
|
- improved code for ZIP support.
|
||||||
|
- the bug was fixed: 7-Zip could not correctly extract TAR archives containing sparse files.
|
||||||
|
- some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
25.01 2025-08-03
|
||||||
|
-------------------------
|
||||||
|
- The code for handling symbolic links has been changed
|
||||||
|
to provide greater security when extracting files from archives.
|
||||||
|
Command line switch -snld20 can be used to bypass default security
|
||||||
|
checks when creating symbolic links.
|
||||||
|
|
||||||
|
|
||||||
|
25.00 2025-07-05
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip for Windows can now use more than 64 CPU threads for compression
|
||||||
|
to zip/7z/xz archives and for the 7-Zip benchmark.
|
||||||
|
If there are more than one processor group in Windows (on systems with more than
|
||||||
|
64 cpu threads), 7-Zip distributes running CPU threads across different processor groups.
|
||||||
|
- bzip2 compression speed was increased by 15-40%.
|
||||||
|
- deflate (zip/gz) compression speed was increased by 1-3%.
|
||||||
|
- improved support for zip, cpio and fat archives.
|
||||||
|
- fixed some bugs and vulnerabilities.
|
||||||
|
|
||||||
|
|
||||||
|
24.09 2024-11-29
|
||||||
|
-------------------------
|
||||||
|
- The default dictionary size values for LZMA/LZMA2 compression methods were increased:
|
||||||
|
dictionary size compression level
|
||||||
|
v24.08 v24.09 v24.09
|
||||||
|
32-bit 64-bit
|
||||||
|
8 MB 16 MB 16 MB -mx4
|
||||||
|
16 MB 32 MB 32 MB -mx5 : Normal
|
||||||
|
32 MB 64 MB 64 MB -mx6
|
||||||
|
32 MB 64 MB 128 MB -mx7 : Maximum
|
||||||
|
64 MB 64 MB 256 MB -mx8
|
||||||
|
64 MB 64 MB 256 MB -mx9 : Ultra
|
||||||
|
The default dictionary size values for 32-bit versions of LZMA/LZMA2 don't exceed 64 MB.
|
||||||
|
- If an archive update operation uses a temporary archive folder and
|
||||||
|
the archive is moved to the destination folder, 7-Zip shows the progress of moving
|
||||||
|
the archive file, as this operation can take a long time if the archive is large.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
24.08 2024-08-11
|
||||||
|
-------------------------
|
||||||
|
- The bug in 7-Zip 24.00-24.07 was fixed:
|
||||||
|
For creating a zip archive: 7-Zip could write extra zero bytes after the end of the archive,
|
||||||
|
if a file included to archive cannot be compressed to a size smaller than original.
|
||||||
|
The created zip archive is correct except for the useless zero bytes after the end of the archive.
|
||||||
|
When unpacking such a zip archive, 7-Zip displays a warning:
|
||||||
|
"WARNING: There are data after the end of archive".
|
||||||
|
|
||||||
|
|
||||||
|
24.07 2024-06-19
|
||||||
|
-------------------------
|
||||||
|
- The bug was fixed: 7-Zip could crash for some incorrect ZSTD archives.
|
||||||
|
|
||||||
|
|
||||||
|
24.06 2024-05-26
|
||||||
|
-------------------------
|
||||||
|
- The bug was fixed: 7-Zip could not unpack some ZSTD archives.
|
||||||
|
|
||||||
|
|
||||||
|
24.05 2024-05-14
|
||||||
|
-------------------------
|
||||||
|
- New switch -myv={MMNN} to set decoder compatibility version for 7z archive creating.
|
||||||
|
{MMNN} is 4-digit number that represents the version of 7-Zip without a dot.
|
||||||
|
If -myv={MMNN} switch is specified, 7-Zip will only use compression methods that can
|
||||||
|
be decoded by the specified version {MMNN} of 7-Zip and newer versions.
|
||||||
|
If -myv={MMNN} switch is not specified, -myv=2300 is used, and 7-Zip will only
|
||||||
|
use compression methods that can be decoded by 7-Zip 23.00 and newer versions.
|
||||||
|
- New switch -myfa={FilterID} to allow 7-Zip to use the specified filter method for 7z archive creating.
|
||||||
|
- New switch -myfd={FilterID} to disallow 7-Zip to use the specified filter method for 7z archive creating.
|
||||||
|
|
||||||
|
|
||||||
|
24.03 2024-03-23
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip now can use new RISCV filter for compression to 7z and xz archives.
|
||||||
|
RISCV filter can increase compression ratio for data containing executable
|
||||||
|
files compiled for RISC-V architecture.
|
||||||
|
- The speed for LZMA and LZMA2 decompression in ARM64 version for Windows
|
||||||
|
was increased by 20%-60%.
|
||||||
|
- new switch -smemx{size}g : to set allowed memory usage limit for RAR archive unpacking.
|
||||||
|
RAR archives can use dictionary up 64 GB. Default allowed limit for RAR unpacking is 4 GB.
|
||||||
|
- -slmu switch : to show timestamps as UTC instead of LOCAL TIME.
|
||||||
|
- -slsl switch : in console 7-Zip for Windows : to show file paths with
|
||||||
|
linux path separator slash '/' instead of backslash separator '\'.
|
||||||
|
- 7-Zip supports .sha256 files that use backslash path separator '\'.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
24.01 2024-01-31
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip now can unpack ZSTD archives (.zst filename extension).
|
||||||
|
- 7-Zip now can unpack ZIP archives that use ZSTD compression method.
|
||||||
|
- 7-Zip now supports fast hash algorithm XXH64 that is used in ZSTD.
|
||||||
|
- Speed optimizations for archive unpacking: zip, gz, cab.
|
||||||
|
- Speed optimizations for hash caclulation: CRC-32, CRC-64.
|
||||||
|
- arm64 binaries are included to 7-Zip Extra package.
|
||||||
|
- The bug was fixed: 7-Zip for Linux could fail for multivolume creation in some cases.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
23.01 2023-06-20
|
||||||
|
-------------------------
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
23.00 2023-05-07
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip now can use new ARM64 filter for compression to 7z and xz archives.
|
||||||
|
ARM64 filter can increase compression ratio for data containing executable
|
||||||
|
files compiled for ARM64 (AArch64) architecture.
|
||||||
|
Also 7-Zip now parses executable files (that have exe and dll filename extensions)
|
||||||
|
before compressing, and it selects appropriate filter for each parsed file:
|
||||||
|
- BCJ or BCJ2 filter for x86 executable files,
|
||||||
|
- ARM64 filter for ARM64 executable files.
|
||||||
|
Previous versions by default used x86 filter BCJ or BCJ2 for all exe/dll files.
|
||||||
|
- Default section size for BCJ2 filter was changed from 64 MiB to 240 MiB.
|
||||||
|
It can increase compression ratio for executable files larger than 64 MiB.
|
||||||
|
- When new 7-Zip creates multivolume archive, 7-Zip keeps in open state
|
||||||
|
only volumes that still can be changed. Previous versions kept all volumes
|
||||||
|
in open state until the end of the archive creation.
|
||||||
|
- 7-Zip for Linux and macOS now can reduce the number of simultaneously open files,
|
||||||
|
when 7-Zip opens, extracts or creates multivolume archive. It allows to avoid
|
||||||
|
the failures for cases with big number of volumes, bacause there is a limitation
|
||||||
|
for number of open files allowed for a single program in Linux and macOS.
|
||||||
|
- The bugs were fixed:
|
||||||
|
- ZIP archives: if multithreaded zip compression was performed with more than one
|
||||||
|
file to stdout stream (-so switch), 7-zip didn't write "data descriptor" for some files.
|
||||||
|
- Some another bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
22.00 2022-06-16
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip now can create TAR archives in POSIX (pax) tar format with the switches
|
||||||
|
-ttar -mm=pax or -ttar -mm=posix
|
||||||
|
- 7-Zip now can store additional file timestamps with high precision (1 ns in Linux)
|
||||||
|
in tar/pax archives with the following switches:
|
||||||
|
-ttar -mm=pax -mtp=3 -mtc -mta
|
||||||
|
|
||||||
|
|
||||||
|
21.07 2021-12-26
|
||||||
|
-------------------------
|
||||||
|
- New switches: -spm and -im!{file_path} to exclude directories from processing
|
||||||
|
for specified paths that don't contain path separator character at the end of path.
|
||||||
|
- The sorting order of files in archives was slightly changed to be more consistent
|
||||||
|
for cases where the name of some directory is the same as the prefix part of the name
|
||||||
|
of another directory or file.
|
||||||
|
- TAR archives created by 7-Zip now are more consistent with archives created by GNU TAR program.
|
||||||
|
|
||||||
|
|
||||||
|
21.06 2021-11-24
|
||||||
|
-------------------------
|
||||||
|
- New switch -mmemuse={N}g / -mmemuse=p{N} to set a limit on memory usage (RAM)
|
||||||
|
for compressing and decompressing.
|
||||||
|
- Bug in versions 21.00-21.05 was fixed:
|
||||||
|
7-Zip didn't set attributes of directories during archive extracting.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
21.04 beta 2021-11-02
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip now reduces the number of working CPU threads for compression,
|
||||||
|
if RAM size is not enough for compression with big LZMA2 dictionary.
|
||||||
|
- 7-Zip now can create and check "file.sha256" text files that contain the list
|
||||||
|
of file names and SHA-256 checksums in format compatible with sha256sum program.
|
||||||
|
7-Zip can work with such checksum files as with archives,
|
||||||
|
but these files don't contain real file data.
|
||||||
|
The context menu commands for command line version::
|
||||||
|
7z a -thash file.sha256 *.txt
|
||||||
|
7z t -thash file.sha256
|
||||||
|
7z t -thash -shd. file.sha256
|
||||||
|
New -shd{dir_path} switch to set the directory that is used to check files
|
||||||
|
referenced by "file.sha256" file for "Test" operation.
|
||||||
|
If -shd{dir_path} is not specified, 7-Zip uses the directory where "file.sha256" is stored.
|
||||||
|
- New -xtd switch to exclude directory metadata records from processing.
|
||||||
|
|
||||||
|
|
||||||
|
21.03 beta 2021-07-20
|
||||||
|
-------------------------
|
||||||
|
- The maximum dictionary size for LZMA/LZMA2 compressing was increased to 4 GB (3840 MiB).
|
||||||
|
- Minor speed optimizations in LZMA/LZMA2 compressing.
|
||||||
|
|
||||||
|
|
||||||
|
21.02 alpha 2021-05-06
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip now writes additional field for filename in UTF-8 encoding to zip archives.
|
||||||
|
It allows to extract correct file name from zip archives on different systems.
|
||||||
|
- Some changes and improvements in ZIP and TAR code.
|
||||||
|
|
||||||
|
|
||||||
|
21.01 alpha 2021-03-09
|
||||||
|
-------------------------
|
||||||
|
- The improvements for speed of ARM64 version using hardware CPU instructions
|
||||||
|
for AES, CRC-32, SHA-1 and SHA-256.
|
||||||
|
- The bug in versions 18.02 - 21.00 was fixed:
|
||||||
|
7-Zip could not correctly extract some ZIP archives created with xz compression method.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
20.02 alpha 2020-08-08
|
||||||
|
-------------------------
|
||||||
|
- The default number of LZMA2 chunks per solid block in 7z archive was increased to 64.
|
||||||
|
It allows to increase the compression speed for big 7z archives, if there is a big number
|
||||||
|
of CPU cores and threads.
|
||||||
|
- The speed of PPMd compressing/decompressing was increased for 7z/ZIP archives.
|
||||||
|
- The new -ssp switch. If the switch -ssp is specified, 7-Zip doesn't allow the system
|
||||||
|
to modify "Last Access Time" property of source files for archiving and hashing operations.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
20.00 alpha 2020-02-06
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip now supports new optional match finders for LZMA/LZMA2 compression: bt5 and hc5,
|
||||||
|
that can work faster than bt4 and hc4 match finders for the data with big redundancy.
|
||||||
|
- The compression ratio was improved for Fast and Fastest compression levels with the
|
||||||
|
following default settings:
|
||||||
|
- Fastest level (-mx1) : hc5 match finder with 256 KB dictionary.
|
||||||
|
- Fast level (-mx3) : hc5 match finder with 4 MB dictionary.
|
||||||
|
- Minor speed optimizations in multithreaded LZMA/LZMA2 compression for Normal/Maximum/Ultra
|
||||||
|
compression levels.
|
||||||
|
- bzip2 decoding code was updated to support bzip2 archives, created by lbzip2 program.
|
||||||
|
|
||||||
|
|
||||||
|
19.02 alpha 2019-09-05
|
||||||
|
-------------------------
|
||||||
|
- 7-Zip now can use new x86/x64 hardware instructions for SHA-1 and SHA-256, supported
|
||||||
|
by AMD Ryzen and latest Intel CPUs: Ice Lake and Goldmont.
|
||||||
|
It increases
|
||||||
|
- the speed of SHA-1/SHA-256 hash value calculation,
|
||||||
|
- the speed of encryption/decryption in zip AES,
|
||||||
|
- the speed of key derivation for encryption/decryption in 7z/zip/rar archives.
|
||||||
|
- The speed of zip AES encryption and 7z/zip/rar AES decryption was increased with
|
||||||
|
the following improvements:
|
||||||
|
- 7-Zip now can use new x86/x64 VAES (AVX Vector AES) instructions, supported by
|
||||||
|
Intel Ice Lake CPU.
|
||||||
|
- The existing code of x86/x64 AES-NI was improved also.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
19.00 2019-02-21
|
||||||
|
-------------------------
|
||||||
|
- Encryption strength for 7z archives was increased:
|
||||||
|
the size of random initialization vector was increased from 64-bit to 128-bit,
|
||||||
|
and the pseudo-random number generator was improved.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
18.06 2018-12-30
|
||||||
|
-------------------------
|
||||||
|
- The speed for LZMA/LZMA2 compressing was increased by 3-10%,
|
||||||
|
and there are minor changes in compression ratio.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
18.05 2018-04-30
|
||||||
|
-------------------------
|
||||||
|
- The speed for LZMA/LZMA2 compressing was increased
|
||||||
|
by 8% for fastest/fast compression levels and
|
||||||
|
by 3% for normal/maximum compression levels.
|
||||||
|
|
||||||
|
|
||||||
|
18.03 beta 2018-03-04
|
||||||
|
-------------------------
|
||||||
|
- The speed for single-thread LZMA/LZMA2 decoding
|
||||||
|
was increased by 30% in x64 version and by 3% in x86 version.
|
||||||
|
- 7-Zip now can use multi-threading for 7z/LZMA2 decoding,
|
||||||
|
if there are multiple independent data chunks in LZMA2 stream.
|
||||||
|
|
||||||
|
|
||||||
|
9.35 beta 2014-12-07
|
||||||
|
------------------------------
|
||||||
|
- SFX modules were moved to LZMA SDK package.
|
||||||
|
|
||||||
|
|
||||||
|
9.34 alpha 2014-06-22
|
||||||
|
------------------------------
|
||||||
|
- Minimum supported system now is Windows 2000 for EXE and DLL files.
|
||||||
|
- all EXE and DLL files use msvcrt.dll.
|
||||||
|
- 7zr.exe now support AES encryption.
|
||||||
|
|
||||||
|
|
||||||
|
9.18 2010-11-02
|
||||||
|
------------------------------
|
||||||
|
- New small SFX module for installers.
|
||||||
|
|
||||||
|
|
||||||
|
9.17 2010-10-04
|
||||||
|
------------------------------
|
||||||
|
- New 7-Zip plugin for FAR Manager x64.
|
||||||
|
|
||||||
|
|
||||||
|
9.10 2009-12-30
|
||||||
|
------------------------------
|
||||||
|
- 7-Zip for installers now supports LZMA2.
|
||||||
|
|
||||||
|
|
||||||
|
9.09 2009-12-12
|
||||||
|
------------------------------
|
||||||
|
- LZMA2 compression method support.
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
4.65 2009-02-03
|
||||||
|
------------------------------
|
||||||
|
- Some bugs were fixed.
|
||||||
|
|
||||||
|
|
||||||
|
4.38 beta 2006-04-13
|
||||||
|
------------------------------
|
||||||
|
- SFX for installers now supports new properties in config file:
|
||||||
|
Progress, Directory, ExecuteFile, ExecuteParameters.
|
||||||
|
|
||||||
|
|
||||||
|
4.34 beta 2006-02-27
|
||||||
|
------------------------------
|
||||||
|
- ISetProperties::SetProperties:
|
||||||
|
it's possible to specify desirable number of CPU threads:
|
||||||
|
PROPVARIANT: name=L"mt", vt = VT_UI4, ulVal = NumberOfThreads
|
||||||
|
If "mt" is not defined, 7za.dll will check number of processors in system to set
|
||||||
|
number of desirable threads.
|
||||||
|
Now 7za.dll can use:
|
||||||
|
2 threads for LZMA compressing
|
||||||
|
N threads for BZip2 compressing
|
||||||
|
4 threads for BZip2 decompressing
|
||||||
|
Other codecs use only one thread.
|
||||||
|
Note: 7za.dll can use additional "small" threads with low CPU load.
|
||||||
|
- It's possible to call ISetProperties::SetProperties to specify "mt" property for decoder.
|
||||||
|
|
||||||
|
|
||||||
|
4.33 beta 2006-02-05
|
||||||
|
------------------------------
|
||||||
|
- Compressing speed and Memory requirements were increased.
|
||||||
|
Default dictionary size was increased: Fastest: 64 KB, Fast: 1 MB,
|
||||||
|
Normal: 4 MB, Max: 16 MB, Ultra: 64 MB.
|
||||||
|
- 7z/LZMA now can use only these match finders: HC4, BT2, BT3, BT4
|
||||||
|
|
||||||
|
|
||||||
|
4.27 2005-09-21
|
||||||
|
------------------------------
|
||||||
|
- Some GUIDs/interfaces were changed.
|
||||||
|
IStream.h:
|
||||||
|
ISequentialInStream::Read now works as old ReadPart
|
||||||
|
ISequentialOutStream::Write now works as old WritePart
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
@echo off
|
|
||||||
chcp 65001 >nul
|
|
||||||
set NAME=启源Q07刷入工具
|
|
||||||
title %NAME% - Build
|
|
||||||
|
|
||||||
echo ============================================================
|
|
||||||
echo %NAME% - Cython Build
|
|
||||||
echo ============================================================
|
|
||||||
echo.
|
|
||||||
|
|
||||||
where python >nul 2>&1
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo [ERROR] Python not found
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
for /f "delims=" %%i in ('where python') do set PY=%%i
|
|
||||||
echo Python: %PY%
|
|
||||||
|
|
||||||
echo [1/6] Installing deps...
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q
|
|
||||||
if errorlevel 1 (
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [2/6] Clean...
|
|
||||||
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
|
||||||
if exist "build" rmdir /s /q build 2>nul
|
|
||||||
if exist "dist" rmdir /s /q dist 2>nul
|
|
||||||
|
|
||||||
echo [3/6] Cython compile...
|
|
||||||
mkdir dist_cy 2>nul
|
|
||||||
copy app.py dist_cy\_core.py >nul
|
|
||||||
|
|
||||||
%PY% -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
|
||||||
|
|
||||||
cd dist_cy
|
|
||||||
%PY% setup_cython.py build_ext --inplace
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] Cython failed, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
|
|
||||||
for %%f in (_core*.pyd) do set PYD=%%f
|
|
||||||
if "%PYD%"=="" (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] No pyd, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
echo PYD: %PYD%
|
|
||||||
copy "%PYD%" _core.pyd >nul
|
|
||||||
|
|
||||||
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
|
||||||
|
|
||||||
echo [4/6] Copy resources...
|
|
||||||
copy ..\adb.exe . >nul
|
|
||||||
copy ..\AdbWinApi.dll . >nul
|
|
||||||
copy ..\AdbWinUsbApi.dll . >nul
|
|
||||||
if exist "..\app.ico" copy "..\app.ico" . >nul
|
|
||||||
|
|
||||||
echo [5/6] PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin launcher.py
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [ERROR] PyInstaller failed
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [6/6] Cleanup...
|
|
||||||
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
|
||||||
rmdir /s /q build 2>nul
|
|
||||||
cd ..
|
|
||||||
goto :DONE
|
|
||||||
|
|
||||||
:NORMAL
|
|
||||||
cd /d "%~dp0"
|
|
||||||
echo [INFO] Normal PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin app.py
|
|
||||||
|
|
||||||
:DONE
|
|
||||||
echo.
|
|
||||||
echo Done.
|
|
||||||
if exist "dist_cy\dist\%NAME%.exe" (
|
|
||||||
echo Output: dist_cy\dist\%NAME%.exe
|
|
||||||
) else if exist "dist\%NAME%.exe" (
|
|
||||||
echo Output: dist\%NAME%.exe
|
|
||||||
) else (
|
|
||||||
echo Check dist folder
|
|
||||||
)
|
|
||||||
pause
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
@echo off
|
|
||||||
chcp 65001 >nul
|
|
||||||
set NAME=长安逸动刷入工具
|
|
||||||
set SRC=app-install.py
|
|
||||||
title %NAME% - Build
|
|
||||||
|
|
||||||
echo ============================================================
|
|
||||||
echo %NAME% - Cython Build
|
|
||||||
echo ============================================================
|
|
||||||
echo.
|
|
||||||
|
|
||||||
where python >nul 2>&1
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo [ERROR] Python not found
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
for /f "delims=" %%i in ('where python') do set PY=%%i
|
|
||||||
echo Python: %PY%
|
|
||||||
|
|
||||||
echo [1/6] Installing deps...
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q
|
|
||||||
if errorlevel 1 (
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [2/6] Clean...
|
|
||||||
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
|
||||||
if exist "build" rmdir /s /q build 2>nul
|
|
||||||
if exist "dist" rmdir /s /q dist 2>nul
|
|
||||||
|
|
||||||
echo [3/6] Cython compile...
|
|
||||||
mkdir dist_cy 2>nul
|
|
||||||
copy %SRC% dist_cy\_core.py >nul
|
|
||||||
|
|
||||||
%PY% -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
|
||||||
|
|
||||||
cd dist_cy
|
|
||||||
%PY% setup_cython.py build_ext --inplace
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] Cython failed, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
|
|
||||||
for %%f in (_core*.pyd) do set PYD=%%f
|
|
||||||
if "%PYD%"=="" (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] No pyd, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
echo PYD: %PYD%
|
|
||||||
copy "%PYD%" _core.pyd >nul
|
|
||||||
|
|
||||||
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
|
||||||
|
|
||||||
echo [4/6] Copy resources...
|
|
||||||
copy ..\adb.exe . >nul
|
|
||||||
copy ..\AdbWinApi.dll . >nul
|
|
||||||
copy ..\AdbWinUsbApi.dll . >nul
|
|
||||||
copy ..\7za.exe . >nul
|
|
||||||
if exist "..\app.ico" copy "..\app.ico" . >nul
|
|
||||||
|
|
||||||
echo [5/6] PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin launcher.py
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [ERROR] PyInstaller failed
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [6/6] Cleanup...
|
|
||||||
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
|
||||||
rmdir /s /q build 2>nul
|
|
||||||
cd ..
|
|
||||||
goto :DONE
|
|
||||||
|
|
||||||
:NORMAL
|
|
||||||
cd /d "%~dp0"
|
|
||||||
echo [INFO] Normal PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin %SRC%
|
|
||||||
|
|
||||||
:DONE
|
|
||||||
echo.
|
|
||||||
echo Done.
|
|
||||||
if exist "dist_cy\dist\%NAME%.exe" (
|
|
||||||
echo Output: dist_cy\dist\%NAME%.exe
|
|
||||||
) else if exist "dist\%NAME%.exe" (
|
|
||||||
echo Output: dist\%NAME%.exe
|
|
||||||
) else (
|
|
||||||
echo Check dist folder
|
|
||||||
)
|
|
||||||
pause
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
@echo off
|
|
||||||
chcp 65001 >nul
|
|
||||||
set NAME=启源Q07刷入工具
|
|
||||||
set SRC=app.py
|
|
||||||
title %NAME% - Build
|
|
||||||
|
|
||||||
echo ============================================================
|
|
||||||
echo %NAME% - Cython Build
|
|
||||||
echo ============================================================
|
|
||||||
echo.
|
|
||||||
|
|
||||||
where python >nul 2>&1
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo [ERROR] Python not found
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
for /f "delims=" %%i in ('where python') do set PY=%%i
|
|
||||||
echo Python: %PY%
|
|
||||||
|
|
||||||
echo [1/6] Installing deps...
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q
|
|
||||||
if errorlevel 1 (
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [2/6] Clean...
|
|
||||||
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
|
||||||
if exist "build" rmdir /s /q build 2>nul
|
|
||||||
if exist "dist" rmdir /s /q dist 2>nul
|
|
||||||
|
|
||||||
echo [3/6] Cython compile...
|
|
||||||
mkdir dist_cy 2>nul
|
|
||||||
copy %SRC% dist_cy\_core.py >nul
|
|
||||||
|
|
||||||
%PY% -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
|
||||||
|
|
||||||
cd dist_cy
|
|
||||||
%PY% setup_cython.py build_ext --inplace
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] Cython failed, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
|
|
||||||
for %%f in (_core*.pyd) do set PYD=%%f
|
|
||||||
if "%PYD%"=="" (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] No pyd, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
echo PYD: %PYD%
|
|
||||||
copy "%PYD%" _core.pyd >nul
|
|
||||||
|
|
||||||
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
|
||||||
|
|
||||||
echo [4/6] Copy resources...
|
|
||||||
copy ..\adb.exe . >nul
|
|
||||||
copy ..\AdbWinApi.dll . >nul
|
|
||||||
copy ..\AdbWinUsbApi.dll . >nul
|
|
||||||
copy ..\7za.exe . >nul
|
|
||||||
if exist "..\app.ico" copy "..\app.ico" . >nul
|
|
||||||
|
|
||||||
echo [5/6] PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin launcher.py
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [ERROR] PyInstaller failed
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [6/6] Cleanup...
|
|
||||||
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
|
||||||
rmdir /s /q build 2>nul
|
|
||||||
cd ..
|
|
||||||
goto :DONE
|
|
||||||
|
|
||||||
:NORMAL
|
|
||||||
cd /d "%~dp0"
|
|
||||||
echo [INFO] Normal PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin %SRC%
|
|
||||||
|
|
||||||
:DONE
|
|
||||||
echo.
|
|
||||||
echo Done.
|
|
||||||
if exist "dist_cy\dist\%NAME%.exe" (
|
|
||||||
echo Output: dist_cy\dist\%NAME%.exe
|
|
||||||
) else if exist "dist\%NAME%.exe" (
|
|
||||||
echo Output: dist\%NAME%.exe
|
|
||||||
) else (
|
|
||||||
echo Check dist folder
|
|
||||||
)
|
|
||||||
pause
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
@echo off
|
|
||||||
chcp 65001 >nul
|
|
||||||
set NAME=深蓝S05刷入工具
|
|
||||||
set SRC=S05.py
|
|
||||||
title %NAME% - Build
|
|
||||||
|
|
||||||
echo ============================================================
|
|
||||||
echo %NAME% - Cython Build
|
|
||||||
echo ============================================================
|
|
||||||
echo.
|
|
||||||
|
|
||||||
where python >nul 2>&1
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo [ERROR] Python not found
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
for /f "delims=" %%i in ('where python') do set PY=%%i
|
|
||||||
echo Python: %PY%
|
|
||||||
|
|
||||||
echo [1/6] Installing deps...
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q
|
|
||||||
if errorlevel 1 (
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [2/6] Clean...
|
|
||||||
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
|
||||||
if exist "build" rmdir /s /q build 2>nul
|
|
||||||
if exist "dist" rmdir /s /q dist 2>nul
|
|
||||||
|
|
||||||
echo [3/6] Cython compile...
|
|
||||||
mkdir dist_cy 2>nul
|
|
||||||
copy %SRC% dist_cy\_core.py >nul
|
|
||||||
|
|
||||||
%PY% -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
|
||||||
|
|
||||||
cd dist_cy
|
|
||||||
%PY% setup_cython.py build_ext --inplace
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] Cython failed, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
|
|
||||||
for %%f in (_core*.pyd) do set PYD=%%f
|
|
||||||
if "%PYD%"=="" (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] No pyd, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
echo PYD: %PYD%
|
|
||||||
copy "%PYD%" _core.pyd >nul
|
|
||||||
|
|
||||||
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
|
||||||
|
|
||||||
echo [4/6] Copy resources...
|
|
||||||
copy ..\adb.exe . >nul
|
|
||||||
copy ..\AdbWinApi.dll . >nul
|
|
||||||
copy ..\AdbWinUsbApi.dll . >nul
|
|
||||||
copy ..\7za.exe . >nul
|
|
||||||
if exist "..\app.ico" copy "..\app.ico" . >nul
|
|
||||||
|
|
||||||
echo [5/6] PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin launcher.py
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [ERROR] PyInstaller failed
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [6/6] Cleanup...
|
|
||||||
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
|
||||||
rmdir /s /q build 2>nul
|
|
||||||
cd ..
|
|
||||||
goto :DONE
|
|
||||||
|
|
||||||
:NORMAL
|
|
||||||
cd /d "%~dp0"
|
|
||||||
echo [INFO] Normal PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin %SRC%
|
|
||||||
|
|
||||||
:DONE
|
|
||||||
echo.
|
|
||||||
echo Done.
|
|
||||||
if exist "dist_cy\dist\%NAME%.exe" (
|
|
||||||
echo Output: dist_cy\dist\%NAME%.exe
|
|
||||||
) else if exist "dist\%NAME%.exe" (
|
|
||||||
echo Output: dist\%NAME%.exe
|
|
||||||
) else (
|
|
||||||
echo Check dist folder
|
|
||||||
)
|
|
||||||
pause
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
@echo off
|
|
||||||
chcp 65001 >nul
|
|
||||||
set NAME=长安逸动刷入工具
|
|
||||||
set SRC=app-yidong.py
|
|
||||||
title %NAME% - Build
|
|
||||||
|
|
||||||
echo ============================================================
|
|
||||||
echo %NAME% - Cython Build
|
|
||||||
echo ============================================================
|
|
||||||
echo.
|
|
||||||
|
|
||||||
where python >nul 2>&1
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo [ERROR] Python not found
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
for /f "delims=" %%i in ('where python') do set PY=%%i
|
|
||||||
echo Python: %PY%
|
|
||||||
|
|
||||||
echo [1/6] Installing deps...
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q
|
|
||||||
if errorlevel 1 (
|
|
||||||
%PY% -m pip install pyinstaller cython pyzipper -q -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [2/6] Clean...
|
|
||||||
if exist "dist_cy" rmdir /s /q dist_cy 2>nul
|
|
||||||
if exist "build" rmdir /s /q build 2>nul
|
|
||||||
if exist "dist" rmdir /s /q dist 2>nul
|
|
||||||
|
|
||||||
echo [3/6] Cython compile...
|
|
||||||
mkdir dist_cy 2>nul
|
|
||||||
copy %SRC% dist_cy\_core.py >nul
|
|
||||||
|
|
||||||
%PY% -c "open('dist_cy/setup_cython.py','w').write('from setuptools import setup\nfrom Cython.Build import cythonize\nsetup(ext_modules=cythonize(\"_core.py\", compiler_directives={\"language_level\":\"3\"}))\n')"
|
|
||||||
|
|
||||||
cd dist_cy
|
|
||||||
%PY% setup_cython.py build_ext --inplace
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] Cython failed, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
|
|
||||||
for %%f in (_core*.pyd) do set PYD=%%f
|
|
||||||
if "%PYD%"=="" (
|
|
||||||
cd ..
|
|
||||||
echo [WARN] No pyd, fallback
|
|
||||||
goto :NORMAL
|
|
||||||
)
|
|
||||||
echo PYD: %PYD%
|
|
||||||
copy "%PYD%" _core.pyd >nul
|
|
||||||
|
|
||||||
%PY% -c "open('launcher.py','w').write('# -*- coding: utf-8 -*-\nfrom _core import main\nmain()\n')"
|
|
||||||
|
|
||||||
echo [4/6] Copy resources...
|
|
||||||
copy ..\adb.exe . >nul
|
|
||||||
copy ..\AdbWinApi.dll . >nul
|
|
||||||
copy ..\AdbWinUsbApi.dll . >nul
|
|
||||||
copy ..\7za.exe . >nul
|
|
||||||
if exist "..\app.ico" copy "..\app.ico" . >nul
|
|
||||||
|
|
||||||
echo [5/6] PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --add-binary "_core.pyd;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin launcher.py
|
|
||||||
if errorlevel 1 (
|
|
||||||
cd ..
|
|
||||||
echo [ERROR] PyInstaller failed
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
echo [6/6] Cleanup...
|
|
||||||
del /q _core.py _core.c _core.pyd %PYD% launcher.py setup_cython.py 2>nul
|
|
||||||
rmdir /s /q build 2>nul
|
|
||||||
cd ..
|
|
||||||
goto :DONE
|
|
||||||
|
|
||||||
:NORMAL
|
|
||||||
cd /d "%~dp0"
|
|
||||||
echo [INFO] Normal PyInstaller...
|
|
||||||
%PY% -m PyInstaller --onefile --windowed --name="%NAME%" --icon=app.ico --add-data "adb.exe;." --add-data "AdbWinApi.dll;." --add-data "AdbWinUsbApi.dll;." --add-data "7za.exe;." --hidden-import=queue --hidden-import=threading --hidden-import=tkinter --hidden-import=zipfile --hidden-import=json --hidden-import=urllib --collect-all tkinter --uac-admin %SRC%
|
|
||||||
|
|
||||||
:DONE
|
|
||||||
echo.
|
|
||||||
echo Done.
|
|
||||||
if exist "dist_cy\dist\%NAME%.exe" (
|
|
||||||
echo Output: dist_cy\dist\%NAME%.exe
|
|
||||||
) else if exist "dist\%NAME%.exe" (
|
|
||||||
echo Output: dist\%NAME%.exe
|
|
||||||
) else (
|
|
||||||
echo Check dist folder
|
|
||||||
)
|
|
||||||
pause
|
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
7-Zip Extra 26.01
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
7-Zip Extra is package of extra modules of 7-Zip.
|
||||||
|
|
||||||
|
7-Zip Copyright (C) 1999-2026 Igor Pavlov.
|
||||||
|
|
||||||
|
7-Zip is free software. Read License.txt for more information about license.
|
||||||
|
|
||||||
|
Source code of binaries can be found at:
|
||||||
|
http://www.7-zip.org/
|
||||||
|
|
||||||
|
This package contains the following files:
|
||||||
|
|
||||||
|
7za.exe - standalone console version of 7-Zip with reduced formats support.
|
||||||
|
7za.dll - library for working with 7z archives
|
||||||
|
7zxa.dll - library for extracting from 7z archives
|
||||||
|
License.txt - license information
|
||||||
|
readme.txt - this file
|
||||||
|
7-zip.chm - Help file
|
||||||
|
|
||||||
|
Far\ - plugin for Far Manager
|
||||||
|
x64\ - binaries for x64
|
||||||
|
arm64\ - binaries for arm64
|
||||||
|
|
||||||
|
|
||||||
|
All 32-bit binaries can work in:
|
||||||
|
Windows 2000 / 2003 / 2008 / XP / Vista / 7 / 8 / 10
|
||||||
|
and in any Windows x64 version with WoW64 support.
|
||||||
|
All x64 binaries can work in any Windows x64 version.
|
||||||
|
|
||||||
|
All x86 and x64 binaries use msvcrt.dll.
|
||||||
|
|
||||||
|
7za.exe
|
||||||
|
-------
|
||||||
|
|
||||||
|
7za.exe - is a standalone console version of 7-Zip with reduced formats support.
|
||||||
|
|
||||||
|
Extra: 7za.exe : support for only some formats of 7-Zip.
|
||||||
|
7-Zip: 7z.exe with 7z.dll : support for all formats of 7-Zip.
|
||||||
|
|
||||||
|
7za.exe and 7z.exe from 7-Zip have same command line interface.
|
||||||
|
7za.exe doesn't use external DLL files.
|
||||||
|
|
||||||
|
You can read Help File (7-zip.chm) from 7-Zip package for description
|
||||||
|
of all commands and switches for 7za.exe and 7z.exe.
|
||||||
|
|
||||||
|
7za.exe features:
|
||||||
|
|
||||||
|
- High compression ratio in 7z format
|
||||||
|
- Supported formats:
|
||||||
|
- Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR
|
||||||
|
- Unpacking only: lzma, CAB, ZSTD.
|
||||||
|
- Highest compression ratio for ZIP and GZIP formats.
|
||||||
|
- Fast compression and decompression
|
||||||
|
- Strong AES-256 encryption in 7z and ZIP formats.
|
||||||
|
|
||||||
|
Note: another package "LZMA SDK" contains 7zr.exe - that is reduced version of 7za.exe.
|
||||||
|
But you can use 7zr.exe as "public domain" code.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DLL files
|
||||||
|
---------
|
||||||
|
|
||||||
|
7za.dll and 7zxa.dll are reduced versions of 7z.dll from 7-Zip.
|
||||||
|
7za.dll and 7zxa.dll support only 7z format.
|
||||||
|
Note: 7z.dll is main DLL file that works with all archive types in 7-Zip.
|
||||||
|
|
||||||
|
7za.dll and 7zxa.dll support the following decoding methods:
|
||||||
|
- LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES, BZip2, Deflate.
|
||||||
|
|
||||||
|
7za.dll also supports 7z encoding with the following encoding methods:
|
||||||
|
- LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES.
|
||||||
|
|
||||||
|
7za.dll and 7zxa.dll work via COM interfaces.
|
||||||
|
But these DLLs don't use standard COM interfaces for objects creating.
|
||||||
|
|
||||||
|
Look also example code that calls DLL functions (in source code of 7-Zip):
|
||||||
|
|
||||||
|
7zip\UI\Client7z
|
||||||
|
|
||||||
|
Another example of binary that uses these interface is 7-Zip itself.
|
||||||
|
The following binaries from 7-Zip use 7z.dll:
|
||||||
|
- 7z.exe (console version)
|
||||||
|
- 7zG.exe (GUI version)
|
||||||
|
- 7zFM.exe (7-Zip File Manager)
|
||||||
|
|
||||||
|
Note: The source code of LZMA SDK also contains the code for similar DLLs
|
||||||
|
(DLLs without BZip2, Deflate support). And these files from LZMA SDK can be
|
||||||
|
used as "public domain" code. If you use LZMA SDK files, you don't need to
|
||||||
|
follow GNU LGPL rules, if you want to change the code.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
License FAQ
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Can I use the EXE or DLL files from 7-Zip in a commercial application?
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Yes, but you are required to specify in documentation for your application:
|
||||||
|
(1) that you used parts of the 7-Zip program,
|
||||||
|
(2) that 7-Zip is licensed under the GNU LGPL license and
|
||||||
|
(3) you must give a link to www.7-zip.org, where the source code can be found.
|
||||||
|
|
||||||
|
|
||||||
|
Can I use the source code of 7-Zip in a commercial application?
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Since 7-Zip is licensed under the GNU LGPL you must follow the rules of that license.
|
||||||
|
In brief, it means that any LGPL'ed code must remain licensed under the LGPL.
|
||||||
|
For instance, you can change the code from 7-Zip or write a wrapper for some
|
||||||
|
code from 7-Zip and compile it into a DLL; but, the source code of that DLL
|
||||||
|
(including your modifications / additions / wrapper) must be licensed under
|
||||||
|
the LGPL or GPL.
|
||||||
|
Any other code in your application can be licensed as you wish. This scheme allows
|
||||||
|
users and developers to change LGPL'ed code and recompile that DLL. That is the
|
||||||
|
idea of free software. Read more here: http://www.gnu.org/.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Note: You can look also LZMA SDK, which is available under a more liberal license.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
End of document
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import base64
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import struct
|
||||||
|
import zlib
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
DEFAULT_AAD = "Q05-Lidar init_boot resource v1"
|
||||||
|
FORMAT_MAGIC = {
|
||||||
|
"q05": (b"Q05R2\x00", "q05-lidar-resource-v2", DEFAULT_AAD),
|
||||||
|
"ez60": (b"EZ60R2\x00", "ez60-resource-v2", "Mazda-EZ60 init_boot resource v1"),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def b64u(data):
|
||||||
|
return base64.urlsafe_b64encode(data).decode("ascii").rstrip("=")
|
||||||
|
|
||||||
|
|
||||||
|
def decode_key_material(key_text):
|
||||||
|
text = str(key_text).strip()
|
||||||
|
if text.startswith("raw:"):
|
||||||
|
key = text.split(":", 1)[1].encode("utf-8")
|
||||||
|
elif len(text) == 64 and all(c in "0123456789abcdefABCDEF" for c in text):
|
||||||
|
key = bytes.fromhex(text)
|
||||||
|
elif len(text.encode("utf-8")) == 32:
|
||||||
|
key = text.encode("utf-8")
|
||||||
|
else:
|
||||||
|
key = base64.urlsafe_b64decode(text + "=" * (-len(text) % 4))
|
||||||
|
if len(key) != 32:
|
||||||
|
raise ValueError(f"key must decode to 32 bytes, got {len(key)} bytes")
|
||||||
|
return key
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Encrypt a vehicle init_boot image into a resource dat file"
|
||||||
|
)
|
||||||
|
parser.add_argument("input_img", help="Magisk-patched init_boot image")
|
||||||
|
parser.add_argument(
|
||||||
|
"-o", "--output",
|
||||||
|
default="resource.dat",
|
||||||
|
help="Output encrypted resource file, default: resource.dat",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--vehicle",
|
||||||
|
choices=sorted(FORMAT_MAGIC.keys()),
|
||||||
|
default="q05",
|
||||||
|
help="Resource header/profile to write. Default: q05.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--aad",
|
||||||
|
help="Optional AES-GCM AAD text. Defaults to the selected vehicle profile.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--key",
|
||||||
|
help="Optional AES-256 key as base64url, 64-char hex, raw:TEXT, or 32-byte UTF-8 text. Omit to generate a random key.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--no-compress",
|
||||||
|
action="store_true",
|
||||||
|
help="Disable zlib compression before encryption.",
|
||||||
|
)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
try:
|
||||||
|
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
||||||
|
except ImportError:
|
||||||
|
raise SystemExit(
|
||||||
|
"Missing dependency: cryptography. Install it with: "
|
||||||
|
"python -m pip install cryptography"
|
||||||
|
)
|
||||||
|
|
||||||
|
input_path = Path(args.input_img)
|
||||||
|
plain = input_path.read_bytes()
|
||||||
|
sha256 = hashlib.sha256(plain).hexdigest()
|
||||||
|
magic, resource_format, default_aad = FORMAT_MAGIC[args.vehicle]
|
||||||
|
aad = (args.aad or default_aad).encode("utf-8")
|
||||||
|
|
||||||
|
if args.key:
|
||||||
|
try:
|
||||||
|
key = decode_key_material(args.key)
|
||||||
|
except Exception as e:
|
||||||
|
raise SystemExit(str(e))
|
||||||
|
else:
|
||||||
|
key = os.urandom(32)
|
||||||
|
|
||||||
|
compression = "none" if args.no_compress else "zlib"
|
||||||
|
body = plain if args.no_compress else zlib.compress(plain, level=9)
|
||||||
|
nonce = os.urandom(12)
|
||||||
|
ciphertext = AESGCM(key).encrypt(nonce, body, aad)
|
||||||
|
|
||||||
|
header = {
|
||||||
|
"format": resource_format,
|
||||||
|
"cipher": "AES-256-GCM",
|
||||||
|
"kdf": "none",
|
||||||
|
"compression": compression,
|
||||||
|
"aad": aad.decode("utf-8"),
|
||||||
|
"nonce": b64u(nonce),
|
||||||
|
"sha256": sha256,
|
||||||
|
"plainSize": len(plain),
|
||||||
|
"packedSize": len(body),
|
||||||
|
}
|
||||||
|
|
||||||
|
output_path = Path(args.output)
|
||||||
|
header_bytes = json.dumps(header, ensure_ascii=False, separators=(",", ":")).encode("utf-8")
|
||||||
|
output_path.write_bytes(magic + struct.pack(">I", len(header_bytes)) + header_bytes + ciphertext)
|
||||||
|
|
||||||
|
print("resource.dat created")
|
||||||
|
print(f"input: {input_path}")
|
||||||
|
print(f"output: {output_path}")
|
||||||
|
print(f"plainSize: {len(plain)}")
|
||||||
|
print(f"packedSize: {len(body)}")
|
||||||
|
print(f"sha256: {sha256}")
|
||||||
|
print(f"cloudKey: {b64u(key)}")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
[defaults]
|
||||||
|
base_features = sparse_super,large_file,filetype,dir_index,ext_attr
|
||||||
|
default_mntopts = acl,user_xattr
|
||||||
|
enable_periodic_fsck = 0
|
||||||
|
blocksize = 4096
|
||||||
|
inode_size = 256
|
||||||
|
inode_ratio = 16384
|
||||||
|
reserved_ratio = 1.0
|
||||||
|
|
||||||
|
[fs_types]
|
||||||
|
ext3 = {
|
||||||
|
features = has_journal
|
||||||
|
}
|
||||||
|
ext4 = {
|
||||||
|
features = has_journal,extent,huge_file,dir_nlink,extra_isize,uninit_bg
|
||||||
|
inode_size = 256
|
||||||
|
}
|
||||||
|
ext4dev = {
|
||||||
|
features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
|
||||||
|
inode_size = 256
|
||||||
|
options = test_fs=1
|
||||||
|
}
|
||||||
|
small = {
|
||||||
|
blocksize = 1024
|
||||||
|
inode_size = 128
|
||||||
|
inode_ratio = 4096
|
||||||
|
}
|
||||||
|
floppy = {
|
||||||
|
blocksize = 1024
|
||||||
|
inode_size = 128
|
||||||
|
inode_ratio = 8192
|
||||||
|
}
|
||||||
|
big = {
|
||||||
|
inode_ratio = 32768
|
||||||
|
}
|
||||||
|
huge = {
|
||||||
|
inode_ratio = 65536
|
||||||
|
}
|
||||||
|
news = {
|
||||||
|
inode_ratio = 4096
|
||||||
|
}
|
||||||
|
largefile = {
|
||||||
|
inode_ratio = 1048576
|
||||||
|
blocksize = -1
|
||||||
|
}
|
||||||
|
largefile4 = {
|
||||||
|
inode_ratio = 4194304
|
||||||
|
blocksize = -1
|
||||||
|
}
|
||||||
|
hurd = {
|
||||||
|
blocksize = 4096
|
||||||
|
inode_size = 128
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Pkg.UserSrc=false
|
||||||
|
Pkg.Revision=37.0.0
|
||||||
@@ -0,0 +1,195 @@
|
|||||||
|
;
|
||||||
|
; Android WinUsb driver installation.
|
||||||
|
;
|
||||||
|
[Version]
|
||||||
|
Signature = "$Windows NT$"
|
||||||
|
Class = AndroidUsbDeviceClass
|
||||||
|
ClassGuid = {3F966BD9-FA04-4ec5-991C-D326973B5128}
|
||||||
|
Provider = %ProviderName%
|
||||||
|
DriverVer = 08/28/2014,11.0.0000.00000
|
||||||
|
CatalogFile.NTx86 = androidwinusb86.cat
|
||||||
|
CatalogFile.NTamd64 = androidwinusba64.cat
|
||||||
|
|
||||||
|
[ClassInstall32]
|
||||||
|
Addreg = AndroidWinUsbClassReg
|
||||||
|
|
||||||
|
[AndroidWinUsbClassReg]
|
||||||
|
HKR,,,0,%ClassName%
|
||||||
|
HKR,,Icon,,-1
|
||||||
|
|
||||||
|
|
||||||
|
[Manufacturer]
|
||||||
|
%ProviderName% = Google, NTx86, NTamd64
|
||||||
|
|
||||||
|
|
||||||
|
[Google.NTx86]
|
||||||
|
|
||||||
|
;Google Nexus One
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
|
||||||
|
|
||||||
|
;Google Nexus S
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E21
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E22&MI_01
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E23
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E24&MI_01
|
||||||
|
|
||||||
|
;Google Nexus 7
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4E40
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E42&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E44&MI_01
|
||||||
|
|
||||||
|
;Google Nexus Q
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_2C10
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_2C11
|
||||||
|
|
||||||
|
;Google Nexus (generic)
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4EE0
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE2&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE4&MI_02
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE6&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE7
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_D001
|
||||||
|
|
||||||
|
;Google Glass
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&MI_01
|
||||||
|
|
||||||
|
;Google Glass EE1
|
||||||
|
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9003
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9003&MI_01
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_9004
|
||||||
|
|
||||||
|
;Google Glass EE2
|
||||||
|
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9005
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9005&MI_00
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_9006
|
||||||
|
|
||||||
|
;Project Tango (generic)
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4D00
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4D02&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4D04&MI_02
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4D06&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4D07
|
||||||
|
|
||||||
|
|
||||||
|
[Google.NTamd64]
|
||||||
|
|
||||||
|
;Google Nexus One
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
|
||||||
|
|
||||||
|
;Google Nexus S
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E21
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E22&MI_01
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E23
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E24&MI_01
|
||||||
|
|
||||||
|
;Google Nexus 7
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4E40
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E42&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E44&MI_01
|
||||||
|
|
||||||
|
;Google Nexus Q
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_2C10
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_2C11
|
||||||
|
|
||||||
|
;Google Nexus (generic)
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4EE0
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE2&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE4&MI_02
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE6&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE7
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_D001
|
||||||
|
|
||||||
|
;Google Glass
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&MI_01
|
||||||
|
|
||||||
|
;Google Glass EE1
|
||||||
|
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9003
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9003&MI_01
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_9004
|
||||||
|
|
||||||
|
;Google Glass EE2
|
||||||
|
|
||||||
|
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9005
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9005&MI_00
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_9006
|
||||||
|
|
||||||
|
;Project Tango (generic)
|
||||||
|
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4D00
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4D02&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4D04&MI_02
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4D06&MI_01
|
||||||
|
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4D07
|
||||||
|
|
||||||
|
|
||||||
|
[USB_Install]
|
||||||
|
Include = winusb.inf
|
||||||
|
Needs = WINUSB.NT
|
||||||
|
|
||||||
|
[USB_Install.Services]
|
||||||
|
Include = winusb.inf
|
||||||
|
AddService = WinUSB,0x00000002,WinUSB_ServiceInstall
|
||||||
|
|
||||||
|
[WinUSB_ServiceInstall]
|
||||||
|
DisplayName = %WinUSB_SvcDesc%
|
||||||
|
ServiceType = 1
|
||||||
|
StartType = 3
|
||||||
|
ErrorControl = 1
|
||||||
|
ServiceBinary = %12%\WinUSB.sys
|
||||||
|
|
||||||
|
[USB_Install.Wdf]
|
||||||
|
KmdfService = WINUSB, WinUSB_Install
|
||||||
|
|
||||||
|
[WinUSB_Install]
|
||||||
|
KmdfLibraryVersion = 1.9
|
||||||
|
|
||||||
|
[USB_Install.HW]
|
||||||
|
AddReg = Dev_AddReg
|
||||||
|
|
||||||
|
[Dev_AddReg]
|
||||||
|
HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}"
|
||||||
|
|
||||||
|
[USB_Install.CoInstallers]
|
||||||
|
AddReg = CoInstallers_AddReg
|
||||||
|
CopyFiles = CoInstallers_CopyFiles
|
||||||
|
|
||||||
|
[CoInstallers_AddReg]
|
||||||
|
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
|
||||||
|
|
||||||
|
[CoInstallers_CopyFiles]
|
||||||
|
WinUSBCoInstaller2.dll
|
||||||
|
WdfCoInstaller01009.dll
|
||||||
|
|
||||||
|
[DestinationDirs]
|
||||||
|
CoInstallers_CopyFiles=11
|
||||||
|
|
||||||
|
[SourceDisksNames]
|
||||||
|
1 = %DISK_NAME%,,,\i386
|
||||||
|
2 = %DISK_NAME%,,,\amd64
|
||||||
|
|
||||||
|
[SourceDisksFiles.x86]
|
||||||
|
WinUSBCoInstaller2.dll = 1
|
||||||
|
WdfCoInstaller01009.dll = 1
|
||||||
|
|
||||||
|
[SourceDisksFiles.amd64]
|
||||||
|
WinUSBCoInstaller2.dll = 2
|
||||||
|
WdfCoInstaller01009.dll = 2
|
||||||
|
|
||||||
|
[Strings]
|
||||||
|
ProviderName = "Google, Inc."
|
||||||
|
SingleAdbInterface = "Android ADB Interface"
|
||||||
|
CompositeAdbInterface = "Android Composite ADB Interface"
|
||||||
|
SingleBootLoaderInterface = "Android Bootloader Interface"
|
||||||
|
WinUSB_SvcDesc = "Android USB Driver"
|
||||||
|
DISK_NAME = "Android WinUsb installation disk"
|
||||||
|
ClassName = "Android Device"
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Pkg.Revision=13
|
||||||
|
Archive.HostOs=WINDOWS
|
||||||
|
Extra.Path=usb_driver
|
||||||