News:

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

Main Menu

Script hooks added to build system

Started by mandrav, January 21, 2006, 09:01:22 PM

Previous topic - Next topic

killerbot

and please allow it to build both flavours :
example :
1) build unicode on windows
2) build ansi on windows ...
3) build unicode on linux (so it should reboot the machine and boot into linux ;-)  )

Therefor it would be good, the objects just don't go into .objs, but some targetname is incorporated into this folder. Targetname that can be modified/constructed by the scripts.  Or the scripts themself can change the 'objs' directory (and also the directory where dll's, libs, exe's go).

280Z28

Why do we still need to build ANSI on Windows?
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

killerbot

our dear win98 friends (or we should also have builds with libunicows (license problems ??).

mandrav

Quote from: killerbot on January 22, 2006, 08:25:12 PM
and please allow it to build both flavours :
example :
1) build unicode on windows
2) build ansi on windows ...
3) build unicode on linux (so it should reboot the machine and boot into linux ;-)  )

Therefor it would be good, the objects just don't go into .objs, but some targetname is incorporated into this folder. Targetname that can be modified/constructed by the scripts.  Or the scripts themself can change the 'objs' directory (and also the directory where dll's, libs, exe's go).

I purposely send a CompileOptionsBase* argument to the scripts not to allow them to touch settings not found in build options (like the executable output, working dir, etc). Some settings should actually do what they seem to do, no matter what ;)

We will be able though to change them in some way: by using custom variables. So, the objects output dir will be like ".objs\$(BUILD_TYPE)" and the scripts will update $(BUILD_TYPE) ;)
Note that we won't need to add the $(BUILD_TYPE) custom var in custom vars. The script will put it for the build.
Be patient!
This bug will be fixed soon...

mandrav

Quote from: mandrav on January 22, 2006, 07:20:48 PM
Quote from: Game_Ender on January 22, 2006, 07:08:25 PM
From what I have seen here this is entirely possible at that you need is to have that function in a Code::Blocks API accessible by the scripts.

Right and I was going to add it today but I 've been busy with the general preferences dialog revamping.
The point is that, yes, these scripts will be able to detect the platform. They 're scripts after all, so they can employ logic ;)

Added a few script constants. Scripts can check the current platform using something like this:
Code (cpp) Select

if (PLATFORM == PLATFORM_MSW)
{
    // windows stuff
}
else if (PLATFORM == PLATFORM_GTK)
{
    // GTK stuff
}
else
{
    // unknown platform
    // i.e PLATFORM_UNKNOWN
}
Be patient!
This bug will be fixed soon...

takeshimiya