source: orange/install-scripts/createCommon__.btm @ 10940:b68211e2535d

Revision 10940:b68211e2535d, 3.4 KB checked in by Ales Erjavec <ales.erjavec@…>, 22 months ago (diff)

Delete leftover orangeqt.pyd file from the installation package.

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 orangeqt.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 # Delete existing orangeqt.pyd in TMPDIR (It will be moved into place later)
60  if exist %TMPDIR\Orange\orangeqt.pyd del /q %TMPDIR\Orange\orangeqt.pyd
61
62  REM # compress pyd and create stamps_pyd.txt, needed for update from web (accessed by updateFromSVN.bat)
63  set TMPBINDIR=%TMPDIR\binaries\%pyver
64  if not direxist %TMPBINDIR\%pyver mkdir /s %TMPBINDIR
65
66  cdd %PYORANGEDIR
67  except (*_d.pyd) for %pydf in (*.pyd) do (
68    if exist %TMPDIR\Orange\%pydf del /q %TMPDIR\Orange\%pydf
69    upx %pydf -o %TMPDIR\Orange\%pydf
70    copy %TMPDIR\Orange\%pydf %TMPBINDIR
71  )
72
73  cdd %TMPBINDIR
74  if exist stamps_pyd.txt del /q stamps_pyd.txt
75  for %pydf in (*.pyd) do (
76    set MD5=%@MD5[%pydf]
77    echo %pydf %MD5 >> stamps_pyd.txt
78  )
79
80  if direxist %PARTY (
81    REM # pack
82    cdd %TMPDIR
83    rem "Make sure the egg.info dir is in TMPDIR
84    %PYTHON\python.exe setup.py egg_info
85
86    cdd %SCRIPTDIR
87    set COMMON_NSI_OPTIONS=/DORANGEDIR=%TMPDIR\Orange /DPYVER=%pyver /DNPYVER=%npver /DPARTY=%PARTY /DQTVER=%@SUBSTR[%THIRD_PARTY_DIR,2,2] install3.nsi
88    nsis /O%TMPDIR\win-%PKG_TYPE-core-packWithNSIS-%THIRD_PARTY_DIR-py%npver.log /DOUTFILENAME="%TMPDIR\%PURE_ORANGE-py%npver.exe" %COMMON_NSI_OPTIONS %+
89    break_on_error
90    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
91    break_on_error
92  ) else (
93    echo installation file was not built because no 3rd-party software available
94  )
95)
96
97rem # compile documentation
98REM cdd %SCRIPTDIR\doc
99REM call compileDocumentation.btm
100REM cdd %WEBDOCDIR
101REM winrar a %DOWNLOADDIR\orange-chm.zip *.chm
102REM break_on_error
Note: See TracBrowser for help on using the repository browser.