From dbcffcfccb39a35f2f8e2447a22776e5e761ce72 Mon Sep 17 00:00:00 2001 From: treeform Date: Tue, 8 Oct 2019 02:00:37 -0700 Subject: [PATCH] Easier build instructions for windows - just run `build_all.bat`. (#12276) * Easier build instructions for windows. * title letter * Update build_all.bat to be like build_all.sh --- build_all.bat | 16 ++++++++++++++++ readme.md | 27 +++++++++------------------ 2 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 build_all.bat diff --git a/build_all.bat b/build_all.bat new file mode 100644 index 0000000000..59df15594e --- /dev/null +++ b/build_all.bat @@ -0,0 +1,16 @@ +@echo off +rem build development version of the compiler; can be rerun safely +if not exist csources ( + git clone --depth 1 https://github.com/nim-lang/csources.git +) +if not exist bin\nim.exe ( + cd csources + if PROCESSOR_ARCHITECTURE == AMD64 ( + SET ARCH=64 + ) + CALL build.bat + cd .. +) +bin\nim.exe c --skipUserCfg --skipParentCfg koch +koch.exe boot -d:release +koch.exe tools \ No newline at end of file diff --git a/readme.md b/readme.md index f6122c1e8a..f78da5b146 100644 --- a/readme.md +++ b/readme.md @@ -60,29 +60,20 @@ the installation instructions on the website to do so: https://nim-lang.org/inst For package maintainers: see [packaging guidelines](https://nim-lang.github.io/Nim/packaging.html). + +First get Nim from github: + ``` -# step 1: git clone https://github.com/nim-lang/Nim.git cd Nim - -# step 2 (posix) clones `csources.git`, bootstraps Nim compiler and compiles tools -sh build_all.sh - -# step 2 (windows) -git clone --depth 1 https://github.com/nim-lang/csources.git - -cd csources -# requires `gcc` in your PATH, see also https://nim-lang.org/install_windows.html -build.bat # x86 Windows -build64.bat # x86_64 Windows -cd .. - -bin\nim c koch -koch boot -d:release -koch tools # Compile Nimble and other tools -# end of step 2 (windows) ``` +Next run the appropriate build shell script for your platform: + +* `build_all.sh` (Linux, Mac) +* `build_all.bat` (Windows) + + Finally, once you have finished the build steps (on Windows, Mac or Linux) you should add the ``bin`` directory to your PATH.