Commit bbaa7ed0 authored by Michael Büsch's avatar Michael Büsch

Update windows build scripts

Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent 5841801c
......@@ -5,6 +5,7 @@ graft debian
graft doc
graft examples
graft libs
graft maintenance
graft pilc
graft progs
graft submodules
......
@echo off
setlocal ENABLEDELAYEDEXPANSION
set PYPROG=awlsim-gui
for /D %%f in ( "progs\putty\*" ) do set PATH=%%f\putty;!PATH!
set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32
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
py -h >NUL 2>&1
if %ERRORLEVEL% EQU 0 goto exec_py
......@@ -27,19 +27,19 @@ goto end
:exec_py
@echo on
py -3 -O %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
py -3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
@goto end
:exec_python3
@echo on
python3 -O %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
python3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
@goto end
:exec_python
@echo on
python -O %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
python -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
@goto end
......
......@@ -30,7 +30,6 @@ hook_post_checkout()
info "Removing version control files"
default_hook_post_checkout "$@"
rm -r "$1"/maintenance
info "Checking signatures"
for f in "$1"/progs/putty/*/*.gpg; do
......
@echo off
setlocal ENABLEDELAYEDEXPANSION
set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32
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
echo Installing PyQt5 ...
pip3 install PyQt5
if ERRORLEVEL 1 goto error_qt5
echo Installing cx_Freeze ...
pip3 install cx_Freeze
if ERRORLEVEL 1 goto error_cx_freeze
echo ---
echo finished successfully
pause
exit /B 0
:error_qt5
echo FAILED to install PyQt5
goto error
:error_cx_freeze
echo FAILED to install cx_Freeze
goto error
:error
pause
exit 1
\ No newline at end of file
......@@ -4,9 +4,14 @@ setlocal ENABLEDELAYEDEXPANSION
set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32
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
set PATH=%PATH%;%ProgramFiles%\7-Zip
cd ..
if ERRORLEVEL 1 goto error_basedir
py -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
......@@ -61,7 +66,6 @@ echo === Creating the cx_Freeze distribution
call :prepare_env
py setup.py build_exe ^
--build-exe=%bindir% ^
--optimize=2 ^
--excludes=%excludes% ^
--silent
if ERRORLEVEL 1 goto error_exe
......@@ -74,7 +78,6 @@ echo === Creating the py2exe distribution
call :prepare_env
py setup.py py2exe ^
--dist-dir=%bindir% ^
--optimize=2 ^
--bundle-files=3 ^
--ignores=win32api,win32con,readline,awlsim_cython ^
--excludes=%excludes% ^
......@@ -148,6 +151,14 @@ mkdir %bindir%
if ERRORLEVEL 1 goto error_prep
exit /B 0
:error_basedir
echo FAILED to CD to base directory
goto error
:error_version
echo FAILED to detect awlsim version
goto error
:error_prep
echo FAILED to prepare environment
goto error
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment