QtDBUS - dealing with DBUS_INSTALL_DIR
Stromek
stromek at realtime.sk
Mon Oct 23 11:12:34 CEST 2006
On Mon, Oct 23, 2006 at 10:38:48AM +0200, Stromek wrote:
> On Mon, Oct 23, 2006 at 10:29:53AM +0200, Jarosław Staniek wrote:
> >
> > In this file
> > http://svn.sourceforge.net/viewvc/*checkout*/windbus/trunk/qt-qdbus-win32.patch
> >
> > I propose to replace
> >
> > DBUS_INSTALL_DIR=c:/Programme/dbus
> >
> > with
> >
> > DBUS_INSTALL_DIR=$(DBUS_INSTALL_DIR)
> > isEmpty(DBUS_INSTALL_DIR) {
> > DBUS_INSTALL_DIR=c:/Programme/dbus
> > }
> >
> > to allow setting DBUS_INSTALL_DIR env. variable.
>
> We were talking about it yesterday. (I think) I cannot commit to windbus
> project but in few minutes I'm going to post this change on this list.
>
> As Peter has suggested, it would be better to have the DBUSDIR variable
> instead of DBUS_INSTALL_DIR. It is similar to QTDIR and requires not
> so much typing :).
>
> My change looks following:
>
> DBUS_INSTALL_DIR=$$(DBUSDIR)
> isEmpty( DBUS_INSTALL_DIR ) {
> message( "DBUSDIR not specified. Using C:\Program Files\dbus" )
> DBUS_INSTALL_DIR = "C:/Program Files/dbus"
> }
>
> My aim was that it should fall to default directory C:\Program
> Files\dbus but then it has to be set during makefile generation.
>
> Maybe "Program Files" should be replaced by $$(PROGRAMFILES) environment
> variable to reflect different windows languages.
So, my change is attached (qt-qdbus-win32.patch - just replace it in
latest check out). If there is
someone with permissions to windbus, please review and commit it. The
following is change I've made:
--- 4.2.0_orig/tools/qdbus/src/src.pro Fri Sep 29 16:39:28 2006
+++ 4.2.0/tools/qdbus/src/src.pro Mon Oct 23 10:47:32 2006
@@ -45,6 +45,14 @@
LIBS += -lws2_32 -ladvapi32 -lnetapi32
CONFIG(debug, debug|release):LIBS += -ldbus-1d
else:LIBS += -ldbus-1
+ DBUS_INSTALL_DIR=$$(DBUSDIR)
+ isEmpty( DBUS_INSTALL_DIR ) {
+ isEmpty( $$(PROGRAMFILES) ):DBUS_INSTALL_DIR = "C:/Program Files/dbus"
+ else:DBUS_INSTALL_DIR = "$$(PROGRAMFILES)/dbus"
+ message( "DBUSDIR not specified. Using $$DBUS_INSTALL_DIR" )
+ }
+ INCLUDEPATH += $$DBUS_INSTALL_DIR/include
+ LIBS += -L\"$$DBUS_INSTALL_DIR/lib\"
}
#load up the headers info
DBUSDIR is read from environment when configuring (creating makefiles).
If it is not set, default is taken (%PROGRAMFILES%). As Windows is very
unpredictable :) and I don't know whether %PROGRAMFILES% is defined also
in those older versions of Windows I've added also check for this case.
Well, as Peter has suggested yesterday, DBUSDIR is similar to QTDIR and
does not need so much typing. Someone with permissions to wiki should
update section with QtDBUS build procedure
(http://www.kdelibs.com/wiki/index.php/QtDBus).
PS: If fall back to default dir is not an intension, at least
%PROGRAMMFILES% variable should be used to handle different languages
in Windows.
--
Stromek
-------------- next part --------------
diff -u -r -N qt-win-opensource-src-4.2.0-snapshot-20060921-orig/demos/dbus-viewer/dbus-viewer.pro demos/dbus-viewer/dbus-viewer.pro
--- qt-win-opensource-src-4.2.0-snapshot-20060921-orig/demos/dbus-viewer/dbus-viewer.pro 2006-09-21 01:24:06.000000000 +0200
+++ demos/dbus-viewer/dbus-viewer.pro 2006-09-21 16:31:04.000000000 +0200
@@ -16,6 +16,8 @@
CONFIG += qdbus
QT += xml
+win32:DESTDIR=../../bin
+
# install
target.path = $$[QT_INSTALL_DEMOS]/dbus-viewer
sources.files = $$SOURCES $$HEADERS *.pro *.html *.doc images
diff -u -r -N qt-win-opensource-src-4.2.0-snapshot-20060921-orig/mkspecs/features/qdbus.prf mkspecs/features/qdbus.prf
--- qt-win-opensource-src-4.2.0-snapshot-20060921-orig/mkspecs/features/qdbus.prf 2006-09-21 01:23:30.000000000 +0200
+++ mkspecs/features/qdbus.prf 2006-09-21 16:31:04.000000000 +0200
@@ -1,6 +1,10 @@
qtAddLibrary(QtDBus)
+win32: !contains(QT, gui):contains(TEMPLATE, app) {
+ CONFIG += console
+}
+
isEmpty(QMAKE_QDBUSXML2CPP) {
win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
diff -u -r -N qt-win-opensource-src-4.2.0-snapshot-20060921-orig/README-qdbus.txt README-qdbus.txt
--- qt-win-opensource-src-4.2.0-snapshot-20060921-orig/README-qdbus.txt 1970-01-01 01:00:00.000000000 +0100
+++ README-qdbus.txt 2006-09-21 16:32:40.000000000 +0200
@@ -0,0 +1,5 @@
+to activate qdbus support add the line
+
+QT_CONFIG = qdbus
+
+to .qmake.cache after configuring and run your make tool
--- 4.2.0_orig/tools/qdbus/src/src.pro Fri Sep 29 16:39:28 2006
+++ 4.2.0/tools/qdbus/src/src.pro Mon Oct 23 10:47:32 2006
@@ -45,6 +45,14 @@
LIBS += -lws2_32 -ladvapi32 -lnetapi32
CONFIG(debug, debug|release):LIBS += -ldbus-1d
else:LIBS += -ldbus-1
+ DBUS_INSTALL_DIR=$$(DBUSDIR)
+ isEmpty( DBUS_INSTALL_DIR ) {
+ isEmpty( $$(PROGRAMFILES) ):DBUS_INSTALL_DIR = "C:/Program Files/dbus"
+ else:DBUS_INSTALL_DIR = "$$(PROGRAMFILES)/dbus"
+ message( "DBUSDIR not specified. Using $$DBUS_INSTALL_DIR" )
+ }
+ INCLUDEPATH += $$DBUS_INSTALL_DIR/include
+ LIBS += -L\"$$DBUS_INSTALL_DIR/lib\"
}
#load up the headers info
diff -u -r -N qt-win-opensource-src-4.2.0-snapshot-20060921-orig/tools/tools.pro tools/tools.pro
--- qt-win-opensource-src-4.2.0-snapshot-20060921-orig/tools/tools.pro 2006-09-21 01:24:00.000000000 +0200
+++ tools/tools.pro 2006-09-21 16:33:26.000000000 +0200
@@ -2,7 +2,7 @@
no-png {
message("Tools not available without PNG support")
} else {
- unix:contains(QT_CONFIG, qdbus):SUBDIRS += qdbus
+ contains(QT_CONFIG, qdbus):SUBDIRS += qdbus
SUBDIRS += assistant/lib \
assistant \
porting \
--- qt-win-opensource-src-4.2.0-snapshot-20060921-orig/tools/qdbus/tools/qdbus/qdbus.pro 2006-09-29 16:39:38.000000000 +0200
+++ tools/qdbus/tools/qdbus/qdbus.pro 2006-10-08 21:55:12.000000000 +0200
@@ -1,7 +1,7 @@
SOURCES = qdbus.cpp
DESTDIR = ../../../../bin
TARGET = qdbus
-QT = core
+QT = core xml
CONFIG += qdbus
CONFIG -= app_bundle
More information about the Kde-windows
mailing list