Home » Developing U++ » UppHub » OpenCascade package
OpenCascade package [message #41873] |
Sun, 02 February 2014 17:51  |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi,
because of recent changes in OpenCascade licensing (and consequently to OCE package), switching to LGPL, static builds are no longer convenient.
In addition, OCE added some plugin mechanics that make static builds cumbersome.
So, I removed completely the old OCE package and added an 'import' package named 'Oce2Upp'.
This package when run creates a directory three containing following packages:
1 - OCEBUILDER package, which provides a portable way to build OCE from inside Upp. The builder REQUIRES a very recent IDE and allows to build the full set of shared OCE libraries
2 - OCE package, which contains just the include files from OCE three and a couple of classes (OCEDoc and OCECtrl) that encapsulate the platform-dependent parts of OCE
USAGE :
1 - Fetch the OCE source three, with GIT :
git clone git://github.com/tpaviot/oce.git
As an alternative, sources can be fetched as a zip file here :
https://github.com/tpaviot/oce/zipball/master
2 - Run the 'Oce2Upp' bazaar application; it'll require the OCE source path and a destinazion path :

3 - Press the 'Generate' button and wait up to process finishes
4 - Add a new IDE assembly pointing to the generated OCEBUILDER root folder inside your destination path, for example
/home/massimo/sources/OCEBUILDER;/home/massimo/sources/upp-svn/bazaar;/home/massimo/sources/upp-svn/uppsrc
Beware, you NEED the Bazaar nest inside assembly, because OCE needs FreeType package on build, which is already in bazaar.
This is needed because OCEBUILDER package needs to be in an assembly and it contains some 60 subpackages which would clobber an already available assembly.
5 - Open the OCEBUILDER package and build it. Again, you'll need a recent IDE. A bug still present requires that you choose 'all shared' build in builder setup. The SO flag is not enough, because it don't take care of correct package order in build, which is required when building DLLs.
The build takes some 10-20 minutes, depending on PC speed.
At the end you'll find some 60+ shared modules in output folder.
6 - You MUST install the shared modules, which is platform-dependent; on Linux, for example:
sudo mkdir /usr/local/lib/OCE
sudo cp /path/of/generated/files/* /usr/local/lib/OCE/
create a 'oce.conf' inside /etc/ld.so.conf.d/ folder with just a line inside containing the lib path:
sudo echo /usr/local/lib/OCE > /etc/ld.so.conf.d/oce.conf
and finally run ldconfig:
On windows, simply create C:\OCE folder and copy all files there; you need to add this folder in PATH environment variable in order to use the libraries.
7 - You MUST set the new library path inside Upp builder Libraries tab
8 - Inside OCEBUILDER main folder you'll find an OCE package, which is the one to use on your projects. If you leave it where it is, you must add its nest in your assemblies; otherwise, just copy it inside MyApps folder.
9 - To test the whole stuff, just run the 'OCETest' package in Bazaar.
All this seems complicated but needs to be done just once, and takes some 10 minutes plus build time. From then you'll have OCE pagage ready to test with.
Usage is quite simple, just look at OCETest sample source code.
Ciao
Massimo
-
Attachment: oce2upp.png
(Size: 44.30KB, Downloaded 928 times)
[Updated on: Sun, 02 February 2014 18:01] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 27 18:22:25 CEST 2025
Total time taken to generate the page: 0.00792 seconds
|