Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How can I use relative paths for "Build Directory" under Qt Creator Mac OS X
QtWS25 Last Chance

How can I use relative paths for "Build Directory" under Qt Creator Mac OS X

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 4 Posters 16.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dancingbeartech
    wrote on last edited by
    #1

    Hi all,

    Have the following issue under Qt Creator Mac OS X 2.0.1 with SDK 4.7.1.

    Under the "Projects" tab, for all of the configurations, there's a "Build directory" field. I want the following directory structure under my home directory:

    /home
    /home/Development
    /home/Development/src
    /home/Development/shadow

    If I put an absolute path in like:

    /home/Development/shadow

    it works for me. However, if I were to use a relative path like:

    ../shadow

    for a project from /home/Development/src, the build winds up in /Developer/Applications/Qt/shadow

    What am I missing here? Is there an environment variable I haven't set yet?

    Thanks in advance.

    Andrew

    1 Reply Last reply
    0
    • D Offline
      D Offline
      diegosarmentero
      wrote on last edited by
      #2

      I think you should work with Qt Resources:
      http://doc.qt.nokia.com/4.7/resources.html

      and you are not going to have any more problems about absolut or relative paths.
      It's something really useful.

      Diego Sarmentero
      Blog: http://diegosarmentero.com.ar
      Twitter: http://twitter.com/diegosarmentero

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        [quote author="diegosarmentero" date="1298046196"]I think you should work with Qt Resources:
        http://doc.qt.nokia.com/4.7/resources.html

        and you are not going to have any more problems about absolut or relative paths.
        It's something really useful.[/quote]

        Qt resources are absolutely unrelated to shadow builds.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          There is a variable for the source directory. You should be able to use that to "anchor" to it and go to some other place relative to it.

          Please check the documentation for a list of available variables.

          IIRC you need 2.1 for this to work... it is available on our ftp site.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dancingbeartech
            wrote on last edited by
            #5

            Tobias, am I looking for this in the QMake reference, or somewhere else?

            Can anyone else point me in the correction direction? Using something like ../shadow works on Windows, but on Mac, it goes to somewhere I don't expect or want.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dancingbeartech
              wrote on last edited by
              #6

              Just to add one thought, this is for the *.pro.user files, not the *.pro files.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tobias.hunger
                wrote on last edited by
                #7

                I was actually referring to the Qt Creator manual:-)

                Feel free to file "a bugreport":http://bugreports.qt.nokia.com/ if this works differently on windows and mac.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dancingbeartech
                  wrote on last edited by
                  #8

                  Have it working correctly now. As you suggested previously, I downloaded Qt Creator 2.1 now that it is officially released and it handles this case correctly.

                  The key is the SOURCEDIR variable. By using this, I can have the relative path

                  $SOURCEDIR/../shadow

                  and it works correctly on Mac.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved