JavaScool:ProcessingLinux : Différence entre versions

De Sciencinfolycee
Aller à : navigation, rechercher
m (How to nicely install processing with linux)
m
 
(14 révisions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
 +
[[Catégorie:JavaScoolv3]]
 +
 
== How to nicely install processing with linux ==
 
== How to nicely install processing with linux ==
# As root you have to
+
 
## Install the Sun JDK6 in a standard location, e.g. ''/usr/java''  
+
=== Initial installation to have processing run ===
### Gets, e.g. ''jdk-6u21-linux-i586.bin'', from http://www.oracle.com/technetwork/java/javase/downloads/index.html in ''/tmp''
+
As root you have to
### Runs ''cd /usr/java ; /tmp/jdk-6u21-linux-i586.bin'' and follow instructions
+
# Install the Sun JDK6 in a standard location, e.g. ''/usr/java''  
## Install the processing files
+
## Gets, e.g. ''jdk-6u21-linux-i586.bin'', from http://www.oracle.com/technetwork/java/javase/downloads/index.html in ''/tmp''
 +
## Runs ''cd /usr/java ; /tmp/jdk-6u21-linux-i586.bin'' and follow instructions
 +
# Install the processing files
 
## Gets, e.g. ''processing-1.4.2.1.tgz'' from http://processing.org/download  
 
## Gets, e.g. ''processing-1.4.2.1.tgz'' from http://processing.org/download  
 
## Copy processing in a standard location, e.g. ''/usr/java''  
 
## Copy processing in a standard location, e.g. ''/usr/java''  
 
### ''tar xvzf processing-1.4.2.1.tgz ; mv processing-1.2.1 /usr/java ; /bin/rm processing-1.4.2.1.tgz''
 
### ''tar xvzf processing-1.4.2.1.tgz ; mv processing-1.2.1 /usr/java ; /bin/rm processing-1.4.2.1.tgz''
## Link the JDK6 to processing
+
## Adapt the preferences to Linux (assuimg here you use firefox and gnome)
### ''/bin/rm -rf /usr/java/processing-1.2.1/java ; ln -s /usr/java/jdk1.6.0_21 /usr/java/processing-1.2.1/java''
+
### ''sed -i 's/brower.linux *= .*/browser.linux = firefox/'          /usr/java/processing-1.2.1/lib/preferences.txt''
## Install the proper sound librairies from the openjdk to the sunjdk (use ''locate libpulse-java.so'' to find the libraries in your system)
+
### ''sed -i 's/[#]?launcher.linux *= .*/launcher.linux = gnome-open/' /usr/java/processing-1.2.1/lib/preferences.txt''
### ''cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libpulse-java.so  /usr/java/jdk1.6.0_21/jre/lib/i386/''
+
# Link the JDK6 to processing
### ''cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar /usr/java/jdk1.6.0_21/''
+
## ''/bin/rm -rf /usr/java/processing-1.2.1/java ; ln -s /usr/java/jdk1.6.0_21 /usr/java/processing-1.2.1/java''
 +
# You may have to install the proper sound/graphic librairies from the openjdk to the sunjdk (use ''locate libpulse-java.so'' to find the libraries in your system)
 +
## ''cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libpulse-java.so  /usr/java/jdk1.6.0_21/jre/lib/i386/''
 +
## ''cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar /usr/java/jdk1.6.0_21/''
 +
## ''cp /usr/java/processing-1.2.1/libraries/opengl/library/*.so /usr/java/jdk1.6.0_21/jre/lib/i386/''
 +
# To see the applets in firefox you may have to
 +
## ''rpm -e java-1.6.0-openjdk-plugin'' erase the open-jdk web browser plugin
 +
## ''ln -s /usr/java/jdk1.6.0_21/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins'' install manually the JRE plugin
 +
## for [http://blogs.sun.com/thinslice/entry/firefox_3_6_changes_the firefox-3.6] and latter
 +
### ''ln -s /usr/java/jdk1.6.0_22/jre/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins''
 +
# Optionnaly install additional librairies if needed in  ''/usr/java/processing-1.2.1/librairies''
 +
 
 +
=== How to choose your sketchbook workdir ===
 +
* Run ''/usr/java/processing-1.2.1/processing''
 +
* In ''$HOME/.processing/preferences.txt'' edit the ''sketchbook.path=<my-workdir>'' line for your convinience
 +
* rm ''$HOME/sketchbook''
 +
 
 +
=== Using you own processing starter (makefile commands) ===
 +
<pre>
 +
P_HOME=/usr/java/processing-1.2.1
 +
J_HOME=$(P_HOME)/java
 +
export PATH:=$(J_HOME)/bin:$(PATH)
 +
export CLASSPATH=$(shell echo '$(J_HOME)/lib/tools.jar $(J_HOME)/jre/lib/rt.jar $(wildcard $(P_HOME)/lib/*.jar)' | sed 's/ /:/g')
 +
 
 +
gui :
 +
@cd $(P_HOME) ; java processing.app.Base
 +
</pre>

Version actuelle datée du 19 août 2011 à 23:18


How to nicely install processing with linux

Initial installation to have processing run

As root you have to

  1.  Install the Sun JDK6 in a standard location, e.g. /usr/java
    1. Gets, e.g. jdk-6u21-linux-i586.bin, from http://www.oracle.com/technetwork/java/javase/downloads/index.html in /tmp
    2. Runs cd /usr/java ; /tmp/jdk-6u21-linux-i586.bin and follow instructions
  2. Install the processing files
    1. Gets, e.g. processing-1.4.2.1.tgz from http://processing.org/download
    2. Copy processing in a standard location, e.g. /usr/java
      1. tar xvzf processing-1.4.2.1.tgz ; mv processing-1.2.1 /usr/java ; /bin/rm processing-1.4.2.1.tgz
    3. Adapt the preferences to Linux (assuimg here you use firefox and gnome)
      1. sed -i 's/brower.linux *= .*/browser.linux = firefox/' /usr/java/processing-1.2.1/lib/preferences.txt
      2. sed -i 's/[#]?launcher.linux *= .*/launcher.linux = gnome-open/' /usr/java/processing-1.2.1/lib/preferences.txt
  3. Link the JDK6 to processing
    1. /bin/rm -rf /usr/java/processing-1.2.1/java ; ln -s /usr/java/jdk1.6.0_21 /usr/java/processing-1.2.1/java
  4. You may have to install the proper sound/graphic librairies from the openjdk to the sunjdk (use locate libpulse-java.so to find the libraries in your system)
    1. cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libpulse-java.so /usr/java/jdk1.6.0_21/jre/lib/i386/
    2. cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar /usr/java/jdk1.6.0_21/
    3. cp /usr/java/processing-1.2.1/libraries/opengl/library/*.so /usr/java/jdk1.6.0_21/jre/lib/i386/
  5. To see the applets in firefox you may have to
    1. rpm -e java-1.6.0-openjdk-plugin erase the open-jdk web browser plugin
    2. ln -s /usr/java/jdk1.6.0_21/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins install manually the JRE plugin
    3. for firefox-3.6 and latter
      1. ln -s /usr/java/jdk1.6.0_22/jre/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins
  6. Optionnaly install additional librairies if needed in /usr/java/processing-1.2.1/librairies

How to choose your sketchbook workdir

  • Run /usr/java/processing-1.2.1/processing
  • In $HOME/.processing/preferences.txt edit the sketchbook.path=<my-workdir> line for your convinience
  • rm $HOME/sketchbook

Using you own processing starter (makefile commands)

P_HOME=/usr/java/processing-1.2.1
J_HOME=$(P_HOME)/java
export PATH:=$(J_HOME)/bin:$(PATH)
export CLASSPATH=$(shell echo '$(J_HOME)/lib/tools.jar $(J_HOME)/jre/lib/rt.jar $(wildcard $(P_HOME)/lib/*.jar)' | sed 's/ /:/g')

gui :
	@cd $(P_HOME) ; java processing.app.Base