AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Mac ChatScript Compilation via Xcode ( plus some swig goodies )
 
 

I’ve added some mac and swig goodies to the ChatBrains project on GitHub (https://www.chatbots.org/ai_zone/viewthread/1698/).

1) Xcode project that you should be able to point to the latest CS source on your machine and compile targets for the chat script server and a shared libraries wrapped up in swig for a few of the languages it supports.  It can also create a mac shared library bundle for using CS in Unity3d.  Note: you need to not import the evserver directory source as this will not currently compile on mac due to using sys/epoll.h .  Most people don’t use the evserver anyway, no harm in removing it.  I just import src for all the targets then remove the evserver directory link.

2) Swig interface definition files for a variety of platforms and languages with generated source.  You should be able to use what’s in these directories to both generate the library for your platform/language and also compile and test it.  Enjoy! smile

 

 
  [ # 1 ]

So is this xcode project I should ship with std cs releases, so mac people can build CS or is it somehow only useful with your github project? 

Does the xcode try to compile the evserver directory? Does xcode just try to compile all code or do you list the code to compile, like makefiles?

 

 
  [ # 2 ]
Bruce Wilcox - Feb 20, 2015:

So is this xcode project I should ship with std cs releases, so mac people can build CS or is it somehow only useful with your github project?

The current targets in the chatbrains project Xcode depend on the Swig stuff in the same project to create the various shared libraries (the server target doesn’t have that dependancy).  So it’s setup to just add the latest src directory from the CS distribution to all the targes and then compile the various targets. 

I can create a Xcode project to include in CS to compile the server, that’s a cool idea.  Give me a bit of time, I will need to create it and test it a bit more, but I think it should be doable - i.e. people just open the project in Xcode and compile the server without any more work similar to the way the VS2010 directory/project works. 

I don’t know if you want to include the Swig stuff in the standard CS dist or not, it’s pretty fiddly and you probably don’t want to get stuck answering questions about that.

Bruce Wilcox - Feb 20, 2015:

Does the xcode try to compile the evserver directory? Does xcode just try to compile all code or do you list the code to compile, like makefiles?

The current project just compiles the code - I mucked with preprocessor macros for a few minutes but my first attempt didn’t work so I just abandoned it. -DDISCARDSERVER should work right?  I haven’t used Xcode enough to know the ins and outs of preprocessing.  Process as it stands is to import the src folder to all the targets and then delete the evserver directory in Xcode ( which just removes the link to the directory in xcode, not delete it on disk )

 

 
  [ # 3 ]

Definitiely no swig. Just a straight xcode for mac project like we have for LINUX and WINDOWX.  Thanks. 
-DDISCARDSERVER should work for standalone.

 

 
  [ # 4 ]

Finally got around to this.

Just put it in the top lvl directory like the VS2010 directory and mac users with Xcode installed should be able to just open the project file and press play.

If someone with a mac could test that would be great.  I just tried it on the latest 5.22 and it worked fine without fiddling ( OS X Yosemite 10.10.3, Xcode 6.3 (6D570) ).  It should compile and run, just press play.  It also copies a binary into the root directory of the chat script project so it’s easy to run from the command line.

For all the different targets like creating a library for perl, C# or whatever, checkout the chat brains project on github, the Xcode project there builds 6 different flavors with swig, etc.

File Attachments
Xcode.zip  (File Size: 27KB - Downloads: 124)
 

 
  [ # 5 ]

Hey Bruce - could you include that Xcode directory?  it would save me time copying it over for every new version of chatscript… wink

The zip file should be what you asked for.

 

 
  [ # 6 ]

OK. will be in next release (maybe this weekend.) we’ll see how it works.

 

 
  [ # 7 ]

Hi there!

Thank you Todd for working on these Mac implementations. I am brand new to this forum, but am very keen on getting chatScript up and running on my Mac and starting to build my own bot.

I seem to be having trouble making it work. I am unsure exactly how to go about running the MacCompile.sh file in Terminal (I apologize… I am very new to this and have not done much coding), and cannot get the above Xcode project to run, either.

If you have a moment, do you think you could offer any trouble shooting tips? I am on OS X 10.10.5.

Cheers!

Ed

 

 
  login or register to react