Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

build_exe.bat 522 B

1234567891011121314151617181920
  1. @echo off
  2. REM Build Bag1.exe (single file, no console window).
  3. REM Run from this folder: build_exe.bat
  4. REM Requires: pip install -r requirements-build.txt
  5. set SCRIPT=Bag1.py
  6. set NAME=Bag1
  7. if not exist "%SCRIPT%" (
  8. echo Error: %SCRIPT% not found. Run from the python folder.
  9. exit /b 1
  10. )
  11. pip install -r requirements-build.txt
  12. pyinstaller --onefile --windowed --name "%NAME%" "%SCRIPT%"
  13. echo.
  14. echo Done. Exe is in: dist\%NAME%.exe
  15. echo Copy dist\%NAME%.exe to the customer PC and run it (no Python needed).
  16. pause