Hi,
from time to time i try new wxWidgets builds with codeblocks (debug, non debug, wx3.1, trunk ecc...)
On Windows you have always to adjust the "Custom variables"
WX_SUFFIX
WX_CFG
WX_VERSION
for every project in the workspace. I know i can use a plugin for this, but this will alter the project files and so they are no longer in sync with the repository and show differences. I think the global variables would be a better place for this type of setting. Also if i alter the configuration of the codeblocks.cbp i can not use the same plugins, so the main project and the plugin projects are connected, and i think it makes sense to configure them from one central place...
So a possibility would be to use the custom fields of the $(#CB_RELEASE_TYPE) variable. Something like $(#CB_RELEASE_TYPE.WX_CFG) ecc.
A better place would be the $(#WX) variable....
any thoughts about this?
Ok, i would like to dig up this Topic again.
Here is a patch for the wx30 project files. With this patch it is easy to switch between wx versions and configurations...
Simply set the global variables for
wx30.suffix = u
wx30.version = 30
and you have the old behavior. If you want to try wx31, simply set
and recompile. This will affect the whole codeblocks workspace.
want to debug things? Set
recompile and you have the right configuration for the whole workspace.
A other upside is that you do not change the project file, so you don't have any changes in the CVS if you want to use the debug configuration...
This is windows only!
@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?
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" />
I have the following global variables so that I can easily change my build:
<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
FYI, you can write
<BASE>
D:\Andrew_Development\Libraries\wxWidgets-3.1.5
<INCLUDE>
$(#WXWIDGETS)\include
<LIB>
$(#WXWIDGETS)\lib
or just leave INCLUDE and LIB empty.
In the attached 7z file is my cbp & workspace files that use the global variables from the code snippet below.
These cbp & workspace files allow me to do the following:- Change from 32 to 64 build without changing any cbp file
- change wxWidget versions without changing any cbp file
- change wxWidget and other external third party dependent library references without changing any cbp file
- change the CPP debug flags without changing any cbp file
- change wxWidget library CFG, Version and Suffix without changing any cbp file
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocksGlobalVariableExportConfig version="1">
<cb_win32>
<cb_build>
<BASE>D:\Andrew_Development\Work_Installers\CodeBLocks_Private_Experimental\src</BASE>
<INCLUDE>$(#CB_BUILD)\include</INCLUDE>
<CFLAGS>-g -O0 -ggdb</CFLAGS>
<OSBITS>32</OSBITS>
<CPP_STD>gnu++17</CPP_STD>
</cb_build>
<wxwidgets>
<BASE>D:\Andrew_Development\Libraries\wxWidgets-3.1.5_win$(#CB_BUILD.OSBITS)</BASE>
<INCLUDE>$(#WXWIDGETS)\include</INCLUDE>
<LIB>$(#WXWIDGETS)\lib</LIB>
<WX_CFG>""</WX_CFG>
<WX_VERSION>31</WX_VERSION>
<WX_SUFFIX>u</WX_SUFFIX>
</wxwidgets>
<discount>
<BASE>D:\Andrew_Development\Libraries\discount_win$(#CB_BUILD.OSBITS)</BASE>
<INCLUDE>$(#DISCOUNT)</INCLUDE>
<LIB>$(#DISCOUNT)</LIB>
</discount>
<boost>
<BASE>D:\Andrew_Development\Libraries\boost</BASE>
<INCLUDE>$(#BOOST)</INCLUDE>
</boost>
</cb_win32>
<cb_win64>
<wxwidgets>
<BASE>D:\Andrew_Development\Libraries\wxWidgets-3.1.5_win64</BASE>
<INCLUDE>$(#WXWIDGETS)\include</INCLUDE>
<LIB>$(#WXWIDGETS)\lib</LIB>
<WX_CFG>""</WX_CFG>
<WX_VERSION>31</WX_VERSION>
<WX_SUFFIX>u</WX_SUFFIX>
</wxwidgets>
<discount>
<BASE>D:\Andrew_Development\Libraries\discount_win64</BASE>
<INCLUDE>$(#DISCOUNT)</INCLUDE>
<LIB>$(#DISCOUNT)</LIB>
</discount>
<cb_build>
<BASE>D:\Andrew_Development\Work_Installers\CodeBLocks_Private_Experimental\src</BASE>
<INCLUDE>$(#CB_BUILD)\include</INCLUDE>
<CFLAGS>-g -O0 -ggdb</CFLAGS>
<OSBITS>64</OSBITS>
<CPP_STD>gnu++17</CPP_STD>
</cb_build>
<boost>
<BASE>D:\Andrew_Development\Libraries\boost</BASE>
<INCLUDE>$(#BOOST)</INCLUDE>
</boost>
</cb_win64>
</CodeBlocksGlobalVariableExportConfig>
P.S. The files include references to plugins and other items that you may not have as these files are from my local build directory and NOT from the CB SVN source tree. If you hit an issue diff the <TBA>_wx31_64.[cbp|workspace] against the <TBA>Windows.[cbp|workspace] file that you have an issue with.