Skip to content

Commit

Permalink
Merge pull request #26 from electro-smith/fix/win_clean_build
Browse files Browse the repository at this point in the history
Fix/win clean build
  • Loading branch information
stephenhensley authored Dec 12, 2020
2 parents 1636ce2 + 3a3452c commit 1205df3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions source/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.2.2-beta

- Fixes for windows compatibility

## v0.2.1-beta

- Automatic zeroing / normalling of unused audio outputs
Expand Down
2 changes: 1 addition & 1 deletion source/libdaisy
Submodule libdaisy updated 1 files
+1 −1 core/Makefile
5 changes: 4 additions & 1 deletion source/oopsy.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,10 @@ int main(void) {
// now try to make:
try {
try {
console.log(execSync("make clean", { cwd: build_path }).toString())
if (os.platform() == "win32") {
// Don't use `make clean`, as `rm` is not default on Windows
// /Q suppresses the Y/n prompt
console.log(execSync("del /Q build", { cwd: build_path }).toString())
// Gather up make output to run command per line as child process
let build_cmd = execSync("make -n", { cwd: build_path }).toString().split(os.EOL)
build_cmd.forEach(line => {
Expand All @@ -250,6 +252,7 @@ int main(void) {
execSync(line, { cwd: build_path }).toString()
})
} else {
console.log(execSync("make clean", { cwd: build_path }).toString())
console.log(execSync("export PATH=$PATH:/usr/local/bin && make", { cwd: build_path }).toString())
}

Expand Down

0 comments on commit 1205df3

Please sign in to comment.