Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
* Add some notes about build pre-requisites, mostly Mac because that's what I
use and next time I want to set up faster.
* Better explanation of what to do if the wrapper libs aren't being built.
* unify java_sml_alias and java_target
* Add "list" to the list of extra targets available from the build CLI
  • Loading branch information
garfieldnate committed Jul 26, 2023
1 parent 8cffd84 commit 58e5eb8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Core/ClientSMLSWIG/Java/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ srcdir = clone.Dir('src')
smldir = srcdir.Dir('sml')
classdir = clone.Dir('classes')
jar = clone.File('sml.jar')
java_target = 'sml_java'
java_target = java_sml_alias
fake_java_target = '#fake_java_target'

if sys.platform == 'darwin':
Expand Down
2 changes: 1 addition & 1 deletion Core/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ for d in ['ElementXML/src', 'ConnectionSML/src', 'ClientSML/src', 'shared']:
env.Alias('headers', headers)

if not CheckSWIG(env):
print('SWIG not found, will not attempt to build wrappers for other programming languages.')
print('SWIG not found. Will not define sml_* build targets. Install swig to build wrappers for other languages.')
else:
for x in 'Python Java Tcl CSharp'.split():
SConscript(os.path.join('ClientSMLSWIG', x, 'SConscript'))
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,31 @@ Some performance statistics are calculated automatically using the Factorization

Disclaimer: These are worst case tests. Average performance is probably much higher. In addition, these show that even in worst case, Soar beats its goal of 50 msec reactivity (in these tests, the max is ~30msec per decision).

# Development

## Prerequisites

To compile Soar, you will need the following:

* C/C++ compiler
- Mac: `xcode-select --install`
- Linux: `sudo apt-get install build-essential`
* Python
- Mac: `brew install python`
* Java
- We recommend using [SDKMan](https://sdkman.io/). Install JDK 17 (Temurin is recommended).

To compile the extra SML wrapper libs, you will need the following:

* C# compiler (`csc`)
- Mac: `brew install mono`
* Tcl
- Mac: `brew install tcl-tk`

The project supports generating compile_commands.json, which can be used by e.g. VSCode with the C/C++ plugin to provide IntelliSense. To generate this file, run scons with the `cdb` target:

python3 scons/scons.py --scu --opt --verbose cdb

# License

Soar is available under the following [LICENSE](https://github.com/SoarGroup/Soar/blob/development/LICENSE.md). This license is [BSD](http://opensource.org/licenses/BSD-2-Clause)
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ print("Targets available:")
print(" Core: kernel* cli* scripts*")
print(" Testing: performance_tests tests")
print(f" SWIG: {SML_PYTHON_ALIAS} {SML_TCL_ALIAS} {SML_JAVA_ALIAS}* {SML_CSHARP_ALIAS}")
print(f" Extras: debugger* headers* {COMPILE_DB_ALIAS}* tclsoarlib {MSVS_ALIAS}")
print(f" Extras: debugger* headers* {COMPILE_DB_ALIAS}* tclsoarlib {MSVS_ALIAS} list")
print("Custom Settings available: *default")
print(" Build Type: --dbg, --opt*, --static")
print(" Custom Paths: --out, --build, --tcl")
Expand Down

0 comments on commit 58e5eb8

Please sign in to comment.