Results 1 to 3 of 3

Thread: Running QT from the command line - qmake to run

  1. #1
    Join Date
    Oct 2009
    Posts
    19
    Thanks
    2

    Default Running QT from the command line - qmake to run

    I'm putting together an install manual for our teams project. While it's not a big deal for us to open QT, run qmake and build the project we're trying to automate that for the end user.

    One of the steps is just that; to build a project in QT and retreive the .dll that is generated and deposit into our main projects lib folder.

    My intent would be to automate the entire process of opening QT, running qmake and building (I'm curious to do RUN too).

    Right now I have a bat file that runs qmake command line and then launches QT. Can I 'remote control drive' QT still from the command line completely. Best would be to build the project through these steps without ever opening the environment. Is that possible?

    To finish my bat file would end by copying that generated file and moving it into my main projects lib file. Hands off for the user from start to finish. thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Running QT from the command line - qmake to run

    You're using a computer, so any automation goes, it only depends how.

    To be more specific, what do you want to control?
    You can add a lot of system checks in your .pro files.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Running QT from the command line - qmake to run

    By "launches QT" are we to assume that you mean "launch Qt Creator"? In that case, why do you need to involve Qt Creator at all? Simple Windows command file:
    Qt Code:
    1. @echo OFF
    2. CALL C:\Qt\2010.02.1\bin\qtenv.bat
    3. CD /D D:\path\to\MyProject\
    4. qmake
    5. mingw32-make
    6. COPY MyProject.DLL Q:\path\to\deployed\location\
    7.  
    8. REM commands to execute the deployed application or unit tests
    To copy to clipboard, switch view to plain text mode 
    Path adjustments, error trapping etc. are left as an exercise.

Similar Threads

  1. qmake: how to supply multiple variables via command-line?
    By eyeofhell in forum Qt Programming
    Replies: 1
    Last Post: 6th July 2014, 02:58
  2. Replies: 2
    Last Post: 28th June 2009, 12:39
  3. running shell command from C++ code problem
    By alex chpenst in forum Qt Programming
    Replies: 4
    Last Post: 31st July 2008, 10:41
  4. Replies: 2
    Last Post: 7th July 2008, 08:44
  5. Printing to Command Line
    By seanmu13 in forum Qt Programming
    Replies: 3
    Last Post: 5th July 2007, 15:57

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.