Skip to content

Add support for building on Windows - #64

Closed
kant2002 wants to merge 7 commits into
leanprover-community:mainfrom
kant2002:kant/add-windows-build
Closed

kant2002 wants to merge 7 commits into
leanprover-community:mainfrom
kant2002:kant/add-windows-build

Conversation

@kant2002

Copy link
Copy Markdown

No description provided.

@kant2002

Copy link
Copy Markdown
Author

@joneugster May I have your attention please?

@joneugster

joneugster commented May 29, 2025 •

Copy link
Copy Markdown
Collaborator

Thanks for the PR! I'll try to have a closer look next week. I'm a bit confused why you want to delete or rename the existing .sh files

Also if you extended the existing github actions (under .github) to run on Windows too and test your setup, it would be easier to ensure your code works and to merge

@kant2002

Copy link
Copy Markdown
Author

the only reason why I rename them, so when you run ./build on the terminal, in windows it will first look for .bat and for .cmd files. so that effectively make it friendly for docs on both platforms, without complicated ifs.

I will take a look at .github actions. That's for the hint.

@kant2002

Copy link
Copy Markdown
Author

@joneugster sorry for delay with Windows build, but can allow run this pipeline?

@abentkamp

Copy link
Copy Markdown
Collaborator

I have approved, but if this just for testing purposes, I think it would be easier if you ran the actions on your own fork. The build.yml file currently restricts actions to run only on dev and main branches. If you remove that restriction, the actions should start to run on the kant/add-windows-build branch of your fork as well.

Comment thread server/build.cjs
Comment thread Projects/MathlibDemo/build.sh
joneugster added a commit that referenced this pull request Aug 25, 2026
- add Windows-runner to CI
- add doc mentioning that `npm run build:projects` is not compatible
with windows
- chore: bump all github actions

Adaptation of #64, authored by @kant2002.
@joneugster

Copy link
Copy Markdown
Collaborator

Hi @kant2002, sorry for dropping the ball on this! I've now merged #149 which adds a windows runner to CI to ensure the project can be built on windows. That PR doesn't port to process behind build:projects (i.e. the sh-scripts) to windows.

I think, if you'd want to do that, it might be best to have the window-build-logic under a script like npm run build:projects:windows, but it might be also fine to just leave this to the user as already now user feedback has shown that people on different architectures might anyways prefer their own logic about managing & updating all Lean-projects. I've added a paragraph to the docs explaining that this step doesn't work on windows and how to address that.

Feel free to update and reopen this PR if you feel like adding build:projects:windows would be worth it.

Thanks very much for the PR, it was very useful!

@joneugster joneugster closed this Aug 25, 2026
@kant2002

Copy link
Copy Markdown
Author

No worries. My goal was to be able build nng4 locally as smooth as possible so this is good thing

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