diff --git a/.github/workflows/test-and-publish.yaml b/.github/workflows/test-and-publish.yaml index 260f317a..042d9386 100644 --- a/.github/workflows/test-and-publish.yaml +++ b/.github/workflows/test-and-publish.yaml @@ -38,7 +38,7 @@ jobs: uses: actions/cache@v3 with: path: | - ./firefox-102.2.0/* + ./firefox-source/* ./_spidermonkey_install/* key: ${{ runner.os }}-spidermonkey - name: Build-Library diff --git a/.gitignore b/.gitignore index f48e7479..cfb07c4c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,7 @@ bin/ lib/* .pytest_cache .DS_Store -firefox-102.2.0* -firefox-102.2.0/* -firefox-*/* +firefox-*.tar.xz firefox-*/ tests/__pycache__/* tests/python/__pycache__/* diff --git a/setup.sh b/setup.sh index 827da61f..137685c6 100755 --- a/setup.sh +++ b/setup.sh @@ -14,16 +14,13 @@ sudo curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y #in echo "Done installing dependencies" echo "Downloading spidermonkey source code" -wget -c -q https://ftp.mozilla.org/pub/firefox/releases/102.2.0esr/source/firefox-102.2.0esr.source.tar.xz -tar xf firefox-102.2.0esr.source.tar.xz +wget -c -q https://ftp.mozilla.org/pub/firefox/releases/102.11.0esr/source/firefox-102.11.0esr.source.tar.xz +mkdir -p firefox-source +tar xf firefox-102.11.0esr.source.tar.xz -C firefox-source --strip-components=1 # strip the root folder echo "Done downloading spidermonkey source code" echo "Building spidermonkey" -cd firefox-102.2.0/python/mozbuild/mozbuild -# the build system breaks on Python 3.11 (`io.open()` no longer accepts 'U' in the file mode) -sed -i 's/"rU"/"r"/g' util.py preprocessor.py action/process_define_files.py backend/base.py -cd - -cd firefox-102.2.0/js +cd firefox-source/js sed -i 's/bool Unbox/JS_PUBLIC_API bool Unbox/g' ./public/Class.h # need to manually add JS_PUBLIC_API to js::Unbox until it gets fixed in Spidermonkey sed -i 's/bool js::Unbox/JS_PUBLIC_API bool js::Unbox/g' ./src/vm/JSObject.cpp # same here cd src