Skip to content

Commit

Permalink
fix: Ensure build failure on emscripten install failure on Windows
Browse files Browse the repository at this point in the history
(cherry picked from commit bfeba14)
  • Loading branch information
jeromelaban authored and mergify[bot] committed Jan 30, 2023
1 parent a34c1ba commit 845ba7b
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/Uno.Wasm.Bootstrap/build/scripts/emscripten-setup.cmd
Expand Up @@ -21,18 +21,43 @@ pushd "%UNO_EMSDK_PATH%"
python --version

IF ERRORLEVEL 1 (
echo Python is not installed. You can install it from the store https://www.microsoft.com/store/productId/9P7QFQMJRFP7 1>&2
echo Python is not installed. You can install it from the store https://aka.platform.uno/python-install 1>&2
EXIT /B 1
)

rem git --version
git --version

IF ERRORLEVEL 1 (
echo Git is not installed. You can install it from the store https://aka.platform.uno/bootstrapper-git 1>&2
EXIT /B 1
)

IF NOT EXIST "%UNO_EMSDK_PATH_MARKER%" (
echo "Installing emscripten %UNO_EMSDK_VERSION% in %UNO_EMSDK_PATH%"

git clone --branch %UNO_EMSDK_VERSION% https://github.com/emscripten-core/emsdk 2>&1

IF ERRORLEVEL 1 (
echo Failed to clone the Emscripten SDK repository. Review the error logs for additional information and check https://aka.platform.uno/msbuild-troubleshoot 1>&2
EXIT /B 1
)

cd emsdk
emsdk install %UNO_EMSDK_VERSION% 2>&1

IF ERRORLEVEL 1 (
echo Failed to install Emscripten SDK %UNO_EMSDK_VERSION%. Review the error logs for additional information and check https://aka.platform.uno/msbuild-troubleshoot 1>&2
EXIT /B 1
)

emsdk activate %UNO_EMSDK_VERSION% 2>&1

IF ERRORLEVEL 1 (
echo Failed to activate the Emscripten SDK %UNO_EMSDK_VERSION%. Review the error logs for additional information and check https://aka.platform.uno/msbuild-troubleshoot 1>&2
EXIT /B 1
)

echo "Writing %UNO_EMSDK_PATH_MARKER%"
echo "installed" > "%UNO_EMSDK_PATH_MARKER%"
) ELSE (
Expand Down

0 comments on commit 845ba7b

Please sign in to comment.