|
| 1 | +#Chatscript on a Mac |
| 2 | + |
| 3 | +> © Bruce Wilcox, [email protected] brilligunderstanding.com |
| 4 | +
|
| 5 | +> Revision 1 - 7/16/2017 - [email protected] |
| 6 | +
|
| 7 | + |
| 8 | +## Installing |
| 9 | + |
| 10 | +Life is not as easy for Mac users since Bruce doesn't have a mac - therefore a build of the mac binary is not part of every release. |
| 11 | + |
| 12 | +However ChatScript builds and runs just fine on any version of OSX ( now called MacOs ) and there are many of us using ChatScript on macs with no problem. The unix underpinnings of MacOS make it a great development environment and ChatScript generally works the same way as under Linux. |
| 13 | + |
| 14 | +### Method 1 - build from command line |
| 15 | + |
| 16 | +After unzipping into a folder |
| 17 | +(typically called ChatScript), you need to compile the src in SRC. The alternate |
| 18 | +technology is to beg in the ChatScript forum on ChatBots.org for a mac user to send you |
| 19 | +their executable copy of the latest build. |
| 20 | +To compile means using XCODE and making an appropriate make file for it based on the |
| 21 | +make file in SRC. And you have to install curl and optionally postgres. If you don't have |
| 22 | +or want them you can in your build file do defines of: DISCARDDATABASE and |
| 23 | +DISCARDJSON. |
| 24 | + |
| 25 | +The example/default command line compile is located in NON-WINDOWS NON-C/MAC/MacCompile.sh. Read the readme in that directory for more instructions. |
| 26 | + |
| 27 | +### Method 2 - use outdated binary in the BINARIES folder |
| 28 | +Alternatively you can use the binary in BINARIES/MacChatScript, but it is at least one version behind unless you are grabbing chatscript directly from github. |
| 29 | + |
| 30 | +### Method 3 - use the included Xcode project to build |
| 31 | +There is also an Xcode project in the 'NON-WINDOWS NON-C/Xcode' directory that you can launch and build your own binary with. This is probably the prefered method for advanced users. |
| 32 | + |
| 33 | +## Prerequisites for compiling via Xcode |
| 34 | + |
| 35 | +####(included) curl library |
| 36 | +This is actually part of the default mac ecosystem and is already included in the Xcode project under 'TARGETS/MacChatScript/Build Phases/Link Binary with Libaries' ( navigation path in xcode editor ) |
| 37 | + |
| 38 | +#### (optional) mongodb libraries |
| 39 | +These can be aquired via brew ( http://brew.sh ) The command is: |
| 40 | + |
| 41 | + brew install mongodb mongo-c-driver |
| 42 | +#### (optional) postgress libraries |
| 43 | +These can also be aquired via brew. The command is: |
| 44 | + |
| 45 | + brew install postgresql |
| 46 | + |
| 47 | +## brew errata |
| 48 | + |
| 49 | +Follow the instructions at http://brew.sh to install and use brew. |
| 50 | + |
| 51 | +In general you can find the packages talked about in the is document with: |
| 52 | + |
| 53 | + brew search mongo |
| 54 | + brew search postgres |
| 55 | + |
| 56 | +You need the mongodb, mongo-c-driver and postgresql modules. |
| 57 | + |
| 58 | +***Important:*** The version of MacOS/OSX you are running determines what version of brew you run and what packages are available. The packages for your particular macos version might be different than above. |
| 59 | + |
| 60 | +## Configuring Xcode for Mongo and/or Postgres |
| 61 | + |
| 62 | +More details coming Soon - essentially it involves installing the libraries then adding them to the list of libs that get included. The setting is under build phases. |
| 63 | + |
| 64 | +## Running |
| 65 | + |
| 66 | +Running Chatscript is as simple as executing the binary you have from the instructions above. Follow the same instructions as the main manual similar to Linux. It boils down to: |
| 67 | + |
| 68 | +* Launch the `Terminal` application. It's found in /Applications/Utilities. note: ⌘[space] launches spotlight, just type terminal in the window that pops up to find it and click on it to launch it. |
| 69 | +* In `Terminal` `cd` to the directory that contains chatscript. example: `cd src/Chatscript` |
| 70 | +* Run your binary using the linux instructions, ie |
| 71 | + |
| 72 | + BINARIES/MacChatScript local |
| 73 | + |
| 74 | +## Getting Mac specific Help |
| 75 | + |
| 76 | +The best place for getting help is probably http://chatbots.org in the Chatscript forum. There are a number of friendly and helpful users there that answer mac specific question. The github project is primarily for people contributing to chatscript code, documentation or reporting bugs. |
0 commit comments