is there any way to install mingw-w64 offline ? I tried many official sources and all of them seem to need some sort of internet access. I'm looking for something that works for both x32 and x64 systems. I tried to have a look at the official repository but I am not sure which files I need for this task.
Thanks in advance !
Although the following isn't fully tested yet, an offline installer seems unnecessary. Based on some screenshots for a bug report, the online installer asks the following questions...
Version .......... seems to be the GNU GCC version number
Architecture ..... i686 / x86_64
Threads .......... posix / win32
Exception ........ dwarf / sjlj / seh
Build Revision ... 0 / 1 / 2 / ...
Install folder ... e.g. c:\mingw
Create desktop shortcuts?
The first 5 options are used to choose a single download package. I don't know about you, but I've no idea what to choose for threads and exceptions. Based purely on download stats, posix threads are used more than twice as much as win32, seh seems much more popular for 64-bit, dwarf for 32-bit, sjlj seems pretty unloved. I'm guessing 32-bit with posix and dwarf is the default.
To identify what the choices are, it uses a file repository.txt from this folder. That's just a pipe-separated text file - 5 fields for those 5 main options, plus one for the URL of the package to download.
Incidentally, if anyone knows where to find the source code for the installer, I'd really appreciate a comment - I've hunted high and low, found e.g. bug reports, but not found the source of the installer. Sources for mingw-64 binary packages are easy enough to find, though.
The binary packages themselves are in subfolders of this folder (Win32) and this folder (Win64).
I'm not sure what the shortcuts the installer offers to create are for - this is MinGW-w64, not MSYS or MSYS2, so there's no bash-based shell to provide shortcuts to. Probably they're just Windows command prompt shortcuts with the path set up.
Other than that shortcuts issue, all you do is unpack the package to a suitable folder, make sure that the mingw32\bin or mingw64\bin folder is on the path somehow, and you should be done. I've already tested this with one of the 32-bit gcc-5.4.0 packages - g++ compiled a hello-world with no problems.
There are alternative third-party builds in subfolders starting from one step further out here (32 bit) and similar subfolders of different Toolchains targetting * folders for 64-bit and other builds. ray_linn has various builds that include Ada (and Objective C/C++?) support. rubenvb has some older GCC and Clang versions. dongsheng-daily looks like daily builds, even including experimental GCC 7.
If you need MSYS too, let me know in comments. I've been installing that offline (along with MinGW32) for some time, so I have a list of which packages to install. You need quite a few packages, it's a pain getting them from SourceForge, but once you have them it's mostly just unpacking again. There's some minor "postinstall" to do - some file to create, mainly where to find MinGW, plus creating a shortcut to the shell. I have AutoIt scripts to do that - a bit of a mess, using inappropriate methods because they were what I knew in AutoIt at the time, but they work OK.
There's MSYS2, but at first glance that's another online-installing-assumed issue, using the pacman package manager - probably very convenient, but not for the minority who can't use it.