Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy cross-platform installation #446

Open
casey opened this issue May 27, 2019 · 8 comments
Open

Easy cross-platform installation #446

casey opened this issue May 27, 2019 · 8 comments

Comments

@casey
Copy link
Owner

casey commented May 27, 2019

I'd like there to be easy-to-follow installation instructions for Linux, MacOS, and Windows.

For unix-based operating systems, like Linux, MacOS and the Linux Subsystem for Windows, this will probably mean curl --proto '=https' --tlsv1.2 -sSf https://just.systems | sh

For Windows, this would mean something equivalent to the above, but which works out of the box in powershell or cmd.exe.

@casey casey added this to the 1.0 milestone May 27, 2019
@casey casey modified the milestones: 1.0, eventually Nov 21, 2019
@bbiagas
Copy link

bbiagas commented Jan 1, 2020

I move between systems a lot so I really appreciate your commitment to cross-platform support. Thank you!

For Windows, maybe consider something similar to Scoop: https://github.com/lukesampson/scoop#installation

This is pretty analogous to the curl method and provides a quick copy/paste install anywhere Powershell exists and the user has the right to set an Execution Policy, which for most people is probably everywhere. I would find this install method very convenient to allow the use of Just in Windows CI, for example.

An installer would make a good additional method too, for those that need/prefer it.

@casey
Copy link
Owner Author

casey commented Jan 1, 2020

I move between systems a lot so I really appreciate your commitment to cross-platform support. Thank you!

You're most welcome!

For Windows, maybe consider something similar to Scoop: https://github.com/lukesampson/scoop#installation

Just is actually already packaged by scoop: https://github.com/casey/just#packages

@bbiagas
Copy link

bbiagas commented Jan 1, 2020

Right, I happen to use Scoop myself. I thought this thread was for additional ways to install Just?

The installation method of Scoop itself is:

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

So I was suggesting something similar for Just, as this would be a convenient install option in places where Scoop is not available/wanted/needed.

So the possible install options on Windows might include:

  1. Scoop (already exists)
  2. Download binaries (requires manual Path management)
  3. Command line install (my suggestion)
  4. Windows EXE installer

Apologies if I misunderstood the OP. I can make a separate issue for discussion if you prefer.

@casey
Copy link
Owner Author

casey commented Jan 1, 2020

Whoops, my mistake, I misunderstood. Yeah, I think your suggesting is the right way to go.

Do most applications that provide a shell one-liner to install (like scoop) use Invoke-Expression (New-Object System.Net.WebClient).DownloadString(URL)

I'm not super familiar with the windows command line, so I'm curious what the equivalent of curl URL | sh is.

@bbiagas
Copy link

bbiagas commented Jan 1, 2020

I would say that pattern is the native Windows equivalent of curl URL | sh with the assumption that your install script is written in Powershell, as is the case with Scoop. As long as you meet the Powershell requirements needed in the script there are no dependencies. That's the closest you can get to a guarantee with Windows.

Something slightly more analogous (using Python as an example) would be:

(Invoke-WebRequest -Uri URL -UseBasicParsing).Content | python

But then of course you're dependent on Windows users having whatever execution method you choose.

A middle-ground might be to depend on Windows Subsystem for Linux being enabled, in which case curl URL | sh would work on Windows as expected (more or less), but WSL isn't mature, requires advanced knowledge, and has dependencies itself which increase friction and may limit the reach of Just.

@casey
Copy link
Owner Author

casey commented Jan 3, 2020

That makes sense, thanks for all the info! It sounds like using Invoke-Expression.. on Windows will be the most compatible option.

@casey casey removed this from the eventually milestone Jul 2, 2020
@andymac4182
Copy link

I would say based on the latest updates from Microsoft the recommended way to install for Windows 10 at least would be Winget https://github.com/microsoft/winget-pkgs

@vmiheer
Copy link

vmiheer commented Oct 23, 2020

That will imply creating a "package". #710

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants