Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Simplify Windows setup and build #560

Merged
merged 2 commits into from
Apr 28, 2023
Merged

Simplify Windows setup and build #560

merged 2 commits into from
Apr 28, 2023

Conversation

ohodson
Copy link
Contributor

@ohodson ohodson commented Apr 22, 2023

Assorted changes to try to make setup and build on Windows simpler.

  • Adds an installer script for the workerd's dependencies on Windows (tools/windows/install-deps.bat).
  • Adds a command-line environment script to set up environment variables for building on Windows (tools/bazel-env.bat).
  • Adds vscode settings to simplify setup on Windows.
  • Defines BAZEL_WINSDK_FULL_VERSION and BAZEL_VC explicitly to address issues when the Windows machine has multiple versions of Visual Studio and/or the Windows SDK installed.

@ohodson ohodson requested a review from mrbbot April 22, 2023 14:58
@ohodson ohodson force-pushed the orion-windows-tweaks branch 2 times, most recently from afdff92 to 7e41d9c Compare April 24, 2023 08:21
@ohodson ohodson force-pushed the orion-windows-tweaks branch 2 times, most recently from fab5ef9 to b5dcfb0 Compare April 25, 2023 08:07
Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

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

Nice! Thank you for doing this! 🎉 Were you able to test this on a fresh install/sandbox? Will running the install script cause issues if users already have some of these tools installed?

.vscode/tasks.json Show resolved Hide resolved
tools/windows/install-deps.bat Show resolved Hide resolved
tools/windows/install-deps.bat Show resolved Hide resolved
tools/windows/bazel-env.bat Show resolved Hide resolved
@ohodson ohodson force-pushed the orion-windows-tweaks branch from b5dcfb0 to 5226ae5 Compare April 25, 2023 15:44
ohodson added 2 commits April 25, 2023 21:00
Assorted changes to try to make setup and build on Windows simpler.

* Adds an installer script for the workerd's dependencies on Windows
  (tools/windows/install-deps.bat).
* Adds a command-line environment script to set up environment variables
  for building on Windows (tools/bazel-env.bat).
* Adds vscode settings to simplify setup on Windows.
* Defines BAZEL_WINSDK_FULL_VERSION and BAZEL_VC explicitly to address
  issues when the Windows machine has multiple versions of Visual Studio
  and/or the Windows SDK installed.
Adds config to use the Visual Studio debugger on Windows.
@ohodson ohodson force-pushed the orion-windows-tweaks branch from 5226ae5 to 927addc Compare April 25, 2023 20:01
@ohodson
Copy link
Contributor Author

ohodson commented Apr 25, 2023

You can run tools\windows\install-deps.bat on a fresh Windows 11 install and then in another cmd.exe instance run bazel build //src/worker/server:worker.

There's no magic for other users, e.g. if someone has installed dependencies manually and then running the script shouldn't affect those. It's generally quite annoying that the installed bits can't be better isolated from the rest of Windows, but it was ever thus.

@ohodson ohodson merged commit d91cf53 into main Apr 28, 2023
@fhanau fhanau deleted the orion-windows-tweaks branch March 7, 2024 14:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants