clj-on-windows

Serafeim Papastefanos 2022-12-23T18:11:28.722049Z

Borkdude the Reddit questions are cool but is there an actual tutorial/ guide for getting started in Windows? Even if there is, is it linked from the clojure homepage ?

borkdude 2022-12-24T10:40:50.300939Z

@ales.najmann Perhaps you can also mention the Calva getting started and Clojure getting started guides in that Getting started document.

littleli 2022-12-24T11:15:33.461239Z

@borkdude I'll find a way to squeeze it in. Good idea.

Serafeim Papastefanos 2022-12-25T06:44:38.139569Z

Ok you probably won't believe it but I had actually written such a guide https://www.spapas.net/2022/04/14/clojure-windows/ some months ago and completely forgotten about it. 😵‍💫

Serafeim Papastefanos 2022-12-25T06:46:17.815629Z

Sean the windows section you mention starts with "Currently, clj on Windows is in an alpha state.". This notice is there for years!

seancorfield 2022-12-25T06:46:57.124229Z

And the PowerShell script is probably going to be retired

Serafeim Papastefanos 2022-12-25T06:47:40.087559Z

Also the fact that it's only about powershell is not very friendly to people that use cmd

seancorfield 2022-12-25T06:48:08.447919Z

There's talk of an MSI installer now

Serafeim Papastefanos 2022-12-25T06:50:49.970299Z

Installer would be cool but maybe allow an extra option of getting the binaries in a zip?

seancorfield 2022-12-25T06:51:12.348039Z

What binaries?

Serafeim Papastefanos 2022-12-25T06:51:44.402729Z

These that would be installed by the msi installer :)

seancorfield 2022-12-25T06:52:11.992199Z

There are no binaries in the Clojure CLI

seancorfield 2022-12-25T06:52:52.911419Z

It's a couple of JAR files and some scripts

Serafeim Papastefanos 2022-12-25T06:53:32.245439Z

Ok ok I mean these files

Serafeim Papastefanos 2022-12-25T06:54:30.500549Z

Put them in a zip so people can download them and extract them wherever they want

seancorfield 2022-12-25T06:56:35.084859Z

That doesn't seem like a very intuitive approach for windows folks

Serafeim Papastefanos 2022-12-25T06:57:53.354299Z

Well this is what I prefer (I'm a Windows folk)

seancorfield 2022-12-25T06:58:00.855099Z

And there's still the issue of what those scripts are for windows. Hence talk of an MSI installer

seancorfield 2022-12-25T06:58:51.260689Z

All my machines are windows. I don't want a zip of files

seancorfield 2022-12-25T06:59:11.254089Z

I tried the MSI installer. It works

Serafeim Papastefanos 2022-12-25T07:00:42.581069Z

I am not fond of installers because i don't know what they do. A zip will put files only where I'll extract it and won't mess with my path or env vars or registry

seancorfield 2022-12-25T07:03:31.929959Z

This is part of the problem: ask a dozen windows users what they want and you get two dozen different responses:grin:

💯 1
seancorfield 2022-12-25T07:04:42.620319Z

I think wsl2 is the best solution. Then you can follow all the books and tutorials which assume Linux/macOS

💯 1
Serafeim Papastefanos 2022-12-25T07:06:19.682689Z

Wsl2 is good but I'd only use it as a last resort because it doesn't fit my workflow.

seancorfield 2022-12-25T07:07:12.518199Z

Well no one is going to create a zip you can use on windows

Serafeim Papastefanos 2022-12-25T07:08:37.526709Z

Well deps clj has such a zip https://github.com/borkdude/deps.clj/releases 😁

seancorfield 2022-12-25T07:10:28.185559Z

https://github.com/casselc/clj-msi/releases

Serafeim Papastefanos 2022-12-25T07:13:12.306489Z

That seems to actually use the deps.clj

seancorfield 2022-12-25T07:14:44.462549Z

Yup. That may be the way to go on windows

Serafeim Papastefanos 2022-12-25T07:15:06.034869Z

I agree

borkdude 2022-12-25T08:08:41.917339Z

If you want a manual zip approach just download the deps.clj zip binary, unzip it and then copy this binary to clj.exe and clojure.exe. This is effectively what happens inside the clj-msi installer. Scoop install clj-deps does the same thing

👍 1
borkdude 2023-01-15T08:43:42.039109Z

You can now also use scoop to install deps.clj as clj.exe with the clojure bucket:

scoop bucket add scoop-clojure 
scoop install clj-deps

🥰 1
2023-01-15T19:32:31.853159Z

Great, well it's awesome that there are all these possibilities now, that's the best of all worlds. Looks like Clojure on Windows is getting better each day.

❤️ 1
seancorfield 2022-12-23T18:14:58.069589Z

The http://clojure.org Getting Started page links to https://clojure.org/guides/install_clojure which has a Windows section that links to https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows

littleli 2022-12-23T23:26:35.369459Z

...or shorter https://github.com/littleli/scoop-clojure/wiki/Getting-started-VERY-QUICKLY

seancorfield 2022-12-24T00:08:21.743909Z

Not linked/reachable from http://clojure.org tho', right?

2023-01-15T05:31:27.661109Z

On windows (without going WSL2), deps.clj is what I always recommend

2023-01-15T05:31:49.448709Z

I agree, MSI yuck! What is this, 1998 and I'm installing Java? Next thing you know there's an adware in the MSI 😛... though I don't mind the option the adware joke is a jab at the Java installer that installed Ask Toolbar What would the MSI solve anyways? How does it get around the finicky powershell script and having to maintain an sh and a powershell script?

Installs  as clojure.exe and clj.exe
Installs latest version of ClojureTools jar
Sets PATH and sets DEPS_CLJ_TOOLS_DIR appropriately
Supports per-user or per-machine installation
Supports setting alternate installation location during install
Displays a warning if the ClojureTools PowerShell module is detected.
Oh, an MSI that installs deps.clj, ok I'm more into that 😛