Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, December 2007
Re: Windows commandline access to create .pro files


Message 1 in thread

On Friday 30 November 2007 02:27:42 pm Mike Broida wrote:
> But that's -not- sufficient to build the project.
[snip]

> qmake can't figure out cross-project dependencies on Windows, I guess?

Right. It simply looks at the current directory and subdirectories for files 
that should be included in the project.  It doesn't have any knowledge of 
solutions or possible other dependencies.

Note, you can include things manually via the command line if you want:

$ qmake -project -after 'INCLUDEPATH += $(SolutionDir)AgentLib \
./GeneratedFiles/Debug
LIBS += -L"$(SolutionDir)$(ConfigurationName)" \
-lAgentLib
DEPENDPATH += .
MOC_DIR += ./GeneratedFiles/debug
OBJECTS_DIR += debug
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFiles'

$ cat qundo1.pro
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

# Input
SOURCES += qte.cpp
INCLUDEPATH += $(SolutionDir)AgentLib \
./GeneratedFiles/Debug
LIBS += -L"$(SolutionDir)$(ConfigurationName)" \
-lAgentLib
DEPENDPATH += .
MOC_DIR += ./GeneratedFiles/debug
OBJECTS_DIR += debug
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFiles

It might not be convenient, but it might get you closer to what you need.

--Kaleb

> When I say "project" above, I'm using the VisualStudio terminology: a  
> Project produces one executable or library, a Solution contains one or  
> more Projects.  From the source-control viewpoint, we have one "project  
> directory" containing several VS Solutions which each contain several VS  
> Projects.
>
>         Mike


--
 [ signature omitted ] 

Message 2 in thread

Yeah,
I thought about the -after switch, but the exact info (QT, DEFINES,  
CONFIG, and INCLUDEPATH mostly) changes from one project to another, and  
I'd like to keep this script as project-independent as I can.

I'll just make my developers use the VS2005+QtIntegration GUI to create  
the initial .pro/.pri files, and let the script start with those files.   
It's not as dumb-proof as I hoped, but they really aren't dumb, either.   
:)  :)  It should work fine.

Thanks for your inputs!   :)
	Mike

On Fri, 30 Nov 2007 17:33:51 -0600, Kaleb Pederson <KalebP@xxxxxxxxxxxxx>  
wrote:

> On Friday 30 November 2007 02:27:42 pm Mike Broida wrote:
>> But that's -not- sufficient to build the project.
> [snip]
>
>> qmake can't figure out cross-project dependencies on Windows, I guess?
>
> Right. It simply looks at the current directory and subdirectories for  
> files
> that should be included in the project.  It doesn't have any knowledge of
> solutions or possible other dependencies.
>
> Note, you can include things manually via the command line if you want:
>
> $ qmake -project -after 'INCLUDEPATH += $(SolutionDir)AgentLib \
> ./GeneratedFiles/Debug
> LIBS += -L"$(SolutionDir)$(ConfigurationName)" \
> -lAgentLib
> DEPENDPATH += .
> MOC_DIR += ./GeneratedFiles/debug
> OBJECTS_DIR += debug
> UI_DIR += ./GeneratedFiles
> RCC_DIR += ./GeneratedFiles'
>
> $ cat qundo1.pro
> TEMPLATE = app
> TARGET =
> DEPENDPATH += .
> INCLUDEPATH += .
>
> # Input
> SOURCES += qte.cpp
> INCLUDEPATH += $(SolutionDir)AgentLib \
> ./GeneratedFiles/Debug
> LIBS += -L"$(SolutionDir)$(ConfigurationName)" \
> -lAgentLib
> DEPENDPATH += .
> MOC_DIR += ./GeneratedFiles/debug
> OBJECTS_DIR += debug
> UI_DIR += ./GeneratedFiles
> RCC_DIR += ./GeneratedFiles
>
> It might not be convenient, but it might get you closer to what you need.
>
> --Kaleb
>
>> When I say "project" above, I'm using the VisualStudio terminology: a  
>> Project produces one executable or library, a Solution contains one or  
>> more Projects.  From the source-control viewpoint, we have one "project  
>>  
>> directory" containing several VS Solutions which each contain several  
>> VS  
>> Projects.
>>
>>         Mike
>
>
> --
> 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 3 in thread

Hi Mike, 

The project I'm using similarly develops on windows, then rebuilds on mac.
But it does the reverse to you to avoid your problems. We start with the
.pro file. It includes conditionals for win32 and mac. Whenever we change
the .pro, we then recreate the .vcproj - at the moment manually. 

The only downside is that recreating the project forces VS to rebuild all of
the intermediates. 

The upside is that we don't need to convert .vcproj to .pro, then perl edit
for mac, etc. 

Attached is an example with platform conditionals for our own components. 

Hope that helps

Tony Rietwyk. 

> -----Original Message-----
> From: Mike Broida [mailto:michaelb@xxxxxxxxxxxxxxxx] 
> Sent: Saturday, 1 December 2007 08:31
> To: qt-interest@xxxxxxxxxxxxx
> Subject: Windows commandline access to create .pro files
> 
> 
> Hi!
> On Windows XP Pro with Visual Studio working C++.
> Using Qt 4.3.2 and Qt Visual Studio Integration 1.3.2.
> 
> Is there a Windows commandline (command prompt) tool in Qt or Qt VS  
> Integration to duplicate the VS "Qt" menu's "Create Basic .pro File"  
> command??  I have been unable to determine what is executed 
> when I make  
> that menu selection.
> 
> I would really like to be able to create the .pro/.pri files from a  
> Windows batch file.  That same batch file would then run my  
> (project-specific) Perl script to modify the .pro/.pri files 
> for use on  
> Mac/Unix/etc.
> 
> Please respond if you know of such a Qt tool or command 
> (probably part of  
> Qt Visual Studio Integration) I can use from the Windows 
> commandline, or  
> if you are positive there is no such tool.  :)
> 
> 	Thanks!
>               Mike
> 
> --
> 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/
> 
> 

Attachment:

Attachment: Test.pro
Description: Binary data