-
Notifications
You must be signed in to change notification settings - Fork 64
Add support for building on Windows #64
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
Closed
kant2002
wants to merge
7
commits into
leanprover-community:main
from
kant2002:kant/add-windows-build
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4770378
Add support for building on Windows
kant2002 4c58d0d
Add Windows build into configuration
kant2002 f0d3d04
Fix error from test run
kant2002 65a4be0
Set permissions bit which was probably lost when I perform rename on …
kant2002 5dacca2
Rewrote server build in JS
kant2002 7211c96
Convert to ESM
kant2002 5ffcbfa
Use CJS
kant2002 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| REM @echo off | ||
| setlocal enabledelayedexpansion | ||
|
|
||
| REM Operate in the directory where this file is located | ||
| cd /d "%~dp0" | ||
|
|
||
| REM Updating Mathlib: We follow the instructions at | ||
| REM https://github.com/leanprover-community/mathlib4/wiki/Using-mathlib4-as-a-dependency#updating-mathlib4 | ||
|
|
||
| REM Note: we had once problems with the `lake-manifest` when a new dependency got added | ||
| REM to `mathlib`, we may need to add `rm lake-manifest.json` again if that's still a problem. | ||
|
|
||
| REM currently the mathlib post-update-hook is not good enough to update the lean-toolchain. | ||
| REM things break if the new lakefile is not valid in the old lean version | ||
| curl -L https://raw.githubusercontent.com/leanprover-community/mathlib4/master/lean-toolchain -o lean-toolchain | ||
|
|
||
| REM note: mathlib has now a post-update hook that modifies the `lean-toolchain` | ||
| REM and calls `lake exe cache get`. | ||
|
|
||
| lake update -R | ||
| lake build | ||
| lake build Batteries |
This file was deleted.
Oops, something went wrong.
0
Projects/Stable/build.sh → Projects/Stable/build
100755 → 100644
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @echo off | ||
| setlocal enabledelayedexpansion | ||
|
|
||
| REM Operate in the directory where this file is located | ||
| cd /d "%~dp0" | ||
|
|
||
| lake update -R | ||
| lake build |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
| const { spawnSync } = require('child_process'); | ||
|
|
||
| // Change to ../Projects directory relative to this script | ||
| const baseDir = path.resolve(__dirname, '../Projects'); | ||
| process.chdir(baseDir); | ||
| const isWin = process.platform === 'win32'; | ||
| const buildScriptName = isWin ? 'build.cmd' : 'build.sh'; | ||
|
|
||
| // Iterate over subfolders in Projects | ||
| fs.readdirSync('.').forEach(folder => { | ||
| const folderPath = path.join(baseDir, folder); | ||
|
|
||
| if (fs.lstatSync(folderPath).isDirectory()) { | ||
|
|
||
| const buildScriptPath = path.join(folderPath, buildScriptName); | ||
|
|
||
| if (fs.existsSync(buildScriptPath)) { | ||
| const start = Date.now(); | ||
|
|
||
| console.log(`Start building ${folder}`); | ||
| if (!isWin) { | ||
| spawnSync('logger', ['-t', 'lean4web', `Start building ${folder}`]); | ||
| } | ||
|
|
||
| // Run the build script | ||
| const result = spawnSync('bash', [buildScriptPath], { stdio: 'inherit' }); | ||
|
|
||
| const duration = Math.floor((Date.now() - start) / 1000); | ||
| const minutes = Math.floor(duration / 60); | ||
| const seconds = duration % 60; | ||
|
|
||
| console.log(`Finished ${folder} in ${minutes}:${seconds < 10 ? '0' : ''}${seconds} min`); | ||
| if (!isWin) { | ||
| spawnSync('logger', ['-t', 'lean4web', `Finished ${folder} in ${minutes}:${seconds < 10 ? '0' : ''}${seconds} min`]); | ||
| } | ||
| } else { | ||
| console.log(`Skipping ${folder}: ${buildScriptName} missing`); | ||
| } | ||
| } | ||
| }); |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.