Skip to content

Commit

Permalink
Merge pull request 1mm0rt41PC#14 from 1mm0rt41PC/1mm0rt41PC-patch-2
Browse files Browse the repository at this point in the history
Update build-py.bat
  • Loading branch information
1mm0rt41PC authored Jun 23, 2023
2 parents ed4bfdf + 013614f commit c2a2195
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build-py.bat
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,17 @@ EXIT /B 0
SET _pyExe=%~5
:Build_arch_main
CALL log.bat "Building %_outTarget%_%_arch%.exe ..."
IF EXIST %_pyTarget%.py (
%_pyExe% %PYTHONOPTIMIZE_FLAG% -m PyInstaller --key=%pykey% --icon=%scriptpath%\pytools.ico --onefile %_pyTarget%.py --name %_outTarget%_%_arch% --noupx %hiddenimports%
IF EXIST %_pyTarget%.spec (
%_pyExe% %PYTHONOPTIMIZE_FLAG% -m PyInstaller %_pyTarget%.spec
) ELSE (
%_pyExe% %PYTHONOPTIMIZE_FLAG% -m PyInstaller %_pyTarget% %hiddenimports%
copy dist\%_pyTarget:.spec=.exe% dist\%_outTarget%_%_arch%.exe
IF EXIST %_pyTarget%.py (
%_pyExe% %PYTHONOPTIMIZE_FLAG% -m PyInstaller --key=%pykey% --icon=%scriptpath%\pytools.ico --onefile %_pyTarget%.py --name %_outTarget%_%_arch% --noupx %hiddenimports%
) ELSE (
%_pyExe% %PYTHONOPTIMIZE_FLAG% -m PyInstaller %_pyTarget% %hiddenimports%
copy dist\%_pyTarget:.spec=.exe% dist\%_outTarget%_%_arch%.exe
)
)

IF NOT EXIST "dist\%_outTarget%_%_arch%.exe" CALL log.bat ERR "Build %_outTarget%_%_arch%.exe FAIL" 1
dist\%_outTarget%_%_arch%.exe -h
set _err=%ERRORLEVEL%
Expand Down

0 comments on commit c2a2195

Please sign in to comment.