views:

2685

answers:

4

hello the question goes as the title. I was searching a lot through qt forums and google the last couple of days. There is no obvious answer to this question , and maybe not at all.

I found the -prefix (not even documented on windows) option that can be supplied to configure to specify different install directory , but this is not clear separation of the sources and binaries at all, since the build is still done in the source directory and then the files needed for installation are copied to the install directoy. I tried this -prefix option and came to some problems i.e it doesnot copy the .pdb files to the install directory.

then I found this link http://doc.trolltech.com/main-snapshot/shadow-builds-wince.html about doing shadow builds but it has the big limitation that the build dir must be at the same level as the source dir.

Can someone say something about this .

Thanks

A: 

IIRC on Windows, you have to do a sandbox install, you can't do the UNIX-typical "make install".

There are two options usually for building Qt, -prefix-install and -prefix /foo

You pick one, so if -prefix doesn't allow you to type make install, then I guess on Windows you have to use the -prefix-install route, which is a sandboxed install to the directory you extract Qt to.

I'm guessing you didn't try make install? So try that. It should install Qt to a separate directory away from the sources.

Max Howell
A: 

I am not sure that I understand you well.

I don't have any experience in that make install stuf, I am

Windows girl :) .

I'm guessing you didn't try make install? So try that. It should

install Qt to a separate >>directory away from the sources.

Are you saying that after I do configure , I should do nmake install instead just nmake ? I know that nmake will process the generated makefiles from qmake

and will place them in the source qt dir, but what nmake install

will exactly do i.e in which directory will install the files and

how to specify the directory where the files will be installed.

Note that I already do this :

configure -prefix builddir -platform win32-msvc2005 nmake install

The effect of the above two lines was that qt was compiled in the

source dir and not directly to my builddir specified with prefix.

Then the compiled files were copied in my builddir . I was hoping

for something that will build my qt files directly to the build

dir, cause this way I stil need 4 Gb space for my source dir

during the compilation . Also the pdb files were not copied to my

buildir which is another issue.

Can you expplain me a little more clear

Thanks

+1  A: 

Basically, you just have to run configure.exe from your build directory. For example:

mkdir \qt\4.5.2-build
cd \qt\4.5.2-build
set PATH=%cd%\bin;%PATH%
\qt\4.5.2-sources\configure.exe -platform win32-msvc2005

Where sources are in \qt\4.5.2-sources, that would cause the build to go into \qt\4.5.2-build on the current drive.

Also, you must have perl in your PATH, ActiveState Perl is suggested.

I had not previously heard of this limitation where the build and source directories must be at the same level. If you hit this problem you could try working around it by creating a symbolic link (see mklink command).

Intransigent Parsnip
This does not work.The error says that it can't include some .h file
What's the error, and where did you get the sources from?
Intransigent Parsnip
the error is at configure time and it says that it can't include some qscriptengine.h. Also in my try the build directory was not in the same level as the source directory (like in your primer above). Is this relevant?
It sounds like the syncqt script wasn't run. This script generates headers in the build tree pointing back to the source tree.One reason why it mightn't run is if you don't have perl installed and in PATH. I added a comment about perl to my answer.
Intransigent Parsnip
Here is my folder structure :--X --qt --shadowI want to build in shadow :cd C:/X/shadowC:/X/qt/configure.exe -platform win32-msvc2005421904I also have shadow/bin and path to perl.exe in my PATH.And Iam still getting the same error at configure time :c:\x\qt\qmake\project.h(57) : fatal error C1083: Cannot open include file: 'qscriptengine.h': No such file or directory
Also note that I am getting the error when configure tries to build qmake.
I can't believe that there is no support from qmake (or maybe am missing something) to do this i.e to build out of source. It is such a common requirement. How suppose to store my qt library on repository now ? ha
qmake (and configure, and Qt) does support this, I and many others do it all the time.
Intransigent Parsnip
Can you tell me how to do it step by step please. I tried everything I can think of so far. Thank you
A: 

At least the problem with the missing include files (e.g. qscriptengine.h) may by solved by temporary adding \qt\4.5.2-sources\include\Qt to the include path.

A. Saratow