- when checking native products: if the version of product installed on the computer is newer than that is required, show warning message "Continue?" with two buttons "Yes", "No".
#!/bin/sh
check_version(){
-if [ `gcc --version | grep 'gcc (GCC) .*' | cut -b 11-13` == "3.2" ] ; then
+gcc_ver=`gcc -dumpversion`
+gcc_ver_number=`echo $gcc_ver | cut -d . -f 1`
+gcc_ver_subnumber=`echo $gcc_ver | cut -d . -f 2`
+gcc_ver=$(($gcc_ver_number*1000+$gcc_ver_subnumber))
+#if [ `gcc --version | grep 'gcc (GCC) .*' | cut -b 11-13` == "3.2" ] ; then
+if [ $gcc_ver -eq 3002 ] ; then
return 0
fi
return 1
fi
if [ -n "${gcc_root}" ] ; then
gcc_root=`cd ${gcc_root}/..; pwd`
- if [ "`${gcc_root}/bin/gcc --version | grep 'gcc (GCC) .*' | cut -b 11-13`" = "3.2" ] ; then
+ gcc_ver=`gcc -dumpversion`
+ gcc_ver_number=`echo $gcc_ver | cut -d . -f 1`
+ gcc_ver_subnumber=`echo $gcc_ver | cut -d . -f 2`
+ gcc_ver=$(($gcc_ver_number*1000+$gcc_ver_subnumber))
+ #if [ "`${gcc_root}/bin/gcc --version | grep 'gcc (GCC) .*' | cut -b 11-13`" = "3.2" ] ; then
+ if [ $gcc_ver -ge 3002 ] ; then
tmp="\${GCC_ROOT}/bin ${gcc_root}/bin \${PATH} ${PATH}";
path=`sort_path ${tmp}`
tmp="\${GCC_ROOT}/lib ${gcc_root}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
##
EOF
make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
- return 0
+ if [ $gcc_ver -eq 3002 ] ; then
+ return 0
+ else
+ return 2
+ fi
fi
fi
return 1
#############################################################################
# Makefile for building: ../bin/SALOME_InstallWizard
-# Generated by qmake (1.03a) on: Wed Mar 17 17:34:01 2004
+# Generated by qmake (1.03a) on: Wed Nov 10 19:38:39 2004
# Project: SALOME_INSTALL.pro
# Template: app
# Command: $(QMAKE) SALOME_INSTALL.pro
CXX = g++
LEX = flex
YACC = yacc
-CFLAGS = -pipe -Wall -W -I/usr/include/fontconfig -I/usr/include/Xft2 -O2 -march=i386 -mcpu=i686 -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG
-CXXFLAGS = -pipe -Wall -W -I/usr/include/fontconfig -I/usr/include/Xft2 -O2 -march=i386 -mcpu=i686 -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG
+CFLAGS = -pipe -Wall -W -O2 -DQT_NO_DEBUG
+CXXFLAGS = -pipe -Wall -W -O2 -DQT_NO_DEBUG
LEXFLAGS =
YACCFLAGS= -d
INCPATH = -I$(QTDIR)/include -I$(QTDIR)/mkspecs/default
LINK = g++
LFLAGS =
-LIBS = $(SUBLIBS) -L$(QTDIR)/lib -L/usr/X11R6/lib -lqt -ldl -lXinerama -lSM -lqt-mt -lXext -lX11 -lm
+LIBS = $(SUBLIBS) -Wl,-rpath,$(QTDIR)/lib -L$(QTDIR)/lib -L/usr/X11R6/lib -ldl -lXinerama -lSM -lqt-mt -lXext -lX11 -lm -lpthread -lXrender -lXinerama -lGL
AR = ar cqs
RANLIB =
MOC = $(QTDIR)/bin/moc
#ifdef DEBUG
cout << "1. Script : " << script << endl;
#endif
- if ( system( script ) ) {
- QMessageBox::warning( this,
- tr( "Warning" ),
- tr( "You don't have native %1 %2 installed").arg(item->text(0)).arg(item->text(1)),
- QMessageBox::Ok,
- QMessageBox::NoButton,
- QMessageBox::NoButton );
- productsView->setNone( item );
- return false;
+ int res = system( script ) / 256; // return code is <errno> * 256
+#ifdef DEBUG
+ cout << "try_native() : res = " << res << endl;
+#endif
+ if ( res > 0 ) {
+ if ( res == 2 ) {
+ // when try_native returns 2 it means that native product version is higher than that is prerequisited
+ if ( QMessageBox::warning( this,
+ tr( "Warning" ),
+ tr( "You have newer version of %1 installed on your computer than that is required (%2).\nContinue?").arg(item->text(0)).arg(item->text(1)),
+ QMessageBox::Yes,
+ QMessageBox::No,
+ QMessageBox::NoButton ) == QMessageBox::No )
+ return false;
+ }
+ else {
+ QMessageBox::warning( this,
+ tr( "Warning" ),
+ tr( "You don't have native %1 %2 installed").arg(item->text(0)).arg(item->text(1)),
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton );
+ productsView->setNone( item );
+ return false;
+ }
}
}
else {