Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

[Proposal] Move the custom variables WX_SUFFIX... to global variables

<< < (5/6) > >>

AndrewCot:
I second that BlueHazzard's work is great!

This saved me a number of hours trying to see what the best option was to support building against various wxWidget combinations (3.1.5 V's trunk <aka 3.1.6 in the future> and/or  debug V's release) without modifying the Windows project files every time I wanted to change a wxwidget variables.


AndrewCot:
@BlueHazzard How is you changes in your github branch going? This may be helpful with Wxwidget 3.2 changes in order to not having to create yet another set of project files if possible. I think it could be possible based on the global changes that I have made in my local source to make it easier to build and potentially not have to change allot project files. It may also be possible to remove the Windows 32 bit build project files in the future as well.

Is it possible with you current code to also use a variable to change the "31_64" in the following project line so it uses two variables, one for WX.WX_VERSION and another for CB_BUILD.OSBIT (I
have not thought of a good name for this one) like the follwoing?

--- Code: ---Original:    <Option output="devel31_64/txml" prefix_auto="1" extension_auto="1" />
Potential future:    <Option output="devel$(#WX.WX_VERSION )_$(#CB_BUILD.OSBITS)/txml" prefix_auto="1" extension_auto="1" />
--- End code ---

I have the following global variables so that I can easily change my build:

--- Code: ---<WXWIDGET>  <BASE>
      D:\Andrew_Development\Libraries\wxWidgets-3.1.5
  <INCLUDE>
      D:\Andrew_Development\Libraries\wxWidgets-3.1.5\include
  <LIB>
      D:\Andrew_Development\Libraries\wxWidgets-3.1.5\lib
  User-defined:
      <WX_CFG>
          ""
      <WX_VERSION>
          31
      <WX_SUFFIX>
          u

<cb_build>
    <BASE>
        D:\Andrew_Development\Work_Installers\AC-WindowsInstaller\src
    <INCLUDE>
        D:\Andrew_Development\Work_Installers\AC-WindowsInstaller\src\include
    User-defined:
        <COMPILER_OPTIONS>
            -g -O0 -ggdb

--- End code ---

AndrewCot:
I did a quick replace of "31_64" with "$(#WXWIDGETS.WX_VERSION)_$(#CB_BUILD.OSBITS)" and defined the two new global variables in CodeBlocks_wx31_64.cbp and it built. I then changes a few more specific keywords, but do NOT change "31 " or "64" globally as you will get into trouble if you do as some files include these.

@Miguel this may help out with moving to wxWidget 3.2 in  that on Windows instead of ending up with 4 sets or project files as follows you could have one, but some of the issues raised in previous posts need to be resolved.     CodeBlocks_wx31.cbp     CodeBlocks_wx32.cbp         * expected future for wx32
     CodeBlocks_wx31_64.cbp     CodeBlocks_wx32_64.cbp  * expected future for wx32

Miguel Gimenez:
FYI, you can write

--- Code: ---<BASE>
      D:\Andrew_Development\Libraries\wxWidgets-3.1.5
<INCLUDE>
      $(#WXWIDGETS)\include
<LIB>
      $(#WXWIDGETS)\lib

--- End code ---

or just leave INCLUDE and LIB empty.

AndrewCot:
Agree.I am still playing with the variables and reworking them as I think of better ways of using them. The next one that I spotted last night was to move $(#CB_RELEASE_TYPE) variable to be a built in cflags instead of a "base" variable. This has been staring me in the face for weeks and I only thought of it last night and will make the project files and variables more intuitive IMHO.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version