mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 04:39:31 -10:00
With these changes, running the following in the Codespace will open the local browser to a page served from the codespace hosting the WASM sample: ```console cd src/mono/sample/wasm/browser make make run-browser ``` * Set EMSDK_PATH in .devcontainer.json We provision Emscripten as part of the devcontainer prebuild. Set EMSDK_PATH to allow rebuilding the wasm runtime to work without any additional ceremony * Install dotnet-serve into .dotnet-tools-global * [wasm] Don't try to open browser if running in Codespaces * .devcontainer: add global tools dir to PATH * .devcontainer: forward port 8000 This enables running the mono wasm samples in the local browser: * [wasm] samples: also check for dotnet-serve on the path On Codespaces we install dotnet-serve on the PATH but not where `dotnet tool list` can see it * remove onAutoForward: notify - it's the default * Adjust the path of v8 depends if running in a dev container * Check if we're running in any Docker container, not just Codespaces Co-authored-by: Fan Yang <[email protected]>
20 lines
672 B
Bash
Executable File
20 lines
672 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# prebuild the repo, so it is ready for development
|
|
./build.sh libs+clr -rc Release
|
|
# restore libs tests so that the project is ready to be loaded by OmniSharp
|
|
./build.sh libs.tests -restore
|
|
|
|
# prebuild for WASM, so it is ready for wasm development
|
|
make -C src/mono/wasm provision-wasm
|
|
export EMSDK_PATH=$PWD/src/mono/wasm/emsdk
|
|
./build.sh mono+libs -os Browser -c release
|
|
|
|
# install dotnet-serve for running wasm samples
|
|
./dotnet.sh tool install dotnet-serve --tool-path ./.dotnet-tools-global
|
|
|
|
# save the commit hash of the currently built assemblies, so developers know which version was built
|
|
git rev-parse HEAD > ./artifacts/prebuild.sha
|