forked from nim-lang/Nim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.txt
88 lines (62 loc) · 2.87 KB
/
install.txt
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
Installation
============
Installation on Linux/UNIX
--------------------------
The GNU C Compiler is fully supported, other compilers may work. The C compiler
should be in your ``$PATH`` (most likely the case). Note that some few Linux
distributions do not ship with a GCC compiler preinstalled - then you have to
install it.
Install Nim by downloading the appropriate ``.tar.xz`` file and extracting it
to a directory of your choice. The Nim Compiler will stay in this
directory (unless you copy it somewhere else). The compiler does not need
write access to its directory, so copying the nim folder to ``/opt``
works.
Then run the following command::
sh build.sh
Unlike other software, Nim does not distribute its files over the whole file
hierarchy. This has the advantage that you can deinstall it by just deleting
its folder. The disadvantage is that you have to add it to your ``PATH``
manually. An alternative is to create a symbolic link in ``/usr/bin``::
[sudo] ln -s $your_install_dir/bin/nim /usr/bin/nim
There are also ``install.sh`` and ``deinstall.sh`` scripts for distributing
the files over the UNIX hierarchy. However, updating your Nim installation
is more cumbersome then.
To complete the installation you should also build Nim's tools like
``nimsuggest``, ``nimble`` or ``nimgrep`` via::
nim c koch
koch tools
Note that these tools should also end up in your ``PATH`` so adding
``$your_install_dir/bin/nim`` to your ``PATH`` is preferred over the symlink
solution.
Installation on the Macintosh
-----------------------------
Only MacOS X is supported.
Since MacOS X is UNIX based too, it works like the installation on Linux.
However, for unknown reasons the symbolic link method does not work on MacOS X.
You need to install Apple's developer's tools for the GNU Compiler Collection
or clang.
Installation on Windows
-----------------------
Install Nim by downloading and unzipping the ``nim_$version.zip`` file.
Run ``finish.exe`` to detect and setup your MingW environment.
Currently, the following C compilers are supported under Windows:
- | Microsoft's Visual C++
| http://msdn.microsoft.com/visualc
| (You need the SDK too - but not the full one: Only
the win32api header files and import libraries are essential.)
- | Gnu C Compiler (the mingw version; the cygwin version has not been tested!)
| http://www.mingw.org/download.shtml
- | LLVM with Clang or GNU C/C++ frontend
| http://llvm.org/releases/download.html
However, most testing is done with GCC.
Bootstrapping from GitHub
-------------------------
Take a look at the readme file on github `here <https://github.com/nim-lang/Nim#readme>`_
for instructions.
Installation of Nimble
----------------------
Nimble is Nim's package manager. For the source based installations where you
added Nim's ``bin`` directory to your ``$PATH`` the easiest way of installing
Nimble is via::
nim c koch
koch nimble