Thursday, January 6, 2011

How to reconstruct Rulebases

The Motif/Windows GUI uses the rulebases.fws file. to recreate this file for whatever reason. If you have rulebase.W files in your conf directory, quit any open GUIs and recreate this file as follows:
Note: These commands will not work on NG FP2 and above. In fact, in NG FP2, they can cause further corruption of your rulebase file. On Unix:
    # cd $FWDIR/conf
    # fwm -g *.W
On NT:
    c:\> cd %FWDIR%\conf
    c:\WINNT\FW\conf> for %i in (*.W) do fw fwm -g %i
The differences are:
  • On Unix, the * is interpreted as a wildcard, including all .W files
  • On NT, the * is not interpreted as a wildcard, so you must list the .W files individually.
  • On NT, there is no 'fwm' binary, but it is included as part of fw.exe
Other notes:
  • When importing rulebase files, if objects referenced in a specific rulebase no longer exist, then the rulebase in question will not be successfully imported. You will see "Not in Scope" messages when you run this command. This is normal.
  • These steps will cause CORRUPTION of your rulebase file in NG FP2 as this command is no longer supported. NG FP3 and later do not allow the commands (e.g. executing fwm -g *.W nets a 'this command is no longer supported' message

No comments: