From ed0e5d94aaa2c2b95ea31586d6361e8204c0aefc Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Wed, 14 Jan 2015 18:04:00 +1000 Subject: [PATCH 1/7] added execution rights to build.sh --- build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build.sh diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 From cfafa7c2b0c54702799cbae6161923dc9b9c541c Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Wed, 14 Jan 2015 18:05:31 +1000 Subject: [PATCH 2/7] faster way to bootstrap-build Nim --- readme.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index d5968982b..9623aa489 100644 --- a/readme.md +++ b/readme.md @@ -29,17 +29,13 @@ To build from source you will need: If you are on a fairly modern *nix system, the following steps should work: -``` +```bash $ git clone git://github.com/Araq/Nim.git $ cd Nim -$ git clone --depth 1 git://github.com/nim-lang/csources -$ cd csources && sh build.sh -$ cd .. -$ bin/nim c koch -$ ./koch boot -d:release +$ ./build.sh ``` -``koch install [dir]`` may then be used to install Nim, or you can simply +``./koch install [dir]`` may then be used to install Nim, or you can simply add it to your PATH. More ``koch`` related options are documented in [doc/koch.txt](doc/koch.txt). From 39ddcef0276a0ed7dd03e6ae3bd9aa20ad2ce0e6 Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Wed, 14 Jan 2015 19:02:47 +1000 Subject: [PATCH 3/7] updated install.txt --- install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.txt b/install.txt index deca55599..f308ef12f 100644 --- a/install.txt +++ b/install.txt @@ -17,7 +17,7 @@ works. Then run the following command:: - sh build.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 From 67d5bc6b0af9cdc5b256bb52e161c59e2c448ba8 Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Wed, 14 Jan 2015 19:03:04 +1000 Subject: [PATCH 4/7] updated web/download.txt --- web/download.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/web/download.txt b/web/download.txt index 497781ad6..0d66247f2 100644 --- a/web/download.txt +++ b/web/download.txt @@ -24,7 +24,7 @@ like systems. Binary packages may be provided later. Download `nim-0.10.2.zip `_, extract it and follow these instructions: -* sh build.sh +* ./build.sh * Add ``$your_install_dir/bin`` to your PATH. There are other ways to install Nim (like using the ``install.sh`` script), @@ -39,11 +39,7 @@ Change the branch to suit your needs:: git clone -b master git://github.com/Araq/Nim.git cd Nim - git clone -b master --depth 1 git://github.com/nim-lang/csources - cd csources && sh build.sh - cd .. - bin/nim c koch - ./koch boot -d:release + ./build.sh The ``master`` branch always contains the latest stable version of the compiler. If you want bleeding edge then switch to the ``devel`` branch and follow From f7dc9492d9f4c8071a05475be759495149c489b4 Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Thu, 15 Jan 2015 01:22:13 +1000 Subject: [PATCH 5/7] added quick bootstrap script for windows --- build.bat | 20 ++++++++++++++++++++ install.bat.template | 6 ++++++ 2 files changed, 26 insertions(+) create mode 100755 build.bat create mode 100755 install.bat.template diff --git a/build.bat b/build.bat new file mode 100755 index 000000000..5214944c0 --- /dev/null +++ b/build.bat @@ -0,0 +1,20 @@ + +if not exist "csources"( + git clone --depth 1 https://github.com/nim-lang/csources.git +) + +cd "csources" +if exist "C:\Program Files (x86)" ( + call build64.bat +) else ( + call build.bat +) + +cd ".." + +./bin/nim c koch +./koch boot -d:release + +xcopy /Y install.bat.template install.bat + +pause \ No newline at end of file diff --git a/install.bat.template b/install.bat.template new file mode 100755 index 000000000..f49c898cc --- /dev/null +++ b/install.bat.template @@ -0,0 +1,6 @@ + +if not "%1"=="" ( + ./koch install %1 +) else ( + ./koch install +) From eef75ba3c31bb77951575049588d7165683a4d52 Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Thu, 15 Jan 2015 01:22:27 +1000 Subject: [PATCH 6/7] updated readme --- readme.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 9623aa489..7790f4a3f 100644 --- a/readme.md +++ b/readme.md @@ -39,9 +39,11 @@ $ ./build.sh add it to your PATH. More ``koch`` related options are documented in [doc/koch.txt](doc/koch.txt). -The above steps can be performed on Windows in a similar fashion, the -``build.bat`` and ``build64.bat`` (for x86_64 systems) are provided to be used -instead of ``build.sh``. +The above steps can be performed on Windows in a similar fashion, use +``build.bat`` instead of ``build.sh``. Make sure you have mingw and git in +your PATH. If you want to use different compiler, run script and then +manually change `CC` and `LINKER` variables in `csources/build.bat` or +`csources/build64.bat`. ## Getting help A [forum](http://forum.nim-lang.org/) is available if you have any From 23c87d4e258c161f45b4fe4c89d832ad5fc116ba Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Thu, 15 Jan 2015 07:50:45 +1000 Subject: [PATCH 7/7] changed architecture detection --- build.bat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.bat b/build.bat index 5214944c0..b68d626f6 100755 --- a/build.bat +++ b/build.bat @@ -4,7 +4,9 @@ if not exist "csources"( ) cd "csources" -if exist "C:\Program Files (x86)" ( + +for /f "skip=1 delims=" %%x in ('wmic cpu get addresswidth') do if not defined AddressWidth set AddressWidth=%%x +if %AddressWidth%==64 ( call build64.bat ) else ( call build.bat