-
Notifications
You must be signed in to change notification settings - Fork 142
/
Copy pathcreateCommon__.btm
83 lines (71 loc) · 2.86 KB
/
createCommon__.btm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
REM #input arguments
REM # %1 - PKG_TYPE - kind of installation (snapshot, release) - needed by the compiler to distinguish binaries
REM # %2 - THIRD_PARTY_DIR - folder with 3rd party software to be included in the installation package
REM # %3 - PURE_ORANGE - name of package with pure Orange
REM # %4 - ORANGE_W_PYTHON - name of package that includes Python installer
set PKG_TYPE=%1
set THIRD_PARTY_DIR=%2
set PURE_ORANGE=%3
set ORANGE_W_PYTHON=%4
set ORANGEDIR=%WORKDIR\orange
cdd %ORANGEDIR\source
call _pyxtract.bat
for %pyver in (%PYTHONVERSIONS) do (
echo *************************************
echo *************************************
echo *** Compiling for Python %pyver
set npver=%@LEFT[1,%pyver].%@RIGHT[-1,%pyver]
cdd %ORANGEDIR\source
set COMPILELOG=%LOGDIR\win-%PKG_TYPE-core-compile-%npver.log
if exist %COMPILELOG del /q %COMPILELOG
set PYTHON=%PYTHONBASE%%pyver
set OBJPOSTFIX=-%PKG_TYPE%
REM # we expect Python to be on same drive
set PYORANGEDIR=%PYTHON\lib\site-packages\Orange
set PARTY=%WORKDIR\%THIRD_PARTY_DIR\%pyver
REM # compile
pushd
cdd %PYORANGEDIR
del /eq orange.pyd corn.pyd statc.pyd orangene.pyd orangeom.pyd orangeqt.pyd
popd
vcexpress orange.sln /build Release /out %COMPILELOG
break_on_error
if %pyver == 27 (
echo *** Compiling orangeqt for Python 2.7 only ***
cdd %ORANGEDIR\source\orangeqt
echo *deleting build directory*
if direxist build rd /q/s build
mkdir build
cdd %ORANGEDIR\source\orangeqt\build
call %QTVARS
echo *running cmake*
call cmake -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..
echo *running nmake*
call nmake
if exist %PYORANGEDIR\orangeqt.pyd del /q %PYORANGEDIR\orangeqt.pyd
copy orangeqt.pyd %PYORANGEDIR
REM #break_on_error
)
REM # Delete existing orangeqt.pyd in ORANGEDIR (It will be moved into place later)
if exist %ORANGEDIR\Orange\orangeqt.pyd del /q %ORANGEDIR\Orange\orangeqt.pyd
cdd %PYORANGEDIR
except (*_d.pyd) for %pydf in (*.pyd) do (
if exist %ORANGEDIR\Orange\%pydf del /q %ORANGEDIR\Orange\%pydf
copy %pydf %ORANGEDIR\Orange\
)
if direxist %PARTY (
REM # pack
cdd %ORANGEDIR
rem "Make sure the egg.info dir is in ORANGEDIR
%PYTHON\python.exe setup.py egg_info
cdd %SCRIPTDIR
set COMMON_NSI_OPTIONS=/DORANGEDIR=%ORANGEDIR\Orange /DPYVER=%pyver /DNPYVER=%npver /DPARTY=%PARTY /DQTVER=%@SUBSTR[%THIRD_PARTY_DIR,2,2] install3.nsi
nsis /O%LOGDIR\win-%PKG_TYPE-core-packWithNSIS-%THIRD_PARTY_DIR-py%npver.log /DOUTFILENAME="%DISTDIR\%PURE_ORANGE-py%npver.exe" %COMMON_NSI_OPTIONS %+
break_on_error
nsis /O%LOGDIR\win-%PKG_TYPE-core-packWithNSIS-%THIRD_PARTY_DIR-w-python-py%npver.log /DCOMPLETE /DOUTFILENAME="%DISTDIR\%ORANGE_W_PYTHON-py%npver.exe" %COMMON_NSI_OPTIONS
break_on_error
) else (
echo installation file was not built because no 3rd-party software available
)
type %COMPILELOG%
)