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

Install Arduino-CLI when not already present #5

Open
PeterWone opened this issue Oct 24, 2020 · 9 comments
Open

Install Arduino-CLI when not already present #5

PeterWone opened this issue Oct 24, 2020 · 9 comments

Comments

@PeterWone
Copy link
Owner

PeterWone commented Oct 24, 2020

On *nix systems the following will install the CLI

https://arduino.github.io/arduino-cli/latest/installation/#use-the-install-script

On Windows systems it is necessary to determine platform bitness and fetch one of

then unpack the file and put the executable somewhere in the filesystem, then set the extension path accordingly.

@RBM-PITT
Copy link
Collaborator

"put the executable somewhere on the system path" is this a requirement?

here's the basis for that question:

Does having the extension setting for the path handle locating the arduino-cli.exe vs relying on having the executable in the system path?

image

@PeterWone
Copy link
Owner Author

No, I've re-worded that now. What I meant was after you put the executable in the local file-system you have to tell the extension where it is using the setting you snapped.

If you were to put arduino-cli.exe on the system path then you could probably abbreviate the path setting to just the name of the executable for child_process.exec() but child_process.spawn() doesn't shell, it runs the exe directly so this may not work.

Thus, best to supply a fully qualified path in the path setting but as a courtesy and convenience to the user it should also be on the system path.

@PeterWone
Copy link
Owner Author

Node reports Windows platforms as win32 irrespective of their actual bitness but child_process.execSync("echo %processor_architecture%") returns "AMD64" for 64 bit Windows.

@PeterWone
Copy link
Owner Author

@RBM-PITT a note on your path, it should be the path to the executable, not the path to the folder containing the executable

/path/to/arduino-cli.exe
c:\path\to\arduino-cli.exe

@PeterWone
Copy link
Owner Author

PeterWone commented Oct 25, 2020

@RBM-PITT These instructions are now in the wiki. Feedback?

https://github.com/PeterWone/vscode-arduino-cli/wiki/How-to-manually-install-Arduino-CLI

@RBM-PITT
Copy link
Collaborator

@PeterWone This is perfect - love it. I should be able to step through it later today. Do we have the ability to contribute to the Wiki? I could help out by adding in detail directly rather than having you do that.

@PeterWone
Copy link
Owner Author

Um... I dunno? Try!

@PeterWone
Copy link
Owner Author

PeterWone commented Oct 25, 2020

I have made you a collaborator. This should allow you to create pages as well as edit the existing material. It probably also permits accidental destruction so take care until we understand the tools better.

As a side note, this issue wasn't intended as an instruction for use, it is a feature for implementation, that's why I didn't originally write it in a user friendly way.

@RBM-PITT
Copy link
Collaborator

@PeterWone I can access the Wiki to contribute - thanks, I understand the need to watch for deletions.

I think this issue can close.

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

No branches or pull requests

2 participants