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

From wiki.gpii
Jump to: navigation, search
(Fedora 17)
(category added again; h1 abuse removed)
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= Installation Instrutions =
+
<span style="color:#ff0000; font-size:large">This page only applies to v0.1 (2012) of the GPII framework - please see: [[Setting Up Your Development Environment]] for more current instructions</span>
  
This release supports two platforms; windows 7 and Fedora Linux with Gnome 3. Installation instructions can be found below
 
  
 +
This release supports two platforms: Windows 7 and Fedora Linux with Gnome 3. Installation instructions can be found below.
  
= Fedora 17 =
+
== Fedora 17 ==
  
 
=== Requirements: ===
 
=== Requirements: ===
* Fedora 17 needs to be installed. Installation requires super-user privileges.
+
 
 +
*Fedora 17 needs to be installed. Installation requires super-user privileges.
  
 
=== Installation Instructions ===
 
=== Installation Instructions ===
  
 
==== Ensure pre-requisites ====
 
==== Ensure pre-requisites ====
 
 
<pre>sudo yum install kernel-devel kernel-headers dkms gcc gcc-c++ \
 
<pre>sudo yum install kernel-devel kernel-headers dkms gcc gcc-c++ \
 
   git openssl-devel glib-devel glib2-devel gtk3-devel \
 
   git openssl-devel glib-devel glib2-devel gtk3-devel \
 
   pcsc-lite-devel pcsc-lite pcsc-perl
 
   pcsc-lite-devel pcsc-lite pcsc-perl
 
</pre>
 
</pre>
 
 
==== Install node ====
 
==== Install node ====
 
 
<pre>sudo yum localinstall --nogpgcheck http://nodejs.tchol.org/repocfg/fedora/nodejs-stable-release.noarch.rpm
 
<pre>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 yum install nodejs nodejs-devel nodejs-gyp nodejs-doc nodejs-debuginfo
sudo ln -s /usr/bin/nodejs /usr/bin/node
+
sudo ln -s /usr/bin/node /usr/bin/nodejs
 
</pre>
 
</pre>
 +
==== Install RFID listener ====
  
==== Install RFID listener ====
 
 
(only required if you want to use a RFID listener on the system)
 
(only required if you want to use a RFID listener on the system)
  
Line 31: Line 29:
  
 
Clone the GPII PCSC Tools Repository
 
Clone the GPII PCSC Tools Repository
<pre>
+
<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>
 
</pre>
 
 
Compile and install
 
Compile and install
<pre>
+
<pre>make all
make all
 
 
sudo make install
 
sudo make install
 
</pre>
 
</pre>
 
 
Final step is to start a daemon running in the background and the scanner
 
Final step is to start a daemon running in the background and the scanner
  
 
Start first daemon and then scanner:
 
Start first daemon and then scanner:
<pre>
+
<pre>sudo /usr/sbin/pcscd
sudo /usr/sbin/pcscd
 
 
./pcsc_scan
 
./pcsc_scan
 
</pre>
 
</pre>
 
 
==== Install and run GPII Personalization Framework ====
 
==== Install and run GPII Personalization Framework ====
  
Line 55: Line 47:
  
 
From the command line:
 
From the command line:
<pre>
+
<pre># Clone the GPII Linux repository:
# 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
 +
git checkout origin/v0.1
  
 
# Build the Framework:
 
# Build the Framework:
Line 66: Line 58:
 
./start.sh
 
./start.sh
 
</pre>
 
</pre>
 
 
==== Running the framework in general ====
 
==== Running the framework in general ====
  
Line 72: Line 63:
  
 
To starts GPII, go to the GPII install dir, then:
 
To starts GPII, go to the GPII install dir, then:
 
+
<pre>cd linux
<pre>
 
cd linux
 
 
./start.sh
 
./start.sh
 
</pre>
 
</pre>
 
 
To enable the RFID listener, go to the GPII install dir, then:
 
To enable the RFID listener, go to the GPII install dir, then:
 
+
<pre>cd linux-rfid-user-listener
<pre>
 
cd linux-rfid-user-listener
 
 
sudo /usr/sbin/pcscd
 
sudo /usr/sbin/pcscd
 
./pcsc_scan
 
./pcsc_scan
 
</pre>
 
</pre>
 
 
== Windows Installation Instructions ==
 
== Windows Installation Instructions ==
  
Line 96: Line 81:
  
 
*Node
 
*Node
**Go to [http://nodejs.org/download/ http://nodejs.org/download/], and choose the 32-bit (x86) version for Windows.
+
**Go to [http://nodejs.org/download/ http://nodejs.org/download/], and choose the 32-bit (x86) version for Windows. NB - we've had issues with the latest version of node, so to be on the safe side, we suggest you use 0.8.23, found here: [http://nodejs.org/dist/v0.8.23/ http://nodejs.org/dist/v0.8.23/] - for windows, download the file ending in "x86.msi"
  
 
*MinGW
 
*MinGW
Line 102: Line 87:
 
**When installing MinGW, make sure the C and C++ compiler checkboxes are on
 
**When installing MinGW, make sure the C and C++ compiler checkboxes are on
 
**Add C:\MinGW\bin to your PATH variable (Right click My Computer > Properties > Advanced > Environment Variables)
 
**Add C:\MinGW\bin to your PATH variable (Right click My Computer > Properties > Advanced > Environment Variables)
*Microsoft Visual C++ Redistributable Package (x86)
+
*Microsoft Visual C++ 2010 Redistributable Package (x86)
 
**Download and install from [http://www.microsoft.com/en-us/download/details.aspx?id=5555 http://www.microsoft.com/en-us/download/details.aspx?id=5555]
 
**Download and install from [http://www.microsoft.com/en-us/download/details.aspx?id=5555 http://www.microsoft.com/en-us/download/details.aspx?id=5555]
 +
*Microsoft Hotfix for issue KB2516889 - this issue prevents the application of the "High Contrast" desktop profile on all modern versions of Windows (7 and 8)
 +
**Download and install from [http://support.microsoft.com/kb/2516889 http://support.microsoft.com/kb/2516889]
  
 
=== Building and Starting ===
 
=== Building and Starting ===
Line 111: Line 98:
 
**mkdir c:\gpii (or wherever you prefer)
 
**mkdir c:\gpii (or wherever you prefer)
 
**cd c:\gpii
 
**cd c:\gpii
*Clone the GPII Windows repository
+
*Clone the GPII Windows repository and make sure we got the correct version
 
**git clone <nowiki>git://github.com/GPII/windows.git</nowiki>
 
**git clone <nowiki>git://github.com/GPII/windows.git</nowiki>
 
**cd windows
 
**cd windows
 +
**git checkout origin/v0.1
 
*Compile the GPII Windows native code (run the following command from the Windows/DOS shell):
 
*Compile the GPII Windows native code (run the following command from the Windows/DOS shell):
 
**build.cmd
 
**build.cmd
Line 122: Line 110:
  
 
*On Windows 7, the GPII can't currently kill applications using taskill unless you:
 
*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
+
**Go into Control Panel > User Accounts and Family Safety > User Accounts > User Account Control Settings
 
**Set the notification level to "Never notify"
 
**Set the notification level to "Never notify"
  
== Troubleshooting ==
+
=== RFID Listener ===
 +
 
 +
The RFID is currently at an experimental state and only available as an exe. It can be found here: [https://www.dropbox.com/s/n7ntpzvj4v1ksm8/GpiiUserListener110.exe https://www.dropbox.com/s/n7ntpzvj4v1ksm8/GpiiUserListener110.exe]
 +
 
 +
== Testing ==
  
 
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:
 
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/login]
+
[http://localhost:8081/user/sammy/login http://localhost:8081/user/sammy/login] (This will run the windows magnifier which can be exited with the WindowsKey + Esc)
  
 
[http://localhost:8081/user/sammy/logout http://localhost:8081/user/sammy/logout]
 
[http://localhost:8081/user/sammy/logout http://localhost:8081/user/sammy/logout]
  
== Mac Installation Instructions ==
+
To test the USB listener create a file '.gpii-user-token.txt' in the root of a USB memory stick containing the text "sammy" (no quotes). Insert the stick to login and remove it to logout.
 
 
Covering the installation of the universal package and node.js.
 
 
 
<span style="color:#ff0000;">'''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.'''</span>
 
 
 
*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 [https://developer.apple.com/devcenter/ Apple Developer Center]
 
**or only install the "Command Line Tools For XCode" from [https://developer.apple.com/downloads/ Apple Developer Downloads]
 
*Install [https://help.github.com/articles/set-up-git git]. The GUI-Tools automatically install the command line tools too.
 
*Install node.js in the terminal:
 
<pre>git clone git://github.com/ry/node.git
 
cd /node
 
./configure
 
make
 
sudo make install</pre>
 
*Install GPII Universal
 
 
 
(to be tested.)
 
<pre>git clone git://github.com/GPII/universal.git</pre>
 
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
 
<pre>- gpii
 
- mac
 
-- index.js
 
- node-modules
 
-- universal
 
</pre>
 
*the index.js file needs to be created and for the beginning can contain
 
<pre>/*!
 
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({
+
[[Category:GPII Architecture]]
    nodeEnv: gpii.config.getNodeEnv("fm.ps.sr.dr.mm.os.development"),
 
    configPath: gpii.config.getConfigPath() || "../node_modules/universal/gpii/configs"
 
});
 
</pre>
 
*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:
 
<pre>node index.js
 
</pre>
 
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:
 
<pre>...
 
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
 
</pre>
 

Latest revision as of 08:28, 10 April 2014

This page only applies to v0.1 (2012) of the GPII framework - please see: Setting Up Your Development Environment for more current instructions


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/node /usr/bin/nodejs 

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
git checkout origin/v0.1

# 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

  • Node

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 and make sure we got the correct version
    • git clone git://github.com/GPII/windows.git
    • cd windows
    • git checkout origin/v0.1
  • 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 Panel > User Accounts and Family Safety > User Accounts > User Account Control Settings
    • Set the notification level to "Never notify"

RFID Listener

The RFID is currently at an experimental state and only available as an exe. It can be found here: https://www.dropbox.com/s/n7ntpzvj4v1ksm8/GpiiUserListener110.exe

Testing

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 (This will run the windows magnifier which can be exited with the WindowsKey + Esc)

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

To test the USB listener create a file '.gpii-user-token.txt' in the root of a USB memory stick containing the text "sammy" (no quotes). Insert the stick to login and remove it to logout.