From c11b4ea701f412654613aefd64ee1627e1908a2b Mon Sep 17 00:00:00 2001 From: stanoddly <109335133+stanoddly@users.noreply.github.com> Date: Thu, 29 Feb 2024 21:56:11 +0100 Subject: [PATCH 1/3] Ugraded to .NET 8 --- .github/workflows/gh-pages.yml | 9 +++++---- DotnetRaylibWasm/DotnetRaylibWasm.csproj | 3 ++- Examples/Examples.csproj | 4 ++-- README.md | 10 +++++----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index e945ce0..f568dcc 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -8,10 +8,10 @@ jobs: with: path: DotnetRaylibWasmRepo - - name: Setup .NET7 + - name: Setup .NET8 uses: actions/setup-dotnet@v3 with: - dotnet-version: '7.0.100' + dotnet-version: '8.0.200' - name: Install wasm-tools run: | @@ -27,7 +27,8 @@ jobs: - name: Setup emsdk uses: mymindstorm/setup-emsdk@v11 with: - version: 3.1.12 + # https://github.com/dotnet/runtime/blob/v8.0.2/src/mono/wasm/emscripten-version.txt + version: 3.1.34 actions-cache-folder: 'emsdk-cache' - name: Build raylib for Web @@ -49,4 +50,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: DotnetRaylibWasmRepo/DotnetRaylibWasm/bin/Release/net7.0/browser-wasm/AppBundle + publish_dir: DotnetRaylibWasmRepo/DotnetRaylibWasm/bin/Release/net8.0/browser-wasm/AppBundle diff --git a/DotnetRaylibWasm/DotnetRaylibWasm.csproj b/DotnetRaylibWasm/DotnetRaylibWasm.csproj index 60de820..20e345d 100644 --- a/DotnetRaylibWasm/DotnetRaylibWasm.csproj +++ b/DotnetRaylibWasm/DotnetRaylibWasm.csproj @@ -1,6 +1,6 @@ - net7.0 + net8.0 browser-wasm main.js Exe @@ -14,6 +14,7 @@ full true + 12 diff --git a/Examples/Examples.csproj b/Examples/Examples.csproj index d4f45a6..ef08a4e 100644 --- a/Examples/Examples.csproj +++ b/Examples/Examples.csproj @@ -1,9 +1,9 @@ - net7.0 + net8.0 true $(MSBuildThisFileDirectory) - 11 + 12 diff --git a/README.md b/README.md index fbfb8fd..b5550a9 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ [GitHub Pages Demo](https://disketteman.github.io/DotnetRaylibWasm/) -This is a fully working prototype for .NET 7 with Raylib ahead-of-time πŸš€ compiled into WebAssembly (wasm). See a couple of [known issues](https://github.com/disketteman/DotnetRaylibWasm/issues) for limitations. +This is a fully working prototype for .NET 8 with Raylib ahead-of-time πŸš€ compiled into WebAssembly (wasm). See a couple of [known issues](https://github.com/disketteman/DotnetRaylibWasm/issues) for limitations. ## Local setup -Make sure you have the latest version of .NET 7 for example from [here](https://dotnet.microsoft.com/en-us/download/dotnet/7.0), the prototype was built with: +Make sure you have the latest version of .NET 8 for example from [here](https://dotnet.microsoft.com/en-us/download/dotnet/8.0), the prototype was built with: ``` dotnet --version -7.0.100 +8.0.200 ``` Install the official wasm tooling: @@ -50,13 +50,13 @@ The project which makes the WebAssembly possible is here: `publish` the solution from the root of the repository. Don't even try to use just `build`, [it's buggy](https://github.com/disketteman/DotnetRaylibWasm/issues/7#issuecomment-1356442508). Note the publishing takes a while: ``` -dotnet publish -C Release +dotnet publish -c Release ``` To serve the files use this command from the root (change `\` to `/` in file path if you are not on Windows): ``` -dotnet serve --mime .wasm=application/wasm --mime .js=text/javascript --mime .json=application/json --directory DotnetRaylibWasm\bin\Debug\net7.0\browser-wasm\AppBundle\ +dotnet serve --mime .wasm=application/wasm --mime .js=text/javascript --mime .json=application/json --directory DotnetRaylibWasm\bin\Debug\net8.0\browser-wasm\AppBundle\ ``` Copy the link from the output and open it in your browser (tested on the latest Chrome). From b9fb591ad2622214c20a330d72fea7067dd14fcf Mon Sep 17 00:00:00 2001 From: stanoddly <109335133+stanoddly@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:14:22 +0100 Subject: [PATCH 2/3] removed ASYNCIFY, it's not compatible with -fwasm-exceptions --- DotnetRaylibWasm/DotnetRaylibWasm.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DotnetRaylibWasm/DotnetRaylibWasm.csproj b/DotnetRaylibWasm/DotnetRaylibWasm.csproj index 20e345d..1dbd68a 100644 --- a/DotnetRaylibWasm/DotnetRaylibWasm.csproj +++ b/DotnetRaylibWasm/DotnetRaylibWasm.csproj @@ -21,12 +21,12 @@ true - -sUSE_GLFW=3 -sASYNCIFY=1 -sVERBOSE=1 -Wbad-function-cast -Wcast-function-type -O2 -g3 -sVERBOSE=1 -sINITIAL_MEMORY=128MB -sMAXIMUM_MEMORY=2048MB -sALLOW_MEMORY_GROWTH=1 -sASYNCIFY_STACK_SIZE=10000000 + -sUSE_GLFW=3 -sVERBOSE=1 -Wbad-function-cast -Wcast-function-type -O2 -g3 -sVERBOSE=1 -sINITIAL_MEMORY=128MB -sMAXIMUM_MEMORY=2048MB -sALLOW_MEMORY_GROWTH=1 -sASYNCIFY_STACK_SIZE=10000000 - -s USE_GLFW=3 -sASYNCIFY=1 -O3 + -s USE_GLFW=3 -O3 From 8e37cf73dec2a26beff17c53ce5ae64fae87cce7 Mon Sep 17 00:00:00 2001 From: stanoddly <109335133+stanoddly@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:37:20 +0100 Subject: [PATCH 3/3] little path fixes --- DotnetRaylibWasm/index.html | 2 +- DotnetRaylibWasm/main.js | 2 +- DotnetRaylibWasm/raylib.html | 2 +- README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DotnetRaylibWasm/index.html b/DotnetRaylibWasm/index.html index 4a947bb..2e35506 100644 --- a/DotnetRaylibWasm/index.html +++ b/DotnetRaylibWasm/index.html @@ -11,7 +11,7 @@

Dotnet + Raylib + Wasm prototype

⚠️The very first example you open will download around 30MB of resources for ALL examples, so it might take a while. The rest of the examples will load almost immediatelly.

-

Please report any errors here. You can find logs in the Console.

+

Please report any errors here. You can find logs in the Console.