Skip to content

Commit 4c6336b

Browse files
committed
Scripted build for windows, final
1 parent c475db3 commit 4c6336b

File tree

1 file changed

+21
-68
lines changed

1 file changed

+21
-68
lines changed

release_windows.bat

+21-68
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,28 @@
11
echo off
22
cls
3-
rem AGe ** this batch is outdated, use pyinstall instead, need a bit more love somewhen later **
4-
rem AGe ** here starts the old batch **
5-
rem AGe, not needed for now: d:\python27\python.exe setup_win.py py2exe -v
6-
rem AGe, not needed for now: py -3.7 setup_win.py py2exe -v
7-
rem AGe obsolete: xcopy images dist\images\ /Y /E
8-
rem AGe xcopy locale dist\locale\ /Y /E
9-
rem AGe, not needed for now: xcopy Slic3r dist\Slic3r\ /Y /E
10-
rem AGe, not needed for now: copy MSVCP90.DLL dist\
11-
rem AGe: pause
12-
13-
rem AGe **** Check's , ToDo's and what ever else... ****
14-
rem AGe
15-
rem AGe **** ---> !! Requirements bevore starting this batch: !! <--- ****
16-
rem AGe, manually?: ** install python 3.7.8 **
17-
rem AGe, manually?: ** install C-compiler environment **
18-
rem AGe ** https://wiki.python.org/moin/WindowsCompilers **
19-
rem AGe
20-
rem AGe ? install git
21-
rem AGe ? git clone http://github.com/kliment/Printrun.git
22-
rem AGe ? git pull
23-
rem AGe ? check if Python 3.7.x is installed and up to date
24-
rem AGe ? check if C-Comiler is installed and up to date
25-
rem AGe ?? maybe add a tool like curl for downloading and processing
26-
rem AGe installations of not pip installations (python 3.7.x,
27-
rem AGe c-compiler and git) --> not jet but maybe later as fully
28-
rem AGe automated process ...
29-
rem AGe ? check for outdated python modules and update them automated
30-
rem AGe ? maybe a option for deleting an existing virtual environment
31-
rem AGe (start from real scratch), compilations,__pycache__ etc.
32-
rem AGe and delete them in general, or maybe delete everything
33-
rem AGe except original git repository files
34-
rem AGe ? generate new pot catalog file automated and with cleanup
35-
rem AGE --> not jet but maybe later
36-
373

384
rem *************************************************************************
395
rem **************** ---> New batch file starts here <--- *****************
406
rem ** **
41-
rem ** This batch will compile automated via commandline an executable **
7+
rem ** This batch will compile automated via command line an executable **
428
rem ** Pronterface file for Windows 10. **
439
rem ** **
4410
rem ** Steps that are automated: **
4511
rem ** **
46-
rem ** 1. clean up previous compilations (directory dist) **
12+
rem ** 1. clean up previous compilations (directory .\dist) **
4713
rem ** 2. check for virtual environment called v3 and generate it, if **
48-
rem ** not availabe (start from scratch) **
49-
rem ** 3. install all needed additional moduls via pip **
50-
rem ** 4. check for outdated moduls that need to be updated and **
51-
rem ** wait for keystroke **
52-
rem ** 5. Check if virtual environment need an update and do it **
14+
rem ** not available (start from scratch) **
15+
rem ** 3. install all needed additional modules via pip **
16+
rem ** 4. check for outdated modules that need to be updated and **
17+
rem ** update them **
18+
rem ** 5. Check if virtual environment needs an update and do it **
5319
rem ** 6. check for existing variants of gcoder_line.cp??-win_amd??.pyd **
5420
rem ** and delete them (to prevent errors and incompatibilities) **
5521
rem ** 7. compile Pronterface.exe **
56-
rem ** 8. copy localisation files to dist **
57-
rem ** 9. go to directory \dist, list files and ends the activity **
22+
rem ** 8. copy localization files to .\dist **
23+
rem ** 9. go to directory .\dist, list files and ends the activity **
5824
rem ** **
59-
rem ** Steps, you need to do manually bevore running this batch: **
25+
rem ** Steps, you need to do manually before running this batch: **
6026
rem ** **
6127
rem ** 1. install python 3.7.8 **
6228
rem ** https://www.python.org/downloads/release/python-378/ **
@@ -65,7 +31,7 @@ rem ** https://wiki.python.org/moin/WindowsCompilers **
6531
rem ** 3. check for latest repository updates at: **
6632
rem ** http://github.com/kliment/Printrun.git **
6733
rem ** **
68-
rem ** Author: DivingDuck, 2020-07-09, Status: working, but not finishd **
34+
rem ** Author: DivingDuck, 2020-07-09, Status: working, but not finished **
6935
rem ** **
7036
rem *************************************************************************
7137
rem *************************************************************************
@@ -83,19 +49,18 @@ echo *********************************************
8349
if exist v3 (
8450
call v3\Scripts\activate
8551
) else (
52+
8653
echo **********************************************************************
8754
echo ****** No virtual environment named v3 avaliable ******
8855
echo ****** Will create first a new virtual environment with name v3 ******
8956
echo **********************************************************************
90-
91-
rem AGe need check of correct version!!!
9257
py -3.7 -m venv v3
9358

9459
echo *********************************************
9560
echo ****** Activate virtual environment v3 ******
9661
echo *********************************************
9762
call v3\Scripts\activate
98-
63+
9964
pip install --upgrade pip
10065
pip install --upgrade setuptools
10166

@@ -109,51 +74,39 @@ if exist v3 (
10974
echo ***********************
11075
echo ****** additions ******
11176
echo ***********************
112-
rem AGe **** my additions
11377
pip install simplejson
11478

115-
rem AGe move before requirements as needed after installation: pip install wheel
11679
echo *******************************
11780
echo ****** pyinstaller 4 dev ******
11881
echo *******************************
119-
rem AGe, pyinstaller v3.6 don't work with Windows 10 pip install pyinstaller
82+
rem pyinstaller v3.6 don't work with Windows 10 pip install pyinstaller
12083
pip uninstall pyinstaller
12184
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
12285

12386
pip install pypiwin32
12487
pip install polygon3
125-
126-
echo ************************************
127-
echo ****** list outdated modules ******
128-
echo ************************************
129-
rem AGe it shouldn't happen, but just in case ....
130-
pip list --outdated
131-
pause
132-
rem AGe exit /b
13388
)
13489

13590
echo ********************************************
13691
echo ****** upgrate virtual environment v3 ******
13792
echo ********************************************
13893
pip install --upgrade virtualenv
13994

140-
echo ************************************
141-
echo ****** list outdated modules ******
142-
echo ************************************
143-
pip list --outdated
144-
rem AGe check for actual env needed?
145-
pause
95+
echo ****************************************************
96+
echo ****** check for and update outdated modules ******
97+
echo ****************************************************
98+
for /F "skip=2 delims= " %%i in ('pip list --outdated') do pip install --upgrade %%i
99+
146100
echo ******************************************************************
147101
echo ****** Compile G-Code parser gcoder_line.cp37-win_amd64.pyd ******
148102
echo ******************************************************************
149-
rem AGe for safty reasons delete existing version first to prevent errors
103+
rem For safety reasons delete existing version first to prevent errors
150104
if exist printrun\gcoder_line.cp??-win_amd??.pyd (
151105
del printrun\gcoder_line.cp??-win_amd??.pyd
152106
echo ********************************************************************************
153107
echo ****** found versions of printrun\gcoder_line.cp??-win_amd??.pyd, deleted ******
154108
echo ********************************************************************************
155109
)
156-
157110
python setup.py build_ext --inplace
158111

159112
echo ****************************************
@@ -176,7 +129,7 @@ echo ****** Batch finalizes ******
176129
echo ****** ******
177130
echo ****** Happy printing with Pronterface for Windows! ******
178131
echo ****** ******
179-
echo ****** You will find Pronterface and localisations here: ******
132+
echo ****** You will find Pronterface and localizations here: ******
180133
echo ***************************************************************
181134
cd dist
182135
dir .

0 commit comments

Comments
 (0)