From: rnv Date: Tue, 18 Mar 2014 08:33:44 +0000 (+0400) Subject: Fix for the "0022515: [CEA 1074] Hexotic does not work under Windows 7 64 bits" issue. X-Git-Tag: V7_4_0a1~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=60b1120bbdf130e8fcde8ed1297d2bf0aee1741f;p=plugins%2Fhexoticplugin.git Fix for the "0022515: [CEA 1074] Hexotic does not work under Windows 7 64 bits" issue. --- diff --git a/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx b/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx index 9929133..76d15bc 100644 --- a/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx @@ -194,6 +194,10 @@ QFrame* HexoticPluginGUI_HypothesisCreator::buildFrame() HexoticPlugin::HexoticPlugin_Hypothesis::_narrow( initParamsHypothesis() ); myStdWidget = new HexoticPluginGUI_StdWidget(aStdGroup); +#ifdef WIN32 + myStdWidget->label_6->hide(); + myStdWidget->myHexoticNbProc->hide(); +#endif l->addWidget( myStdWidget, row++, 0, 1, 3 ); myStdWidget->onSdModeSelected(SD_MODE_4); @@ -407,8 +411,9 @@ void HexoticPluginGUI_HypothesisCreator::retrieveParams() const myStdWidget->myHexoticSharpAngleThreshold->setText(""); else myStdWidget->myHexoticSharpAngleThreshold->setValue( data.myHexoticSharpAngleThreshold ); - +#ifndef WIN32 myStdWidget->myHexoticNbProc->setValue( data.myHexoticNbProc ); +#endif myStdWidget->myHexoticWorkingDir->setText( data.myHexoticWorkingDir ); myStdWidget->myHexoticVerbosity->setValue( data.myHexoticVerbosity ); @@ -567,8 +572,9 @@ bool HexoticPluginGUI_HypothesisCreator::readParamsFromWidgets( HexoticHypothesi h_data.myHexoticIgnoreRidges = myStdWidget->myHexoticIgnoreRidges->isChecked(); h_data.myHexoticInvalidElements = myStdWidget->myHexoticInvalidElements->isChecked(); - +#ifndef WIN32 h_data.myHexoticNbProc = myStdWidget->myHexoticNbProc->value(); +#endif h_data.myHexoticWorkingDir = myStdWidget->myHexoticWorkingDir->text(); h_data.myHexoticVerbosity = myStdWidget->myHexoticVerbosity->value(); h_data.myHexoticMaxMemory = myStdWidget->myHexoticMaxMemory->value(); diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index fd8688c..588d408 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -922,7 +922,11 @@ static TCollection_AsciiString getSuffix() { TCollection_AsciiString aSuffix = ""; aSuffix += "_"; +#ifndef WIN32 aSuffix += getenv("USER"); +#else + aSuffix += getenv("USERNAME"); +#endif aSuffix += "_"; aSuffix += Kernel_Utils::GetHostname().c_str(); aSuffix += "_"; @@ -969,7 +973,9 @@ std::string HexoticPlugin_Hexotic::getHexoticCommand(const TCollection_AsciiStri TCollection_AsciiString sizeMap = " --read_sizemap "; TCollection_AsciiString ignoreRidges = " --compute_ridges no ", invalideElements = " --allow_invalid_elements yes "; TCollection_AsciiString subdom = " --components "; +#ifndef WIN32 TCollection_AsciiString proc = " --max_number_of_threads "; +#endif TCollection_AsciiString verb = " --verbose "; TCollection_AsciiString maxmem = " --max_memory "; @@ -1025,7 +1031,9 @@ std::string HexoticPlugin_Hexotic::getHexoticCommand(const TCollection_AsciiStri run_Hexotic += in + Hexotic_In + out + Hexotic_Out; run_Hexotic += subdom + mode; +#ifndef WIN32 run_Hexotic += proc + nbproc; +#endif run_Hexotic += verb + verbosity; run_Hexotic += maxmem + maxMemory;