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

Add option for running by CLI args #11

Open
Starlight220 opened this issue Jun 12, 2020 · 6 comments · May be fixed by #464
Open

Add option for running by CLI args #11

Starlight220 opened this issue Jun 12, 2020 · 6 comments · May be fixed by #464

Comments

@Starlight220
Copy link
Member

This would be very helpful for install automation. I can try to help implement this, but I am not very sure in my ability to help significantly.

@RyanHir
Copy link

RyanHir commented Dec 18, 2020

While not ideal, It is still possible to automate (at least for Linux, I have not tested other Operating Systems). In every OS release (for 2021) there is a companion archive with the files that will go into the ~/wpilib/YEAR/

Install instructions for Linux for the 2021 release (mostly) in CLI. A install would look similar to...

  1. Download archive from https://github.com/wpilibsuite/allwpilib/releases (2021>=)
  2. tar xf WPILib_Linux-2021.1.1-beta-4.tar.gz
  3. mkdir 2021
  4. cd 2021
  5. mv ../WPILib_Linux-2021.1.1-beta-4/WPILib_Linux-2021.1.1-beta-4-artifacts.tar.gz .
  6. tar xf WPILib_Linux-2021.1.1-beta-4-artifacts.tar.gz
  7. rm WPILib_Linux-2021.1.1-beta-4-artifacts.tar.gz
  8. cd ..
  9. mkdir -p ~/wpilib
  10. mv 2021 ~/wpilib

Note, everything later is optional

  1. rm -rf WPILib_Linux-*
  2. cd ~/wpilib/2021/tools/ && python3 ToolsUpdater.py
  3. cd ~/wpilib/2021/vsCodeExtensions && find . -name "*.vsix" | xargs -I {} code --install-extension {}
  4. open vscode and set java home per 2020 instructions

I chose to exclude extra instructions such as VSCode installation

@reediculous456
Copy link

I did a little poking around in the code and it looks like there are 2 ways this could be implemented:

  1. Access desktop.Args here and pass them through MainWindow into each page so that each page can read from the args passed to the installer and if their specific arg is present, automatically take action and move to the next page of the installer
  2. In the Program.cs file here use an arg to determine if we build avalonia (default) or run in non-interactive mode. If the user passes the arg for non-interactive mode, they are sent into a flow that validates they have passed all required options (all of the choices from the UI pages) and then there is a script that runs the install without the UI ever being loaded

I think 2 would be the cleaner approach, although I'm not sure how coupled the install steps are to their respective UI pages so it may take some effort to de-couple the install steps so that the same code can be triggered from either the UI or the command line program

@reediculous456
Copy link

My team is working on acquiring either InTune or SCCM and it would be great if we could push the WPILib Install using those tools

@reediculous456 reediculous456 linked a pull request Oct 24, 2024 that will close this issue
@spacey-sooty

This comment has been minimized.

@reediculous456
Copy link

Number 2 still results in the same binary since it's the same Program.cs entrypoint

@spacey-sooty
Copy link
Contributor

Ah I see I've essentially described what you were suggesting, I was thrown off by the "if we build avalonia (default) or run in non-interactive mode" mb

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

Successfully merging a pull request may close this issue.

4 participants