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

Revise Windows docs, prefer CMake #691

Merged
merged 2 commits into from
Jun 22, 2024
Merged

Revise Windows docs, prefer CMake #691

merged 2 commits into from
Jun 22, 2024

Conversation

Gadgetoid
Copy link
Contributor

No description provided.

@@ -100,7 +103,8 @@ There is also a skeleton game project created for you at https://github.com/32bl
"inheritEnvironments": [ "gcc-arm" ],
"variables": [],
"intelliSenseMode": "linux-gcc-arm",
"cmakeToolchain": "[path...]/32blit-sdk/32blit.toolchain"
"cmakeToolchain": "[path...]/32blit-sdk/32blit.toolchain",
"environments": [ { "PATH": "${env.PATH}" } ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While that does fix the build, it usually breaks configuring as it resets the PATH set by the "gcc-arm" environment containing the cross tools... (Works after configuring as all the paths are cached)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it can do something like append to the path rather than completely trounce it. I assume you've probably bashed your head against this quite a bit! 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, I can't seem to get it to break configuration. Even after deleting the cache.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I kept trying to workaround it in 32blit setup... and eventually got annoyed enough to remember my MS account and report it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, I can't seem to get it to break configuration. Even after deleting the cache.

Possibly finding some other installed toolchain instead of the VS supplied one? It definitely doesn't find the one shipped with VS with that override.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh that's something to check. Might be prudent to remove the ARM GCC toolchain since that's in my path.

I strongly suspect there wont be a fix for this imminently and we'd have to bless the command-line procedure for actual on-device builds. Which isn't so bad.

Or, I guess, if it's gonna detect ARM GCC and work... that's also fine?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, maybe it'll work in VS 2022, who knows... There's always VS Code (and probably most other editors) to make the "command-line" builds less... command-line.

Guess the problem with an "external" toolchain is it might stop working, as finding that instead of the VS one probably isn't supposed to work. Might mess up intellisense or something 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right- it finds the ARM GCC toolchain I installed. Makes sense!

This... sort-of... fix does the trick in both cases:

"environments": [ { "PATH": "${env.ProgramFiles(x86)}/Microsoft Visual Studio/2019/Community/Linux/gcc_arm/bin/;${env.PATH}" } ]

It's ugly, and I'd feel a lot happier if I could find a way to get the full path to the currently running Visual Studio but there doesn't seem to be a way. Also not sure if I'm subtly breaking something by supplying the wrong executable, my install isn't exactly clean!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In VS2022 it seems that the "IoT" configs are gone, so the only way to get this to work is to install the Arm toolchain and manually add a config similar to the one above. (Including the PATH hack...)

Anyway, I was in the area so I've rebased this.


Place these in the `vs\sdl\` folder. You will need to merge the include/lib directories. If you are using CMake/Open Folder, these are downloaded automatically.

Make sure you install "Desktop development with C++". If you plan to build for 33blit, you'll also need "Linux development with C++", making sure "C++ CMake tools for Linux" and "Embedded and IoT development tools" are selected in the "Optional" section.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the new improved 33blit 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more bit is nothing to sniff at! Though memory alignment of smaller types is quite complicated so you're encouraged to use uint33_t everywhere.

@Daft-Freak
Copy link
Collaborator

Guess this should mention somewhere that 32blit setup does all the config stuff for you if you select the VS option. (Oops, completely forgot to document that tool anywhere)

@Gadgetoid
Copy link
Contributor Author

I never got as far as to get 32blit setup working when I did my Windows install. I guess I should have tried that first 😆

@Daft-Freak
Copy link
Collaborator

I think the changes other than the PATH thing still make sense. (I don't know if the bug got fixed, but it got closed as "lower priority" so I'm assuming it hasn't). I did just delete the entire "option 1" section though.

Guess I have to make that "33blit" myself now. 😆

@Daft-Freak Daft-Freak merged commit 6023468 into master Jun 22, 2024
18 checks passed
@Daft-Freak Daft-Freak deleted the patch-windows-vs-docs branch June 22, 2024 21:31
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.

None yet

2 participants