mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
SALOME 9.1.0 Windows version
This commit is contained in:
parent
ddca8a32b0
commit
b24ee9fa23
@ -76,7 +76,12 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
// boost includes
|
// boost includes
|
||||||
|
#include <boost/version.hpp>
|
||||||
|
#if BOOST_VERSION < 106700
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
|
#else
|
||||||
|
#include <boost/next_prior.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
enum{
|
enum{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
|
// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
@ -112,7 +112,21 @@ namespace
|
|||||||
xmlPath += sep;
|
xmlPath += sep;
|
||||||
xmlPath += "share" + sep + "salome" + sep + "resources" + sep + "geom" + sep + plugin + ".xml";
|
xmlPath += "share" + sep + "salome" + sep + "resources" + sep + "geom" + sep + plugin + ".xml";
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
//RNV: this is workaround for providing compilation,
|
||||||
|
// path should be processed as unicode string.
|
||||||
|
size_t length = strlen(xmlPath.c_str()) + sizeof(char);
|
||||||
|
wchar_t* aPath = new wchar_t[length + 1];
|
||||||
|
memset(aPath, '\0', length);
|
||||||
|
mbstowcs(aPath, xmlPath.c_str(), length);
|
||||||
|
#else
|
||||||
|
const char* aPath = xmlPath.c_str();
|
||||||
|
#endif
|
||||||
|
fileOK = (GetFileAttributes(aPath) != INVALID_FILE_ATTRIBUTES);
|
||||||
|
#if UNICODE
|
||||||
|
delete aPath;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
|
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
|
||||||
#endif
|
#endif
|
||||||
@ -125,7 +139,18 @@ namespace
|
|||||||
xmlPath += sep;
|
xmlPath += sep;
|
||||||
xmlPath += "share" + sep + "salome" + sep + "resources" + sep + toLower(plugin) + sep + plugin + ".xml";
|
xmlPath += "share" + sep + "salome" + sep + "resources" + sep + toLower(plugin) + sep + plugin + ".xml";
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
|
#ifdef UNICODE
|
||||||
|
size_t length = strlen(xmlPath.c_str()) + sizeof(char);
|
||||||
|
wchar_t* aPath = new wchar_t[length+1];
|
||||||
|
memset(aPath, '\0', length);
|
||||||
|
mbstowcs(aPath, xmlPath.c_str(), length);
|
||||||
|
#else
|
||||||
|
const char* aPath = xmlPath.c_str();
|
||||||
|
#endif
|
||||||
|
fileOK = (GetFileAttributes(aPath) != INVALID_FILE_ATTRIBUTES);
|
||||||
|
#if UNICODE
|
||||||
|
delete aPath;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
|
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2531,8 +2531,22 @@ void GEOM_Gen_i::LoadPlugin(const std::string& theLibName)
|
|||||||
|
|
||||||
// check, if corresponding operations are already created
|
// check, if corresponding operations are already created
|
||||||
if (myOpCreatorMap.find(theLibName) == myOpCreatorMap.end()) {
|
if (myOpCreatorMap.find(theLibName) == myOpCreatorMap.end()) {
|
||||||
|
#if WIN32
|
||||||
|
#if UNICODE
|
||||||
|
//RNV: this is workaround for providing compilation,
|
||||||
|
// path should be processed as unicode string.
|
||||||
|
size_t length = strlen(aPlatformLibName.c_str()) + sizeof(char);
|
||||||
|
wchar_t* aPath = new wchar_t[length + 1];
|
||||||
|
memset(aPath, '\0', length);
|
||||||
|
mbstowcs(aPath, aPlatformLibName.c_str(), length);
|
||||||
|
#else
|
||||||
|
const char* aPath = aPlatformLibName.c_str();
|
||||||
|
#endif
|
||||||
// load plugin library
|
// load plugin library
|
||||||
LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
|
LibHandle libHandle = LoadLib(aPath);
|
||||||
|
#else
|
||||||
|
LibHandle libHandle = LoadLib(aPlatformLibName.c_str());
|
||||||
|
#endif
|
||||||
if (!libHandle) {
|
if (!libHandle) {
|
||||||
// report any error, if occurred
|
// report any error, if occurred
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
@ -74,7 +74,12 @@ SET(_swig_SCRIPTS
|
|||||||
|
|
||||||
# --- rules ---
|
# --- rules ---
|
||||||
|
|
||||||
SWIG_ADD_MODULE(libGEOM_Swig python libGEOM_Swig.i libGEOM_Swig.cxx)
|
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
|
||||||
|
SWIG_ADD_MODULE(libGEOM_Swig python libGEOM_Swig.i libGEOM_Swig.cxx)
|
||||||
|
ELSE()
|
||||||
|
SWIG_ADD_LIBRARY(libGEOM_Swig LANGUAGE python SOURCES libGEOM_Swig.i libGEOM_Swig.cxx)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SWIG_LINK_LIBRARIES(libGEOM_Swig "${_link_LIBRARIES}")
|
SWIG_LINK_LIBRARIES(libGEOM_Swig "${_link_LIBRARIES}")
|
||||||
SWIG_CHECK_GENERATION(libGEOM_Swig)
|
SWIG_CHECK_GENERATION(libGEOM_Swig)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
|
@ -53,11 +53,16 @@ SET(_swig_SCRIPTS
|
|||||||
# swig flags
|
# swig flags
|
||||||
SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES CPLUSPLUS ON)
|
SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES CPLUSPLUS ON)
|
||||||
SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES SWIG_FLAGS "-py3")
|
SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES SWIG_FLAGS "-py3")
|
||||||
#SET_SOURCE_FILES_PROPERTIES(xao_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
|
SET_SOURCE_FILES_PROPERTIES(xao_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
|
||||||
|
|
||||||
# --- rules ---
|
# --- rules ---
|
||||||
|
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
|
||||||
|
SWIG_ADD_MODULE(xao python xao.i)
|
||||||
|
ELSE()
|
||||||
|
SWIG_ADD_LIBRARY(xao LANGUAGE python SOURCES xao.i)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
SWIG_ADD_MODULE(xao python xao.i)
|
|
||||||
SWIG_LINK_LIBRARIES(xao "${_link_LIBRARIES}")
|
SWIG_LINK_LIBRARIES(xao "${_link_LIBRARIES}")
|
||||||
SWIG_CHECK_GENERATION(xao)
|
SWIG_CHECK_GENERATION(xao)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
|
Loading…
Reference in New Issue
Block a user