Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • scs/ipaaca
  • ramin.yaghoubzadeh/ipaaca
2 results
Show changes
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of IPAACA, the
# "Incremental Processing Architecture
# for Artificial Conversational Agents".
#
# Copyright (c) 2009-2016 Social Cognitive Systems Group
# CITEC, Bielefeld University
#
# http://opensource.cit-ec.de/projects/ipaaca/
# http://purl.org/net/ipaaca
#
# This file may be licensed under the terms of of the
# GNU Lesser General Public License Version 3 (the ``LGPL''),
# or (at your option) any later version.
#
# Software distributed under the License is distributed
# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the LGPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the LGPL along with this
# program. If not, go to http://www.gnu.org/licenses/lgpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The development of this software was supported by the
# Excellence Cluster EXC 277 Cognitive Interaction Technology.
# The Excellence Cluster EXC 277 is a grant of the Deutsche
# Forschungsgemeinschaft (DFG) in the context of the German
# Excellence Initiative.
from __future__ import division, print_function
import os
import platform
import sys
import time
import traceback
import ipaaca
def exit(code):
ipaaca.exit(code)
#if platform.system() == 'Windows':
# os._exit(code)
#else:
# sys.exit(code)
parser = ipaaca.IpaacaArgumentParser(description='Ipaaca Maintainor')
if __name__ == '__main__':
arguments = parser.parse_args()
# Warn if user tries to configure a transport other than socket or a
# server mode other than server
if (ipaaca.defaults.IPAACA_DEFAULT_RSB_TRANSPORT is not None and
ipaaca.defaults.IPAACA_DEFAULT_RSB_TRANSPORT != 'socket'):
print("ERROR: Works only with RSB transport type 'socket'.")
ipaaca.exit(1)
if (ipaaca.defaults.IPAACA_DEFAULT_RSB_SOCKET_SERVER is not None and
ipaaca.defaults.IPAACA_DEFAULT_RSB_SOCKET_SERVER != '1'):
print("ERROR: Works only in socket server mode '0'.")
ipaaca.exit(1)
# Configure rsb socket transport
ipaaca.defaults.IPAACA_DEFAULT_RSB_TRANSPORT = 'socket'
ipaaca.defaults.IPAACA_DEFAULT_RSB_SOCKET_SERVER = '1'
ob = ipaaca.OutputBuffer("IPAACAMaintainor")
while True:
try:
time.sleep(1)
except KeyboardInterrupt:
decision = raw_input('Shutdown the IPAACA socket transport hub (y/[n])?')
if decision in 'yY':
break
except Exception, e:
print(u'Exception: '+unicode(traceback.format_exc()))
ipaaca.exit(1)
ipaaca.exit(0)
......@@ -5,6 +5,15 @@ if [ -d /vol/soa/opt64/spread ]; then
/vol/soa/opt64/spread/current/sbin/spread -n localhost &
else
echo "Starting local-only spread daemon for ipaaca ..."
spread -n localhost &
spr=`which spread`
[ $? -eq 0 ] || {
echo spread not found in PATH - searching in /usr/sbin and /usr/local/sbin
spr=''
[ -e /usr/local/sbin/spread ] && spr="/usr/local/sbin/spread"
[ -e /usr/sbin/spread ] && spr="/usr/sbin/spread"
[ "$spr" = "" ] && echo "Could not find spread"
echo $spr
}
${spr} -n localhost &
fi
#!/bin/bash
PACKAGES="rsb"
# This file has been auto-generated by the soa script.
eval "`grep '^REQUIRED=\|^OPTIONAL=' DEPS.txt`"
REQ="$REQUIRED"
OPT="$OPTIONAL"
shopt -q nullglob || resetnullglob=1
shopt -s nullglob
shopt -q dotglob || resetdotglob=1
shopt -s dotglob
echo "Performing local resolution... "
mkdir -p deps/bin
mkdir -p deps/lib
mkdir -p deps/include
mkdir -p deps/scripts
mkdir -p deps/python
for P in $PACKAGES; do
for P in $REQ $OPT; do
echo "Importing from $P ..."
files=(../$P/dist/bin/*);
[ "$files" ] && cp -a ../$P/dist/bin/* deps/bin/
files=(../$P/dist/lib/*);
......@@ -25,8 +27,21 @@ for P in $PACKAGES; do
[ "$files" ] && for zipfile in ../$P/dist/python/*.zip; do
unzip -oqq $zipfile -d deps/python
done
files=(../$P/dist/*.cpp.zip);
[ "$files" ] && for zipfile in ../$P/dist/*.cpp.zip; do
unzip -oqq $zipfile -d deps/
done
files=(../$P/dist/*.py.zip);
[ "$files" ] && for zipfile in ../$P/dist/*.py.zip; do
unzip -oqq $zipfile -d deps/python
done
files=(../$P/dist/*.scripts.zip);
[ "$files" ] && for zipfile in ../$P/dist/*.scripts.zip; do
unzip -oqq $zipfile -d deps/scripts
done
chmod -R +x deps/bin
chmod -R +x deps/scripts
done
echo "Done."
[ "$resetdotglob" ] && shopt -u dotglob
[ "$resetnullglob" ] && shopt -u nullglob
[ "$resetnullglob" ] && shopt -u nullglob