]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Porting to win32 system.
authornds <nds@opencascade.com>
Wed, 28 May 2008 08:38:17 +0000 (08:38 +0000)
committernds <nds@opencascade.com>
Wed, 28 May 2008 08:38:17 +0000 (08:38 +0000)
src/TableViewer/TableViewer.pro
src/TableViewer/TableViewer_ViewWindow.cxx
src/VTKViewer/VTKViewer.pro

index 8e9746fb24b6bb49ef213f171d39bebaef739890..a985d3e9c4a1014dd7cf8f9e4104ddda94a984f9 100644 (file)
@@ -1,4 +1,5 @@
-TEMPLATE = lib
+unix:TEMPLATE = lib
+win32:TEMPLATE = vclib
 
 DESTDIR = ../../$(CONFIG_ID)/lib
 MOC_DIR = ../../moc
@@ -8,13 +9,13 @@ CAS_CPPFLAGS = $(CASINC)
 CAS_KERNEL = -L$(CASLIB) -lTKernel
 
 INCLUDEPATH = ../../include  $${CAS_CPPFLAGS}
-LIBS += -L../../$(CONFIG_ID)/lib -lSUIT $${CAS_KERNEL} -lHTMLService
+LIBS += -L../../$(CONFIG_ID)/lib -lQtx -lSUIT $${CAS_KERNEL} -lHTMLService
 
 CONFIG -= debug release debug_and_release
 CONFIG += qt thread debug dll shared
 
-win32:DEFINES += WIN32
-DEFINES += TABLE_VIEWER_EXPORTS $(CASDEFINES) OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
+win32:DEFINES += WNT WIN32
+DEFINES += TABLEVIEWER_EXPORTS $(CASDEFINES) OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
 
 HEADERS = *.h
 
@@ -28,7 +29,7 @@ win32:GUIResources = ..\\..\\resources
 
 lrelease.name = LRELASE ${QMAKE_FILE_IN}
 unix:lrelease.commands = $(QTDIR)/bin/lrelease ${QMAKE_FILE_NAME} -qm $${GUIResources}/${QMAKE_FILE_BASE}.qm
-win32:lrelease.commands = $(QTDIR)\\bin\\lrelease ${QMAKE_FILE_NAME} -qm $${GUIResources}\\${QMAKE_FILE_BASE}.qm
+win32:lrelease.commands = $(QTDIR)\\bin\\lrelease ${QMAKE_FILE_IN} -qm $${GUIResources}\\${QMAKE_FILE_BASE}.qm
 unix:lrelease.output = $${GUIResources}/${QMAKE_FILE_BASE}.qm
 win32:lrelease.output = $${GUIResources}\\${QMAKE_FILE_BASE}.qm
 lrelease.input = TRANSLATIONS
@@ -37,8 +38,21 @@ win32:lrelease.clean = $${GUIResources}\\${QMAKE_FILE_BASE}.qm
 lrelease.CONFIG += no_link target_predeps
 QMAKE_EXTRA_COMPILERS += lrelease
 
+win32:copy_hdr.name = Install ${QMAKE_FILE_IN}
+win32:copy_hdr.commands = type ${QMAKE_FILE_IN} > ../../include/${QMAKE_FILE_BASE}.h
+win32:copy_hdr.output = ../../include/${QMAKE_FILE_BASE}.h
+win32:copy_hdr.input = HEADERS
+win32:QMAKE_EXTRA_COMPILERS += copy_hdr
+
 ICONS   = resources/*.png
 
+win32:Resource=$$ICONS
+win32:copy_res.name = Install resources ${QMAKE_FILE_IN}
+win32:copy_res.commands = type ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+win32:copy_res.output = $${GUIResources}\\${QMAKE_FILE_BASE}.png
+win32:copy_res.input = Resource
+win32:QMAKE_EXTRA_COMPILERS += copy_res
+
 includes.files = $$HEADERS
 includes.path = ../../include
 
index ee9b442fc9253e16e703872dbbee7ded56cbdc35..9e9305ed105fe0b644e74d48eb54ce2f2146c68d 100755 (executable)
@@ -329,7 +329,7 @@ void TableViewer_ViewWindow::selectionChanged()
 {
   bool anEnable = myTable->getSelectedIndexes().count() > 0;
   myActionsMap[CopyId]->setEnabled( anEnable );
-  myActionsMap[PasteId]->setEnabled( anEnable & myCopyLst.count() > 0 );
+  myActionsMap[PasteId]->setEnabled( anEnable && myCopyLst.count() > 0 );
 }
 
 void TableViewer_ViewWindow::onActivated()
index 04b2493c7b1c080bbb57d9c5f129ebff0da89b42..46673de6f3db37a901f1183e32e8c8001442cb96 100644 (file)
@@ -1,10 +1,12 @@
-TEMPLATE = lib
+unix:TEMPLATE = lib
+win32:TEMPLATE = vclib
 
 DESTDIR = ../../$(CONFIG_ID)/lib
 MOC_DIR = ../../moc
 OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET
 
-VTK_LIBS = -L$$(VTKLIB) -lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid -lvtkParallel -lvtkWidgets   -lGL -L/usr/X11R6/lib -lGLU -L/usr/X11R6/lib -lX11 -lXt
+unix:VTK_LIBS = -L$$(VTKLIB) -lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid -lvtkParallel -lvtkWidgets   -lGL -L/usr/X11R6/lib -lGLU -L/usr/X11R6/lib -lX11 -lXt
+win32:VTK_LIBS = -L$$(VTKLIB) -lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid -lvtkParallel -lvtkWidgets
 
 CAS_CPPFLAGS = $(CASINC)
 
@@ -16,7 +18,7 @@ LIBS += -L../../$(CONFIG_ID)/lib -lQtx -lSUIT $${VTK_LIBS} $${CAS_KERNEL}
 CONFIG -= debug release debug_and_release
 CONFIG += qt thread debug dll shared
 
-win32:DEFINES += WIN32 
+win32:DEFINES += WNT WIN32 
 DEFINES += VTKVIEWER_EXPORTS $(CASDEFINES) OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
 
 HEADERS  = VTKViewer.h
@@ -60,7 +62,7 @@ SOURCES += VTKViewer_ViewModel.cxx
 SOURCES += VTKViewer_ConvexTool.cxx
 SOURCES += VTKViewer_ViewWindow.cxx
 
-message ( "Sources: $$SOURCES " )
+unix:message ( "Sources: $$SOURCES " )
 
 TRANSLATIONS = resources/VTKViewer_images.ts \
                resources/VTKViewer_msg_en.ts
@@ -70,7 +72,7 @@ win32:GUIResources = ..\\..\\resources
 
 lrelease.name = LRELASE ${QMAKE_FILE_IN}
 unix:lrelease.commands = $(QTDIR)/bin/lrelease ${QMAKE_FILE_NAME} -qm $${GUIResources}/${QMAKE_FILE_BASE}.qm
-win32:lrelease.commands = $(QTDIR)\\bin\\lrelease ${QMAKE_FILE_NAME} -qm $${GUIResources}\\${QMAKE_FILE_BASE}.qm
+win32:lrelease.commands = $(QTDIR)\\bin\\lrelease ${QMAKE_FILE_IN} -qm $${GUIResources}\\${QMAKE_FILE_BASE}.qm
 unix:lrelease.output = $${GUIResources}/${QMAKE_FILE_BASE}.qm
 win32:lrelease.output = $${GUIResources}\\${QMAKE_FILE_BASE}.qm
 lrelease.input = TRANSLATIONS
@@ -79,8 +81,21 @@ win32:lrelease.clean = $${GUIResources}\\${QMAKE_FILE_BASE}.qm
 lrelease.CONFIG += no_link target_predeps
 QMAKE_EXTRA_COMPILERS += lrelease
 
+win32:copy_hdr.name = Install ${QMAKE_FILE_IN}
+win32:copy_hdr.commands = type ${QMAKE_FILE_IN} > ../../include/${QMAKE_FILE_BASE}.h
+win32:copy_hdr.output = ../../include/${QMAKE_FILE_BASE}.h
+win32:copy_hdr.input = HEADERS
+win32:QMAKE_EXTRA_COMPILERS += copy_hdr
+
 ICONS   = resources/*.png
 
+win32:Resource=$$ICONS
+win32:copy_res.name = Install resources ${QMAKE_FILE_IN}
+win32:copy_res.commands = type ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+win32:copy_res.output = $${GUIResources}\\${QMAKE_FILE_BASE}.png
+win32:copy_res.input = Resource
+win32:QMAKE_EXTRA_COMPILERS += copy_res
+
 includes.files = $$HEADERS
 includes.path = ../../include