source: orange/install-scripts/createCommon__.btm @ 10911:f84e907548ae

Revision 10911:f84e907548ae, 3.3 KB checked in by Ales Erjavec <ales.erjavec@…>, 23 months ago (diff)

Added Orange.egg info directory to the windows install package.

This is required for setuptools based addons.

Line 
1REM #input arguments
2REM # %1 - PKG_TYPE - kind of installation (snapshot, release) - needed by the compiler to distinguish binaries
3REM # %2 - THIRD_PARTY_DIR - folder with 3rd party software to be included in the installation package
4REM # %3 - PURE_ORANGE - name of package with pure Orange
5REM # %4 - ORANGE_W_PYTHON - name of package that includes Python installer
6
7set PKG_TYPE=%1
8set THIRD_PARTY_DIR=%2
9set PURE_ORANGE=%3
10set ORANGE_W_PYTHON=%4
11
12cdd %TMPDIR
13del /syeqtx binaries
14copy /S %SCRIPTDIR\binaries.precompiled %TMPDIR\binaries
15
16cdd %TMPDIR\source
17call _pyxtract.bat
18
19for %pyver in (%PYTHONVERSIONS) do (
20  echo *************************************
21  echo *************************************
22  echo *** Compiling for Python %pyver
23
24  set npver=%@LEFT[1,%pyver].%@RIGHT[-1,%pyver]
25  cdd %TMPDIR\source
26  set COMPILELOG=%TMPDIR\win-%PKG_TYPE-core-compile-%npver.log
27  if exist %COMPILELOG del /q %COMPILELOG
28  set PYTHON=%PYTHONBASE%%pyver
29  set OBJPOSTFIX=-%PKG_TYPE%
30  REM # we expect Python to be on same drive
31  set PYORANGEDIR=%PYTHON\lib\site-packages\orange
32  set PARTY=%SCRIPTDIR\%THIRD_PARTY_DIR\%pyver
33
34  REM # compile
35  pushd
36  cdd %PYORANGEDIR
37  del /eq orange.pyd corn.pyd statc.pyd orangene.pyd orangeom.pyd
38  popd
39  vcexpress orange.sln /build Release /out %COMPILELOG
40  break_on_error
41
42  if %pyver == 27 (
43    echo *** Compiling orangeqt for Python 2.7 only ***
44    cdd %TMPDIR\source\orangeqt
45    echo *deleting build directory*
46    if direxist build rd /q/s build
47    mkdir build
48    cdd  %TMPDIR\source\orangeqt\build
49    call %QTVARS
50    echo *running cmake*
51    call cmake -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..
52    echo *running nmake*
53    call nmake
54    if exist %PYORANGEDIR\orangeqt.pyd del /q %PYORANGEDIR\orangeqt.pyd
55    copy orangeqt.pyd %PYORANGEDIR
56    REM #break_on_error
57  )
58 
59  REM # compress pyd and create stamps_pyd.txt, needed for update from web (accessed by updateFromSVN.bat)
60  set TMPBINDIR=%TMPDIR\binaries\%pyver
61  if not direxist %TMPBINDIR\%pyver mkdir /s %TMPBINDIR
62
63  cdd %PYORANGEDIR
64  except (*_d.pyd) for %pydf in (*.pyd) do (
65    if exist %TMPDIR\orange\%pydf del /q %TMPDIR\orange\%pydf
66    upx %pydf -o %TMPDIR\orange\%pydf
67    copy %TMPDIR\orange\%pydf %TMPBINDIR
68  )
69
70  cdd %TMPBINDIR
71  if exist stamps_pyd.txt del /q stamps_pyd.txt
72  for %pydf in (*.pyd) do (
73    set MD5=%@MD5[%pydf]
74    echo %pydf %MD5 >> stamps_pyd.txt
75  )
76
77  if direxist %PARTY (
78    REM # pack
79    cdd %TMPDIR
80    rem "Make sure the egg.info dir is in TMPDIR
81    %PYTHON\python.exe setup.py egg_info
82
83    cdd %SCRIPTDIR
84    set COMMON_NSI_OPTIONS=/DORANGEDIR=%TMPDIR\Orange /DPYVER=%pyver /DNPYVER=%npver /DPARTY=%PARTY /DQTVER=%@SUBSTR[%THIRD_PARTY_DIR,2,2] install3.nsi
85    nsis /O%TMPDIR\win-%PKG_TYPE-core-packWithNSIS-%THIRD_PARTY_DIR-py%npver.log /DOUTFILENAME="%TMPDIR\%PURE_ORANGE-py%npver.exe" %COMMON_NSI_OPTIONS %+
86    break_on_error
87    nsis /O%TMPDIR\win-%PKG_TYPE-core-packWithNSIS-%THIRD_PARTY_DIR-w-python-py%npver.log /DCOMPLETE /DOUTFILENAME="%TMPDIR\%ORANGE_W_PYTHON-py%npver.exe" %COMMON_NSI_OPTIONS
88    break_on_error
89  ) else (
90    echo installation file was not built because no 3rd-party software available
91  )
92)
93
94rem # compile documentation
95REM cdd %SCRIPTDIR\doc
96REM call compileDocumentation.btm
97REM cdd %WEBDOCDIR
98REM winrar a %DOWNLOADDIR\orange-chm.zip *.chm
99REM break_on_error
Note: See TracBrowser for help on using the repository browser.