Ticket #328 (closed enhancement: fixed)

Opened 2 years ago

Last modified 8 months ago

Improving our build scripts

Reported by: Sleek Owned by: prock
Priority: high Milestone: 0.3.0
Component: tools/build Version: trunk
Severity: normal Keywords: scons
Cc: Time planned:
Time spent: Time remaining:

Description

After reading the Scons manual, I've learnt that we are not using Scons the way it's supposed to be. For example, instead of using targets to define what will get build, we are defining options. It really should've been

scons swig_wrapper tests

rather than

scons tests=1 noengine=1

Also, Scons puts forward the concept of target, source and dependencies for our perusal, but ext/SConscript totally dismissed this. I'm not pointing to anyone but let's fix this.

Here is a proposal for a rewrite of SConstruct and SConscripts:

1) Target: FIFE Library, '_fife.pyd' , 
options: debug=1/0, profile=1/0, opengl=1/0, zip=1/0, log=1/0 . 
obj1 = Object( 'engine_object' , engine/core/*.cpp)
obj2 = Object( 'swigwrap_object' , engine/swigwrappers/python/*.cxx)

SharedLibrary( '_fife,pyd', [ obj1 , obj2 ] )

Depends on (3), (2).

2) Target: ext / dependents. 

use automake/autoconfig or 
make our Sconscript for each library.
Depends on none ( depends on each target libraries if we write our own build script).


3) Target: fife.i, fife.py, fife_wrapper.cxx, fife_wrapper.h
 or when we separate each FIFE module into their own library:
 fife/*.py, fife/*.cxx, fife/*.h , 
options: no option. debug always off.

env.SwigWrapper( 'engine/swigwrapper/python/fife' , interface_files )

Depends on *.i ( interface_files) .

4) Target: tests. 
option: debug=1/0. depends on (1).

env.Program( 'test_xxx' , 'test_xxx.cpp' )

Depends on (1)

5) Target: project files. 

Depends on (3)

6) Target: build_utils
Dependents: unknown

7) build gen_docs
Dependents: none

8) Target: build_all, 

Attachments

Change History

Changed 10 months ago by prock

  • status changed from new to assigned
  • priority changed from normal to high
  • owner changed from FIFE to prock
  • milestone changed from Proposal to 0.3.0
  • keywords scons added
  • type changed from defect to enhancement

I'm working on this one at the moment. I have created a new branch called "build_system_rework" to work on this ticket.

Changed 10 months ago by prock

(In [3085]) Updating all batch files to work as expected. Still have to move the fife.pyd file into the expected directories. refs #328

Changed 10 months ago by prock

(In [3086]) Working on the unit tests. Updated a few paths to correctly find all the libraries. This currently does not link correctly. refs #328

Changed 10 months ago by prock

(In [3087]) Modified the tests to work in darwin. Tests must be run in the projects root directory to work correctly. We have to decide how exactly we want to handle the tests in the future. refs #328

Changed 9 months ago by prock

[09:50] <prock> so basically all that we have left is:
[09:51] <prock> 1) get core_tests linking properly on win32
[09:51] <prock> 2) copy of the .pyd file to the expected location used by clients
[09:52] <prock> 3) install target
[09:52] <prock> 4) generate project files
[09:54] <prock> 5) update the dev kit to include the new version of scons

Changed 9 months ago by prock

(In [3092]) Started working on the Install targets. Currently only the libraries can be installed in PREFIX. You can also install the python library and extensions into PREFIX refs #328

Changed 9 months ago by prock

Some random stuff from IRC....

[10:09] <prock> we should probably make the ext builds a target
[10:10] <prock> using the env.Command() function
[10:10] <prock> basically something like this:
[10:11] <prock> def build_ext(env, target, source):
[10:11] <prock>      do stuff
[10:12] <prock> ext_cmd = env.Command('ext','ext',build_ext)
[10:12] <prock> env.Alias('ext', ext_cmd)

Changed 9 months ago by prock

(In [3095]) Merged trunk into this branch to allow for the use of the new development kit which has some modifications specific to this branch (new version of scons). In order to build using this you must download the scons-local package and replace the old version of scons. refs #328

Changed 8 months ago by prock

Progress on the build_system_rework branch has been progressing very well. We have completed all the build targets including static library, shared library, python library, tests, ext and projects. The install targets are in place but we still have the rpath issue that needs to be worked out. I've added a few command line options to make packagers lives a little easier.

Changed 8 months ago by prock

the install targets now work. Install targets include: install-shared, install-static, install-python, install-dev, install-all.

The install targets now copy everything into the users <python>/site-packages/fife directory. All clients had to be updated to update the way they import fife. Client's like UH and PARPG will no longer work with build_system_rework.

Changed 8 months ago by prock

Added target 'python-swig' which generates only the swig wrappers.

Changed 8 months ago by prock

vtchill has merged the build_system_rework branch back into trunk. There is one known issue... code blocks project files need to be updated.

Changed 8 months ago by prock

  • status changed from assigned to closed
  • resolution set to fixed

Encountered some minor issues. This is now complete. Closing ticket.

Add/Change #328 (Improving our build scripts)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.