orange / install-scripts / createCommon__.btm

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

cdd %TMPDIR
del /syeqtx binaries
copy /S %SCRIPTDIR\binaries.precompiled %TMPDIR\binaries

cdd %TMPDIR\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 %TMPDIR\source
  set COMPILELOG=%TMPDIR\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=%SCRIPTDIR\%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 %TMPDIR\source\orangeqt
	echo *deleting build directory*
    if direxist build rd /q/s build
    mkdir build
    cdd  %TMPDIR\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 TMPDIR (It will be moved into place later)
  if exist %TMPDIR\Orange\orangeqt.pyd del /q %TMPDIR\Orange\orangeqt.pyd

  REM # compress pyd and create stamps_pyd.txt, needed for update from web (accessed by updateFromSVN.bat)
  set TMPBINDIR=%TMPDIR\binaries\%pyver
  if not direxist %TMPBINDIR\%pyver mkdir /s %TMPBINDIR

  cdd %PYORANGEDIR
  except (*_d.pyd) for %pydf in (*.pyd) do (
    if exist %TMPDIR\Orange\%pydf del /q %TMPDIR\Orange\%pydf
    copy %pydf %TMPDIR\Orange\
    copy %pydf %TMPBINDIR
  )

  cdd %TMPBINDIR
  if exist stamps_pyd.txt del /q stamps_pyd.txt
  for %pydf in (*.pyd) do (
    set MD5=%@MD5[%pydf]
    echo %pydf %MD5 >> stamps_pyd.txt
  )

  if direxist %PARTY (
    REM # pack
    cdd %TMPDIR
    rem "Make sure the egg.info dir is in TMPDIR
    %PYTHON\python.exe setup.py egg_info

    cdd %SCRIPTDIR
    set COMMON_NSI_OPTIONS=/DORANGEDIR=%TMPDIR\Orange /DPYVER=%pyver /DNPYVER=%npver /DPARTY=%PARTY /DQTVER=%@SUBSTR[%THIRD_PARTY_DIR,2,2] install3.nsi
    nsis /O%TMPDIR\win-%PKG_TYPE-core-packWithNSIS-%THIRD_PARTY_DIR-py%npver.log /DOUTFILENAME="%TMPDIR\%PURE_ORANGE-py%npver.exe" %COMMON_NSI_OPTIONS %+
	break_on_error
    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
	break_on_error
  ) else (
    echo installation file was not built because no 3rd-party software available
  )
)

rem # compile documentation
REM cdd %SCRIPTDIR\doc
REM call compileDocumentation.btm
REM cdd %WEBDOCDIR
REM winrar a %DOWNLOADDIR\orange-chm.zip *.chm
REM break_on_error
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.