Difference between revisions of "Core (real-time) Framework v0.1 - Installation Instructions"

From wiki.gpii
Jump to: navigation, search
(Fedora 17)
Line 25: Line 25:
 
</pre>
 
</pre>
  
your GPII code directory:
+
==== Install RFID listener ====
<pre># Clone the GPII PCSC Tools Repository
+
(only required if you want to use a RFID listener on the system)
 +
 
 +
Go to the location where you want to install the GPII
 +
 
 +
Clone the GPII PCSC Tools Repository
 +
<pre>
 
git clone https://github.com/GPII/linux-rfid-user-listener
 
git clone https://github.com/GPII/linux-rfid-user-listener
 
cd linux-rfid-user-listener
 
cd linux-rfid-user-listener
 +
</pre>
  
# Compile and install
+
Compile and install
 +
<pre>
 
make all
 
make all
 
sudo make install
 
sudo make install
 +
</pre>
 +
 +
Final step is to start a daemon running in the background and the scanner
  
# Start PCSC the daemon
+
Start first daemon and then scanner:
 +
<pre>
 
sudo /usr/sbin/pcscd
 
sudo /usr/sbin/pcscd
 
# Run the scanner
 
 
./pcsc_scan
 
./pcsc_scan
 
</pre>
 
</pre>
We also include a utility for reading and writing the tokens on smart cards.
 
<pre># If you haven't started the daemon already do so.
 
sudo /usr/sbin/pcscd
 
  
# Shows the model of tag you're using
+
==== Install and run GPII Personalization Framework ====
python pcscutil.py get model
 
  
# Shows the current token stored on the card
+
Make sure you're in the directory where you want to install the GPII.
python pcscutil.py get gpiitoken
 
 
 
# Sets the card token to 'nisha'
 
python pcscutil.py set gpiitoken nisha
 
</pre>
 
 
 
== The GPII Personalization Framework ==
 
  
 
From the command line:
 
From the command line:
<pre># Clone the GPII Linux repository:
+
<pre>
 +
# Clone the GPII Linux repository:
 
git clone git://github.com/GPII/linux.git
 
git clone git://github.com/GPII/linux.git
 
cd linux
 
cd linux
Line 67: Line 66:
 
./start.sh
 
./start.sh
 
</pre>
 
</pre>
=== Fedora In VirtualBox ===
 
  
Most of the GPII development team run Fedora Linux as a virtual machine with VirtualBox.
+
==== Running the framework in general ====
 +
 
 +
After having followed the above steps, you will have installed the GPII and it should be running on the machine. In general (for example after a reboot), you would have to do the following steps:
 +
 
 +
To starts GPII, go to the GPII install dir, then:
 +
 
 +
<pre>
 +
cd linux
 +
./start.sh
 +
</pre>
 +
 
 +
To enable the RFID listener, go to the GPII install dir, then:
  
#Ensure you're running VirtualBox 4.1.10 or higher ([https://www.virtualbox.org/ https://www.virtualbox.org/])
+
<pre>
#Set up a new Virtual Box VM
+
cd linux-rfid-user-listener
##Choose "Enable 3D Acceleration" in the Display tab
+
sudo /usr/sbin/pcscd
##Ensure you allocate sufficient disk space and RAM to support a full Fedora installation with GNOME Shell 3
+
./pcsc_scan
#Update your kernel by running, as root: yum -y update kernel
+
</pre>
#Restart your virtual machine
 
#Mount the VirtualBox Guest Additions disk by choosing '''Devices''' > '''Install Guest Additions''' from the VirtualBox menu bar
 
#As root:
 
##cd /run/meda/&lt;username&gt;/VBOXADD...
 
##sh ./VBoxLinuxAdditions.run
 
##restorecon -R -v /opt
 
#Restart your virtual machine
 
  
 
== Windows Installation Instructions ==
 
== Windows Installation Instructions ==

Revision as of 15:38, 11 February 2013

Installation Instrutions

This release supports two platforms; windows 7 and Fedora Linux with Gnome 3. Installation instructions can be found below


Fedora 17

Requirements:

  • Fedora 17 needs to be installed. Installation requires super-user privileges.

Installation Instructions

Ensure pre-requisites

sudo yum install kernel-devel kernel-headers dkms gcc gcc-c++ \
  git openssl-devel glib-devel glib2-devel gtk3-devel \
  pcsc-lite-devel pcsc-lite pcsc-perl

Install node

sudo yum localinstall --nogpgcheck http://nodejs.tchol.org/repocfg/fedora/nodejs-stable-release.noarch.rpm
sudo yum install nodejs nodejs-devel nodejs-gyp nodejs-doc nodejs-debuginfo
sudo ln -s /usr/bin/nodejs /usr/bin/node

Install RFID listener

(only required if you want to use a RFID listener on the system)

Go to the location where you want to install the GPII

Clone the GPII PCSC Tools Repository

git clone https://github.com/GPII/linux-rfid-user-listener
cd linux-rfid-user-listener

Compile and install

make all
sudo make install

Final step is to start a daemon running in the background and the scanner

Start first daemon and then scanner:

sudo /usr/sbin/pcscd
./pcsc_scan

Install and run GPII Personalization Framework

Make sure you're in the directory where you want to install the GPII.

From the command line:

# Clone the GPII Linux repository:
git clone git://github.com/GPII/linux.git
cd linux

# Build the Framework:
./build.sh

# Start up the Personalization Framework:
./start.sh

Running the framework in general

After having followed the above steps, you will have installed the GPII and it should be running on the machine. In general (for example after a reboot), you would have to do the following steps:

To starts GPII, go to the GPII install dir, then:

cd linux
./start.sh

To enable the RFID listener, go to the GPII install dir, then:

cd linux-rfid-user-listener
sudo /usr/sbin/pcscd
./pcsc_scan

Windows Installation Instructions

Dependencies

Building and Starting

  • Open up cmd.exe (Start > Run > cmd.exe)
  • Create a GPII directory
    • mkdir c:\gpii (or wherever you prefer)
    • cd c:\gpii
  • Clone the GPII Windows repository
    • git clone git://github.com/GPII/windows.git
    • cd windows
  • Compile the GPII Windows native code (run the following command from the Windows/DOS shell):
    • build.cmd
  • Start the GPII Framework and the USB Listener (from the Windows/DOS shell - not the Git Bash sell - while in the gpii\windows folder):
    • start.cmd

Setup and Configuration

  • On Windows 7, the GPII can't currently kill applications using taskill unless you:
    • Go into Control Panels > User Accounts and Family Safety > User Accounts > User Account Control Settings
    • Set the notification level to "Never notify"

Troubleshooting

Once you start the system (by using the start.cmd/start.sh scripts), you can test it without USB by navigating your browser to the following URLs:

http://localhost:8081/user/sammy/login

http://localhost:8081/user/sammy/logout

Mac Installation Instructions

Covering the installation of the universal package and node.js.

The Mac installation doesn't do much yet except running gpii in node.js. There are no settings handlers or listeners implemented yet, so only the http GET or POST requests will work.

  • Installing make: The make compiler is not automatically included in a Mac, but is included in the Xcode development package.
    • If you have already installed xcode, you can skip this step. Otherwise there are two possibilities as described below. Anyway you need an apple developer account, which is for free at this time.
    • Download and install Xcode from the apple developers page Apple Developer Center
    • or only install the "Command Line Tools For XCode" from Apple Developer Downloads
  • Install git. The GUI-Tools automatically install the command line tools too.
  • Install node.js in the terminal:
git clone git://github.com/ry/node.git
cd /node
./configure
make
sudo make install
  • Install GPII Universal

(to be tested.)

git clone git://github.com/GPII/universal.git

finally you need to mimic the structure in the git gpii linux version.

  • move the just downloaded "universal" directory to a place you like.
  • create a folder-structure looking like this
- gpii 
- mac
-- index.js
- node-modules
-- universal 
  • the index.js file needs to be created and for the beginning can contain
/*!
GPII Linux Personalization Framework Node.js Bootstrap

Copyright 2012 OCAD University

Licensed under the New BSD license. You may not use this file except in
compliance with this License.

You may obtain a copy of the License at
https://github.com/gpii/universal/LICENSE.txt
*/

var fluid = require("universal"),
    gpii = fluid.registerNamespace("gpii");

// fluid.require("gsettingsBridge", require); /* linux specific, like this you can load the handlers and listeners as soon as they are developed. */

gpii.config.makeConfigLoader({
    nodeEnv: gpii.config.getNodeEnv("fm.ps.sr.dr.mm.os.development"),
    configPath: gpii.config.getConfigPath() || "../node_modules/universal/gpii/configs"
});
  • the "universal" folder is the recently downloaded folder from github, containing all the downloaded files.
  • open the terminal and go to the just created index.js file. run:
node index.js

Well done, this will start the node.js server and make gpii running and listening. The Port number on which it is listening should be shown in the second-last output line, like this:

...
13:04:25.786:   Firing event registerMiddleware of component with typename gpii.requests and id 9c0m8p6e-14 to list of 1 listeners
13:04:25.787:   Firing event onHandlers of component with typename gpii.server and id 9c0m8p6e-9 to list of 1 listeners
13:04:25.789:   Server is running on port: 8081
13:04:25.789:   Cleared instantiators (last id 9c0m8p6e-8) from threadLocal for end of flowManager.preferencesServer.solutionsRegistry.deviceReporter.matchMaker.ontologyServer.development