Herramientas Personales
Usted está aquí: Inicio Portal Content Frequently Asked Questions Building Olex2 from scratch

Building Olex2 from scratch

Building process of Olex2 executable in details

Olex2 can be build from source for Windows, Linux and Mac.

See notes at the end.

 

Windows

There is Olex2 project available in the 'build' folder to be used with MSVC 2005 and 2008. Building requires Python and precompiled wxWidgets to be preinstalled/compiled. The build assumes that there are two system variables set:

WX_DIR – the root folder of the wxWidgets library to be used for compiling and linking
PY_DIR – the location of Python

Note that Olex2 will be compiled into the same configuration folder, so Rebuild or Clean commands should be used if these variables change.  Also if these variables are changed while Visual Studio is running – it should be restarted to take the new variables into account.

The OLEX2_DIR variable might be used to specify the Olex2 GUI location (e.g. the Olex2 installation folder).

Olex2 can also be compiled for Windows using the scons script. The script uses Python running the script as the Python against which to compile Olex2 (the PY_DIR is NOT used). The WX_DIR variable is used only if the --wxdir option is not passed.

 

Linux and Mac

Make, CMake or scons script can be used to compile Olex2 on Linux.

The scons script uses py-config and wx-config coming first on the PATH to configure Python and wxWidgets used for Olex2 compilation. The readline library and python-imaging PIL (used at run time) should be available. To build Olex2, go to a folder with SConstruct file and run:

scons
or
scons –j number_of_CPU

Additional scons script parameters:

--olx_debug=Boolean – to specify if to build a debug verson
--olx_profile=Boolean – to specify if profiling information is required

When scons starts it will print the destination of the executables, which are stored under build/scons folder.

 To run Olex2 executable on Linux, the Olex2 GUI needs to be dowloaded, the unirun program can be used for this purpose. Once it is run, it will contact the olex2 web server and check available instalations and will ask you for the version you want. It is also required to run the unirun program before olex2 to apply any downloaded patches.

Mac executable needs to be wrapped to be useful, for this purpose the Mac Olex2 distribution has to be downloaded and the fresh executable placed in olex2.app/Contants/MacOSX.
 
Notes
 
Current version of wxWindows 2.8.10 has an HTML processing bug (see  http://trac.wxwidgets.org/ticket/10370), therefore for proper HTML rendering please use version 2.8.9.
Acciones de Documento