ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \
ac_cc_warnings.m4 check_swig.m4 check_boost.m4
-ACLOCAL_GUI = \
-check_vtk.m4 check_opengl.m4 check_qt.m4 \
-check_GUI.m4 check_corba_in_GUI.m4
-
ACLOCAL_GEOM = check_GEOM.m4
ACLOCAL_SMESH = check_SMESH.m4
+ifeq ($(GHS3DPRLPLUGIN_WITH_GUI),yes)
+ACLOCAL_GUI = \
+check_vtk.m4 check_opengl.m4 check_qt.m4 \
+check_GUI.m4 check_corba_in_GUI.m4
+
$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
$(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \
$(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) \
$(ACLOCAL_SMESH:%=@SMESH_ROOT_DIR@/adm_local/unix/config_files/%)
- cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
- -I @GUI_ROOT_DIR@/adm_local/unix/config_files \
- -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \
- -I @SMESH_ROOT_DIR@/adm_local/unix/config_files
-
+ cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files \
+ -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
+ -I @GUI_ROOT_DIR@/adm_local/unix/config_files \
+ -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \
+ -I @SMESH_ROOT_DIR@/adm_local/unix/config_files
+endif
+
+ifeq ($(GHS3DPRLPLUGIN_WITH_GUI),no)
+$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
+ $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) \
+ $(ACLOCAL_SMESH:%=@SMESH_ROOT_DIR@/adm_local/unix/config_files/%)
+ cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files \
+ -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
+ -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \
+ -I @SMESH_ROOT_DIR@/adm_local/unix/config_files
+endif
ORIG_DIR=`pwd`
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+GHS3DPRLPLUGIN_WITH_GUI="yes"
########################################################################
# Test if the KERNEL_ROOT_DIR is set correctly
# echo "failed : KERNEL_SRC variable is not correct !"
# exit
#fi
+
+for option
+do
+ case $option in
+ -with-gui | --with-gui)
+ GHS3DPRLPLUGIN_WITH_GUI="yes"
+ break;;
+ -without-gui | --without-gui | -with-gui=no | --with-gui=no)
+ GHS3DPRLPLUGIN_WITH_GUI="no"
+ break;;
+ esac
+done
+
########################################################################
# Test if the GUI_ROOT_DIR is set correctly
-if test ! -d "${GUI_ROOT_DIR}"; then
+if test ${GHS3DPRLPLUGIN_WITH_GUI} = yes; then
+ if test ! -d "${GUI_ROOT_DIR}"; then
echo "failed : GUI_ROOT_DIR variable is not correct !"
exit
+ fi
fi
########################################################################
echo -n "Creating 'configure' script ... "
fi
-aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
- -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/DEPRECATED \
- -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
- -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
- -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
- -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files
+if test ${GHS3DPRLPLUGIN_WITH_GUI} = yes; then
+ aclocal -I adm_local/unix/config_files \
+ -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+ -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/DEPRECATED \
+ -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files
+else
+ aclocal -I adm_local/unix/config_files \
+ -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+ -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/DEPRECATED \
+ -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files
+fi
if autoconf
then
corba=make_$ORB
CORBA=adm_local/unix/$corba
-echo
-echo ---------------------------------------------
-echo testing openGL
-echo ---------------------------------------------
-echo
+dnl
+dnl ---------------------------------------------
+dnl testing WITHGUI
+dnl ---------------------------------------------
+dnl
-CHECK_OPENGL
+CHECK_WITHGUI
-echo
-echo ---------------------------------------------
-echo testing QT
-echo ---------------------------------------------
-echo
+if test "X$WITHGUI" = "Xyes"; then
-CHECK_QT
+ echo
+ echo ---------------------------------------------
+ echo testing openGL
+ echo ---------------------------------------------
+ echo
-echo
-echo ---------------------------------------------
-echo testing MSG2QM
-echo ---------------------------------------------
-echo
+ CHECK_OPENGL
-CHECK_MSG2QM
+ echo
+ echo ---------------------------------------------
+ echo testing QT
+ echo ---------------------------------------------
+ echo
-echo
-echo ---------------------------------------------
-echo testing VTK
-echo ---------------------------------------------
-echo
+ CHECK_QT
+
+ echo
+ echo ---------------------------------------------
+ echo testing MSG2QM
+ echo ---------------------------------------------
+ echo
+
+ CHECK_MSG2QM
+
+ echo
+ echo ---------------------------------------------
+ echo testing VTK
+ echo ---------------------------------------------
+ echo
-CHECK_VTK
+ CHECK_VTK
+
+ echo
+ echo ---------------------------------------------
+ echo Testing GUI
+ echo ---------------------------------------------
+ echo
+
+ CHECK_SALOME_GUI
+
+ echo
+ echo ---------------------------------------------
+ echo Testing full GUI
+ echo ---------------------------------------------
+ echo
+
+ CHECK_CORBA_IN_GUI
+ if test "x${CORBA_IN_GUI}" != "xyes"; then
+ echo "failed : For configure GHS3DPRLPLUGIN module necessary full GUI !"
+ exit
+ fi
+fi
echo
echo ---------------------------------------------
CHECK_HTML_GENERATORS
-echo
-echo ---------------------------------------------
-echo Testing GUI
-echo ---------------------------------------------
-echo
-
-CHECK_SALOME_GUI
-
-echo
-echo ---------------------------------------------
-echo Testing full GUI
-echo ---------------------------------------------
-echo
-
-CHECK_CORBA_IN_GUI
-if test "x${CORBA_IN_GUI}" != "xyes"; then
- echo "failed : For configure GHS3DPRLPLUGIN module necessary full GUI !"
- exit
-fi
-
echo
echo ---------------------------------------------
echo Testing Kernel
echo
echo Configure
+
+if test "X$WITHGUI" = "Xyes"; then
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok GHS3DPRL_ok"
+fi
+
+if test "X$WITHGUI" = "Xno"; then
+variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok GHS3DPRL_ok"
+fi
for var in $variables
do
using namespace std;
#include <GHS3DPRLPlugin_Hypothesis.hxx>
#include <utilities.h>
-#include <qstring.h>
//=============================================================================
/*!
*
*/
//=============================================================================
+static string cutOrReplaceBlancs(string theIn)
+{
+ // cut all blancs at the beginning and at the end of the string,
+ // replace each blancs sequence of maximum length inside the string by one '_' symbol,
+ // as blancs consider: 9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR) and 32 (Space)
+ int len = theIn.length();
+ int lastgood = 0;
+ const char* str1 = theIn.c_str();
+ char* str2 = new char [len + 1];
+ bool del = true;
+
+ for (int i = 0, j = 0; i < len; i++)
+ {
+ ushort ucs = (ushort)(str1[i]);
+ if ((9 <= ucs && ucs <= 13) || ucs == 32)
+ {
+ if (!del)
+ {
+ str2[j++] = '_';
+ del = true;
+ }
+ }
+ else
+ {
+ str2[j++] = str1[i];
+ lastgood = j;
+ del = false;
+ }
+ }
+ str2[lastgood] = '\0';
+ string anOut = str2;
+ return anOut;
+}
void GHS3DPRLPlugin_Hypothesis::SetMEDName(string theVal) {
//without whitespaces! ..from python?
- QString tmp1,tmp2;
- tmp1 = (QString) theVal;
- tmp1.simplifyWhiteSpace(); //for qt3
- tmp1.replace(QChar(' '),QChar('_'));
- tmp2 = (QString) _MEDName;
+ string tmp1 = cutOrReplaceBlancs(theVal);
+ string tmp2 = _MEDName;
if (tmp1 != tmp2) {
- _MEDName = (const char *) tmp1;
+ _MEDName = tmp1.c_str();
NotifySubMeshesHypothesisModification();
}
}
{
//explicit inputs for future code compatibility of saved .hdf
bool isOK = true;
- int imax;
- string str1;
- QString str2,str3,str4,str5;
-
+ string str1,str2,str3,str4;
+
//save without any whitespaces!
isOK = (load >> str1);
if (!(isOK)) {
load.clear(ios::badbit | load.rdstate());
return load;
}
- str2 = (QString) str1;
- imax = str2.contains(";");
- for (int i=0; i<=imax; i++) {
- str3 = str2.section(";",i,i);
- str4 = str3.section("=",0,0);
- str5 = str3.section("=",1,1);
-
- if (str4=="MEDName") _MEDName = str5.ascii();
- if (str4=="NbPart") _NbPart = str5.toInt();
- if (str4=="KeepFiles") _KeepFiles = (bool) str5.toInt();
+ int pos = 0;
+ int len = str1.length();
+ while (pos < len) {
+ int found = str1.find(';',pos);
+ str2 = str1.substr(pos,found-pos);
+ int eqpos = str2.find('=',0);
+ str3 = str2.substr(0,eqpos);
+ str4 = str2.substr(eqpos+1);
+ pos = found + 1;
+
+ if (str3=="MEDName") _MEDName = str4.c_str();
+ if (str3=="NbPart") _NbPart = atoi(str4.c_str());
+ if (str3=="KeepFiles") _KeepFiles = (bool) atoi(str4.c_str());
}
return load;
}
# Libraries targets
LIB = libGHS3DPRLEngine.la
-CPPFLAGS+=$(QT_INCLUDES)
-LDFLAGSFORBIN+=-lm $(QT_LIBS)
+LDFLAGSFORBIN+=-lm
$(BIN):$(OBJ)
- $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(QT_LIBS) $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $<
@CONCLUDE@
@COMMENCE@
-SUBDIRS = GHS3DPRLPlugin gui tepal2med
+SUBDIRS = GHS3DPRLPlugin
+
+ifeq (@WITHGUI@,yes)
+ SUBDIRS += gui tepal2med
+endif
@MODULE@