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

Update installer instructions for new computers #523

Open
coolaj86 opened this issue Oct 6, 2022 · 5 comments
Open

Update installer instructions for new computers #523

coolaj86 opened this issue Oct 6, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@coolaj86
Copy link
Member

coolaj86 commented Oct 6, 2022

A fairly common occurrence is that when a webi user gets a new computer, they forget to install common pre-requisites.

  1. Mac users need to know that they have to run softwareupdate --install-rosetta and xcode-select --install
  2. Linux users need to know to install zip
  3. Mac and Linux users need the constant reminder of source ~/.config/envman/PATH.env

How to make the first time, new computer user experience better without making the existing user experience worse?

Maybe we say that the website is for first time users?

@y0rune
Copy link
Collaborator

y0rune commented Oct 7, 2022

Hello @coolaj86!
I think we can add the checking that specific per-requirements for Mac and Linux. If the pre-reqs are not fulfilled the docs or output can be show.

What do u think @coolaj86 ?

@smileart
Copy link

Also, as I understand ~/.config/envman has nothing to do with https://github.com/bitrise-io/envman
Maybe it is worth mentioning in README or somewhere in the docs. Because I was certain, you install it as a dependency and was looking for envman binary, struggling to find it. Wanted to continue managing my ENV with it, since I thought I have it already.
Hope my explanation makes some sense. 😅

@coolaj86 coolaj86 added the enhancement New feature or request label Oct 17, 2023
@thegreatestgiant
Copy link
Contributor

Isn't this done in bootstrap.sh for linux at least already?

    ##
    ## Detect acceptable package formats
    ##

    my_ext=""
    set +e
    # NOTE: the order here is least favorable to most favorable
    if [ -n "\$(command -v pkgutil)" ]; then
        my_ext="pkg,\$my_ext"
    fi
    # disable this check for the sake of building the macOS installer on Linux
    #if [ -n "\$(command -v diskutil)" ]; then
        # note: could also detect via hdiutil
        my_ext="dmg,\$my_ext"
    #fi
    if [ -n "\$(command -v git)" ]; then
        my_ext="git,\$my_ext"
    fi
    if [ -n "\$(command -v unxz)" ]; then
        my_ext="xz,\$my_ext"
    fi
    if [ -n "\$(command -v unzip)" ]; then
        my_ext="zip,\$my_ext"
    fi
    # for mac/linux 'exe' refers to the uncompressed binary without extension
    my_ext="exe,\$my_ext"
    if [ -n "\$(command -v tar)" ]; then
        my_ext="tar,\$my_ext"
    fi
    my_ext="\$(echo "\$my_ext" | sed 's/,$//')" # nix trailing comma
    set -e

@coolaj86
Copy link
Member Author

@smileart FYI: envman is the project that I was going to evolve from pathman.

I also created aliasman.

I should make an envman project that just links to those two for the time being. I was going to have it do PATH, alias, and then arbitrary global ENVs, but I never got around to the last part... even though it's probably the easiest.

@coolaj86
Copy link
Member Author

coolaj86 commented Oct 19, 2023

@thegreatestgiant That's close to where we should be putting some of the checks and notifications.

for example:

    if [ -n "\$(command -v unzip)" ]; then
        my_ext="zip,\$my_ext"
    else
        printf >&2 '\e[35m[WARN] `unzip` is not installed\e[0m'
    fi

I'd have to take a closer look again to know for sure.

There's a bit of matching going on: the client sends which packages it would prefer and the server, knowing which are available, sends that info back.

If zip or xz is available but unzip or unxz are not installed, that's when we should print the error - because it's not that a suitable package wasn't found, but that the environment is missing some pretty normal stuff.

The trick is that we don't want to error in the case that everything could have gone successful (there is a match between available packages and ones that can be used, even if non-optimal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants