PleoCommand
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:command a Pleo dinosaur via a very flexible piping mechanism, configurable by GUI, written in Java for Unix/Windows




  
  

  



  

Directory structure

src All source files. This are the only one needed to generate all files in all the other directories.
bin Contains temporary files created during building. Will be recreated during build.
dist Contains all finally created files, ready for distribution. Can be recreated from src/ if deleted.
ext Additional external dependencies which are required for certain steps during building or running the application. Can be recreated from src/ if deleted.

First Building

If only build under Linux, PleoCommand will only work under Linux and vice versa, so building under both systems is needed to get a full working distribution.

Linux

Execute prepare.sh from the root directory. This will download some files.
Install from jdk-setup-linux.bin and unzip ant-bin.zip from "ext/prebuild" if needed. You may also use any recent enough version provided by your distributor.
Open a console and execute "ant fetch" in the root directory of PleoCommand.
Install the tools mentioned under "Rebuilding" and continue with "ant dist".
You will need about 600 MB free disk space.

Windows

Execute prepare.bat from the root directory. This will download some files.
Install from jdk-setup-win.exe and unzip ant-bin.zip from "ext/prebuild" if needed.
You must set the ANT_HOME environment variable to the directory where you unzipped the Ant files and add the bin directory to your PATH environment variable. You must also set the JAVA_HOME environment variable to the installation target directory of the JDK (not a JRE)
The final environment settings should be something like:
PATH="...;C:\Programme\Java\jdk1.6.0_20\bin;C:\ant\apache-ant-1.8.0\bin;C:\Programme\Git\cmd;C:\Programme\GnuWin32\bin;C:\MinGW\bin"
JAVA_HOME="C:\Programme\Java\jdk1.6.0_20" (not the bin sub-directory!!!)
Open a console by clicking on the win-cmd.lnk and execute "ant fetch" in the root directory of PleoCommand.
Install the tools mentioned under "Rebuilding" and continue with "ant dist".
You will need about 1800 MB free disk space.

Rebuilding

If any of the following files linked in this document are missing, execute "ant fetch" or "ant dist" to get them downloaded.

Linux

Open a console and execute "ant dist" in the root directory of PleoCommand.
You need the following tools for successful building, so if the build fails, install the missing tools, and retry:

Coreutils (rm, stat, md5sum, ...)

Coreutils are always available under any known Linux distribution.

GIT, GCC, Make, Bison, XSLTProc

If it's not already provided by your distributor, download from the URL listed at the end of this document.

Windows

Open a console by clicking on the win-cmd.lnk and execute "ant dist" in the root directory of PleoCommand.
You need the following tools for successful building, so if the build fails, install the missing tools, and retry:

Coreutils (rm, stat, md5sum, ...)

Install from coreutils-setup.zip and add the bin directory to your PATH environment variable.

GIT

Install from git-setup.zip.
It doesn't matter whether you select "additional icons, windows explorer integration, etc." but you have to select "Run Git From Windows Command Prompt (second option)" and "Check out as-is, commit Unix-Style (second option !!!)" when prompted for it.

GCC

Install from gcc-setup.zip. Enable "G++ Compiler" and "MinGW Make" in the setup.
You must add the bin directory to your PATH environment variable.

Make

Install from make-setup.zip. You must add the bin directory to your PATH environment variable.

Bison

Install from bison-setup.zip. You must add the bin directory to your PATH environment variable.

XSLTProc

Add the directory ext/build/xsltproc/bin to your PATH environment variable.
You may also copy the content to some other directory and add this to the PATH instead.


Running

PleoCommand needs the following prerequisites to be met in order to function properly.
PleoCommand itself is located in the dist directory. If this directory is missing or empty, a rebuild according to the "Rebuilding" section in this document must be done.

If any of the following files linked in this document are missing, execute "ant fetch" or "ant dist" to get them downloaded.

Linux

Java Runtime Environment

If it's not already provided by the distributor, go to http://www.java.com/en/download/installed.jsp.
You may also use the JDK version listed in the "First Building" section of this document.

Pleo USB Driver

You can just use the "USB Abstract Control Model driver for USB modems and ISDN adapters" which should already be available in most distributions.
If not, you have to make sure CONFIG_USB_ACM is set to either "Y" or "M" in the kernel:

"Device Drivers"
        [*] "USB support"
                <M> "USB Modem (CDC ACM) support"

PleoCommand

To finally start PleoCommand, execute dist/pleocommand.

MySkit (optional)

For creating your own motions or sounds, MySkit is a very good and fast solution.
Execute from MySkit-setup.zip with Wine to install MySkit.
MySkit should run perfectly with Wine (but maybe you have to turn of compositing in KDE4 to reduce flickering of the 3D-Pleo-Model).

BCI 2000 (optional)

BCI 2000 currently only works under Windows.

Windows

Java Runtime Environment

Go to http://www.java.com/en/download/installed.jsp.
You may also use the JDK version listed in the "First Building" section of this document.

Pleo USB Driver

If a driver selection dialog pops up after plugging in Pleo, choose "Manual selection of driver source" and point the installation dialog to the directory "ext/rt".
If everything works fine, you should see a new COM port in the Device Manager.

PleoCommand

To finally start PleoCommand, execute dist/PleoCommand.exe.

MySkit (optional)

For creating your own motions or sounds, MySkit is a very good and fast solution.
Execute from MySkit-setup.zip to install MySkit.

BCI 2000 (optional)

To use BCI 2000 as an input source for PleoCommand (via the TCP/IP Input component), execute BCI2000-setup.zip and copy all files from the BCI2000-Prog directory to the prog/ directory where BCI 2000 has been installed, overwriting existing files.
TODO Hint about creating missing exe files in the BCI2000-Prog dir
Start it by executing "BCI2000launcher.exe" and make sure that the Application module is set to "PleoCommandTCPIP".
To quickly set a fitting mask for the Application module, you may use the following line by simply pasting it in your parameter-file, replacing any exiting line beginning with "Application:PleoCommandTCPIPTask" (it should be on one line):

Application:PleoCommandTCPIPTask matrix Fields= { DataType a)Channel%20Nr b)Fixed%20Value } { #1 #2 #3 #4 #5 #6 #7 #8 } { matrix { int8 int32 int64 float32 float64 utfString ansiString hexData <omitted> } { Choose } % % % % x % % % % } { matrix { int8 int32 int64 float32 float64 utfString ansiString hexData <omitted> } { Choose } % % % % x % % % % } { matrix { int8 int32 int64 float32 float64 utfString ansiString hexData <omitted> } { Choose } % % % % x % % % % } { matrix { int8 int32 int64 float32 float64 utfString ansiString hexData <omitted> } { Choose } % % % % x % % % % } { matrix { int8 int32 int64 float32 float64 utfString ansiString hexData <omitted> } { Choose } % % % % x % % % % } { matrix { int8 int32 int64 float32 float64 utfString ansiString hexData <omitted> } { Choose } % % % % x % % % % } { matrix { int8 int32 int64 float32 float64 utfString ansiString hexData <omitted> } { Choose } % % % % x % % % % } { matrix { int8 int32 int64 float32 float64 utfString ansiString hexData <omitted> } { Choose } % % % % x % % % % } 0 1 2 3 4 5 6 7 % % % % % % % % // Type and number of channel or fixed value for each field

Pleo's Firmware

Pleo's firmware should be at least version 1.1 for PleoCommand to work properly.
To update it, unzip PleoSDSoftware_1.1.zip to an empty SD-Card, turn off Pleo, make sure it's battery is fully charged and cooled, insert the SD-Card and turn Pleo on. Several chimes will be played by Pleo and until a few minutes Pleo will fall asleep and can be turned off and the SD-Card can be removed.


Extending, Modifying

These are tools which help in extending or otherwise modifying PleoCommand, BCI 2000 and other sources in the src/ directory.

Linux

Eclipse

If it's not already provided by your distributor, download "Eclipse IDE for Java Developers" from http://www.eclipse.org/downloads/.
You may additionally want to install CDT from http://www.eclipse.org/cdt/ and EGit from http://www.eclipse.org/egit/.

C++ Builder Architect (optional)

Borland Architect is only needed for BCI 2000, and currently only works under Windows.

OpenOffice (optional)

Many of the icons and images in PleoCommand have been created with OpenOffice Draw. To install OpenOffice, visit http://www.openoffice.org or use the version provided by your distributor.

Pleo's PAWN (optional)

This is completely optional, as PleoCommand works fine without a PAWN script running in Pleo.

To create PAWN scripts, unpack the PleoDevelopmentKit.zip to any directory.
Copy ugobe_project_tool and libpython2.5.so.1.0 from the exe.linux-i686-2.5 directory from where you unpacked the zip file to your /usr/local/bin respectively /usr/local/lib directory.

Additionaly you need to copy the file ext/dev/pawncc/bin/pawncc to /usr/local/bin and the file ext/dev/pawncc/lib/libpawnc.so to /usr/local/lib (make sure both are executable).
You may also install the complete PAWN package instead, by executing pawn-setup.package but this installs many unneeded files.
If you want to use a newer version of PAWN, please make sure that it's still compatible with Pleo.

Take a look in PleoDevelopmentKit.zip for examples and documentation.

Windows

Eclipse

Download "Eclipse IDE for Java Developers" from http://www.eclipse.org/downloads/.
You may additionally want to install CDT from http://www.eclipse.org/cdt/ and SubClipse from http://subclipse.tigris.org.

Borland Architect (optional)

Borland Architect is only needed for BCI 2000.
BCI 2000 can only be compiled with Borland Architect, but newer releases may also work with GCC.
Visit https://downloads.embarcadero.com/free/c_builder do download a trial version or the free to use C++ Compiler (which didn't quite work for me).
Use "4BHK-8BCD5M-DTW77V-HBLA" as serial for the free trial (only works for 30 days).
You may disable everything except "Embarcadero RAD Studio" during installation.
Enter "Hoffmann_Oliver@gmx.de" as name and "cG8hT3dWdmIPROKf" as password on first start.

You may alternatively download the already compiled executables from BCI2000-modules.zip and put them in "bin/BCI2000Source/src/contrib/Application/PleoCommandTCPIP" and "bin/BCI2000Source/src/contrib/SignalSource/NexusSource" respectively, so the build process should be happy and skip the "Building BCI-2000 modules" step.

OpenOffice (optional)

Many of the icons and images in PleoCommand are created with OpenOffice Draw. To install OpenOffice, visit http://www.openoffice.org.

Pleo's PAWN (optional)

This is completely optional, as PleoCommand works fine without a PAWN script running in Pleo.

To create PAWN scripts, unpack the PleoDevelopmentKit.zip to any directory.
The ugobe and PAWN compilers are under bin for Windows and macosx for MacOS.
You may need to put the directory in your PATH, so Windows is able to find the pawncc and the ugobe_project_tool executable.

Take a look in PleoDevelopmentKit.zip for examples and documentation.


Distributing

Copy the contents of the dist and the ext/rt directory to the target machine.
Then follow the steps in the "Running" section on the target machine, i.e. install at least a Java Runtime Environment and the Pleo USB Driver.

3rd Party Tools

This is a list of all 3rd party tools used by this project and the versions which have been tested (and shipped):

Name Used For Minimal Version Tested With(Linux) Tested With(Windows) URL
Java JDK P, R 1.6 1.6.0.20 1.6.0.20 http://java.sun.com/
Apache Ant P 1.8 1.8.0 1.8.0 http://ant.apache.org/
wget P 1.10.0 1.12.0 1.11.4 http://www.gnu.org/software/wget/
Coreutils (md5sum, stat) B 5.3 8.5 5.3 http://www.gnu.org/software/coreutils/
RXTX B 2.1.7.2 2.1.7.2 2.1.7.2 http://rxtx.org/
CheckStyle B 5.0 5.1 5.1 http://checkstyle.sourceforge.net/
GIT B 1.6.0 1.7.1 1.7.0.2 http://git-scm.com/
GCC B 3.4.0 4.4.3 3.4.5 (MinGW 5.1.6) http://gcc.gnu.org/
Make B 3.0 (?) 3.81.2 ??? http://www.gnu.org/software/make/
Bison B 2.0 (?) 2.4.2 ??? http://www.gnu.org/software/bison/
XSLTProc B ??? 1.1.26 + 2.7.7 1.1.26 + 2.7.6 http://www.xmlsoft.org/
JSmooth B 0.9.9.5 0.9.9.7 0.9.9.7 http://jsmooth.sourceforge.net/
JUnit B 4.6 4.7 - http://www.junit.org/
hamcrest B 1.1 1.2 1.2 http://code.google.com/p/hamcrest/
BCI 2000 R 2.0 - 2.1 http://www.bci2000.org/
Pleo USB R 2.6.0 or 2007-06-04 2.6.34 (Linux-Kernel) 2007-06-04 (ugobe.inf) http://www.kernel.org/
http://www.pleoworld.com/
Pleo Firmware R 1.1 1.1 http://www.pleoworld.com/
Eclipse SDK D 3.5.0 3.5.1 3.5.1 http://www.eclipse.org/
Borland C++ Builder D 5.5 Compiler - 2010 Architect http://www.embarcadero.com/
PleoDevelopmentKit D 2.0 2.0 2.0 http://www.pleoworld.com/
PAWN D 3.3.3930 3.3.4127 3.3.4127 http://www.compuphase.com/pawn/pawn.htm
OpenOffice D 3.0 3.2 - http://go-oo.org
HTML Tidy D 4.8.0 20090325 - http://tidy.sourceforge.net/

Legend: R = Runtime, B = Building, D = Development, P = Prebuild - Needs to be installed before first building


Troubleshooting

Der Befehl "..." ist entweder falsch geschrieben oder konnte nicht gefunden werden.

Please check that you PATH is correct. See "First Building" for an example of a correct PATH environment if all of the above tools have been installed to their default directories.

Der Befehl "bds" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

You need to install Borland Architect. See "Extending, Modifying" for additional information.

Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK.
OR Unable to locate tools.jar. Expected to find it in ...

Make sure that JAVA_HOME points to the root of the JDK directory, not to any subdirectory within, so for example:
JAVA_HOME="C:\Programme\Java\jdk1.6.0_20"

Cannot run program "xsltproc": CreateProcess error=2, Das System kann die angegebene Datei nicht finden.

Either put ext/build/xsltproc/bin onto your PATH or just copy the files into a directory which is on the PATH, like "C:\Programme\GnuWin32\bin".

[jsmoothgen] java.io.IOException: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch

This seems to have to negative effect, the resulting executable is working fine. If you however compile unter Linux, you won't get this error message.

Error makefile: Command syntax error
OR gcc.exe: ....o: No such file or directory

Instead of GNU make the Architect Builder's make (aka CodeGear) has been selected, which is broken and can't correctly read Makefiles.
Please make sure that GNU Make's directory comes before the Architect Builder's one in the PATH environment, so a string like "C:\Programme\Embarcadero\RAD Studio\7.0\bin" is the last on the PATH.

Der Befehl "C:\..." ist entweder falsch geschrieben oder konnte nicht gefunden werden.

Make is known to have problems with special characters like "(" in the TEMP path, so maybe explicitly setting TEMP to some sane value like "C:\Temp" solves the problem.

echo "... needs manual rebuilding: Select Project - Compile All Projects"

If Borland Builder Architect doesn't start automatically, start it manually and open "bin\BCI2000Source\src\contrib\Application\PleoCommandTCPIP" or "bin\BCI2000Source\src\contrib\SignalSource\NexusSource" respectively. Then choose "Compile - Make".

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。