ENV: Windows porting

This commit is contained in:
env 2005-08-29 06:03:08 +00:00
parent 3a675cc5c0
commit a994aaae9f
27 changed files with 199 additions and 27 deletions

View File

@ -219,6 +219,9 @@ gp_Pnt BasicGUI::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView)
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return BasicGUI::GetBasicGUI( parent );

View File

@ -126,6 +126,9 @@ bool BlocksGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return BlocksGUI::GetBlocksGUI( parent );

View File

@ -100,6 +100,9 @@ bool BooleanGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return BooleanGUI::GetBooleanGUI( parent );

View File

@ -108,6 +108,9 @@ bool BuildGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return BuildGUI::GetBuildGUI( parent );

View File

@ -466,6 +466,9 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return DisplayGUI::GetDisplayGUI( parent );

View File

@ -19,7 +19,13 @@ class QLabel;
class QLineEdit;
class QPushButton;
class DlgRef_6Sel_QTD : public QWidget
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define DLGREF_WNT_EXPORT __declspec( dllexport )
#else
#define DLGREF_WNT_EXPORT
#endif
class DLGREF_WNT_EXPORT DlgRef_6Sel_QTD : public QWidget
{
Q_OBJECT

View File

@ -668,6 +668,9 @@ bool EntityGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char*
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return EntityGUI::GetEntityGUI( parent );

View File

@ -200,8 +200,13 @@ GEOMGUI* GeometryGUI::getLibrary( const QString& libraryName )
if ( !myGUIMap.contains( libraryName ) ) {
// try to load library if it is not loaded yet
QCString libs;
#ifndef WNT
if( ( libs = getenv( "LD_LIBRARY_PATH" ) ) ) {
QStringList dirList = QStringList::split( ":", libs, false ); // skip empty entries
QStringList dirList = QStringList::split( ":", libs, false ); // skip empty entries
#else
if( ( libs = getenv( "PATH" ) ) ) {
QStringList dirList = QStringList::split( ";", libs, false ); // skip empty entries
#endif
for( int i = dirList.count()-1; i >= 0; i-- ) {
QString dir = dirList[ i ];
QFileInfo fi( Qtx::addSlash( dirList[ i ] ) + libraryName );
@ -366,7 +371,11 @@ void GeometryGUI::OnGUIEvent( int id )
id == 901 || // OBJECT BROWSER - RENAME
id == 9024 ) { // OBJECT BROWSER - OPEN
//cout << "id " << id << " received" << endl;
library = getLibrary( "libGEOMToolsGUI.so" );
#ifndef WNT
library = getLibrary( "libGEOMToolsGUI.so" );
#else
library = getLibrary( "GEOMToolsGUI.dll" );
#endif
}
else if( id == 211 || // MENU VIEW - WIREFRAME/SHADING
id == 212 || // MENU VIEW - DISPLAY ALL
@ -376,7 +385,11 @@ void GeometryGUI::OnGUIEvent( int id )
id == 216 || // MENU VIEW - DISPLAY
id == 80311 || // POPUP VIEWER - WIREFRAME
id == 80312 ) { // POPUP VIEWER - SHADING
library = getLibrary( "libDisplayGUI.so" );
#ifndef WNT
library = getLibrary( "libDisplayGUI.so" );
#else
library = getLibrary( "DisplayGUI.dll" );
#endif
}
else if( id == 4011 || // MENU BASIC - POINT
id == 4012 || // MENU BASIC - LINE
@ -388,24 +401,40 @@ void GeometryGUI::OnGUIEvent( int id )
id == 4018 || // MENU BASIC - WPLANE
id == 4019 || // MENU BASIC - CURVE
id == 4020 ) { // MENU BASIC - REPAIR
library = getLibrary( "libBasicGUI.so" );
#ifndef WNT
library = getLibrary( "libBasicGUI.so" );
#else
library = getLibrary( "BasicGUI.dll" );
#endif
}
else if( id == 4021 || // MENU PRIMITIVE - BOX
id == 4022 || // MENU PRIMITIVE - CYLINDER
id == 4023 || // MENU PRIMITIVE - SPHERE
id == 4024 || // MENU PRIMITIVE - TORUS
id == 4025 ) { // MENU PRIMITIVE - CONE
library = getLibrary( "libPrimitiveGUI.so" );
#ifndef WNT
library = getLibrary( "libPrimitiveGUI.so" );
#else
library = getLibrary( "PrimitiveGUI.dll" );
#endif
}
else if( id == 4031 || // MENU GENERATION - PRISM
id == 4032 || // MENU GENERATION - REVOLUTION
id == 4033 || // MENU GENERATION - FILLING
id == 4034 ) { // MENU GENERATION - PIPE
library = getLibrary( "libGenerationGUI.so" );
#ifndef WNT
library = getLibrary( "libGenerationGUI.so" );
#else
library = getLibrary( "GenerationGUI.dll" );
#endif
}
else if( id == 404 || // MENU ENTITY - SKETCHER
id == 407 ) { // MENU ENTITY - EXPLODE
library = getLibrary( "libEntityGUI.so" );
#ifndef WNT
library = getLibrary( "libEntityGUI.so" );
#else
library = getLibrary( "EntityGUI.dll" );
#endif
}
else if( id == 4081 || // MENU BUILD - EDGE
id == 4082 || // MENU BUILD - WIRE
@ -413,13 +442,21 @@ void GeometryGUI::OnGUIEvent( int id )
id == 4084 || // MENU BUILD - SHELL
id == 4085 || // MENU BUILD - SOLID
id == 4086 ) { // MENU BUILD - COMPUND
library = getLibrary( "libBuildGUI.so" );
#ifndef WNT
library = getLibrary( "libBuildGUI.so" );
#else
library = getLibrary( "BuildGUI.dll" );
#endif
}
else if( id == 5011 || // MENU BOOLEAN - FUSE
id == 5012 || // MENU BOOLEAN - COMMON
id == 5013 || // MENU BOOLEAN - CUT
id == 5014 ) { // MENU BOOLEAN - SECTION
library = getLibrary( "libBooleanGUI.so" );
#ifndef WNT
library = getLibrary( "libBooleanGUI.so" );
#else
library = getLibrary( "BooleanGUI.dll" );
#endif
}
else if( id == 5021 || // MENU TRANSFORMATION - TRANSLATION
id == 5022 || // MENU TRANSFORMATION - ROTATION
@ -429,14 +466,22 @@ void GeometryGUI::OnGUIEvent( int id )
id == 5026 || // MENU TRANSFORMATION - OFFSET
id == 5027 || // MENU TRANSFORMATION - MULTI-TRANSLATION
id == 5028 ) { // MENU TRANSFORMATION - MULTI-ROTATION
library = getLibrary( "libTransformationGUI.so" );
#ifndef WNT
library = getLibrary( "libTransformationGUI.so" );
#else
library = getLibrary( "TransformationGUI.dll" );
#endif
}
else if( id == 503 || // MENU OPERATION - PARTITION
id == 504 || // MENU OPERATION - ARCHIMEDE
id == 505 || // MENU OPERATION - FILLET
id == 506 || // MENU OPERATION - CHAMFER
id == 507 ) { // MENU OPERATION - CLIPPING RANGE
library = getLibrary( "libOperationGUI.so" );
#ifndef WNT
library = getLibrary( "libOperationGUI.so" );
#else
library = getLibrary( "OperationGUI.dll" );
#endif
}
else if( id == 601 || // MENU REPAIR - SEWING
id == 603 || // MENU REPAIR - SUPPRESS FACES
@ -448,7 +493,11 @@ void GeometryGUI::OnGUIEvent( int id )
id == 609 || // MENU REPAIR - FREE BOUNDARIES
id == 610 || // MENU REPAIR - FREE FACES
id == 602 ) { // MENU REPAIR - GLUE FACES
library = getLibrary( "libRepairGUI.so" );
#ifndef WNT
library = getLibrary( "libRepairGUI.so" );
#else
library = getLibrary( "RepairGUI.dll" );
#endif
}
else if( id == 701 || // MENU MEASURE - PROPERTIES
id == 702 || // MENU MEASURE - CDG
@ -460,19 +509,31 @@ void GeometryGUI::OnGUIEvent( int id )
id == 707 || // MENU MEASURE - CHECK
id == 7072 || // MENU MEASURE - CHECK COMPOUND OF BLOCKS
id == 708 ) { // MENU MEASURE - POINT COORDINATES
library = getLibrary( "libMeasureGUI.so" );
#ifndef WNT
library = getLibrary( "libMeasureGUI.so" );
#else
library = getLibrary( "MeasureGUI.dll" );
#endif
}
else if( id == 800 || // MENU GROUP - CREATE
id == 8001 || // POPUP MENU - CREATE GROUP
id == 801 ) { // MENU GROUP - EDIT
library = getLibrary( "libGroupGUI.so" );
#ifndef WNT
library = getLibrary( "libGroupGUI.so" );
#else
library = getLibrary( "GroupGUI.dll" );
#endif
}
else if( id == 9999 || // MENU BLOCKS - HEXAHEDRAL SOLID
id == 9998 || // MENU BLOCKS - MULTI-TRANSFORMATION
id == 9997 || // MENU BLOCKS - QUADRANGLE FACE
id == 99991 || // MENU BLOCKS - PROPAGATE
id == 9995 ) { // MENU BLOCKS - EXPLODE ON BLOCKS
library = getLibrary( "libBlocksGUI.so" );
#ifndef WNT
library = getLibrary( "libBlocksGUI.so" );
#else
library = getLibrary( "BlocksGUI.dll" );
#endif
}
// call method of corresponding GUI library

View File

@ -639,6 +639,9 @@ QString GEOMToolsGUI::getParentComponent( _PTR( SObject ) obj )
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new GEOMToolsGUI( parent );

View File

@ -852,6 +852,9 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::GetObject (CORBA::Long theStudyID, const char*
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
PortableServer::ObjectId * GEOMEngine_factory(CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
PortableServer::ObjectId * contId,

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "GenerationGUI.h"
#include "SUIT_Session.h"
@ -37,6 +36,8 @@ using namespace std;
#include "GenerationGUI_FillingDlg.h" // Method FILLING
#include "GenerationGUI_PipeDlg.h" // Method PIPE
using namespace std;
GenerationGUI* GenerationGUI::myGUIObject = 0;
//=======================================================================
@ -101,6 +102,9 @@ bool GenerationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI(GeometryGUI* parent)
{
return GenerationGUI::GetGenerationGUI(parent);

View File

@ -142,6 +142,9 @@ bool GroupGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI(GeometryGUI* p)
{
return GroupGUI::GetGroupGUI(p);

View File

@ -138,6 +138,9 @@ bool MeasureGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return MeasureGUI::GetMeasureGUI( parent );

View File

@ -33,11 +33,17 @@
class MeasureGUI_1Sel6LineEdit_QTD;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : DialogBox_PROPERTIES
// purpose :
//=================================================================================
class MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -32,11 +32,17 @@
class MeasureGUI_1Sel3LineEdit_QTD;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : MeasureGUI_CenterMassDlg
// purpose :
//=================================================================================
class MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton
{
Q_OBJECT

View File

@ -35,11 +35,17 @@ class MeasureGUI_1Sel1TextView_QTD;
class QListBox;
class QLabel;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : MeasureGUI_CheckCompoundOfBlocksDlg
// purpose :
//=================================================================================
class MeasureGUI_CheckCompoundOfBlocksDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_CheckCompoundOfBlocksDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -33,11 +33,17 @@
class MeasureGUI_1Sel1TextView_QTD;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : MeasureGUI_CheckShapeDlg
// purpose :
//=================================================================================
class MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -34,12 +34,17 @@
class MeasureGUI_2Sel1LineEdit_QTD;
class gp_Pnt;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : MeasureGUI_DistanceDlg
// purpose :
//=================================================================================
class MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -35,12 +35,18 @@ class MeasureGUI_1Sel12LineEdit_QTD;
class gp_XYZ;
class gp_Mat;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : MeasureGUI_InertiaDlg
// purpose : Dialog for displaying moment of inertia
//=================================================================================
class MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -33,11 +33,17 @@
class MeasureGUI_1Sel6LineEdit_QTD;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : DialogBox_PROPERTIES
// purpose :
//=================================================================================
class MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -32,12 +32,18 @@
class QLineEdit;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : MeasureGUI_PointDlg
// purpose : Dialog for displaying point coordinates
//=================================================================================
class MeasureGUI_PointDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_PointDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -31,12 +31,18 @@
#include "MeasureGUI_Skeleton.h"
class MeasureGUI_1Sel3LineEdit_QTD;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : MeasureGUI_PropertiesDlg
// purpose : Dialog for displaying length, area and volume
//=================================================================================
class MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -33,11 +33,17 @@
class MeasureGUI_1Sel1TextView_QTD;
#if defined WNT && defined MEASUREGUI_EXPORTS
#define MEASUREGUI_EXPORT __declspec( dllexport )
#else
#define MEASUREGUI_EXPORT
#endif
//=================================================================================
// class : DialogBox_PROPERTIES
// purpose :
//=================================================================================
class MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton
class MEASUREGUI_EXPORT MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton
{
Q_OBJECT

View File

@ -115,6 +115,9 @@ bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI(GeometryGUI* parent)
{
return OperationGUI::GetOperationGUI(parent);

View File

@ -128,6 +128,9 @@ bool PrimitiveGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return PrimitiveGUI::GetPrimitiveGUI( parent );

View File

@ -136,6 +136,9 @@ bool RepairGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return RepairGUI::GetRepairGUI( parent );

View File

@ -146,6 +146,9 @@ bool TransformationGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
//=====================================================================================
extern "C"
{
#ifdef WNT
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return TransformationGUI::GetTransformationGUI( parent );