From db0c7128fea6ca1f5d0c594fa7bc77c5eebcc6ad Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 28 May 2008 08:38:17 +0000 Subject: [PATCH] Porting to win32 system. --- src/TableViewer/TableViewer.pro | 24 ++++++++++++++++----- src/TableViewer/TableViewer_ViewWindow.cxx | 2 +- src/VTKViewer/VTKViewer.pro | 25 +++++++++++++++++----- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/src/TableViewer/TableViewer.pro b/src/TableViewer/TableViewer.pro index 8e9746fb2..a985d3e9c 100644 --- a/src/TableViewer/TableViewer.pro +++ b/src/TableViewer/TableViewer.pro @@ -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 diff --git a/src/TableViewer/TableViewer_ViewWindow.cxx b/src/TableViewer/TableViewer_ViewWindow.cxx index ee9b442fc..9e9305ed1 100755 --- a/src/TableViewer/TableViewer_ViewWindow.cxx +++ b/src/TableViewer/TableViewer_ViewWindow.cxx @@ -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() diff --git a/src/VTKViewer/VTKViewer.pro b/src/VTKViewer/VTKViewer.pro index 04b2493c7..46673de6f 100644 --- a/src/VTKViewer/VTKViewer.pro +++ b/src/VTKViewer/VTKViewer.pro @@ -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 -- 2.39.2