Making Wok Work

Hi Everyone,
After spending some time setting up my workbench and trying out various wok commands, I tried to create my own package in CDL. I was immediately confronted with the problem of making the OCC packages accessible from my WB. I gather that the unimplemented 'pinstall' is intended for that purpose. The method that I'm using may not be optimal (there's probably an easier way), involves three steps but it does get the job done. I'll use Standard as an example:

In wok, navigate to your wb home. Isse the command:
ucreate -p Standard

Navigate to the same directory in a unix shell program and issue these commands:
rmdir Standard
ln -s $CASROOT/src/Standard

Back in woksh:
wokcd Standard
umake -e xcpp

If all goes well you can now reference Standard with the 'uses' keyword in your own cdl.

I've done this for only a selected few of the numerous packages, but it has worked well for all of them so far - though some require that prerequisites be loaded first. For instance gp requires TCollection which requires TColStd which in turn requires MMgt. If anyone knows of a better way to do this I would appreciate your enlightenment! I found it extremely convenient that the OCAF manual contains code for a transformation container. I cut and paste it, very handy.

Tim M.

timoor's picture

I created a link to $CASROOT/src in my WB_Hme directory and found out that woksh doesn't mind a pre-existing directory when you issue the ucreate commands. This means it's easily a tcl script to import all packages. It seems ok just to iterate over the list of packages until all dependencies are satisfied. I created a second WB with "ucreate -f" to have an uncluttered work area. Wok umake now finds the OCC packages.

I had seen something here in the forum of using the original ros wb as the father, something like: ucreate -f ros - but I couldn't get it to work.

Has anyone else resolved this differently, or should it have just worked from the outset?

Tim

Tim

timoor's picture

Sorry I meant wcreate -f for wb creation - not ucreate -f

Denis Teissandier's picture

You can do that :
wokcd OS:OCC62

wcreate -f ros yourworkbench
wokcd yourworkbench
ucreate -p yourpackage

wsrc : you are in the src directory
winc : you are in the include directory
wbin : you are in the binary directory

to build yourpackage : umake yourpackage

Denis

timoor's picture

Hi Denis,
Thank you very much for your help. I got off to a false start by pointing to wok as WOK_HOME in CSF.edl so I was one level too deep. I straightened everything out and did as you suggested and it all works well now. It wasn't entirely a waste though, as I learned a lot about how things work - and I did get it to work, albeit in a klutzy way.

Thanks Again,
Tim M.