this is for installing the clojure CLI tools on windows
Alex Miller points out that he is working on an official installer for windows and asks that my project clearly differentiate itself from the official installers.
see https://groups.google.com/d/msg/clojure/nw66LtqsaWU/rMv1GWEfDAAJ)
I am doing this:
THIS IS NOT THE OFFICIAL installer for clojure and cli tools on windows
see cli https://clojure.org/guides/getting_started for the official installers and https://dev.clojure.org/jira/browse/TDEPS-67 for progress on the windows part
- Download the latest release from https://github.com/frericksm/clj-windows/releases
- Extract it to some
<local-path>
- Execute
<local-path>
\windows-clojure-tools-1.10.0.414\install.exe
install.exe does the following things:
-
It downloads and extracts https://download.clojure.org/install/clojure-tools-VERSION.tar.gz where VERSION is replaced by the current version 1.10.0.414 (at the time of writing)
-
creates and fills the folder %localappdata%/Programs\clojure
where %localappdata% is the expansion of the environment variable LOCALAPPDATA
-
It adds the path %localappdata%/Programs\clojure\bin to the environment variable PATH in scope USER
- Delete the folder %localappdata%/Programs\clojure
- Remove %localappdata%/Programs\clojure\bin from the environment variable PATH in scope USER
- Install https://golang.org/
- install maven https://maven.apache.org/
- Checkout https://github.com/frericksm/clj-windows.git
- change directory to clj-windows/clojure
- run "go build "
- change directory to clj-windows/clj
- run "go build "
- change directory to /clj-windows/install
- run "go build"
- change directory to /clj-windows
- run "mvn package"
- see clj-windows/target for build results an follow the installation task above
There is a subtle difference in parsing command line arguments between unix and windows
while following command runs on unix
clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.20.0"} }}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware"])'
it will not run on windows. You have to use double quotes instead of single quotes an additionally you have to escape double quotes in strings with a backslash. so the modified command
clj -Sdeps "{:deps {cider/cider-nrepl {:mvn/version \"0.20.0\"} }}" -e "(require (quote cider-nrepl.main)) (cider-nrepl.main/init [\"cider.nrepl/cider-middleware\"])"
runs on windows and surprise it also runs on unix