Re: [Qt-creator] How to modify output-directory of exe or how to set a working directory?

2010-12-04 Thread Coda Highland
 Then there's the | symbol.  In this context, is it a separator for strings
 or a logical or?  Assuming CONFIG contains either debug or release, how is
 CONFIG(debug, debug|release) different from CONFIG(debug)?

CONFIG(debug) returns true if the CONFIG variable contains debug.

CONFIG(debug, debug|release) returns true if, out of the
mutually-exclusive set of debug and release, the last value set
was debug.

So for CONFIG = debug release, CONFIG(debug) returns true but
CONFIG(debug, debug|release) returns false.

/s/ Adam

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


[Qt-creator] How to modify output-directory of exe or how to set a working directory?

2010-12-03 Thread Jens Saathoff
Hi!

I'm using QTCreator 2.0.1 with Qt 4.7 on a Windows 7 64-Bit Machine. I
want to set a working directory, but if i try to access files that are
inside the working-dir it doesn't work because the exe is in
MyProject-build-desktop.
Is it possible to get the exe output to a directory of choice or how
to set the working-directory so that the currentPath() of my exe is
in myfolder ?

Sorry, i'm very new to Qt and QtCreator.

Thank you very much!

Jens Saathoff
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] How to modify output-directory of exe or how to set a working directory?

2010-12-03 Thread Carlos Smith
Hi,

Well, the way we are doing it is, in the Project settings, build tab, we turn 
off Shadow build:, then it appears to respect the paths in the .pro files, as 
so:


Release:LIBS += ../../../../build/lib/release/libCustomWidgetLib.a
Release:DESTDIR = ../../../../build/bin/release
Release:OBJECTS_DIR = ../../../../build/bin/release/.obj/$$TARGET
Release:MOC_DIR = ../../../../build/bin/release/.moc/$$TARGET
Release:RCC_DIR = ../../../../build/bin/release/.rcc/$$TARGET
Release:UI_DIR = ../../../../build/bin/release/.ui/$$TARGET

Debug:LIBS += ../../../../build/lib/debug/libCustomWidgetLib.a
Debug:DESTDIR = ../../../../build/bin/debug
Debug:OBJECTS_DIR = ../../../../build/bin/debug/.obj/$$TARGET
Debug:MOC_DIR = ../../../../build/bin/debug/.moc/$$TARGET
Debug:RCC_DIR = ../../../../build/bin/debug/.rcc/$$TARGET
Debug:UI_DIR = ../../../../build/bin/debug/.ui/$$TARGET

We add these ourselves, they don't come from the project wizard, but qmake 
seems to respect them.  Of course you change them to wherever you want your 
build, libs etc.

Then, back in the Project settings, now go to the Run Settings tab, and you 
have to tell it to run the executable from the target build directory you set 
up above.  So we add a new Run Configuration and set the executable and working 
directory paths to where we want them.  Then we delete the old, default one 
that pointed to the wrong location, since you can't edit it to set its 
executable path.

I hope this helps a little.

Carlos

Carlos Smith
Principal Software Engineer
Stonewedge Corporation



-Original Message-
From: qt-creator-boun...@trolltech.com 
[mailto:qt-creator-boun...@trolltech.com] On Behalf Of Jens Saathoff
Sent: Friday, December 03, 2010 12:03 PM
To: qt-creator@trolltech.com
Subject: [Qt-creator] How to modify output-directory of exe or how to set a 
working directory?

Hi!

I'm using QTCreator 2.0.1 with Qt 4.7 on a Windows 7 64-Bit Machine. I want to 
set a working directory, but if i try to access files that are inside the 
working-dir it doesn't work because the exe is in MyProject-build-desktop.
Is it possible to get the exe output to a directory of choice or how to set the 
working-directory so that the currentPath() of my exe is in myfolder ?

Sorry, i'm very new to Qt and QtCreator.

Thank you very much!

Jens Saathoff
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator

This electronic message is intended only for the use of the individual or 
entity named above and may contain information which is privileged and/or 
confidential. If you are not the intended recipient, be aware that any 
disclosure, copying, distribution, dissemination or use of the contents of this 
message is prohibited. If you have received this message in error, please 
notify the sender immediately.

This electronic message is intended only for the use of the individual or 
entity named above and may contain information which is privileged and/or 
confidential. If you are not the intended recipient, be aware that any 
disclosure, copying, distribution, dissemination or use of the contents of this 
message is prohibited. If you have received this message in error, please 
notify the sender immediately.

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] How to modify output-directory of exe or how to set a working directory?

2010-12-03 Thread Bob Babcock
Andre Poenitz andre.poen...@mathematik.tu-chemnitz.de wrote in 
news:idbpm0$b7...@eple.troll.no:

 That's not the right way to make variable assignments depend on 'debug'
 or 'release', see http://doc.qt.nokia.com/4.7/qmake-common-projects.html
 
 It's something like
 
  CONFIG(debug, debug|release) {
  TARGET = debug_binary
  } else {
  TARGET = release_binary
  }

I keep reading the documentation for the CONFIG function and not 
understanding it.  My confusion starts with the two statements:

(1) CONFIG variable values:
release   The project is to be built in release mode. This is ignored if 
debug is also specified.

(2) CONFIG(config) function:
As the order of values is important in CONFIG variables (i.e. the last one 
set will be considered the active config for mutually exclusive values)...

So if I say
  CONFIG = debug release
is release ignored or is it the active config?

Then there's the | symbol.  In this context, is it a separator for strings 
or a logical or?  Assuming CONFIG contains either debug or release, how is 
CONFIG(debug, debug|release) different from CONFIG(debug)?
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator