Author Topic: What is used to build nightlies?  (Read 8688 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
What is used to build nightlies?
« on: February 16, 2019, 08:17:21 pm »
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?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: What is used to build nightlies?
« Reply #1 on: March 09, 2019, 10:45:28 am »
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 :
Code
===> 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 :
Code
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 :-)

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: What is used to build nightlies?
« Reply #2 on: December 14, 2021, 09:21:48 am »
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
Code
#if defined(_MSC_VER) && _MSC_VER >= 1600
    #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#else
    #define wxUSE_GRAPHICS_DIRECT2D 0
#endif
to this
Code
#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
Code
#define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: What is used to build nightlies?
« Reply #3 on: December 14, 2021, 10:26:46 am »
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.

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: What is used to build nightlies?
« Reply #4 on: December 14, 2021, 02:06:42 pm »
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.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: What is used to build nightlies?
« Reply #5 on: December 15, 2021, 01:23:58 am »
I put the lines in the new #if the wrong way arround.