clj-on-windows

For those interested in making clj on Windows https://dev.clojure.org/jira/browse/TDEPS-67. Also see https://github.com/littleli/scoop-clojure.
carkh 2019-07-25T02:09:53.137200Z

Please test, comment

2019-07-25T03:00:24.138200Z

downloaded the exe from the release, started it up and i see an hourglass. there is some indication of a dialog not responding. will terminate and try again.

carkh 2019-07-25T03:00:36.138400Z

!

carkh 2019-07-25T03:01:16.138900Z

hum did you accept the windows user access control ?

carkh 2019-07-25T03:01:27.139400Z

sometimes it remains in the background

2019-07-25T03:01:37.139600Z

didn't even see that -- but unblocking via properties is yielding saner behavior

carkh 2019-07-25T03:02:44.140400Z

i'm afraid i don't quite understand the problem

carkh 2019-07-25T03:02:54.140700Z

how was it blocked ?

carkh 2019-07-25T03:02:59.141Z

and what properties?

2019-07-25T03:03:06.141200Z

from windows explorer

2019-07-25T03:03:23.141800Z

the default on this machine for downloaded things appears to be to "mark" things blocked

carkh 2019-07-25T03:03:30.142100Z

ohhh ok

carkh 2019-07-25T03:03:38.142300Z

i didn't know that even was a thing !

2019-07-25T03:03:52.142500Z

lol

2019-07-25T03:04:04.142800Z

from windows powershell, i can see output for clj -h

2019-07-25T03:04:08.143Z

but not from powershell core

carkh 2019-07-25T03:04:35.143200Z

hum

carkh 2019-07-25T03:05:05.143600Z

try [Environment]::GetEnvironmentVariable("PSModulePath")

2019-07-25T03:05:09.143800Z

from cmd.exe it works

2019-07-25T03:05:19.144100Z

pardon me as i do this slowly as this is via a vm 🙂

carkh 2019-07-25T03:05:34.144400Z

i'm very glad that you test it at all =)

2019-07-25T03:05:55.144700Z

actually, it's via rdp 🙂

carkh 2019-07-25T03:06:02.144900Z

wew

carkh 2019-07-25T03:07:01.145700Z

there is a bug in ClojureTools (the powershell stuff made by cognitect and which i use there)

carkh 2019-07-25T03:07:27.146400Z

if you start powershell, it will first look at the path instead of inside powershell for the clj and clojrue commands

2019-07-25T03:07:29.146700Z

this is what i saw: C:\Users\user\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\6\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules

carkh 2019-07-25T03:07:53.147Z

ok the install was not successfull

2019-07-25T03:08:23.147600Z

ah, why does it work for windows powershell, i wonder? old things remaining?

carkh 2019-07-25T03:08:34.147900Z

the program shoudl at least be in c:\program files\clojure

carkh 2019-07-25T03:08:56.148500Z

yes, something prevented the powershell install scripts to run, that's very fiddly

2019-07-25T03:09:09.148800Z

i see a c:\program files\clojure here with some files and such

2019-07-25T03:09:40.149200Z

should i try running the installer again?

carkh 2019-07-25T03:09:57.149600Z

i don't think this would change anything, but you may try =)

2019-07-25T03:10:04.149800Z

ha ha ha

carkh 2019-07-25T03:11:09.150600Z

the installer runs powershell scripts, to do this it has to first edit the registry for the users that disallow it, that's 2 points of failure

carkh 2019-07-25T03:11:40.150900Z

though i tested it with maximum security here

carkh 2019-07-25T03:12:17.151200Z

what version of windows are you running ?

2019-07-25T03:13:04.151400Z

windows 10 pro

carkh 2019-07-25T03:13:13.151700Z

same as mine

2019-07-25T03:13:24.152Z

for completeness, here's the output of power shell core:

Invoke-Clojure : The term 'Invoke-Clojure' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ Invoke-Clojure -h
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Invoke-Clojure:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

carkh 2019-07-25T03:13:44.152300Z

ah so your clj command is from the unofficial tool

2019-07-25T03:14:11.152600Z

it is? i thought i uninstalled it -- i'll check

2019-07-25T03:14:20.153Z

for reference this is 1903 of windows 10

carkh 2019-07-25T03:14:27.153200Z

check your path environment variable to find it

carkh 2019-07-25T03:14:52.153600Z

or where.exe clj

carkh 2019-07-25T03:16:00.153900Z

how do you run two powershells on the same machine ?

carkh 2019-07-25T03:16:05.154100Z

that's another point of failure

2019-07-25T03:16:23.154400Z

where clj yields no output

2019-07-25T03:16:35.154900Z

i have the default windows powershell and powershell core

carkh 2019-07-25T03:16:47.155200Z

ok so you have it installed in windows powershell and not on powershell core

carkh 2019-07-25T03:17:11.155600Z

the output of [Environment]::GetEnvironmentVariable("PSModulePath") was on which one ?

2019-07-25T03:17:47.155900Z

that was for powershell core

2019-07-25T03:17:56.156200Z

ah, i had your wrapper installed too -- got rid of that just now

carkh 2019-07-25T03:18:13.156600Z

may i ask that you try the same command on regular powershell ?

2019-07-25T03:18:35.156800Z

ofc, just a sec

2019-07-25T03:20:35.157Z

[Environment]::GetEnvironmentVariable("PSModulePath")

windows power shell

C:\Users\user\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Clojure\Modules

powershell core

C:\Users\user\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\6\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules

carkh 2019-07-25T03:20:48.157300Z

aha ! there it is !

carkh 2019-07-25T03:20:57.157600Z

so the install succeeded on regular powershell

carkh 2019-07-25T03:21:16.158Z

and now the final test, try running clojure or clj from a regular cmd prompt

2019-07-25T03:21:29.158300Z

ah, that worked -- but will try it again for fun

2019-07-25T03:21:52.158700Z

yes, worked again

carkh 2019-07-25T03:22:19.159500Z

ok so it works indeed, just not on powershell core, I must admit i have no clue at all about that beast =)

2019-07-25T03:22:20.159600Z

i presume you meant via cmd.exe

carkh 2019-07-25T03:22:24.159800Z

yes

carkh 2019-07-25T03:22:42.160300Z

i guess they're not using the same registry entries etc

2019-07-25T03:22:45.160500Z

i don't know what will happen ofc, but my sense is that ms wants to move to powershell core

2019-07-25T03:23:24.161300Z

they even advertise it when you start windows powershell 🙂

carkh 2019-07-25T03:23:28.161500Z

i'm not sure, that's a step in the unix world, but they do not provide the same security guaranties with powershell core

carkh 2019-07-25T03:24:14.162500Z

hum not on my machine, but my version is nowhere close to the latest

2019-07-25T03:24:25.162700Z

ah, btw, it's been a really long time since i've used inno setup, but was it possible to show the details of installation during the installation (like a text windows that can have its content copied)?

2019-07-25T03:24:45.163200Z

i think my windows powershell is 5.2.1

carkh 2019-07-25T03:24:49.163300Z

nope that's nullsoft install that allows that i think

2019-07-25T03:25:00.163600Z

ah, ok

2019-07-25T03:25:12.163900Z

i don't remember nsis being particularly easy to think in 🙂

carkh 2019-07-25T03:25:28.164100Z

5.1 here

carkh 2019-07-25T03:25:53.164600Z

yes that language is like a strange breed of forth

2019-07-25T03:26:14.164900Z

your installer page mentioned one other choice i hadn't heard of

carkh 2019-07-25T03:26:42.165300Z

Wix is both feet in microsoft land

carkh 2019-07-25T03:26:56.165600Z

with all the craziness that goes along with it

2019-07-25T03:27:07.165900Z

ah, i see

carkh 2019-07-25T03:27:32.166400Z

their help page is describing properties like this : this will give you access to feature 51 or 54

2019-07-25T03:28:11.166700Z

!!

2019-07-25T03:28:55.167Z

i guess i can do some research at: https://alternativeto.net/software/nsis/

carkh 2019-07-25T03:29:20.167500Z

I think it's the more versatile one

carkh 2019-07-25T03:29:37.167800Z

but you have to do more work for the same result

carkh 2019-07-25T03:31:04.168900Z

if you're real bent on obtaining a log file from this install,i think there is a /log option you can start it with

2019-07-25T03:31:12.169200Z

i don't personally have difficulty with inno setup as a former user, but i can imagine other folks not being too keen

2019-07-25T03:31:28.169600Z

ah, thanks for the tip on the log option

carkh 2019-07-25T03:31:41.169900Z

you mean because of the license ?

2019-07-25T03:32:07.170400Z

the lack of source, i was thinking

carkh 2019-07-25T03:32:24.170600Z

true enough

carkh 2019-07-25T03:33:22.171200Z

the hard part about doing this installer was more the dance with powershell security, it wouldn't be that hard to change to nullsoft

2019-07-25T03:36:38.171600Z

ah, it's good to hear you seem to have gotten the hard part working 🙂

carkh 2019-07-25T03:37:02.171900Z

not that hard though =)

carkh 2019-07-25T03:38:03.172700Z

the idea is to maybe dump it on cognitect so i want it to be easy to maintain, they already have quite a burden to bear with clojure

2019-07-25T03:39:09.173100Z

my mistake, apparently inno setup source is available: http://jrsoftware.org/isdl.php#cvsgit

2019-07-25T03:39:34.173400Z

https://github.com/jrsoftware/issrc

carkh 2019-07-25T03:39:54.174100Z

oh so they're open source but not free software, though free as in beer