News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

What is used to build nightlies?

Started by Pecan, February 16, 2019, 08:17:21 PM

Previous topic - Next topic

Pecan

Which one of these compilers is being used to build the nightly for windows?

MinGW-W64 GCC-8.1.0
x86_64-posix-sjlj
x86_64-posix-seh
x86_64-win32-sjlj
x86_64-win32-seh
i686-posix-sjlj
i686-posix-dwarf
i686-win32-sjlj
i686-win32-dwarf

What are the parameters being used to compile wxWidgets for the windows nightly?

killerbot

Compiler:
======
Mingw_w64 : 8.1.0  (https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)

In the following configuration :
Version : 8.1.0
Architecture : x86_64
Threads : posix
Exception : seh
Build Revision : 0


WX:
===
The nightly is still using wx 3.1.1, in order to build it on windows a little patch is needed :

===> https://github.com/wxWidgets/wxWidgets/commit/424f64f27d94f83ed946ebfcf9b9543c828f9f25
include/wx/msw/private.h
    static HANDLE InvalidHandle()
    {
        return static_cast<HANDLE>(INVALID_VALUE);
        return reinterpret_cast<HANDLE>(INVALID_VALUE);
    }

so rather easy to adjust.

The build instruction is :

mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 VENDOR=cb CXXFLAGS+="-std=c++11"



PS : the same instruction (minus that patch) work also to build wx 3.1.2, and this one has a zillion less warnings during the build :-)

Miguel Gimenez

Update:

Used wxWidgets version is now 3.1.5.

Starting with 3.1.2, the file include/wx/msw/setup.h must be edited before compiling the library, changing this

#if defined(_MSC_VER) && _MSC_VER >= 1600
    #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#else
    #define wxUSE_GRAPHICS_DIRECT2D 0
#endif

to this

#if defined(_MSC_VER) && _MSC_VER >= 1600
    #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#else
    #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#endif

or just

#define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT


AndrewCot

This is okay for C::B build of WxWidgets, BUT what about other MS Windows compilers like Visual Studio (using the MS compiler)?

It may be better to do the following:
#if defined(_MSC_VER) && _MSC_VER >= 1600
    #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#else
    #if defined(__GNUC__)
        #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
   #else
       #define wxUSE_GRAPHICS_DIRECT2D 0
    #endif
#endif

This way if someone was to use :
1. GNU compiler it will use wxUSE_GRAPHICS_CONTEXT.
2. Visual Studio < 1600 then it will use 0.




It's not always intuitive the best way of supporting multiple different compiler manufacturers and versions in a header file sometimes. 

It can get way more complex when you throw in
   * 32 V 64 bit
   and/or
   * GNU V's CYGWIN  V's MSVC
   and/or
    Windows V's Linux and still use the GNU compiler......
   and then inn the code
   having to support %I64u or %lu etc etc etc
getting these combinations has sometimes caused me to waste a few hours.

sodev

If you want to nitpick, this is actually not OK. The reason Direct2D is disabled for non-MSVC-compilers is because it is quite hard (impossible?) to figure out if the used GCC distribution actually has the Direct2D headers available. Therefor, the simple solution to enable Direct2D for everything is not that bad, should be harder to find someone who is using Visual Studio <= 2008 than someone who has a GCC without Direct2D ;D.

AndrewCot

I put the lines in the new #if the wrong way arround.