Compilation workaround for older MinGW versions (Win only)
see issue 847
This commit is contained in:
parent
9716b235d6
commit
fdb490c49f
18
COMPILE.txt
18
COMPILE.txt
@ -35,20 +35,22 @@ Windows
|
||||
This tutorial assume that you've installed the packages in paths THAT DOES NOT CONTAIN SPACES.
|
||||
|
||||
METHOD 1:
|
||||
- MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
|
||||
OpenMP seems to be broken in TDM-GCC4.5.1, so when MinGW has been installed, download and install
|
||||
libgomp form tdm-gcc-4.5.0
|
||||
(http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%204.5%20series/Previous/4.5.0-tdm-1%20SJLJ/gcc-4.5.0-tdm-1-openmp.zip/download)
|
||||
- MinGW64-TDM (Bundle or On-Demand insteller from http://tdm-gcc.tdragon.net/download)
|
||||
Make sure you use the current 4.5.2 or better, and install MinGW64 (not MinGW32)
|
||||
MinGW64 is more comprehensive, plus it runs AND compiles both 32bit and 64bit Windows.
|
||||
Old Mingw32 version miss some required header files, so some Windows functions will be disabled though it will compile.
|
||||
- MSYS (http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe)
|
||||
If you have some trouble installing MSYS, see here : http://www.mingw.org/wiki/MSYS
|
||||
- CMake (http://www.cmake.org/cmake/resources/software.html)
|
||||
Version 2.8.4 or above si required for this platform
|
||||
- Gtkmm2.22 (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
|
||||
Version 2.8.4 or above is required for this platform
|
||||
- Gtkmm2.22 (for 32bit: http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/
|
||||
for 64bit: http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/)
|
||||
|
||||
METHOD 2:
|
||||
- MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
|
||||
- MinGW-TDM (Bundle or On-Demand insteller from http://tdm-gcc.tdragon.net/download)
|
||||
- CMake (http://www.cmake.org/cmake/resources/software.html)
|
||||
- Gtkmm2.22 (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
|
||||
- Gtkmm2.22 (for 32bit: http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/
|
||||
for 64bit: http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/)
|
||||
|
||||
Additionnal steps:
|
||||
When all the packages of your preferred method are installed:
|
||||
|
@ -96,11 +96,15 @@ bool MultiLangMgr::save (Glib::ustring fname) {
|
||||
|
||||
bool MultiLangMgr::isOSLanguageDetectSupported() {
|
||||
#ifdef WIN32
|
||||
#ifdef __MINGW64_VERSION_MAJOR
|
||||
// Only on Vista or above
|
||||
return LOBYTE(LOWORD(GetVersion()))>=6;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -112,6 +116,8 @@ Glib::ustring MultiLangMgr::getOSUserLanguage() {
|
||||
|
||||
// TODO: Add support for other OS here
|
||||
#ifdef WIN32
|
||||
// When using old versions of MINGW this is not defined
|
||||
#ifdef __MINGW64_VERSION_MAJOR
|
||||
WCHAR langRFCU[64] = {0};
|
||||
if (GetUserDefaultLocaleName(langRFCU,64)!=0 && lstrlenW(langRFCU)>=2) {
|
||||
// convert UNICODE16 to GTK
|
||||
@ -121,6 +127,7 @@ Glib::ustring MultiLangMgr::getOSUserLanguage() {
|
||||
|
||||
langName=TranslateRFC2Language(localRFC);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
} else printf("Automatic language detection not supported on your OS\n");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user