Author Topic: Script hooks added to build system  (Read 23341 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Script hooks added to build system
« Reply #15 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).

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: Script hooks added to build system
« Reply #16 on: January 22, 2006, 08:27:05 pm »
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:

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Script hooks added to build system
« Reply #17 on: January 22, 2006, 08:31:30 pm »
our dear win98 friends (or we should also have builds with libunicows (license problems ??).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Script hooks added to build system
« Reply #18 on: January 22, 2006, 08:33:22 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...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Scripts = Solution to Cross Platform Projects
« Reply #19 on: January 22, 2006, 09:06:49 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
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

  • Guest
Re: Script hooks added to build system
« Reply #20 on: January 23, 2006, 04:49:22 pm »
PS: Yiannis, can you update AngelScript to 2.5.0 (latest stable), so I can diff the patch to fix 64 bits compilation?

Updated in r1828.

Acknowledge. :) http://forums.codeblocks.org/index.php?topic=2096.msg16502#msg16502