MinGW-w64离线安装程序 [英] MinGW-w64 offline installer

查看:637
本文介绍了MinGW-w64离线安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以离线安装mingw-w64?我尝试了许多官方资源,所有这些资源似乎都需要某种互联网访问权限.我正在寻找适用于x32和x64系统的东西.我试图看看官方存储库但我不确定执行此任务需要哪些文件.

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.

提前谢谢!

推荐答案

尽管以下内容尚未经过全面测试,但似乎不需要脱机安装程序.根据一些错误报告的屏幕截图,在线安装程序会询问以下问题...

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?

前5个选项用于选择单个下载程序包.我不了解您,但是我不知道该为线程和异常选择什么.纯粹基于下载统计信息,posix线程的使用量是win32的两倍以上,seh在64位上似乎更受欢迎,在32位上则是矮人,sjlj似乎不受欢迎.我猜默认是posix和dwarf的32位.

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.

顺便说一句,如果有人知道在哪里可以找到安装程序的源代码,我将不胜感激.错误报告,但找不到安装程序的源.不过,mingw-64二进制软件包的来源很容易找到.

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.

二进制程序包本身位于此文件夹(Win64).

The binary packages themselves are in subfolders of this folder (Win32) and this folder (Win64).

我不确定安装程序提供的创建快捷方式的目的是什么-这是MinGW-w64,不是MSYS或MSYS2,因此没有基于bash的shell提供快捷方式.可能它们只是Windows命令提示符快捷方式,并设置了路径.

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.

除了该快捷方式问题外,您所要做的就是将包解压缩到合适的文件夹中,确保mingw32 \ bin或mingw64 \ bin文件夹在路径上,并且应该这样做.我已经使用32位gcc-5.4.0软件包之一进行了测试-g ++编译了一个hello-world,没有问题.

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.

子文件夹中还有其他第三方构建,从更进一步的步骤开始此处(32位)以及针对64位和其他版本的*工具文件夹的不同工具链的类似子文件夹. ray_linn具有各种构建,其中包括对Ada(和Objective C/C ++?)的支持. rubenvb具有一些较旧的GCC和Clang版本. dongsheng-daily看起来每天都在构建,甚至包括实验性GCC 7.

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.

如果您也需要MSYS,请在评论中告诉我.我已经离线(与MinGW32一起)安装了一段时间,所以我列出了要安装的软件包.您需要很多软件包,从SourceForge获得它们很痛苦,但是一旦有了它们,大多数情况下只是重新打包.有一些小的后安装"要做-创建一些文件,主要是在哪里找到MinGW,以及创建Shell的快捷方式.我有AutoIt脚本来执行此操作-使用不适当的方法有点混乱,因为这是我当时在AutoIt中所知道的,但是它们可以正常工作.

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.

有MSYS2,但是乍一看,这是另一个使用pacman软件包管理器进行在线安装的问题-可能非常方便,但对于那些无法使用它的少数人来说不是.

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.

这篇关于MinGW-w64离线安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆