-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9dba6b9
commit 490192f
Showing
61 changed files
with
4,373 additions
and
2,798 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"root": true, | ||
"env": { | ||
"es6": true, | ||
"es2020": true, | ||
"node": true, | ||
"shared-node-browser": true | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
name: Setup | ||
description: Setup Node.js and install dependencies | ||
inputs: | ||
skip_install: | ||
required: false | ||
default: 'false' | ||
|
||
runs: | ||
using: composite | ||
|
@@ -10,26 +14,16 @@ runs: | |
node-version-file: .nvmrc | ||
|
||
- name: Setup Yarn | ||
run: | ||
npm i -g [email protected] | ||
run: npm i -g [email protected] | ||
shell: bash | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11.5 | ||
|
||
- name: Cache dependencies | ||
id: yarn-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-yarn-ng-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-ng | ||
- name: Install dependencies | ||
if: ${{ inputs.skip_install == 'false' }} | ||
run: | | ||
yarn config set agora-electron-sdk-pre-built 0 | ||
yarn install --frozen-lockfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
yarn-path "scripts/bootstrap.js" | ||
registry "https://registry.npmjs.org/" | ||
network-timeout 600000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ dist/ | |
node_modules/ | ||
thumbs.db | ||
.idea/ | ||
appId.* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const pkg = require('../package.json'); | ||
|
||
const packageJsonPath = path.join(__dirname, '../package.json'); | ||
const electron_version = pkg.agora_electron?.electron_version; | ||
const arch = process.env.npm_config_agora_electron_sdk_arch; | ||
|
||
//When you set agora_electron.electron_version, | ||
//the script will automatically download the specially compiled version of Electron by Agora when installing agora-electron-sdk. | ||
//It will be moved to node_modules/electron/dist. | ||
//If you want to use the Agora compiled Electron version during Electron packaging as well, | ||
//please configure this script in your project. | ||
//It can help you compile based on the content configured in (electronDist)[https://www.electron.build/configuration/configuration] during packaging. | ||
if (process.platform !== 'darwin') { | ||
return; | ||
} | ||
if (electron_version) { | ||
console.log('electron_version is set in agora_electron:', electron_version); | ||
const version = electron_version.match(/^([^-]+)/)[1]; | ||
const version_suffix = electron_version.match(/-(.+)/)[1]; | ||
console.log('version_suffix is:', version_suffix); | ||
pkg.devDependencies.electron = version; | ||
console.log('change example electron version to:', version); | ||
let electron_dist_path = path.join(require.resolve('electron'), `../dist`); | ||
pkg.build.electronDist = electron_dist_path; | ||
console.log('change electronDist to:', pkg.build.electronDist); | ||
} | ||
|
||
console.log('change arch to:', arch); | ||
pkg.build.mac.target = [ | ||
{ | ||
target: 'zip', | ||
arch: [arch], | ||
}, | ||
]; | ||
|
||
fs.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + '\n'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.