Compiling Nim package from source is not that hard. On my Windows system, I usually do these:
$ cd csources
$ build64.bat
$ cd ..
$ bin\nim c koch
$ koch boot -d:release
$ koch tools
$ koch nimble
Of course, now my Nim source code directory is polluted with executables, object files, and so on. Is there an automated way to install the only necessary executables and subdirectories on another directory?.
On Free Pascal, you can do this:
$ cd <FPC source directory>
$ make install INSTALL_PREFIX=C:\FPC\3.1.1 NOGDB=1
$ make clean
That means a new Free Pascal compiler package will be built on C:\FPC\3.1.1, and you can clean the source directory afterwards.
Run ./install.sh <temporary_directory> from the source directory after building to extract the required files.
The "compiler" directory is currently included but it should not really installed according to https://github.com/nim-lang/Nim/issues/4866#issuecomment-271194805
OK, found an issue. I copied bin and lib directories to C:Nim.
Cannot compile this program:
import math
echo log10(100.0)
Nim says:
C:\Users\0590\Codes\Nim>nim c -d:release mathtest.nim
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: mathtest [Processing]
mathtest.nim(1, 8) Error: cannot open file: math
OK. New error message:
$ nim c -d:release mathtest.nim
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: mathtest [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
C:\nim\lib\pure\bitops.nim(50, 10) Error: cannot open file: macros$ nim c -d:release mathtest.nim
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: mathtest [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
C:\nim\lib\pure\bitops.nim(50, 10) Error: cannot open file: macros
I'm afraid there will be another similar "cannot open file" messages...