Tuesday, April 2, 2013

Clojure on Windows


Mostly this is stolen from http://onbeyondlambda.blogspot.com/2012/01/setting-up-clojure-emacs-on-windows.html with some updates where appropriate.
  1. Install Java 7 JDK
  2. Use environment variables:
    JAVA_HOME = C:\Program Files\Java\jdk1.7.0_03Path = %Path%;%Java_Home%\bin;c:\lein
    JAVA_CMD = 
    %java_home%/bin/java.exe
  3.  Make directory c:\lein
  4. Extract to c:\lein
    http://www.paehl.com/open_source/?download=curl_729_0_ssl.ziphttps://raw.github.com/technomancy/leiningen/stable/bin/lein.bat
  5. Open a command prompt (win-r, "cmd")
  6. Run "lein self-install". Test install was successful by running "lein repl"
  7. Download Emacs. Extract it anywhere you like, and run "bin/runemacs"
    http://mirror.clarkson.edu/gnu/gnu/emacs/windows/emacs-24.3-bin-i386.zip
  8. Open ~/.emacs (<Ctrl>-X <Ctrl>-F ~/.emacs <Enter>) and add the following to enable an extra package repository, then restart:
    ;;; ELPA
    (require 'package)
    (add-to-list 'package-archives
        '("marmalade" . "http://marmalade-repo.org/packages/"))
  9. Install package "nrepl" (<Alt>-x package-install <Enter> nrepl <Enter>). This will also install "clojure-mode" as it is a dependency of nrepl.

Now, on to scad-clj!

  1. Download and install Openscad
    https://openscad.googlecode.com/files/OpenSCAD-2013.01-Installer.exe
  2. Download the project from github and extract anywhere you like
    https://github.com/farrellm/scad-clj/archive/master.zip
  3. Open a sample design, eg, "scad-clj-master/src/scad_clj/designs/cage.clj"
  4. Start a REPL (<Alt>-x nrepl-jack-in)

No comments:

Post a Comment