Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Build for Linux and Windows on Mac. How?



  • Hello all!
    How to build for Linux and Windows if I am working on Mac? Is there any way to get Qt Kits for Linux and Windows like for iOS and Android?


  • Moderators

    @bogong said in Build for Linux and Windows on Mac. How?:

    Hello all!
    How to build for Linux and Windows if I am working on Mac? Is there any way to get Qt Kits for Linux and Windows like for iOS and Android?

    No. You have to install Linux and Windows and compile on them. You can use virtual machines for that purpose.

    There are ways to cross-compile to Linux and Windows, but it's usually very complex and delicate - using native builds is much simpler.



  • Thanks ... About virtual machines - well known, even organised remote auto-build on virtual machine by running command from shell script defined in *.pro file:

    • write *.sh script within remote SSH access to virtual and add it to *pro file
    • use git repo
    • run remote script on virtual machine within cloning and auto building

    I've been trying to find all-in-one solution.


  • Moderators

    @bogong said in Build for Linux and Windows on Mac. How?:

    I've been trying to find all-in-one solution.

    Jenkins, Travis CI or GitLab Pipelines are the standard solutions here. I don't think building release packages on developer machine is a good idea.



  • @sierdzio I know all of it. Thanks. I have even at home separated build system (https://www.linkedin.com/posts/activity-6523516081821229056-I3SR - this is my home made noice-less server box made by hand) there are 25 virtual servers based on FreeBSD. And this script only running chain of actions directly from Qt Creator.

    My second specialisation - Erlang for High-Load and Big-Data. Links on articles in my Github. If interesting.



  • @sierdzio For now I am checking "about something new in what make my life easy". There are nothing new yet for this topic. Thanks fo assistance.


  • Lifetime Qt Champion

    @bogong If you already know how to do it, then why do you ask?

    It would at least have been good to tell us "is there a way without using a build server and virtual machines?".

    And yes, you can cross-compile. From Windows to Linux, from Linux to Windows etc. But as @sierdzio said, this has to be set up manually and therefore the other ways mentioned may be easier.

    Regards



  • @aha_1980 said in Build for Linux and Windows on Mac. How?:

    If you already know how to do it, then why do you ask?

    Look on previous message. I am seeking something new that might help me in developing. When I am in project deeply there are no time for checking something new or to change project developing schema sometimes impossible because of inheritance. For now I am starting new one and checking before it. There are the rule to refresh knowledge before new project.


  • Moderators

    @bogong said in Build for Linux and Windows on Mac. How?:

    I am seeking something new that might help me in developing.

    Then please say so. And tell us what you already know.

    We can't tell you something "new" if you don't tell us what is "old" for you.



  • @jksh The question was about building on Mac for Linux and Windows, I've got very clear reply from @sierdzio (really appreciate it, thanks a lot to him) and got closed issue (marked solved) but you still writing in this thread and asking me about what new for me or not. The question was about building on Mac for Linux and Windows ... I've not been asking about something new for me. I've been asking only about the "how-to" and the current state of it, not more then it. And I got it and closed issue.


Log in to reply