Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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__/*
Expand Down
11 changes: 4 additions & 7 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down