Discussion:
[Msys2-users] Request help to build Qt with Msys2 offline
Maarten Verhage
2017-07-01 21:26:01 UTC
Permalink
Dear people of Msys2,

I hope someone can help me out. My objective is to build Qt on a Windows 7 64 bit computer. I already installed TDM-GCC-64 which includes the Mingw-w64 windows API.

I’m already able to compile and link some of my C++ code with GCC and Mingw-w64, with makefiles.

I’m familiar with compiling and linking my programs with MSVC on the command prompt. But I want to turn away from Microsoft for software development in C/C++.

I read somewhere Msys2 is the easiest tool to use to reach the goal of building Qt. Msys2-x86_64 is also installed and I can get to that command prompt.

Also I would like to have my development computer OFFLINE from the internet. The pacman command seems to want to download stuff so that is not going to work.

So, I am basically stuck at how do I provide Qt to pacman. On the development computer I do have for example the qt-everywhere-opensource-src-5.3.2.zip file. Of course I can download something else from the Qt Company. But at least I know a build of qt-everywhere-opensource-src-5.3.2.zip on gcc with mingw-w64 is what solves my goal.

Please be specific in what you recommend me to do. Then I can use your advice and I would be very grateful about it.

Best regards,
Maarten Verhage
Norbert Pfeiler
2017-07-01 21:34:53 UTC
Permalink
Setup (install all necessary packages needed for your development) on a pc
with internet and transfer the msys2 installation to your dev machine (or
at least the package cache and database file).
Post by Maarten Verhage
But at least I know a build of qt-everywhere-opensource-src-5.3.2.zip on
gcc with mingw-w64 is what solves my goal.
Why/How?

You can also build stuff manually, but it’s probably more hassle than
worth.

Best, Norbert.
Post by Maarten Verhage
Dear people of Msys2,
I hope someone can help me out. My objective is to build Qt on a Windows 7
64 bit computer. I already installed TDM-GCC-64 which includes the
Mingw-w64 windows API.
I’m already able to compile and link some of my C++ code with GCC and
Mingw-w64, with makefiles.
I’m familiar with compiling and linking my programs with MSVC on the
command prompt. But I want to turn away from Microsoft for software
development in C/C++.
I read somewhere Msys2 is the easiest tool to use to reach the goal of
building Qt. Msys2-x86_64 is also installed and I can get to that command
prompt.
Also I would like to have my development computer OFFLINE from the
internet. The pacman command seems to want to download stuff so that is not
going to work.
So, I am basically stuck at how do I provide Qt to pacman. On the
development computer I do have for example the
qt-everywhere-opensource-src-5.3.2.zip file. Of course I can download
something else from the Qt Company. But at least I know a build of
qt-everywhere-opensource-src-5.3.2.zip on gcc with mingw-w64 is what solves
my goal.
Please be specific in what you recommend me to do. Then I can use your
advice and I would be very grateful about it.
Best regards,
Maarten Verhage
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
https://lists.sourceforge.net/lists/listinfo/msys2-users
David Grayson
2017-07-02 00:23:31 UTC
Permalink
I can understand wanting to deploy software to a computer without
internet, but why do you need to compile it there? Qt takes about 12
hours to compile on Windows, just so you know. It takes more like an
hour to compile on Linux in VirtualBox.

I have some handy build scripts for cross-compiling Qt statically
here: https://github.com/DavidEGrayson/nixcrpkgs Download them to a
Linux machine of some sort, then install the Nix functional package
manager (nixos.org). Then, in nixcrpkgs directory, run "nix-build -A
win32.pavr2". This will build a mingw-w64 toolchain, then build Qt,
and then build a particular application from it. It uses static
linking so you get a totally standalone executable at the end, which
could be transported to your Windows 7 machine. I think the build
time will be around 2 hours when you are starting from scratch. It
rebuilds things smartly: if you change the recipes and run the build
command again, it will only build those packages whose recipe changed,
or packages that depend on packages whose recipes changed.

--David
Post by Maarten Verhage
Dear people of Msys2,
I hope someone can help me out. My objective is to build Qt on a Windows 7
64 bit computer. I already installed TDM-GCC-64 which includes the Mingw-w64
windows API.
I’m already able to compile and link some of my C++ code with GCC and
Mingw-w64, with makefiles.
I’m familiar with compiling and linking my programs with MSVC on the command
prompt. But I want to turn away from Microsoft for software development in
C/C++.
I read somewhere Msys2 is the easiest tool to use to reach the goal of
building Qt. Msys2-x86_64 is also installed and I can get to that command
prompt.
Also I would like to have my development computer OFFLINE from the internet.
The pacman command seems to want to download stuff so that is not going to
work.
So, I am basically stuck at how do I provide Qt to pacman. On the
development computer I do have for example the
qt-everywhere-opensource-src-5.3.2.zip file. Of course I can download
something else from the Qt Company. But at least I know a build of
qt-everywhere-opensource-src-5.3.2.zip on gcc with mingw-w64 is what solves
my goal.
Please be specific in what you recommend me to do. Then I can use your
advice and I would be very grateful about it.
Best regards,
Maarten Verhage
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
https://lists.sourceforge.net/lists/listinfo/msys2-users
Maarten Verhage
2017-07-04 18:46:30 UTC
Permalink
Post by Maarten Verhage
Dear people of Msys2,
I hope someone can help me out. My objective is to build Qt on a Windows 7
64 bit computer. I already installed TDM-GCC-64 which includes the Mingw-w64
windows API.
I’m already able to compile and link some of my C++ code with GCC and
Mingw-w64, with makefiles.
I’m familiar with compiling and linking my programs with MSVC on the command
prompt. But I want to turn away from Microsoft for software development in
C/C++.
I read somewhere Msys2 is the easiest tool to use to reach the goal of
building Qt. Msys2-x86_64 is also installed and I can get to that command
prompt.
Also I would like to have my development computer OFFLINE from the internet.
The pacman command seems to want to download stuff so that is not going to
work.
So, I am basically stuck at how do I provide Qt to pacman. On the
development computer I do have for example the
qt-everywhere-opensource-src-5.3.2.zip file. Of course I can download
something else from the Qt Company. But at least I know a build of
qt-everywhere-opensource-src-5.3.2.zip on gcc with mingw-w64 is what solves
my goal.
Please be specific in what you recommend me to do. Then I can use your
advice and I would be very grateful about it.
Best regards,
Maarten Verhage
Dear Norbert and David,

I would like to thank you for your suggestions. It has been awhile since I
build Qt. Earlier I did build it with MSVC. But now I realised the Qt
library also provided make specifications for GCC. I have to say in my eyes
this is the most straightforward way of building Qt 5.3.2.

All I did was:

configure –opensource –opengl desktop –debug-and-release –static –platform
win32-g++ -skip qtdeclarative -skip qtscript

in a normal Windows command prompt on the Qt folder. Followed by:

mingw32-make

I am happy this resulted in a succesful build.

Best regards,
Maarten Verhage
D. B.
2017-07-05 12:18:13 UTC
Permalink
Post by Maarten Verhage
Earlier I did build it with MSVC. But now I realised the Qt
library also provided make specifications for GCC. I have to say in my eyes
this is the most straightforward way of building Qt 5.3.2.
configure ?opensource ?opengl desktop ?debug-and-release ?static ?platform
win32-g++ -skip qtdeclarative -skip qtscript
mingw32-make
I am happy this resulted in a succesful build.
Indeed, this is where for me MSYS2 is completely invaluable, making it
trivial to build and run a lot of software with POSIX-style build setups,
meaning we don't have to have a completely different workflow for Windows
ports.

Loading...