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

WIP Setup tool #81

Merged
merged 11 commits into from
May 26, 2021
Merged

WIP Setup tool #81

merged 11 commits into from
May 26, 2021

Conversation

Daft-Freak
Copy link
Collaborator

Helps setting up a new project/ getting the SDK. Probably needs more error handling and tests,

@coveralls
Copy link

coveralls commented May 21, 2021

Pull Request Test Coverage Report for Build 871789306

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.9%) to 69.842%

Totals Coverage Status
Change from base Build 864173613: -2.9%
Covered Lines: 931
Relevant Lines: 1333

💛 - Coveralls

@Gadgetoid
Copy link
Contributor

This is an excellent idea and appears to work well, nice!

It's a shame the SDK path doesn't tab complete, but that looks to be... rocky territory: pallets/click#173

Some feedback at the very end of the process- ie: "Your new project has been created in: project-dir" would be nice. It sort of trails off after "downloading boilerplate."

Project name: pong
Author name: Gadgetoid
32Blit SDK path [/home/phil/32blit-sdk]: /home/phil/Development/32blit/32blit-sdk
Initialise a Git repository? [Y/n]: y
Create VS Code configuration? [Y/n]: y
Create Visual Studio configuration? [y/N]: y
Downloading boilerplate...

I also can't begin to imagine how we'd test this using conventional means, but I guess an action could build/install the tools and actually just run the commands directly.

@Daft-Freak
Copy link
Collaborator Author

Daft-Freak commented May 23, 2021

Fixed up some more windows stuff (backslashes...) also added the slightly silly VS cmd.exe workaround. Still need to add some error handling, explodes a bit if the SDK/boilerplate git stuff goes wrong for some reason.

Good point on the feedback (I think I intended to do that, but forgot... oops). And yeah, unsure on tests.

Hmm, may need to tweak the "SDK not found" bit, you can currently automate everything else.

EDIT: And the arm gcc check probably fails for VS as its toolchain isn't in PATH. (I seem to have a second one installed).

@Daft-Freak
Copy link
Collaborator Author

Ugh, okay that PATH fix only works if you configure then add it since it overwrites the one VS is providing... which provides the tools and no system paths...

It's also supposed to be fixed: https://developercommunity.visualstudio.com/t/cmdexe-is-not-recognized-when-using-cmake-with-nin/367003#T-N429389 (and the provided workaround doesn't work either!)

@Gadgetoid
Copy link
Contributor

This workflow will test the setup tool and that the output project builds (on Linux, STM32 build) - https://github.com/Gadgetoid/32blit-tools/blob/setup-tool/.github/workflows/test-setup.yml

Doesn't help coveralls, but we can just ignore that.

Daft-Freak and others added 5 commits May 24, 2021 15:26
Usually because a windows path isn't escaped right
This is enough to find all the tools if you're running in a developer command prompt.
@Gadgetoid Gadgetoid merged commit dbaa42b into 32blit:master May 26, 2021
@Gadgetoid
Copy link
Contributor

Thank you. I need to coordinate a release now 😬

@Daft-Freak Daft-Freak deleted the setup-tool branch May 26, 2021 14:13
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 this pull request may close these issues.

3 participants