-
Notifications
You must be signed in to change notification settings - Fork 1
/
README-en-windows.template
181 lines (134 loc) · 3.85 KB
/
README-en-windows.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[Русская версия](README-ru.md)
**VeLisp** is AutoLISP interpreter with DCL support.
The idea is to treat AutoLISP as a general purpose programming language.
The goal is to run AutoLISP programs outside of AutoCAD.
Why? To learn basic AutoLISP and DCL programming, to write shell scripts, to
run DCL dialogs just like regular applications on Windows, MacOS and Linux.
### Table of contents
- [Install](#install)
- [Usage](#usage)
- [License](#license)
### Install
You can find the latest release [here](https://github.com/ten0s/velisp/releases).
#### Install via automatic setup
1. Download https://github.com/ten0s/velisp/releases/download/{{version}}/velisp-{{version}}-win-x64-setup.zip
2. Open Downloads folder
3. Double-click on velisp-{{version}}-win-x64-setup.zip to open the archive
4. Run velisp-{{version}}-win-x64-setup.exe
5. Follow the installation wizard. Default options are ok for most users
#### Install via binary archive
##### Download and unarchive
1. Download https://github.com/ten0s/velisp/releases/download/{{version}}/velisp-{{version}}-win-x64.zip
2. Open Downloads folder
3. Select velisp-{{version}}-win-x64.zip
4. Press the right mouse button
5. Click 'Extract All...'
6. Enter C:\
7. Click 'Extract'
##### Add the folder to PATH
1. Press 'Windows + Break' to open the System Info
2. Click 'Advanced system settings'
3. Click 'Environment Variables...'
4. Select 'Path' inside the User variables block
5. Click 'Edit...'
6. Click 'New...'
7. Enter C:\velisp-{{version}}-win-x64
8. Click 'OK'
9. Click 'OK'
### Usage
If you installed VeLisp via [automatic setup](#install-via-automatic-setup)
go to 'Start' -> 'VeLisp' -> 'VeLisp Command Prompt'.
If you installed Velisp via [binary archive](#install-via-binary-archive)
run the Command Prompt (cmd.exe) and move to the extraction directory:
```
> cd C:\velisp-{{version}}-win-x64
```
#### Run REPL (Read–Eval–Print Loop)
```
> velisp
VeLisp {{version}} on Windows
Type ".license" or ".help" for more information
_$ (+ 1 2)
3
_$ (defun add (a b) (+ a b))
ADD
_$ (mapcar '(lambda (x y) (itoa (add x y))) '(1 2 3) '(9 8 7))
("10" "10" "10")
_$ (quit)
```
#### Run code from file
Calculate 10th (by default) Fibonacci number
```
> velisp examples\fib.lsp
55
```
Calculate 11th Fibonacci number
```
> velisp examples\fib.lsp 11
89
```
Run the Calculator example
```
> velisp examples\calc.lsp
```
Run the Minesweeper example
```
> velisp examples\mines.lsp
```
Run the Fifteen Puzzle example
```
> velisp examples\fifteen.lsp
```
Run the Demo example
```
> velisp examples\demo.lsp
```
Run the Slides example
```
> velisp examples\slides.lsp
```
#### Run code from standard input
```
> type examples\fib.lsp | velisp
55
```
```
> type examples\fib.lsp | velisp -- 11
89
```
#### Run without DCL support (faster loading, good for scripting)
```
> velisp --no-dcl examples\fib.lsp
55
```
### Run the examples in AutoCAD
#### Add the examples folder to AutoCAD's search path
1. Click 'Tools' -> 'Options...'
2. Click 'Files' -> 'Support File Search Path'
3. Click 'Add...'
4. Click 'Browse...'
5. Select appropriately C:\Program Files\VeLisp\examples or C:\velisp-{{version}}-win-x64\examples
6. Click 'OK'
7. Click 'Apply'
7. Click 'OK'
#### Run the examples
1. Click 'Tools' -> 'AutoLISP' -> 'Visual LISP Editor'
2. Run in Visual LISP Console
```
_$ (load "calc")
_$ (load "mines")
_$ (load "fifteen")
_$ (load "demo")
_$ (load "slides")
```
### License
The project is licensed under the GNU General Public License v3.0 or later
with the exception below.
See [LICENSE](LICENSE) or
https://spdx.org/licenses/GPL-3.0-or-later.html
for full license information.
The files in the [examples/](examples/) and [lib/](lib/) directories
are licensed under the BSD Zero Clause License.
See [LICENSE](examples/LICENSE) or [LICENSE](lib/LICENSE) or
https://spdx.org/licenses/0BSD.html for full license
information.