Qt-interest Archive, January 2008
Multiple development environments: How To on Mac and Windows ?
Pages: Prev | 1 | 2 | Next
Message 1 in thread
On a Unix/Linux box, QTDIR drives everything. Change it and you can
change which Qt version you are using.
I want to do that on both a Mac and a Windows-XP machine.
How, please ?
--
[ signature omitted ]
Message 2 in thread
On Jan 12, 2008 6:32 PM, Dan White <ygor@xxxxxxxxxxx> wrote:
> On a Unix/Linux box, QTDIR drives everything. Change it and you can
> change which Qt version you are using.
>
> I want to do that on both a Mac and a Windows-XP machine.
I'm not sure what you are into here, I develop on Linux, Mac and
Windows. On Linux and Mac I simply use the qmake from the Qt-version I
like together with .pro and .pri files.
On Windows I use Visual Studio during development and make the release
binaries using qmake with again with the same .pro/.pri files.
And yes, I have four checkouts from the source repository, one for
each release (3) and for Visual Studio.
--
[ signature omitted ]
Message 3 in thread
Thanks for the reply.
I think I see what you mean. I looked in the Qt source and found
various .pri files, but I can find no documentation about them.
I looked under qmake and found nothing.
"What I am into" is doing some small applications with a single
source code base that I can build on any platform with an appropriate
Qt library installed. Sounds very similar to what you are doing,
Robin. Difference being I am on a Mac, using Xcode and MinGW on a
virtual-XP.
You say, "I simply use the qmake from the Qt-version I like"
That sounds like you use a full path name (/foo/bar/Qt-version-x-dot-
y/qmake) when you invoke qmake. Is that the case ?
Any other pointers ?
On Jan 12, 2008, at 2:15 PM, Robin Helgelin wrote:
> On Jan 12, 2008 6:32 PM, Dan White <ygor@xxxxxxxxxxx> wrote:
>> On a Unix/Linux box, QTDIR drives everything. Change it and you can
>> change which Qt version you are using.
>>
>> I want to do that on both a Mac and a Windows-XP machine.
>
> I'm not sure what you are into here, I develop on Linux, Mac and
> Windows. On Linux and Mac I simply use the qmake from the Qt-version I
> like together with .pro and .pri files.
>
> On Windows I use Visual Studio during development and make the release
> binaries using qmake with again with the same .pro/.pri files.
>
> And yes, I have four checkouts from the source repository, one for
> each release (3) and for Visual Studio.
>
> --
> regards,
> Robin
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]
Message 4 in thread
I found the answer to one question: a .pri file is a file "included"
into a .pro file. I understand it is a naming convention.
But I am still confused as to what to put in the files.
Robin, would you be willing to share an example of .pro/.pri file
contents for building on different platforms ?
Thanks.
On Jan 12, 2008, at 3:05 PM, Dan White wrote:
> Thanks for the reply.
>
> I think I see what you mean. I looked in the Qt source and found
> various .pri files, but I can find no documentation about them.
>
> I looked under qmake and found nothing.
>
> "What I am into" is doing some small applications with a single
> source code base that I can build on any platform with an
> appropriate Qt library installed. Sounds very similar to what you
> are doing, Robin. Difference being I am on a Mac, using Xcode and
> MinGW on a virtual-XP.
>
> You say, "I simply use the qmake from the Qt-version I like"
> That sounds like you use a full path name (/foo/bar/Qt-version-x-
> dot-y/qmake) when you invoke qmake. Is that the case ?
>
> Any other pointers ?
>
> On Jan 12, 2008, at 2:15 PM, Robin Helgelin wrote:
>
>> On Jan 12, 2008 6:32 PM, Dan White <ygor@xxxxxxxxxxx> wrote:
>>> On a Unix/Linux box, QTDIR drives everything. Change it and you can
>>> change which Qt version you are using.
>>>
>>> I want to do that on both a Mac and a Windows-XP machine.
>>
>> I'm not sure what you are into here, I develop on Linux, Mac and
>> Windows. On Linux and Mac I simply use the qmake from the Qt-
>> version I
>> like together with .pro and .pri files.
>>
>> On Windows I use Visual Studio during development and make the
>> release
>> binaries using qmake with again with the same .pro/.pri files.
>>
>> And yes, I have four checkouts from the source repository, one for
>> each release (3) and for Visual Studio.
>>
>> --
>> regards,
>> Robin
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
>> with "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]
Message 5 in thread
On Jan 12, 2008 9:27 PM, Dan White <ygor@xxxxxxxxxxx> wrote:
> I found the answer to one question: a .pri file is a file "included"
> into a .pro file. I understand it is a naming convention.
>
> But I am still confused as to what to put in the files.
>
> Robin, would you be willing to share an example of .pro/.pri file
> contents for building on different platforms ?
Sure. In the .pro-file I keep all but the source references. There are
a few cases in the code where we have platform dependant code, but
those after ifed with #ifdef Q_OS_MAC, etc.
""" test.pro
TEMPLATE = app
QT += gui
...
include( test.pri )
"""
""" test.pri
HEADERS += testapp.h
SOURCES += testapp.cpp
FORMS += testapp.ui
"""
Linux:
/path/to/qmake; make
On mac I still use gcc, even though you need to install xcode, as I do
primary development on Windows
/path/to/qmake -spec macx-g++; make, however, xcodebuild would to the same trick
Windows:
c:\path\to\qmake.exe
nmake // guess you need to tweak with mingw
--
[ signature omitted ]
Message 6 in thread
On 12.01.08 15:27:35, Dan White wrote:
> I found the answer to one question: a .pri file is a file "included" into a
> .pro file. I understand it is a naming convention.
>
> But I am still confused as to what to put in the files.
Check the QMake manual, you put information how to build your project.
For simpler apps you don't need anything besides telling Qt which
modules to use (via the QT variable) and what the source,header,form
files of your project are. (eventually some subdir projects).
In larger projects you might need special treatment for different
platforms, which is available with some config stuff like:
win32 : EXTRA_LIB = "winlib"
macos : EXTRA_LIB = "maclib"
Andreas
--
[ signature omitted ]
Message 7 in thread
you are missing the point.
I want to have an installation of Qt 4.3 and an installation of Qt
4.4 on the same machine and I want to be able to use either one at my
choice.
I know how to do this on a Linux/Unix machine. How do I do it on a
Windows Xp box with MinGW and on an Apple Macintosh using GCC/Xcode ?
On Jan 12, 2008, at 7:49 PM, Andreas Pakulat wrote:
> On 12.01.08 15:27:35, Dan White wrote:
>> I found the answer to one question: a .pri file is a file
>> "included" into a
>> .pro file. I understand it is a naming convention.
>>
>> But I am still confused as to what to put in the files.
>
> Check the QMake manual, you put information how to build your project.
> For simpler apps you don't need anything besides telling Qt which
> modules to use (via the QT variable) and what the source,header,form
> files of your project are. (eventually some subdir projects).
>
> In larger projects you might need special treatment for different
> platforms, which is available with some config stuff like:
> win32 : EXTRA_LIB = "winlib"
> macos : EXTRA_LIB = "maclib"
>
> Andreas
>
> --
> You will be audited by the Internal Revenue Service.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]
Message 8 in thread
Dan White wrote:
> I want to have an installation of Qt 4.3 and an installation of Qt 4.4
> on the same machine and I want to be able to use either one at my choice.
This is easy on Windows. To switch Qt installations, the procedure is
exactly the same as it is on Linux. To use Qt 4.3, do this:
set QTDIR to C:\Qt\4.3.3
set PATH to %QTDIR%\bin;%PATH%
qmake
make clean
make
Now switch to Qt 4.4, do the same thing but replace "c:\Qt\4.3.3" with
the directory of your Qt 4.4 installation. Easy!
--Dave
--
[ signature omitted ]
Message 9 in thread
Yes, but the UI sucks. You are better off just setting it on the command
line. Each Qt installation comes with a .bat file you can run that sets
up the environment correctly for that version of Qt.
--Dave
Dan White wrote:
> Thanks for the useful response
> I'm mainly a Mac / Unix person.
> Is there a settings file or control panel for environment settings
> like this ?
>
>
> On Jan 12, 2008, at 10:44 PM, Dave Smith wrote:
>
>> Dan White wrote:
>>> I want to have an installation of Qt 4.3 and an installation of Qt
>>> 4.4 on the same machine and I want to be able to use either one at
>>> my choice.
>>
>> This is easy on Windows. To switch Qt installations, the procedure is
>> exactly the same as it is on Linux. To use Qt 4.3, do this:
>>
>> set QTDIR to C:\Qt\4.3.3
>> set PATH to %QTDIR%\bin;%PATH%
>> qmake
>> make clean
>> make
>>
>> Now switch to Qt 4.4, do the same thing but replace "c:\Qt\4.3.3"
>> with the directory of your Qt 4.4 installation. Easy!
>>
>> --Dave
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
>> with "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>
--
[ signature omitted ]
Message 10 in thread
On 12.01.08 20:21:01, Dan White wrote:
> you are missing the point.
I don't think so, I specifically answered your question, what exactly to
put into .pri files (which is the same stuff that you put into .pro
files)
> I want to have an installation of Qt 4.3 and an installation of Qt 4.4 on
> the same machine and I want to be able to use either one at my choice.
That has already explained, just use 2 source dirs and run the "right"
qmake in each of them.
But if you want to use the same source dir, you have to look through the
QMake manual, how to separate the output folders for files such as .o,
.moc, .h from forms, and so on. And you can probably get the Qt version
inside a qmake project file and just append it to the different output
folders so you'll get something like
src/.obj-4.4
src/.obj-4.3
src/.moc-4.4
...
Also you're going to have to change the Makefile name and append the
version number, so when you want to build you just do a make -f
Makefile.4.4 or make -f Makefile.4.3 depending on which version of Qt
you want to build with.
> I know how to do this on a Linux/Unix machine. How do I do it on a Windows
> Xp box with MinGW and on an Apple Macintosh using GCC/Xcode ?
Why do you think this would be different on other OS'es? Thats the whole
point of using a portable buildsystem like qmake, to have the same
procedure on each platform.
Andreas
--
[ signature omitted ]
Message 11 in thread
"Dan White" <ygor@xxxxxxxxxxx> wrote in message
news:E25F3032-9A0E-4FDD-A0FE-1B02A29A8D7E@xxxxxxxxxxxxxx
> On a Unix/Linux box, QTDIR drives everything. Change it and you can
> change which Qt version you are using.
>
> I want to do that on both a Mac and a Windows-XP machine.
>
> How, please ?
With windows, if you use the Qt Integration with Visual Studio, QtDir is set
by the IDE when you switch Qt versions. This is done on a project or
solution
basis. I currently have two build sets VS2003 with Qt4.3.1 or Qt4.3.2 and
VS2005 with Qt 4.3.3.
I have no QTDIR setting in my environment variables. I just installed the
Qt versions that
I wanted with the compiler that I wanted. This seems to work fairly
well.
If you don't use the integration package, I imagine that you just set QTDIR
in
your environment. ISTR that that's what we were doing with Qt3.
--
[ signature omitted ]
Message 12 in thread
I guess I should mention I am using MinGW in my XP environment
On Jan 12, 2008, at 7:08 PM, Duane Hebert wrote:
>
> "Dan White" <ygor@xxxxxxxxxxx> wrote in message
> news:E25F3032-9A0E-4FDD-A0FE-1B02A29A8D7E@xxxxxxxxxxxxxx
>> On a Unix/Linux box, QTDIR drives everything. Change it and you can
>> change which Qt version you are using.
>>
>> I want to do that on both a Mac and a Windows-XP machine.
>>
>> How, please ?
>
> With windows, if you use the Qt Integration with Visual Studio,
> QtDir is set
> by the IDE when you switch Qt versions. This is done on a project or
> solution
> basis. I currently have two build sets VS2003 with Qt4.3.1 or
> Qt4.3.2 and
> VS2005 with Qt 4.3.3.
> I have no QTDIR setting in my environment variables. I just
> installed the
> Qt versions that
> I wanted with the compiler that I wanted. This seems to work fairly
> well.
>
> If you don't use the integration package, I imagine that you just
> set QTDIR
> in
> your environment. ISTR that that's what we were doing with Qt3.
>
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]
Message 13 in thread
Hi,
> On a Unix/Linux box, QTDIR drives everything. Change it and you can
> change which Qt version you are using.
That's not true anymore in Qt 4.
Even in Qt 3, QTDIR had been slowly phased out.
--
[ signature omitted ]
Message 14 in thread
Dimitri wrote:
>> On a Unix/Linux box, QTDIR drives everything. Change it and you can
>> change which Qt version you are using.
>
> That's not true anymore in Qt 4. Even in Qt 3, QTDIR had been slowly
> phased out.
Does qmake just know where it is located, and then generate the
appropriate paths in its Makefiles?
--Dave
--
[ signature omitted ]
Message 15 in thread
On 14.01.08 14:56:33, Dave Smith wrote:
> Dimitri wrote:
>>> On a Unix/Linux box, QTDIR drives everything. Change it and you can
>>> change which Qt version you are using.
>>
>> That's not true anymore in Qt 4. Even in Qt 3, QTDIR had been slowly
>> phased out.
>
> Does qmake just know where it is located, and then generate the appropriate
> paths in its Makefiles?
In Qt4.x yes. Qt3 qmake honors the QTDIR variable.
Andreas
--
[ signature omitted ]
Pages: Prev | 1 | 2 | Next