From ea6aaf0be2531e0f1cd444f730399f79220d14c1 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Mon, 23 Aug 2021 17:33:04 -0400 Subject: [PATCH] docs: Add wasm script generation doc --- README.md | 2 ++ src/CalcManager/build.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 663e0be..d43fae3 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ Prerequisites: - Open [src\Calculator.sln](/src/Calculator.sln) in Visual Studio to build and run the Calculator app. +If building for WebAssembly fails, make sure to follow the notes in the `calculator/src/CalcManager/build.sh` file. + ## Contributing We ❤ contributions. The team encourages community feedback and contributions. Please follow our [contributing guidelines](CONTRIBUTING.md). diff --git a/src/CalcManager/build.sh b/src/CalcManager/build.sh index b16c087..02ea6c1 100755 --- a/src/CalcManager/build.sh +++ b/src/CalcManager/build.sh @@ -1,3 +1,14 @@ +# To run this script locally: +# - if cloned from windows, ensure that line endings are `LF` +# - under linux: cd to your_path\calculator\src\CalcManager +# - under WSL: cd `wslpath "your_path\calculator\src\CalcManager"` +# Execute the following: +# git clone --branch 2.0.23 https://github.com/emscripten-core/emsdk +# ./emsdk install 2.0.23 +# ./emsdk activate 2.0.23 +# source ./emsdk_env.sh +# Navigate back to this file's folder in the same terminal + mkdir -p bin/wasm echo Generating LLVM Bitcode files