Skip to content

Commit

Permalink
Update win build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mbuesch committed Jan 25, 2024
1 parent 937b13c commit 14eb268
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion maintenance/win-install-dependencies.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ for /D %%f in ( "C:\PYTHON*" ) do set PATH=!PATH!;%%f
for /D %%f in ( "%USERPROFILE%\AppData\Local\Programs\Python\Python*" ) do set PATH=!PATH!;%%f;%%f\Scripts


call :install pip
if ERRORLEVEL 1 exit /B 1
call :install setuptools
if ERRORLEVEL 1 exit /B 1
call :install wheel
if ERRORLEVEL 1 exit /B 1
call :install pywin32
Expand All @@ -32,7 +36,7 @@ exit /B 0

:install
echo Installing %1 ...
pip3 install --upgrade %1
python -m pip install --upgrade %1
if ERRORLEVEL 1 (
echo FAILED to install %1
pause
Expand Down
12 changes: 6 additions & 6 deletions maintenance/win-standalone-build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
rem
rem AWL simulator - Windows frozen package build script
rem
rem Copyright 2012-2022 Michael Buesch <[email protected]>
rem Copyright 2012-2024 Michael Buesch <[email protected]>
rem
rem This program is free software; you can redistribute it and/or modify
rem it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -68,7 +68,7 @@ exit /B 0


:detect_version
py -c "from awlsim.common.version import VERSION_STRING; print(VERSION_STRING)" > version.txt
python -c "from awlsim.common.version import VERSION_STRING; print(VERSION_STRING)" > version.txt
if ERRORLEVEL 1 goto error_version
set /p version= < version.txt
del version.txt
Expand Down Expand Up @@ -113,7 +113,7 @@ exit /B 0

:build_cxfreeze
echo === Building the cx_Freeze distribution
py setup.py build
python setup.py build
if ERRORLEVEL 1 goto error_exe
exit /B 0

Expand All @@ -122,9 +122,9 @@ exit /B 0
echo Generating %~2.html from %~1 ...
echo ^<!DOCTYPE html^>^<html^>^<head^>^<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"^>^</head^>^<body^> > %~2.html
if ERRORLEVEL 1 goto error_doc
py -c "import re; print(re.subn(r'\.md\)', '.html)', open('"%~1"', 'r').read())[0])" >> %~2.md.tmp
python -c "import re; print(re.subn(r'\.md\)', '.html)', open('"%~1"', 'r').read())[0])" >> %~2.md.tmp
if ERRORLEVEL 1 goto error_doc
py -c "from readme_renderer.markdown import render; print(render(open('"%~2.md.tmp"', 'r').read()))" >> %~2.html
python -c "from readme_renderer.markdown import render; print(render(open('"%~2.md.tmp"', 'r').read()))" >> %~2.html
if ERRORLEVEL 1 goto error_doc
del %~2.md.tmp
if ERRORLEVEL 1 goto error_doc
Expand All @@ -147,7 +147,7 @@ exit /B 0

:build_cxfreeze_exe
echo === Building the cx_Freeze distribution executables
py setup.py build_exe --build-exe=%bindir%
python setup.py build_exe --build-exe=%bindir%
if ERRORLEVEL 1 goto error_exe
exit /B 0

Expand Down

0 comments on commit 14eb268

Please sign in to comment.