mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-09 10:01:48 +00:00
.github
.vscode
.well-known
app
build
docs
extras
locale
patches
scripts
build-docs.mjs
build-linux.mjs
build-macos.mjs
build-modules.mjs
build-native.mjs
build-typings.mjs
build-windows.mjs
generate-icon-metadata.mjs
i18n-extract.mjs
install-deps.mjs
prepackage-plugins.mjs
publish-plugins.mjs
sentry-upload.mjs
vars.mjs
snap
tabby-community-color-schemes
tabby-core
tabby-electron
tabby-linkifier
tabby-local
tabby-plugin-manager
tabby-serial
tabby-settings
tabby-ssh
tabby-telnet
tabby-terminal
tabby-uac
tabby-web
tabby-web-demo
web
.all-contributorsrc
.editorconfig
.env
.eslintrc.yml
.gitignore
.mergify.yml
.pug-lintrc.js
CODE_OF_CONDUCT.md
HACKING.md
LICENSE
README.de-DE.md
README.es-ES.md
README.id-ID.md
README.it-IT.md
README.ja-JP.md
README.ko-KR.md
README.md
README.pl-PL.md
README.pt-BR.md
README.ru-RU.md
README.zh-CN.md
electron-builder.yml
firebase.json
package.json
tsconfig.json
typedoc.mjs
webpack.config.mjs
webpack.plugin.config.mjs
yarn.lock
38 lines
1.1 KiB
JavaScript
Executable File
38 lines
1.1 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
import { rebuild } from '@electron/rebuild'
|
|
import * as path from 'path'
|
|
import * as vars from './vars.mjs'
|
|
|
|
import * as url from 'url'
|
|
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
|
|
|
|
|
|
if (process.platform === 'win32' || process.platform === 'linux') {
|
|
process.env.ARCH = ((process.env.ARCH || process.arch) === 'arm') ? 'armv7l' : process.env.ARCH || process.arch
|
|
} else {
|
|
process.env.ARCH ??= process.arch
|
|
}
|
|
|
|
let lifecycles = []
|
|
for (let dir of ['app', 'tabby-core', 'tabby-local', 'tabby-ssh', 'tabby-terminal']) {
|
|
const build = rebuild({
|
|
buildPath: path.resolve(__dirname, '../' + dir),
|
|
electronVersion: vars.electronVersion,
|
|
arch: process.env.ARCH,
|
|
force: true,
|
|
})
|
|
build.catch(e => {
|
|
console.error(e)
|
|
process.exit(1)
|
|
})
|
|
lifecycles.push([build.lifecycle, dir])
|
|
}
|
|
|
|
console.info('Building against Electron', vars.electronVersion)
|
|
|
|
for (let [lc, dir] of lifecycles) {
|
|
lc.on('module-found', name => {
|
|
console.info('Rebuilding', dir + '/' + name)
|
|
})
|
|
}
|