mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
Support for Apple Silicon via node 15, electron 11.1 update
This commit is contained in:
22
scripts/build-macos-arm64.js
Executable file
22
scripts/build-macos-arm64.js
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env node
|
||||
const builder = require('electron-builder').build
|
||||
const vars = require('./vars')
|
||||
const fs = require('fs')
|
||||
const signHook = require('../build/mac/afterSignHook')
|
||||
|
||||
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
||||
|
||||
builder({
|
||||
dir: true,
|
||||
mac: ['pkg', 'zip'],
|
||||
arm64: true,
|
||||
config: {
|
||||
extraMetadata: {
|
||||
version: vars.version,
|
||||
},
|
||||
},
|
||||
publish: isTag ? 'always' : 'onTag',
|
||||
}).catch(e => {
|
||||
console.error(e)
|
||||
process.exit(1)
|
||||
})
|
@@ -10,16 +10,18 @@ const npx = `${localBinPath}/npx`;
|
||||
log.info('deps', 'app')
|
||||
|
||||
sh.cd('app')
|
||||
sh.exec(`${npx} yarn install`)
|
||||
sh.exec(`${npx} yarn install --force`)
|
||||
sh.cd('..')
|
||||
|
||||
vars.builtinPlugins.forEach(plugin => {
|
||||
log.info('deps', plugin)
|
||||
sh.cd(plugin)
|
||||
sh.exec(`${npx} yarn install`)
|
||||
sh.exec(`${npx} yarn install --force`)
|
||||
sh.cd('..')
|
||||
})
|
||||
|
||||
sh.cp('binding.gyp_hack', "app/node_modules/@terminus-term/node-pty/binding.gyp")
|
||||
|
||||
if (['darwin', 'linux'].includes(process.platform)) {
|
||||
sh.cd('node_modules')
|
||||
for (let x of vars.builtinPlugins) {
|
||||
|
@@ -1,8 +1,7 @@
|
||||
|
||||
#This script creates local release for macos
|
||||
|
||||
./scripts/install-deps.js
|
||||
./scripts/build-native.js
|
||||
yarn run build
|
||||
./scripts/prepackage-plugins.js
|
||||
npm run build
|
||||
./scripts/build-macos.js
|
||||
./scripts/build-macos-arm64.js
|
@@ -6,6 +6,9 @@ const fs = require('fs')
|
||||
const vars = require('./vars')
|
||||
const log = require('npmlog')
|
||||
|
||||
const localBinPath = path.resolve(__dirname, '../node_modules/.bin');
|
||||
const npx = `${localBinPath}/npx`;
|
||||
|
||||
let target = path.resolve(__dirname, '../builtin-plugins')
|
||||
sh.mkdir('-p', target)
|
||||
fs.writeFileSync(path.join(target, 'package.json'), '{}')
|
||||
@@ -15,7 +18,10 @@ vars.builtinPlugins.forEach(plugin => {
|
||||
sh.cp('-r', path.join('..', plugin), '.')
|
||||
sh.rm('-rf', path.join(plugin, 'node_modules'))
|
||||
sh.cd(plugin)
|
||||
sh.exec(`npm install --only=prod`)
|
||||
//sh.exec(`npm install --only=prod`)
|
||||
sh.exec(`${npx} yarn install --force`)
|
||||
|
||||
|
||||
log.info('rebuild', 'native')
|
||||
if (fs.existsSync('node_modules')) {
|
||||
rebuild(path.resolve('.'), vars.electronVersion, process.arch, [], true)
|
||||
|
Reference in New Issue
Block a user