sdkman / sdkman-cli

The SDKMAN! Command Line Interface
https://sdkman.io
Apache License 2.0
6.04k stars 626 forks source link

Windows PowerShell Installation #462

Open empalogan opened 7 years ago

empalogan commented 7 years ago

Please provide an easier way to install this in windows powershell. See Jabba for reference.

marc0der commented 7 years ago

This sub-project to SDKMAN was developed and maintained by @flofreud. It would need to be raised with him since I have no knowledge of powershell.

kastork commented 6 years ago

You just need to stop pointing to it on your website. It is a dead project and doesn't work anymore.

marc0der commented 6 years ago

I've now removed posh from our beta site (which will soon go into production).

srimajji commented 6 years ago

@kastork While repo is no longer maintained, it still works fine with updated api links. https://github.com/flofreud/posh-gvm/issues/30

marc0der commented 6 years ago

Would someone mind doing a PR to fix those please? It would help all others who want to use it.

srimajji commented 6 years ago

@marc0der Already on it! I do a have a PR open in that repo. Hopefully, the maintainer checks it soon

https://github.com/flofreud/posh-gvm/pull/31

marc0der commented 6 years ago

I think it might be worth forking the project under sdkman and making this the official repo we point to from the site.

marc0der commented 6 years ago

Just forked it: https://github.com/sdkman/posh-gvm

I'll do some renaming later but for now feel free to raise any PRs here.

aadrian commented 6 years ago

IMO the best approach would be to extend the git-bash version with only that part of posh-gvm to set globally env variables (since that is something git-bash can't seem to do?) ).

The installation and auto-udpates can be easily done with Chocolatey https://chocolatey.org/ once the git-bash version of SDKMAN is working.

marc0der commented 6 years ago

@aadrian does that mean you're volunteering? 😀

aadrian commented 6 years ago

@marc0der

does that mean you're volunteering?

As I mentioned on the chat, I would gladly create the Chocolatey wrappers (for install, update and uninstall of SDKMAN itself so that with choco install sdkman and choco update sdkman to achieve the same behavior as with brew on OSX) of the GitBash version of SDKMAN - once SDKMAN itself is working with GitBash (haven't got it working on any recent machines yet :( ) .

Stuff that I haven't figured out, or I couldn't find docs how to do it:

  1. how to make SDKMAN itself work with GitBash correctly (so all commands, but without install since that would be done by Chocolatey)
  2. how would a version of SDKMAN look like (or is supposed to look like) once it's installed with GitBash (in order to be able to link the Chocolatey wrappers correctly)
    1. how does SDKMAN work with Proxies (since Chocolatey can)
    2. how to disable the install/update commands for SDKMAN itself (like it's done with brew) , to allow Chocolatey take care of those.
    3. how would a new version of SDKMAN be published, in order to automatically fetch it and compile a new Chocolatey package and than publish to Chocolatey.org (or even better, integrate this in the normal SDKMAN release).
srimajji commented 6 years ago

@aadrian If you have win10, you can just use windows WSL(Ubuntu) and sdkman

aadrian commented 6 years ago

@srimajji most companies use Win 7

marc0der commented 6 years ago

I must say that this solution sounds over-complicated and not very sustainable to me. Using a package manager to install a package manager seems wrong.

Besides, I test sdkman on git bash regularly and it works fine apart from some small bugs related to symbolic links. Why not just fix those instead?

On Thu, 3 May 2018, 23:26 aadrian, notifications@github.com wrote:

@srimajji https://github.com/srimajji most companies use Win 7

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sdkman/sdkman-cli/issues/462#issuecomment-386455598, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI0Bt-CrJv0ejV62cyrpQJ4GXQqEgriks5tu4QBgaJpZM4JwT12 .

aadrian commented 6 years ago

I must say that this solution sounds over-complicated and not very sustainable to me. Using a package manager to install a package manager seems wrong.

And on OSX it's not "over-complicated" :) ? On Macs, most people install SDKMAN with brew install sdkman because it's more preferred over piping from the net a bash script .

Besides, SDKMAN is not used for "package" management in the classical sense, but for "version management of some packages" (that don't have dependencies on each other or on other stuff - besides Java).

With brew is just too complicated to easily switch between several versions of Grails or Scala, otherwise people would simply use brew for those parts too instead of SDKMAN :) .

The same is true for Node, Ruby etc. - people use brew to install something that is a "package version manager" (nvm, rvm) since it's much easier to manage and switch versions.

Nowadays, thanks to the more stable Chocolatey releases, this scenario (of brew) is finally possible on Windows too :) .

Why not just fix those instead?

They must be fixed, but that won't solve the main issues with SDKMAN on Windows which are (were):

flofreud commented 6 years ago

I was pushed today onto this issue (a coworker was contacted on twitter) and I merged the PR from @srimajji. Thx for that. I also added a comment to the repository regarding the not continued work. If someone wants to maintain it, I could offer to anwser some questions but I currently have no environment anymore where I can run it myself.

If we want to move the self-update function to the forked repository, it should be just changing one URL.

RealYukiSan commented 12 months ago

There are some issues with this approach, but it works for the most part.

image

What's the issue?