Skip to content

Commit 40f8eb0

Browse files
author
xcodebuild
committed
feat: support for Apple M1
1 parent 487c30a commit 40f8eb0

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ jobs:
3434
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
3535
mac_certs: ${{ secrets.mac_certs }}
3636
mac_certs_password: ${{ secrets.mac_certs_password }}
37+
args: --universal

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
"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",
2222
"update:zip": "cd vendor && rimraf files.zip && bestzip files.zip files/",
2323
"update:zip-fullnode": "cd vendor && rimraf files.zip && bestzip files.zip files/",
24-
"update:node": "node scripts/update-node.js",
2524
"cleanbuild": "rm -rf node_modules && yarn install --ignore-engines && yarn run dist",
2625
"build-doc": "cd docs && yarn install --ignore-engines&& yarn run build",
27-
"install-deps": "yarn install --ignore-engines && yarn run update:node && yarn run update:node_modules",
26+
"install-deps": "yarn install --ignore-engines && yarn run update:node_modules",
2827
"ci": "npm install -g yarn && yarn run install-deps && yarn run dist",
2928
"postinstall": "electron-builder install-app-deps",
3029
"test": "echo 'no test here yet'",

scripts/update-node.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/main/api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import path from 'path';
1212
import { IPROXY_FILES_DIR, SYSTEM_IS_MACOS } from './const';
1313
import { app, nativeTheme, BrowserWindow } from 'electron';
1414
import http from 'http';
15+
import * as process from "process";
1516

1617
interface SwpanModuleProp {
1718
moduleId: string;
@@ -54,7 +55,7 @@ cp.spawn = function(cmd, argv, options) {
5455
require(decodeURIComponent('${modulePath}'));`;
5556
const startProcess = () => {
5657
const child = spwan(
57-
nodeExe,
58+
process.execPath,
5859
[
5960
'-e',
6061
`const code = decodeURIComponent("${encodeURIComponent(nodeScript)}");console.log(code);eval(code);`,

0 commit comments

Comments
 (0)