Giter VIP home page Giter VIP logo

clj-windows's Introduction

Clojure installer and CLI tools for windows

this is for installing the clojure CLI tools on windows

Warning

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

Installation

  1. Download the latest release from https://github.com/frericksm/clj-windows/releases
  2. Extract it to some <local-path>
  3. Execute <local-path>\windows-clojure-tools-1.10.0.414\install.exe

How install.exe works:

install.exe does the following things:

  1. 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)

  2. creates and fills the folder %localappdata%/Programs\clojure

    where %localappdata% is the expansion of the environment variable LOCALAPPDATA

  3. It adds the path %localappdata%/Programs\clojure\bin to the environment variable PATH in scope USER

Deinstallation

  1. Delete the folder %localappdata%/Programs\clojure
  2. Remove %localappdata%/Programs\clojure\bin from the environment variable PATH in scope USER

Build from source

Prerequisites

  1. Install https://golang.org/
  2. install maven https://maven.apache.org/

Steps

  1. Checkout https://github.com/frericksm/clj-windows.git
  2. change directory to clj-windows/clojure
  3. run "go build "
  4. change directory to clj-windows/clj
  5. run "go build "
  6. change directory to /clj-windows/install
  7. run "go build"
  8. change directory to /clj-windows
  9. run "mvn package"
  10. see clj-windows/target for build results an follow the installation task above

Command line arguments

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

clj-windows's People

Contributors

frericksm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.