From 9cf1517b383cd222ba0b819061b07d516972bb1a Mon Sep 17 00:00:00 2001 From: Ethan O'Brien Date: Thu, 9 Jan 2025 15:10:04 -0600 Subject: [PATCH] Use tags, instead of commit hashes --- emscripten/build_emscripten.sh | 24 ++++++------------------ src/openrct2-ui/UiContext.cpp | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 29 deletions(-) diff --git a/emscripten/build_emscripten.sh b/emscripten/build_emscripten.sh index 3b1904df9940..8db447bb680a 100755 --- a/emscripten/build_emscripten.sh +++ b/emscripten/build_emscripten.sh @@ -10,45 +10,33 @@ build_ext() { cd ext/ # Pin versions - to prevent sudden breakage if [ ! -d "speexdsp" ]; then - git clone https://gitlab.xiph.org/xiph/speexdsp.git --depth 1 + git clone https://gitlab.xiph.org/xiph/speexdsp.git --depth 1 --branch SpeexDSP-1.2.1 cd speexdsp - git fetch --depth=1 origin dbd421d149a9c362ea16150694b75b63d757a521 - git checkout dbd421d149a9c362ea16150694b75b63d757a521 cd .. fi if [ ! -d "icu" ]; then - git clone https://github.com/unicode-org/icu.git --depth 1 + git clone https://github.com/unicode-org/icu.git --depth 1 --branch release-76-1 cd icu - git fetch --depth=1 origin ba012a74a11405a502b6890e710bfb58cef7a2c7 - git checkout ba012a74a11405a502b6890e710bfb58cef7a2c7 cd .. fi if [ ! -d "libzip" ]; then - git clone https://github.com/nih-at/libzip.git --depth 1 + git clone https://github.com/nih-at/libzip.git --depth 1 --branch v1.11.2 cd libzip - git fetch --depth=1 origin 8352d224d458d86949fd9148dd33332f50a25c7f - git checkout 8352d224d458d86949fd9148dd33332f50a25c7f cd .. fi if [ ! -d "zlib" ]; then - git clone https://github.com/madler/zlib.git --depth 1 + git clone https://github.com/madler/zlib.git --depth 1 --branch v1.3.1 cd zlib - git fetch --depth=1 origin ef24c4c7502169f016dcd2a26923dbaf3216748c - git checkout ef24c4c7502169f016dcd2a26923dbaf3216748c cd .. fi if [ ! -d "vorbis" ]; then - git clone https://gitlab.xiph.org/xiph/vorbis.git --depth 1 + git clone https://gitlab.xiph.org/xiph/vorbis.git --depth 1 --branch v1.3.7 cd vorbis - git fetch --depth=1 origin bb4047de4c05712bf1fd49b9584c360b8e4e0adf - git checkout bb4047de4c05712bf1fd49b9584c360b8e4e0adf cd .. fi if [ ! -d "ogg" ]; then - git clone https://gitlab.xiph.org/xiph/ogg.git --depth 1 + git clone https://gitlab.xiph.org/xiph/ogg.git --depth 1 --branch v1.3.5 cd ogg - git fetch --depth=1 origin 7cf42ea17aef7bc1b7b21af70724840a96c2e7d0 - git checkout 7cf42ea17aef7bc1b7b21af70724840a96c2e7d0 cd .. fi if [ ! -d "$JSON_DIR" ]; then diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index fdf06f5d031f..5f4518baa510 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -722,18 +722,17 @@ class UiContext final : public IUiContext return (SDL_SetClipboardText(target) == 0); #else return ( - MAIN_THREAD_EM_ASM_INT( + MAIN_THREAD_EM_ASM_INT({ + try { - try - { - navigator.clipboard.writeText(UTF8ToString($0)); - return 0; - } - catch (e) - { - return -1; - }; - }) + navigator.clipboard.writeText(UTF8ToString($0)); + return 0; + } + catch (e) + { + return -1; + }; + }) == 0); #endif }