DONE: add build_win.bat
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
@echo off
|
||||
setlocal
|
||||
cd /d "%~dp0"
|
||||
|
||||
if not exist ".venv\Scripts\python.exe" (
|
||||
echo Create the venv first:
|
||||
echo python -m venv .venv
|
||||
echo .venv\Scripts\activate
|
||||
echo pip install -r requirements.txt
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
call .venv\Scripts\activate
|
||||
|
||||
echo Building MyKadReader GUI...
|
||||
pyinstaller --noconfirm --clean --windowed --onedir --name MyKadReader ^
|
||||
--icon ACS_Small.ico ^
|
||||
--hidden-import smartcard ^
|
||||
--hidden-import smartcard.scard ^
|
||||
--hidden-import PIL ^
|
||||
--collect-all smartcard ^
|
||||
--collect-all PIL ^
|
||||
--add-data "ACS_Small.ico;." ^
|
||||
MyKad_Reader.py
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
echo Building MyKadHelper API...
|
||||
pyinstaller --noconfirm --clean --console --onedir --name MyKadHelper ^
|
||||
--icon ACS_Small.ico ^
|
||||
--hidden-import smartcard ^
|
||||
--hidden-import smartcard.scard ^
|
||||
--collect-all smartcard ^
|
||||
mykad_api.py
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
echo.
|
||||
echo Done.
|
||||
echo GUI: dist\MyKadReader\MyKadReader.exe
|
||||
echo Helper: dist\MyKadHelper\MyKadHelper.exe
|
||||
echo Copy each whole folder. Do not copy only the .exe.
|
||||
endlocal
|
||||
Reference in New Issue
Block a user