Skip to content

Commit 926f430

Browse files
Update howto.md
Substantially revised and updated installation instructions
1 parent 18cfb34 commit 926f430

File tree

1 file changed

+68
-49
lines changed

1 file changed

+68
-49
lines changed

raw-docs/howto.md

Lines changed: 68 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,57 @@
11
# HOWTO
22

3-
If you just want to have a try, then there is no need to read this documentation, you could get the distribution from [gaocegege.com/Processing.R](http://gaocegege.com/Processing.R)
3+
## Installation
44

5-
## Play with Docker
5+
Processing.R is available for the Processing Development Environment (PDE) or stand-alone. It is available in these forms:
66

7-
### DEPRECATED
7+
1. a PDE mode, which can be
8+
- added to PDE
9+
- built with its own PDE
10+
2. a command-line runner -- does not require the PDE
11+
3. a pre-built image -- OLD
12+
4. a docker container image -- DEPRECATED
813

9-
* `docker pull quay.io/gaocegege/processing.r`
10-
* `docker run quay.io/gaocegege/processing.r`
11-
* Open the link of NoVNC in a web browser and the default password is `process`. Input it in the URL and play with Processing.R in a desktop environment:)
14+
Processing.R is *not* currently available via PDE > Add Tool > Modes, however the mode will appear there once installed.
1215

13-
See [the demo in vimeo :)](https://vimeo.com/207571123)
16+
### 1. PDE Mode
1417

15-
## In Your Native Environment
16-
17-
### Editor Support
18+
**Warning:** Many parts of PDE integration are still incomplete: files cannot be double-clicked or dragged to open so code must be cut-pasted into the window, saved files cannot be reopened except through the recent files dialog list, the run button launches multiple window rather than re-running, stop button does not work, etc.
1819

1920
1. checkout Processing.R from github
2021
2. configure `./scripts/generate-ant-file.sh`
21-
3. build mode and install into PDE using `ant build` (must have ant)
22-
4. restart PDE
23-
5. select R Language from mode drop-down
22+
3. build and install mode into PDE using `ant build` (must have ant)
23+
4. start PDE and select `R Language` from mode drop-down menu
24+
25+
#### Configure script
26+
27+
Configure `./scripts/generate-ant-file.sh`:
2428

25-
**Note:** Many parts of PDE integration are still incomplete: files cannot be double-clicked or dragged to open so code must be cut-pasted into the window, saved files cannot be reopened except through the recent files dialog list, the run button launches multiple window rather than re-running, stop button does not work, etc.
29+
- `modes`: the destination for installing the mode once it is built.
30+
- MacOSX: `~/Documents/Processing/modes/`
31+
- Windows: `%homepath%\Documents\modes\`
32+
- Linux: `~/sketchbook/modes/`
33+
- `core` and `pde`: directories contain pde.jar and core.jar. They are be used to build RLangMode.
34+
- MacOSX: `/Applications/Processing.app/Contents/Java/`
35+
- `executable`: optional argument giving the location of PDE.
36+
- The path is used in `ant run` to start a PDE instance. Leave blank to not launch PDE on `ant run`.
37+
- MacOSX: `/Applications/Processing.app/Contents/MacOS/Processing`
2638

27-
There are 4 paths to be determined in `./scripts/generate-ant-file.sh`:
39+
##### A) Add to existing PDE
40+
41+
For example, to install the mode into a default existing PDE app on a MacOS system, set arguments in `./scripts/generate-ant-file.sh` such as:
2842

2943
```
3044
modes="~/Documents/Processing/modes"
31-
core="../processing/core/library/"
32-
pde="../processing/app/"
45+
core="/Applications/Processing.app/Contents/Java/"
46+
pde="/Applications/Processing.app/Contents/Java/"
3347
executable="/Applications/Processing.app/Contents/MacOS/Processing"
3448
```
3549

36-
After that,
37-
38-
* Run `./scripts/generate-ant-file.sh` to get a valid build.xml
39-
* Run `ant install`, the modes will be installed into PDE.
40-
41-
<div align="center">
42-
<img src="./img/editor.png" alt="Editor" width="500">
43-
</div>
44-
45-
<div align="center">
46-
<img src="./img/demo.gif" alt="Demo" width="300">
47-
</div>
48-
49-
#### Explanation about paths in `scripts/generate-ant-file.sh`
50-
51-
##### mode
52-
53-
The value of mode could be:
54-
55-
* MacOSX: `~/Documents/Processing/modes/`
56-
* Windows: `%homepath%\Documents\modes\`
57-
* Linux: `~/sketchbook/modes/`
58-
59-
##### pde and core
50+
This will generate build.xml errors (as the core and pde directories only contain the actual jars, not source). However it will work correctly.
6051

61-
These are two directories which contain pde.jar and core.jar. They are be used to build RLangMode.
52+
##### B) Create new PDE
6253

63-
You could get the two directories after building the source code of Processing:
54+
Build the source code of Processing core and pde wherever it is located on the system. For example:
6455

6556
```bash
6657
$ cd processing/core
@@ -69,18 +60,30 @@ $ cd processing/app
6960
$ ant build
7061
```
7162

72-
Then you could set the two paths:
63+
Then set the two paths accordingly in `./scripts/generate-ant-file.sh`:
7364

7465
```
75-
core="processing/core/library/"
76-
pde="processing/app/"
66+
modes="~/Documents/Processing/modes"
67+
core="../processing/core/library/"
68+
pde="../processing/app/"
69+
executable="/Applications/Processing.app/Contents/MacOS/Processing"
7770
```
7871

79-
##### executable
72+
#### Install
73+
74+
* Run `./scripts/generate-ant-file.sh` to get a valid build.xml
75+
* Run `ant install`, the modes will be installed into PDE.
76+
77+
<div align="center">
78+
<img src="./img/editor.png" alt="Editor" width="500">
79+
</div>
80+
81+
<div align="center">
82+
<img src="./img/demo.gif" alt="Demo" width="300">
83+
</div>
8084

81-
The path is used in `ant run`, it will call the binary to start a PDE instance, if you don't want this, feel free to leave it blank.
8285

83-
### Runner.jar
86+
### 2. Command Line Runner
8487

8588
Processing.R offers a jar, which allows to have a try without the installation of Processing app.
8689

@@ -101,3 +104,19 @@ The output is:
101104
<div align="center">
102105
<img src="./img/demo.png" alt="Output" width="100">
103106
</div>
107+
108+
### 3. Image (OLD)
109+
110+
**Warning:** The pre-built distribution may be significantly out of date compared to the latest repository.
111+
112+
The distribution image is available from:
113+
114+
- [gaocegege.com/Processing.R](http://gaocegege.com/Processing.R)
115+
116+
### 4. Docker Image (DEPRECATED)
117+
118+
* `docker pull quay.io/gaocegege/processing.r`
119+
* `docker run quay.io/gaocegege/processing.r`
120+
* Open the link of NoVNC in a web browser and the default password is `process`. Input it in the URL and play with Processing.R in a desktop environment:)
121+
122+
See [the demo in vimeo :)](https://vimeo.com/207571123)

0 commit comments

Comments
 (0)