Commits

Janez Demšar  committed 530aec8

- this version now seems to work OK. It can be used to compile versions from various branches (1.0, snapshot), with a few hard-coded exceptions here and there.

  • Participants
  • Parent commits 6e71ed6

Comments (0)

Files changed (6)

File install-scripts/checkSyntax.btm

 @echo off
 alias check=\python%1\python -c "import py_compile; py_compile.compile('%%@REPLACE[\,/,%%1]')"
 
-cd ..
 for %f in (*.py) check %f
 cd orangeCanvas
 for %f in (*.py;*.pyw) check %f
 cd ..\orangeWidgets
 for /r %f in (*.py;*.pyw) check %f
-cd ..\scripts
+cd ..

File install-scripts/install3.nsi

 Icon OrangeInstall.ico
 UninstallIcon OrangeInstall.ico
 
-!ifndef ORANGEDIR
-	!define ORANGEDIR orange
-!endif
-
 !define PYFILENAME python-${NPYVER}.msi
-!define PYWINFILENAME pywin32-210.win32-py${NPYVER}.exe
+!define PYWINFILENAME pywin32-212.win32-py${NPYVER}.exe
 
 OutFile ${OUTFILENAME}
 
 					MessageBox MB_YESNO "Orange cannot run without Python.$\r$\nAbort the installation?" IDNO askpython23
 						Quit
 			installpython23:
-				File 3rdparty-23\Python-2.3.5.exe
+				File ${PARTY}\Python-2.3.5.exe
 				ExecWait "$DESKTOP\Python-2.3.5.exe"
 				Delete "$DESKTOP\Python-2.3.5.exe"
 
 			installsilently:
 				StrCpy $0 "/Qb-"
 			installpython:
-				File 3rdparty-${PYVER}\${PYFILENAME}
+				File ${PARTY}\${PYFILENAME}
 				${If} $AdminInstall == 1
 					ExecWait 'msiexec.exe /i "$DESKTOP\${PYFILENAME}" ADDLOCAL=Extensions,Documentation,TclTk ALLUSERS=1 $0' $0
 				${Else}
 				File various\${MFC}
 			have_mfc:
 			SetOutPath $DESKTOP
-			File 3rdparty-${PYVER}\${PYWINFILENAME}
+			File ${PARTY}\${PYWINFILENAME}
 			ExecWait "$DESKTOP\${PYWINFILENAME}"
 			Delete "$DESKTOP\${PYWINFILENAME}"
 	have_pythonwin:
 
+		!if ${QTVER} == 23
+				SetOutPath $PythonDir\lib\site-packages
+				IfFileExists $PythonDir\lib\site-packages\qt.py have_pyqt
+					File /r ${PARTY}\pyqt\*.*
+			have_pyqt:
 
-		SetOutPath $PythonDir\lib\site-packages
-		IfFileExists $PythonDir\lib\site-packages\qt.py have_pyqt
-			File /r 3rdparty-${PYVER}\pyqt\*.*
-	have_pyqt:
 
+				IfFileExists $PythonDir\lib\site-packages\qwt\*.* have_pyqwt
+					File /r ${PARTY}\qwt
+			have_pyqwt:
 
-		IfFileExists $PythonDir\lib\site-packages\qwt\*.* have_pyqwt
-			File /r 3rdparty-${PYVER}\qwt
-	have_pyqwt:
 
+				IfFileExists $PythonDir\lib\site-packages\Numeric\*.* have_numeric
+					File /r ${PARTY}\numeric
+					File various\Numeric.pth
+			have_numeric:
 
-		IfFileExists $PythonDir\lib\site-packages\Numeric\*.* have_numeric
-			File /r 3rdparty-${PYVER}\numeric
-			File various\Numeric.pth
-	have_numeric:
 
+				IfFileExists $PythonDir\lib\site-packages\numpy\*.* have_numpy
+					File /r ${PARTY}\numpy
+			have_numpy:
 
-		IfFileExists $PythonDir\lib\site-packages\numpy\*.* have_numpy
-			File /r 3rdparty-${PYVER}\numpy
-	have_numpy:
 
-
-		IfFileExists "$PythonDir\lib\site-packages\qt-mt230nc.dll" have_qt
-		IfFileExists "$SysDir\qt-mt230nc.dll" have_qt
-			File various\qt-mt230nc.dll
-			SetOutPath $INSTDIR
-			File various\QT-LICENSE.txt
-		have_qt:
-
+				IfFileExists "$PythonDir\lib\site-packages\qt-mt230nc.dll" have_qt
+				IfFileExists "$SysDir\qt-mt230nc.dll" have_qt
+					File various\qt-mt230nc.dll
+					SetOutPath $INSTDIR
+					File various\QT-LICENSE.txt
+			have_qt:
+		!else
+			MessageBox MB_OK "Installation will check for various needed libraries$\r$\nand launch their installers if needed."
+			SetOutPath $DESKTOP
+			
+				IfFileExists $PythonDir\lib\site-packages\numpy-1.1.0-py2.5.egg-info have_numpy
+				    File ${PARTY}\numpy-1.1.0-win32-superpack-python2.5.exe
+					ExecWait $DESKTOP\numpy-1.1.0-win32-superpack-python2.5.exe
+					Delete $DESKTOP\numpy-1.1.0-win32-superpack-python2.5.exe
+					
+			have_numpy:
+				IfFileExists $PythonDir\lib\site-packages\PyQt4\*.* have_pyqt
+				    File ${PARTY}\PyQt-Py2.5-gpl-4.4.2-1.exe
+					ExecWait $DESKTOP\PyQt-Py2.5-gpl-4.4.2-1.exe
+					Delete $DESKTOP\PyQt-Py2.5-gpl-4.4.2-1.exe
+					
+			have_pyqt:
+				IfFileExists $PythonDir\lib\site-packages\PyQt4\Qwt5\*.* have_pyqwt
+				    File ${PARTY}\PyQwt5.1.0-Python2.5-PyQt4.4.2-NumPy1.1.0-1.exe
+					ExecWait $DESKTOP\PyQwt5.1.0-Python2.5-PyQt4.4.2-NumPy1.1.0-1.exe
+					Delete $DESKTOP\PyQwt5.1.0-Python2.5-PyQt4.4.2-NumPy1.1.0-1.exe
+			
+			have_pyqwt:
+		!endif
+					
+					
+					
+					
+          
 SectionEnd
 !endif
 
 
 	StrCpy $INSTDIR  "$PythonDir\lib\site-packages\orange"
 	SetOutPath $INSTDIR
-	File /r ${ORANGEDIR}\*
+	File /r /x .svn ${ORANGEDIR}\*
 
 	!ifdef INCLUDEGENOMICS
 	!endif
 
 	!ifndef COMPLETE
 		StrCmp $PythonDir "" 0 have_python
-			MessageBox MB_OK "Please install Python first (www.python.org)$\r$\nor download Orange which includes Python."
+			MessageBox MB_OK "Please install Python first (www.python.org)$\r$\nor download Orange distribution that includes Python."
 			Quit
 		have_python:
 
         have_qt:
 
 		StrCmp $MissingModules "" continueinst
-		MessageBox MB_YESNO "Missing module(s): $MissingModules$\r$\n$\r$\nThese module(s) are not needed for running scripts in Orange, but Orange Canvas will not work without them.$\r$\nYou can download and install them later or obtain an Orange installation that includes them.$\r$\n$\r$\nContinue with installation?" /SD IDYES IDYES continueinst
+		MessageBox MB_YESNO "Missing module(s): $MissingModules$\r$\n$\r$\nWithout these modules you can still scripts in Orange, but Orange Canvas will not work without them.$\r$\nYou can download and install them later or obtain the Orange installation that includes them.$\r$\n$\r$\nContinue with installation?" /SD IDYES IDYES continueinst
 		Quit
 		continueinst:
 	!endif

File install-scripts/updateCommon__.btm

-call updateSetConstants__.btm %1 %2
+call updateSetConstants__.btm %1 %2 %3
 
-if not exist %TMPDIR mkdir %TMPDIR
-break_on_error
-del /syefkq %TMPDIR
-cdd %TMPDIR
-
-svn export --quiet http://www.ailab.si/svn/orange/%BRANCH/orange orange
-svn export --quiet http://www.ailab.si/svn/orange/%BRANCH/source source
-del /syefkqx orange/orangeWidgets/Prototypes
-
-rem call %SCRIPTDIR/winCompileAddOns.btm
+svn update orange
+svn update source
 
 cdd %TMPDIR\source
 call _pyxtract.bat
   set COMPILELOG=%TMPDIR\win-compile-%npver.log
   rem if exist %COMPILELOG del %COMPILELOG
   set PYTHON=%PYTHONBASE%%pyver
+  set OBJPOSTFIX=-%2
+  set PYORANGEDIR=c:\Python%pyver\lib\site-packages\orange
+  set PARTY=%SCRIPTDIR\%3\%pyver
+  if not direxist %PARTY goto skipversion
   
   rem start /wait 
-  rem vcexpress orange.sln /build Release /out %COMPILELOG
+  pushd
+  cd %PYORANGEDIR
+  del orange.pyd corn.pyd statc.pyd orangene.pyd orangeom.pyd
+  popd
+  rem except (%PYORANGEDIR\*_d.pyd) del /q %PYORANGEDIR\*.pyd
+  vcexpress orange.sln /build Release /out %COMPILELOG
   flag_on_error
 
-  cdd c:\Python%pyver\lib\site-packages\orange
-  for %pydf in (*.pyd) do (
+  cdd %PYORANGEDIR
+  except (*_d.pyd) for %pydf in (*.pyd) do (
     if exist %TMPDIR\orange\%pydf del %TMPDIR\orange\%pydf
     upx %pydf -o %TMPDIR/orange/%pydf
   )
 
   cdd %SCRIPTDIR
-  set COMMON_NSI_OPTIONS=/DORANGEDIR=%TMPDIR\orange /DCWD=%SCRIPTDIR /DPYVER=%pyver /DNPYVER=%npver install3.nsi
-  nsis /Onsis_standard-py%npver.log /DOUTFILENAME="%TMPDIR\%WIN-py%npver.exe" %COMMON_NSI_OPTIONS %+
+  set COMMON_NSI_OPTIONS=/DORANGEDIR=%TMPDIR\orange /DPYVER=%pyver /DNPYVER=%npver /DPARTY=%PARTY /DQTVER=%@SUBSTR[%3,2,2] install3.nsi
+  nsis /O%TMPDIR/nsis-%WIN-py%npver.log /DOUTFILENAME="%TMPDIR\%WIN-py%npver.exe" %COMMON_NSI_OPTIONS %+
   flag_on_error
-  nsis /Onsis_complete-py%npver.log /DCOMPLETE /DOUTFILENAME="%TMPDIR\%WIN_PYTHON-py%npver.exe" %COMMON_NSI_OPTIONS
+  nsis /O%TMPDIR/nsis-%WIN-py-py%npver.log /DCOMPLETE /DOUTFILENAME="%TMPDIR\%WIN_PYTHON-py%npver.exe" %COMMON_NSI_OPTIONS
   flag_on_error
+  
+  :skipversion
 ) 
 
 cdd %SCRIPTDIR

File install-scripts/updateMajorRelease.btm

+set verstr=%1
 call updateSetConstants__.btm
-
-set orangeMinorVersion=0
-set orangeMajorVersion=%@eval[orangeMajorVersion+1]
-set verstr=%orangeReleaseVersion.%orangeMajorVersion
-
 call updateCommon__.btm

File install-scripts/updateSetConstants__.btm

 rem Popravki za doma:
 rem - set /r filenames.set
-rem - alias vcexpress
+rem - alias vcexpress  in ostalo za vc8
+rem - pythonbase
+
 set verstr=%1
-set BRANCH=%2
 echo Building Orange version '%verstr' from SVN's branch '%BRANCH'
 
+set SCRIPTDIR=%_CWD
+set BUILDDIR=%SCRIPTDIR
+set TMPDIR=%SCRIPTDIR\%2
+set WEBDOWNLOAD=O:\2
+
 set daystr=%_YEAR-%@format[02,%_MONTH]-%@format[02,%_DAY]
 set nicedate=%_DAY %@INSTR[%@EVAL[3*%_MONTH-3],3,JanFebMarAprMayJunJulAugSepOctNovDec] %_YEAR
 
-set SCRIPTDIR=%_CWD
-set BUILDDIR=%SCRIPTDIR
-set TMPDIR=%SCRIPTDIR\tmp
-set WEBDOWNLOAD=O:\2
-
 rem set MAIL_TO="tomaz.curk@fri.uni-lj.si,janez.demsar@fri.uni-lj.si,marko.toplak@fri.uni-lj.si"
 set LOGFILE=%SCRIPTDIR\build-%verstr.log
 set ERRORS=0
 set WIN_GOLIB_SNAPSHOT=GOlib-snapshot-%daystr
 
 set PYTHONBASE=c:\Python
-set PYTHONVERSIONS=23 24 25
+set PYTHONVERSIONS=25 24 23
 
 alias nsis="c:\program files\nsis\makensis.exe"
 alias cvs="C:\Program Files\CVSNT\cvs.exe"

File install-scripts/updateVersionsPy__.btm

 ADDON_GENOMICS
 set foo=%@FILECLOSE[%fhandle]
 
-set fhandle=%@FILEOPEN[%SCRIPTDIR\versions.set, write, t]
-set foo=%@FILEWRITE[%fhandle,orangeMajorVersion=%orangeMajorVersion]
-set foo=%@FILEWRITE[%fhandle,orangeMinorVersion=%orangeMinorVersion]
-set foo=%@FILEWRITE[%fhandle,orangeReleaseVersion=%orangeReleaseVersion]
-set foo=%@FILECLOSE[%fhandle]