first commit

This commit is contained in:
2026-03-06 22:19:58 +07:00
commit 9771033418
13 changed files with 2141 additions and 0 deletions

59
build_windows.bat Normal file
View File

@@ -0,0 +1,59 @@
@echo off
REM ============================================
REM IoT Firmware Loader - Windows Build Script
REM Tao file .exe khong can cai Python
REM ============================================
echo ========================================
echo IoT Firmware Loader - Build for Windows
echo ========================================
echo.
cd /d "%~dp0"
REM 1. Tao venv neu chua co
if not exist "venv" (
echo [1/4] Creating virtual environment...
python -m venv venv
)
REM 2. Activate venv
call venv\Scripts\activate.bat
REM 3. Cai dependencies + PyInstaller
echo [2/4] Installing dependencies...
pip install PyQt6 scapy requests pyinstaller --quiet
REM 4. Build .exe
echo [3/4] Building executable...
pyinstaller ^
--name "IoT_Firmware_Loader" ^
--onefile ^
--windowed ^
--noconfirm ^
--clean ^
--hidden-import "scapy.all" ^
--hidden-import "scapy.layers.l2" ^
--hidden-import "scapy.arch.windows" ^
--hidden-import "PyQt6.QtWidgets" ^
--hidden-import "PyQt6.QtCore" ^
--hidden-import "PyQt6.QtGui" ^
main.py
echo.
echo [4/4] Build complete!
echo.
if exist "dist\IoT_Firmware_Loader.exe" (
echo ✅ SUCCESS: dist\IoT_Firmware_Loader.exe
echo.
echo File size:
for %%A in ("dist\IoT_Firmware_Loader.exe") do echo %%~zA bytes
echo.
echo Ban co the copy file .exe nay sang may khac va chay truc tiep.
) else (
echo ❌ BUILD FAILED. Check errors above.
)
echo.
pause