[Kst] branches/work/kst/portto4/kst
Mike Fenton
mike at staikos.net
Tue May 12 17:52:24 CEST 2009
SVN commit 967112 by fenton:
Merge in changes made in beta release branch.
Clean up lib line changes to be windows/unix specific.
M +61 -2 INSTALL
M +2 -1 dataobjectplugin.pri
M +2 -1 src/d2asc/d2asc.pro
M +2 -1 src/d2d/d2d.pro
M +3 -1 src/kst/kst.pro
A src/kst/kst_icon.rc
M +2 -1 src/libkstapp/libkstapp.pro
M +5 -0 src/libkstapp/viewitemdialog.cpp
M +5 -0 src/libkstmath/curve.cpp
M +2 -2 src/libkstmath/image.cpp
M +11 -1 src/widgets/curveappearance.cpp
M +2 -1 src/widgets/widgets.pro
M +2 -1 tests/tests.pro
--- branches/work/kst/portto4/kst/INSTALL #967111:967112
@@ -24,8 +24,61 @@
#2. The qmake command line needs to be updated to include -spec macx-g++.
#3. An error has been observed compiling view.cpp, view.h may need to be updated to change QXmlStreamWriter to QCoreXmlStreamWriter on line 45.
-Windows
+Windows using mingw
+
+Note: This process must be done using the windows shell directly. It cannot be done within cygwin or msys and neither can be included in the path.
+
+1. Download or otherwise install Qt 4.4/4.5.
+2. Update environment variables for build.
+ a. This can be done using the Qt command line as installed in the Qt Creator bundle.
+ b. This can be done using qtvars.bat generated by Qt and included below.
+ c. This can be done manually following these steps.
+ i. Make sure your QTDIR is set to that Qt installation.
+ ii. Update your path to include ..\mingw\bin and %QTDIR%\bin
+ iii. set QMAKESPEC environmental variable to %QTDIR%\mkspecs\win32-g++
+3. mkdir build && cd build
+4. qmake -r ../kst.pro
+5. mingw32-make
+
+Notes: Be careful to ensure there's nothing else in path that might interfere. Cygwin, msys and various other things all have individual make and sh executables that are slightly incompatible.
+
+qtvars.bat - mingw - Update directories to match machine configuration.
+-------------------------------------------------------------
+
+ at echo off
+rem
+rem This file is generated
+rem
+
+echo Setting up a MinGW/Qt only environment...
+echo -- QTDIR set to C:\Qt\4.5.1
+echo -- PATH set to C:\Qt\4.5.1\bin
+echo -- Adding C:\Qt\MinGW\bin to PATH
+echo -- Adding %SystemRoot%\System32 to PATH
+echo -- QMAKESPEC set to win32-g++
+
+set QTDIR=C:\Qt\4.5.1
+set PATH=C:\Qt\4.5.1\bin
+set PATH=%PATH%;C:\Qt\MinGW\bin
+set PATH=%PATH%;%SystemRoot%\System32
+set QMAKESPEC=win32-g++
+
+
+-------------------------------------------------------------
+
+Windows using Qt Creator Bundle
+
+1. Download or otherwise install the Qt Creator bundle including mingw
+2. Open Kst.pro
+3. Verify build settings
+4. Click Build
+
+-------------------------------------------------------------
+
+
+Windows using Visual Studio
+
Note: This has only been build using Visual Studio & Cygwin. The following steps
are used on the current Windows build machine used for testing, but may vary.
@@ -38,10 +91,16 @@
6. qmake -r ../kst.pro
7. nmake
7a. If an error occurs, you may need to update Makefile.debug and replace "CXX = @echo compiling $< && cl" with "CXX=cl"
+7b. If libkstapp fails to build the following steps should circumvent the error.
+ 1) run nmake >makelog
+ 2) locate the cl.exe command line including application.cpp and copy it
+ 3) Replace all \ with \\ in the command
+ 4) Starting in the build directory, cd src\libkstapp, paste the command line, return to the build directory
+ 4) rerun nmake.
8. ../run-kst
-qtvars.bat - Update directories to match machine configuration.
+qtvars.bat - Visual Studio - Update directories to match machine configuration.
-------------------------------------------------------------
@echo off
--- branches/work/kst/portto4/kst/dataobjectplugin.pri #967111:967112
@@ -19,4 +19,5 @@
$$TOPLEVELDIR/src/widgets \
$$OUTPUT_DIR/src/widgets \
-LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkst -lkstmath -lkstwidgets -lkstapp
+win32:LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkstapp -lkstwidgets -lkstmath -lkst
+!win32:LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkst -lkstmath -lkstwidgets -lkstapp
--- branches/work/kst/portto4/kst/src/d2asc/d2asc.pro #967111:967112
@@ -12,7 +12,8 @@
$$TOPLEVELDIR/src/libkstapp \
$$OUTPUT_DIR/src/kst/tmp
-LIBS += -lkst -lkstmath -lkstwidgets -lkstapp
+win32:LIBS += -lkstapp -lkstwidgets -lkstmath -lkst
+!win32:LIBS += -lkst -lkstmath -lkstwidgets -lkstapp
SOURCES += \
d2asc.cpp
--- branches/work/kst/portto4/kst/src/d2d/d2d.pro #967111:967112
@@ -12,7 +12,8 @@
$$TOPLEVELDIR/src/libkstapp \
$$OUTPUT_DIR/src/kst/tmp
-LIBS += -lkst -lkstmath -lkstwidgets -lkstapp
+win32:LIBS += -lkstapp -lkstwidgets -lkstmath -lkst
+!win32:LIBS += -lkst -lkstmath -lkstwidgets -lkstapp
SOURCES += \
d2d.cpp
--- branches/work/kst/portto4/kst/src/kst/kst.pro #967111:967112
@@ -18,7 +18,8 @@
$$TOPLEVELDIR/src/libkstapp \
$$OUTPUT_DIR/src/kst/tmp
-LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkst -lkstmath -lkstwidgets -lkstapp
+win32:LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkstapp -lkstwidgets -lkstmath -lkst
+!win32:LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkst -lkstmath -lkstwidgets -lkstapp
SOURCES += \
main.cpp
@@ -27,3 +28,4 @@
$$TOPLEVELDIR/src/images/images.qrc
win32:QT += svg opengl
+win32:RC_FILE = kst_icon.rc
--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #967111:967112
@@ -21,7 +21,8 @@
$$OUTPUT_DIR/src/widgets \
$$OUTPUT_DIR/src/libkstapp/tmp
-LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkst -lkstmath -lkstwidgets
+win32:LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkstwidgets -lkstmath -lkst
+!win32:LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin -lkst -lkstmath -lkstwidgets
SOURCES += \
application.cpp \
--- branches/work/kst/portto4/kst/src/libkstapp/viewitemdialog.cpp #967111:967112
@@ -153,6 +153,11 @@
p.setJoinStyle(_strokeTab->joinStyle());
p.setCapStyle(_strokeTab->capStyle());
p.setBrush(b);
+#ifdef Q_WS_WIN32
+ if (p.isCosmetic()) {
+ p.setWidth(1);
+ }
+#endif
_item->setPen(p);
}
--- branches/work/kst/portto4/kst/src/libkstmath/curve.cpp #967111:967112
@@ -584,6 +584,11 @@
void Curve::setLineWidth(int in_LineWidth) {
+#ifdef Q_WS_WIN32
+ if (in_LineWidth == 0) {
+ in_LineWidth = 1;
+ }
+#endif
LineWidth = in_LineWidth;
}
--- branches/work/kst/portto4/kst/src/libkstmath/image.cpp #967111:967112
@@ -766,13 +766,13 @@
for (int i = l; i <= r; i++) {
int index = (int)floor(static_cast<double>(((i - l) * (_pal.paletteData().count() - 1))) / (r - l));
QColor sliceColor = _pal.paletteData().value(index).rgb();
- p->setPen(QPen(sliceColor, 0));
+ p->setPen(QPen(sliceColor, 1));
p->drawLine(i, t, i, b);
}
}
if (hasContourMap()) {
// draw a box with contour color
- p->setPen(QPen(_contourColor, 0));
+ p->setPen(QPen(_contourColor, 1));
p->drawRect(bound.left(), bound.top(), bound.width(), bound.height());
}
}
--- branches/work/kst/portto4/kst/src/widgets/curveappearance.cpp #967111:967112
@@ -331,7 +331,7 @@
if (lineColor == Qt::transparent) {
lineColor = Qt::black;
}
- QPen pen(lineColor, 0);
+ QPen pen(lineColor, 1);
int currentItem = _comboLineStyle->currentIndex();
_comboLineStyle->clear();
@@ -372,6 +372,16 @@
p.drawRect(rectBar);
}
+#ifdef Q_WS_WIN32
+ // Note: This modification was made in response to an apparent bug in Qt 4.4.0 in which any
+ // painting done with a cosmetic pen resulted in a crash.
+
+ // When this is no longer required similar code should also be removed in ViewItemDialog.cpp and
+ // curve.cpp - setLineWidth().
+ if (pen.isCosmetic()) {
+ pen.setWidth(1);
+ }
+#endif
p.setPen(pen);
if (showLines()) {
p.drawLine(1, pix.height()/2, pix.width()-1, pix.height()/2);
--- branches/work/kst/portto4/kst/src/widgets/widgets.pro #967111:967112
@@ -21,7 +21,8 @@
$$TOPLEVELDIR/src/libkstmath \
$$OUTPUT_DIR/src/widgets/tmp
-LIBS += -L$$OUTPUT_DIR/lib -lkst -lkstmath
+win32:LIBS += -L$$OUTPUT_DIR/lib -lkstmath -lkst
+!win32:LIBS += -L$$OUTPUT_DIR/lib -lkst -lkstmath
SOURCES += \
colorbutton.cpp \
--- branches/work/kst/portto4/kst/tests/tests.pro #967111:967112
@@ -18,7 +18,8 @@
$$TOPLEVELDIR/src/libkstapp \
$$OUTPUT_DIR/src/kst/tmp
-LIBS += -lkst -lkstmath -lkstwidgets -lkstapp
+win32:LIBS += -lkstapp -lkstwidgets -lkstmath -lkst
+!win32:LIBS += -lkst -lkstmath -lkstwidgets -lkstapp
SOURCES += \
main.cpp \
More information about the Kst
mailing list