Skip to content

Commit

Permalink
feat: support for Apple M1
Browse files Browse the repository at this point in the history
  • Loading branch information
xcodebuild committed Jul 12, 2021
1 parent 487c30a commit 40f8eb0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ jobs:
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
args: --universal
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
"update:node_modules": "npx rimraf vendor/files/node/modules && cd vendor/files/node && echo {} > package.json && yarn add --ignore-engines ../../whistle-start ../../whistle whistle.vase ../../whistle.scriptfile ../../whistle.chii-internal --production=true && mv node_modules modules && cd ../../.. && npm run update:zip",
"update:zip": "cd vendor && rimraf files.zip && bestzip files.zip files/",
"update:zip-fullnode": "cd vendor && rimraf files.zip && bestzip files.zip files/",
"update:node": "node scripts/update-node.js",
"cleanbuild": "rm -rf node_modules && yarn install --ignore-engines && yarn run dist",
"build-doc": "cd docs && yarn install --ignore-engines&& yarn run build",
"install-deps": "yarn install --ignore-engines && yarn run update:node && yarn run update:node_modules",
"install-deps": "yarn install --ignore-engines && yarn run update:node_modules",
"ci": "npm install -g yarn && yarn run install-deps && yarn run dist",
"postinstall": "electron-builder install-app-deps",
"test": "echo 'no test here yet'",
Expand Down
13 changes: 0 additions & 13 deletions scripts/update-node.js

This file was deleted.

3 changes: 2 additions & 1 deletion src/main/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import path from 'path';
import { IPROXY_FILES_DIR, SYSTEM_IS_MACOS } from './const';
import { app, nativeTheme, BrowserWindow } from 'electron';
import http from 'http';
import * as process from "process";

interface SwpanModuleProp {
moduleId: string;
Expand Down Expand Up @@ -54,7 +55,7 @@ cp.spawn = function(cmd, argv, options) {
require(decodeURIComponent('${modulePath}'));`;
const startProcess = () => {
const child = spwan(
nodeExe,
process.execPath,
[
'-e',
`const code = decodeURIComponent("${encodeURIComponent(nodeScript)}");console.log(code);eval(code);`,
Expand Down

0 comments on commit 40f8eb0

Please sign in to comment.