changeset 2:3ec5808e3b53

added screenshots + launching script
author souliane <souliane@mailoo.org>
date Fri, 20 Jun 2014 15:01:11 +0200
parents 9ad3704cbbd4
children 73d3b94b7364
files screenshots/0.4/laclasse/sat_chat_states.png screenshots/0.4/laclasse/sat_directory.png screenshots/0.4/laclasse/sat_extended_addressing.png screenshots/0.4/laclasse/sat_message_box.png screenshots/0.4/laclasse/sat_notifs.png screenshots/0.4/laclasse/sat_overview.png screenshots/0.4/laclasse/sat_overview_jdll.png screenshots/0.4/laclasse/sat_params.png screenshots/0.4/laclasse/sat_radiocol.png screenshots/0.4/laclasse/sat_radiocol_invit.png screenshots/0.4/laclasse/sat_radiocol_invit_2.png screenshots/0.4/laclasse/sat_richtext.png screenshots/0.4/laclasse/sat_roster_manager.png screenshots/0.4/laclasse/sat_static_blog.png screenshots/0.4/laclasse/sat_wysiwyg.png screenshots/0.5/laclasse/adhoc_administration.png screenshots/0.5/laclasse/announcement_admin.png screenshots/0.5/laclasse/bookmarks_manager_primivitus.png screenshots/0.5/laclasse/contact_list_avatars.png screenshots/0.5/laclasse/http_unsecure_warning.png screenshots/0.5/laclasse/logging.png screenshots/0.5/laclasse/logging_primitivus.png screenshots/0.5/laclasse/manage_account_delete_blogposts.png screenshots/0.5/laclasse/static_blog.png screenshots/0.5/laclasse/stdui_contact_list_primitivus.png screenshots/0.5/laclasse/stdui_profile_manager_primitivus_1.png screenshots/0.5/laclasse/stdui_profile_manager_primitivus_2.png scripts/launch.sh
diffstat 28 files changed, 187 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
Binary file screenshots/0.4/laclasse/sat_chat_states.png has changed
Binary file screenshots/0.4/laclasse/sat_directory.png has changed
Binary file screenshots/0.4/laclasse/sat_extended_addressing.png has changed
Binary file screenshots/0.4/laclasse/sat_message_box.png has changed
Binary file screenshots/0.4/laclasse/sat_notifs.png has changed
Binary file screenshots/0.4/laclasse/sat_overview.png has changed
Binary file screenshots/0.4/laclasse/sat_overview_jdll.png has changed
Binary file screenshots/0.4/laclasse/sat_params.png has changed
Binary file screenshots/0.4/laclasse/sat_radiocol.png has changed
Binary file screenshots/0.4/laclasse/sat_radiocol_invit.png has changed
Binary file screenshots/0.4/laclasse/sat_radiocol_invit_2.png has changed
Binary file screenshots/0.4/laclasse/sat_richtext.png has changed
Binary file screenshots/0.4/laclasse/sat_roster_manager.png has changed
Binary file screenshots/0.4/laclasse/sat_static_blog.png has changed
Binary file screenshots/0.4/laclasse/sat_wysiwyg.png has changed
Binary file screenshots/0.5/laclasse/adhoc_administration.png has changed
Binary file screenshots/0.5/laclasse/announcement_admin.png has changed
Binary file screenshots/0.5/laclasse/bookmarks_manager_primivitus.png has changed
Binary file screenshots/0.5/laclasse/contact_list_avatars.png has changed
Binary file screenshots/0.5/laclasse/http_unsecure_warning.png has changed
Binary file screenshots/0.5/laclasse/logging.png has changed
Binary file screenshots/0.5/laclasse/logging_primitivus.png has changed
Binary file screenshots/0.5/laclasse/manage_account_delete_blogposts.png has changed
Binary file screenshots/0.5/laclasse/static_blog.png has changed
Binary file screenshots/0.5/laclasse/stdui_contact_list_primitivus.png has changed
Binary file screenshots/0.5/laclasse/stdui_profile_manager_primitivus_1.png has changed
Binary file screenshots/0.5/laclasse/stdui_profile_manager_primitivus_2.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/launch.sh	Fri Jun 20 15:01:11 2014 +0200
@@ -0,0 +1,187 @@
+#!/bin/bash
+
+# This is a helping script to do some tasks like installing, cleaning, starting sat and/or libervia.
+
+# Python dist-packages where project are installed
+PACKAGES=/usr/local/lib/python2.7/dist-packages
+
+# Paths to the projects
+WORKSPACE=~/workspace
+SAT=$WORKSPACE/sat
+PYJS=$WORKSPACE/pyjamas
+LIBERVIA=$WORKSPACE/libervia
+PROSODY=$WORKSPACE/prosody-hg
+SATPUBSUB=$WORKSPACE/sat_pubsub
+URWID_SATEXT=$WORKSPACE/urwid_satext
+
+# PIDs of the processes
+LOCAL_DIR=~/.local/share/sat
+SAT_PID=$LOCAL_DIR/sat.pid
+LIB_PID=$LOCAL_DIR/libervia.pid
+SER_PID=$PROSODY/prosody.pid
+SPS_PID=$SATPUBSUB/twistd.pid
+
+# Connection information for sat_pubsub
+SPS_JID=sat-pubsub.souliane.org
+SPS_PWD=password
+
+# Informations for a concurrent sat instance
+# For this to work, you have to follow the instructions in:
+# http://wiki.goffi.org/wiki/Howto_launch_several_S%C3%A0T_instances
+# Also:
+#     - modify const_INT_PREFIX in the two DBus.py files
+#     - set DAEMON="" in the sat.sh to launch sat as a daemon
+SAT_MAIN=$WORKSPACE/sat_main
+SAT_MAIN_PID=~/.sat_main/sat.pid
+
+# 4 Firefox profiles names for testing
+FF_PROFILES=(test1 test2 test3 test4)
+# 4 SąT profiles names for testing
+SAT_PROFILES=(Peter Steven Dave Dino)
+# Passwords for these profiles
+SAT_PROFILES_PASSWD=(xxxxxx xxxxxx xxxxxx xxxxxx)
+
+# Launch sat in debug mode?
+SAT_DEBUG=1
+# Launch sat pubsub in debug mode?
+SPS_DEBUG=0
+# Launch libervia in debug mode?
+LIB_DEBUG=1
+# Force killing processes?
+KILL_FORCE=1
+
+kill_process() {
+    # $1 is the file containing the PID to kill
+    if [ -f $1 ]; then
+        PID=`cat $1`
+        if ps -p $PID > /dev/null; then
+            if [[ $KILL_FORCE = 1 ]]; then
+                kill -9 $PID
+            else
+                kill -INT $PID
+            fi
+        fi
+        rm -f $1
+    fi
+}
+
+stop_lib() {
+    echo "############ Stopping libervia ############"
+    libervia stop
+    kill_process $LIB_PID
+}
+stop_sat() {
+    echo "############### Stopping sat ##############"
+    sat stop
+    kill_process $SAT_PID
+}
+stop_ser() {
+    echo "############# Stopping Prosody ############"
+    cd $PROSODY && if [[ -f $SER_PID ]]; then ./prosodyctl stop; fi
+    kill_process $SER_PID
+    echo "########### Stopping sat_pubsub ###########"
+    kill_process $SPS_PID
+}
+start_ser() {
+    echo "############# Starting Prosody ############"
+    cd $PROSODY && ./prosodyctl start
+    echo "########## Installing sat_pubsub ##########"
+    cd $SATPUBSUB && sudo python setup.py install
+    echo "########### Starting sat-pubsub ###########"
+    if [[ $SPS_DEBUG = 1 ]]; then
+        mate-terminal -e "twistd -n -b sat_pubsub --jid=$SPS_JID --secret=$SPS_PWD" &
+    else
+        twistd sat_pubsub --jid=$SPS_JID --secret=$SPS_PWD
+    fi
+}
+start_sat() {
+    echo "############## Installing sat #############"
+    cd $SAT && sudo python setup.py install
+    echo "############### Starting sat ##############"
+    if [[ $SAT_DEBUG = 1 ]]; then
+        mate-terminal -e "sat debug" &
+    else
+        sat
+    fi
+}
+start_lib() {
+    echo "########### Installing libervia ###########"
+    cd $LIBERVIA && sudo python setup.py install
+    echo "############ Starting libervia ############"
+    cd src
+    if [[ $LIB_DEBUG = 1 ]]; then
+        mate-terminal -e "libervia debug" &
+    else
+        libervia
+    fi
+}
+4foxes() {
+    # Starts 4 instances of firefox and connect SąT profiles with Libervia
+    # Assumes the HTTPS port for local server is 8443
+    echo "####### Starting 4 libervia clients #######"
+    for I in `seq 0 3`; do
+        URL="https://localhost:8443/libervia.html?login=${SAT_PROFILES[$I]}&passwd=${SAT_PROFILES_PASSWD[$I]}"
+        firefox -no-remote -P ${FF_PROFILES[$I]} "$URL" &
+    done
+}
+clean() {
+    echo "############ Cleaning log files ###########"
+    rm -f $LOCAL_DIR/*.log*
+    rm -f $SATPUBSUB/twistd.log*
+    rm -f $PROSODY/prosody.log* $PROSODY/prosody.err*
+}
+purge() {
+    echo "######## Purging installed packages #######"
+    rm -rf $PACKAGES/sat
+    rm -rf $PACKAGES/sat_frontends
+    rm -rf $PACKAGES/libervia
+    rm -rf $PACKAGES/libervia_server
+}
+main() {
+    echo "######## Starting SąT main instance #######"
+    export PYTHONPATH=$SAT_MAIN/lib
+    cd $SAT_MAIN/lib/sat && hg pull -u && ./sat.sh
+    echo "#### Starting primitivus main instance ####"
+    cd $SAT_MAIN/lib/sat_frontends/primitivus && ./primitivus
+}
+bridge() {
+    echo "######### Generating DBus.py files ########"
+    cd $SAT/src/bridge/bridge_constructor
+    ./bridge_constructor.py --force && cp generated/DBus.py ../DBus.py
+    ./bridge_constructor.py -s frontend --force && cp generated/DBus.py ../../../frontends/src/bridge/DBus.py
+    cd $SAT_MAIN/src/bridge/bridge_constructor
+    SAT_BRIDGE_CONST_INT_PREFIX='"org.goffi.sat_main"' ./bridge_constructor.py --force && cp generated/DBus.py ../DBus.py
+    SAT_BRIDGE_CONST_INT_PREFIX='"org.goffi.sat_main"' ./bridge_constructor.py -s frontend  --force && cp generated/DBus.py ../../../frontends/src/bridge/DBus.py
+}
+monitor() {
+    echo "## Monitoring DBus for SąT main instance ##"
+    killall -q dbus-monitor
+    nohup dbus-monitor "sender='org.goffi.sat_main', interface='org.goffi.sat_main.core'" >> /tmp/sat_xml_core_`date +%y.%m.%d`&
+    nohup dbus-monitor "sender='org.goffi.sat_main', interface='org.goffi.sat_main.plugin'" >> /tmp/sat_xml_plugin_`date +%y.%m.%d`&
+}
+case "$1" in
+    stop_lib) stop_lib ;;
+    stop_sat) stop_sat ;;
+    stop_ser) stop_ser ;;
+    start_ser) start_ser ;;
+    start_sat) start_sat ;;
+    start_lib) start_lib ;;
+    stop) stop_lib && stop_sat && stop_ser ;;
+    start) start_ser && start_sat && start_lib;;
+    restart_sat) stop_sat && stop_ser && start_ser && start_sat ;;
+    restart_lib) stop_lib && start_lib ;;
+    4foxes) 4foxes ;;
+    clean) clean ;;
+    purge) clean && purge;;
+    main) main ;;
+    bridge) bridge;;
+    monitor) monitor;;
+    *)
+        # default: reinstall and restart all
+        stop_lib && stop_sat && stop_ser
+        clean
+        start_ser && start_sat && start_lib
+        ;;
+esac
+
+echo "Done."