runThisSystem

runThisSystem Utility

Description

Normally, BNCS v4.x requires a few environment variables to give it its place in the world. These are set by the installer and you'd run "Workstation Manager" to launch the BNCS applications required.

This is the usual way workstations are configured, but it's useful for test/demo purposes to set-up a temporary environment to run BNCS. That's what runThisSystem utility is for.

The BNCS environment is typically:

CC_ROOT=w:\cs
CC_SYSTEM=masterSystem
CC_WORKSTATION=2
CC_SERVER_ROOT=w:\cs
PATH=...;%CC_ROOT%\%CC_SYSTEM%\windows\lib;%CC_ROOT%\%CC_SYSTEM%\windows\bin;...

(PATH shown is not an actual full path, with ... being used to denote various other settings for your specific workstation)

runThisSystem allows setting/overriding of these environment variables: sets the new environment, and launches child process of bncs_ws_man (workstation manager) which inherits this modified environment. Workstation manager then launches various other applications which also inherit the same modified environment.

Temporary or no-install?

It would be possible to use this instead of doing a full BNCS install. No faffing with environment settings, no changes to the path etc.

For development this is undesirable because the environment created is temporary and exists only from processes run by runThisSystem (and those chained off it).

What can happen is that you use runThisSystem to set up a temporary environment to run a BNCS system. Then using Windows explorer or command line run other BNCS applications that will have picked up a different environment because explorer is not a child process of runThisSystem. These other applications may appear to run, but wierd things will happen as they could be using different binaries, different config etc. etc.

You have been warned.

Settings

runThisSystem automatically works out where it is in the file structure, and sets the CC_ROOT, CC_SYSTEM environment variables appropriately. The app must exist in the top level directory of the system you want to run (so alongside the config, panels, source, windows etc. folders.

It can't however work out what workstation it should run - so there are two ways of setting that:

Config file

Write the required workstation number to a file adjacent to the executable: runThisSystem.ini:

[runThisSystem]
Workstation=2

Command line

Just provide the required workstation number as a command line parameter:

runThisSystem 2

System Server config

Ordinarily this runThisSystem runs stand-alone and doesn't set server environment variable. It is possible to override this too by providing an additional setting in the runThisSystem.ini file:

[runThisSystem]
Workstation=2
CC_SERVER_ROOT=\\192.168.1.210

This allows switching between different workstations on a machine that needs to be set to update from a system server.

Build: bncs_4.7.5 5800 a1b48197a Atos|Syntel © 2021