Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28

Thread: QT minimum build to start developing

  1. #21
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: QT minimum build to start developing

    Quote Originally Posted by wysota View Post
    It doesn't work. It still points to the original path.
    bash Code:
    1. echo "Prefix=/opt/" >> /tmp/bin/qt.conf
    To copy to clipboard, switch view to plain text mode 
    You must write

    bash Code:
    1. echo "Prefix=/tmp" >> /tmp/bin/qt.conf
    To copy to clipboard, switch view to plain text mode 

    Not "/opt/"

    I don't try this on non windows machine. I think on your OS you also need modify PATH variable for founding correct qmake. It from my batch script on windows:

    bash Code:
    1. set QTDIR=D:\Work\qt-all-opensource-src-4.5.2_gcc440
    2. set PATH=%QTDIR%/bin
    To copy to clipboard, switch view to plain text mode 

    So, i know what qmake has been called from QTDIR/bin path.
    Last edited by SABROG; 10th September 2009 at 07:50.

  2. #22
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing

    Quote Originally Posted by SABROG View Post
    You must write

    bash Code:
    1. echo "Prefix=/tmp" >> /tmp/bin/qt.conf
    To copy to clipboard, switch view to plain text mode 

    Not "/opt/"
    Why?


    I don't try this on non windows machine. I think on your OS you also need modify PATH variable for founding correct qmake.
    I called qmake by its full path, so the proper path is used.

    Somehow I think we are talking about two different things And I insist that it's not possible to move the full installation to another path and have everything work just by using qt.conf.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #23
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: QT minimum build to start developing

    Quote Originally Posted by wysota View Post
    Why?
    I don't know, ask trolls

    Quote Originally Posted by wysota View Post
    I called qmake by its full path, so the proper path is used.
    Somehow I think we are talking about two different things And I insist that it's not possible to move the full installation to another path and have everything work just by using qt.conf.
    I think this is possible, if read this:

    Without qt.conf, the Qt libraries will use the hard-coded paths to look for plugins, translations, and so on. These paths may not exist on the target system, or they may not be accesssible. Because of this, you need qt.conf to make the Qt libraries look elsewhere.
    This about user programs, but this must also work on Qt tools. On windows this work, i dont have possibility test this on other OS's.

  4. #24
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing

    Quote Originally Posted by SABROG View Post
    I think this is possible, if read this:
    The word "qmake" is not there anywhere. When I look at qmake docs, the only reference to qt.conf is a function that is never called.

    This about user programs, but this must also work on Qt tools. On windows this work, i dont have possibility test this on other OS's.
    Ok, install Qt to C:\Qt, move it to C:\Qtxxx, copy some example's sources to a random place on your disk, make distclean, C:\Qtxxx\bin\qmake, compile it and run it. Does it work?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #25
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: QT minimum build to start developing

    Quote Originally Posted by wysota View Post
    Ok, install Qt to C:\Qt, move it to C:\Qtxxx, copy some example's sources to a random place on your disk, make distclean, C:\Qtxxx\bin\qmake, compile it and run it. Does it work?
    I do this steps:
    - rename c:\SABROG\qt-all-opensource-src-4.5.2\ to c:\SABROG\_qt-all-opensource-src-4.5.2\
    - create qt.conf file in c:\SABROG\_qt-all-opensource-src-4.5.2\bin with this content:

    bash Code:
    1. [Paths]
    2. Prefix = c:\SABROG\_qt-all-opensource-src-4.5.2
    To copy to clipboard, switch view to plain text mode 
    - create .bat file with this content

    bash Code:
    1. @echo off
    2. set LIB=
    3. set INCLUDE=
    4. set QTDIR=c:\SABROG\_qt-all-opensource-src-4.5.2
    5. set PATH=%QTDIR%\bin
    6. set PATH=%PATH%;c:\mingw\bin;c:\perl\bin;c:\cmake\bin
    7. set PATH=%PATH%;%SystemRoot%\System32;c:\gdb\bin;c:\Vim\vim72;%CMAKE%;%CMAKE%\bin
    8. set QMAKESPEC=win32-g++
    9. cmd
    To copy to clipboard, switch view to plain text mode 
    - run new .bat file
    >cd d:\work\testproject /D
    >mingw32-make clean
    >qmake
    >mingw32-make release
    >release\testproject.exe

    All compiling and run, whats different?

  6. #26
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing

    What happens if you remove QTDIR\bin from PATH and call qmake by its full path? Also run make distclean, not make clean. Please also report the output of qmake -query.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #27
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: QT minimum build to start developing

    All works fine. I call mingw32-make distclean on testproject, then i call qmake:

    bash Code:
    1. D:\Work\RotatedLabel\examples>D:\Work\_qt-all-opensource-src-4.5.2_gcc440\bin\qmake
    To copy to clipboard, switch view to plain text mode 

    next just call mingw32-make release and try run program. Of course she dont run, becouse not found Qt dll's who placed in QTDIR/bin dir, but variable PATH dont have this path.

    And as you ask qmake -query:

    bash Code:
    1. D:\Work\RotatedLabel\examples>D:\Work\_qt-all-opensource-src-4.5.2_gcc440\bin\qm
    2. ake -query
    3. QT_INSTALL_PREFIX:D:/Work/_qt-all-opensource-src-4.5.2_gcc440
    4. QT_INSTALL_DATA:D:/Work/_qt-all-opensource-src-4.5.2_gcc440
    5. QT_INSTALL_DOCS:D:/Work/_qt-all-opensource-src-4.5.2_gcc440/doc
    6. QT_INSTALL_HEADERS:D:/Work/_qt-all-opensource-src-4.5.2_gcc440/include
    7. QT_INSTALL_LIBS:D:/Work/_qt-all-opensource-src-4.5.2_gcc440/lib
    8. QT_INSTALL_BINS:D:/Work/_qt-all-opensource-src-4.5.2_gcc440/bin
    9. QT_INSTALL_PLUGINS:D:/Work/_qt-all-opensource-src-4.5.2_gcc440/plugins
    10. QT_INSTALL_TRANSLATIONS:D:/Work/_qt-all-opensource-src-4.5.2_gcc440/translations
    11.  
    12. QT_INSTALL_CONFIGURATION:D:/Work/_qt-all-opensource-src-4.5.2_gcc440
    13. QT_INSTALL_EXAMPLES:D:/Work/_qt-all-opensource-src-4.5.2_gcc440
    14. QT_INSTALL_DEMOS:D:/Work/_qt-all-opensource-src-4.5.2_gcc440
    15. QMAKE_MKSPECS:D:/Work/_qt-all-opensource-src-4.5.2_gcc440\mkspecs
    16. QMAKE_VERSION:2.01a
    17. QT_VERSION:4.5.2
    To copy to clipboard, switch view to plain text mode 

    But original Qt path D:/Work/qt-all-opensource-src-4.5.2_gcc440

    qmake uses QLibraryInfo class. This class found qt.conf on dir where placed program, so when qmake call QLibraryInfo::location() he return new path getting from qt.conf:

    Qt Code:
    1. if(v == "QT_INSTALL_PREFIX")
    2. return QLibraryInfo::location(QLibraryInfo::PrefixPath);
    To copy to clipboard, switch view to plain text mode 
    Last edited by SABROG; 10th September 2009 at 19:30.

  8. #28
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing

    Hmm... seems that you're right. I'll check that out myself when I find some time.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Build error on mac Platform::WaitMouseMoved
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 14:18

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.