Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruffle autodownload #220

Merged
merged 2 commits into from
Jun 4, 2024
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@
"start-electron": "NODE_ENV=development electron ./dist/electron/electron.js",
"start-ext": "NODE_ENV=development webpack --mode=development --watch",
"start-embed": "yarn run build-dev && cd dist/embed/ && http-server -p 10001",
"update-ruffle": "./src/static/ruffle/download-latest-ruffle.sh",
"pack": "CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --publish never",
"pack-signed": "electron-builder",
"dist": "yarn run build && yarn run pack",
"dist-dev": "yarn run build-dev && yarn run pack",
"release": "yarn run build && electron-builder",
"release": "yarn run update-ruffle && yarn run build && electron-builder",
"lint": "eslint ./src/ webpack.config.js"
},
"build": {
Expand Down
2 changes: 2 additions & 0 deletions src/static/ruffle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.wasm
*.js
Binary file removed src/static/ruffle/35bdd3b1a72b1704b5f5.wasm
Binary file not shown.
Binary file removed src/static/ruffle/932a995f8efbc8932dcc.wasm
Binary file not shown.
2 changes: 0 additions & 2 deletions src/static/ruffle/core.ruffle.2bdce3d13ee9db3415e5.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/static/ruffle/core.ruffle.3cb02ac2f1dd5c9282e8.js

This file was deleted.

17 changes: 17 additions & 0 deletions src/static/ruffle/download-latest-ruffle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

RUFFLE_DIR=$SCRIPT_DIR

SELFHOST_URL=$(curl "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')

echo "$SELFHOST_URL"

curl -L -o $RUFFLE_DIR/ruffle.zip "$SELFHOST_URL"

rm $RUFFLE_DIR/*.js $RUFFLE_DIR/*.wasm

cd $RUFFLE_DIR
unzip $RUFFLE_DIR/ruffle.zip *.js *.wasm

rm $RUFFLE_DIR/ruffle.zip
3 changes: 0 additions & 3 deletions src/static/ruffle/ruffle.js

This file was deleted.

Loading