mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-22 20:55:03 +03:00
.
This commit is contained in:
parent
21da3bebfb
commit
8837173b1c
14
Makefile
14
Makefile
@ -19,20 +19,6 @@ build:
|
||||
watch:
|
||||
DEV=1 ./node_modules/.bin/webpack --progress -w
|
||||
|
||||
install-deps:
|
||||
npm install
|
||||
npm prune
|
||||
for dir in app $(builtin_plugins) ; do \
|
||||
cd $$dir; \
|
||||
npm install; \
|
||||
npm prune; \
|
||||
cd ..; \
|
||||
done
|
||||
make build-native
|
||||
|
||||
build-native:
|
||||
./node_modules/.bin/electron-rebuild -f -w terminus-terminal/node_modules/node-pty -m terminus-terminal
|
||||
./node_modules/.bin/electron-rebuild -f -w terminus-terminal/node_modules/font-manager -m terminus-terminal
|
||||
|
||||
build-windows:
|
||||
echo :: Building application
|
||||
|
@ -1,3 +1,5 @@
|
||||
if (process.platform == 'win32' && require('electron-squirrel-startup')) process.exit(0)
|
||||
|
||||
const electron = require('electron')
|
||||
require('electron-debug')({enabled: true, showDevTools: (process.argv.indexOf('--debug') != -1) ? 'undocked' : false})
|
||||
|
||||
@ -18,7 +20,6 @@ const yaml = require('js-yaml')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const Config = require('electron-config')
|
||||
const platform = require('os').platform()
|
||||
require('electron-debug')({enabled: true, showDevTools: process.argv.indexOf('--debug') != -1})
|
||||
let windowConfig = new Config({name: 'window'})
|
||||
|
||||
@ -162,7 +163,7 @@ start = () => {
|
||||
if ((configData.appearance || {}).frame == 'native') {
|
||||
options.frame = true
|
||||
} else {
|
||||
if (platform == 'darwin') {
|
||||
if (process.platform == 'darwin') {
|
||||
options.titleBarStyle = 'hidden-inset'
|
||||
}
|
||||
}
|
||||
@ -172,7 +173,7 @@ start = () => {
|
||||
app.window = new electron.BrowserWindow(options)
|
||||
app.window.loadURL(`file://${app.getAppPath()}/dist/index.html`, {extraHeaders: "pragma: no-cache\n"})
|
||||
|
||||
if (platform != 'darwin') {
|
||||
if (process.platform != 'darwin') {
|
||||
app.window.setMenu(null)
|
||||
}
|
||||
|
||||
@ -181,7 +182,7 @@ start = () => {
|
||||
|
||||
setupWindowManagement()
|
||||
|
||||
if (platform == 'darwin') {
|
||||
if (process.platform == 'darwin') {
|
||||
setupMenu()
|
||||
} else {
|
||||
app.window.setMenu(null)
|
||||
|
@ -20,6 +20,7 @@
|
||||
"electron-config": "0.2.1",
|
||||
"electron-debug": "^1.0.1",
|
||||
"electron-is-dev": "0.1.2",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"fs-promise": "^2.0.2",
|
||||
"js-yaml": "3.8.2",
|
||||
"path": "0.12.7",
|
||||
|
@ -12,6 +12,7 @@
|
||||
"css-loader": "0.26.1",
|
||||
"electron": "1.6.2",
|
||||
"electron-builder": "^17.1.1",
|
||||
"electron-builder-squirrel-windows": "^17.0.1",
|
||||
"electron-osx-sign": "electron-userland/electron-osx-sign#f092181a1bffa2b3248a23ee28447a47e14a8f04",
|
||||
"electron-rebuild": "1.5.7",
|
||||
"file-loader": "^0.9.0",
|
||||
@ -26,6 +27,7 @@
|
||||
"pug-static-loader": "0.0.1",
|
||||
"raw-loader": "^0.5.1",
|
||||
"sass-loader": "^6.0.3",
|
||||
"shelljs": "^0.7.7",
|
||||
"source-sans-pro": "^2.0.10",
|
||||
"style-loader": "^0.13.1",
|
||||
"to-string-loader": "^1.1.5",
|
||||
@ -38,8 +40,8 @@
|
||||
"webpack": "2.4.1"
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.elements.benchmark",
|
||||
"productName": "ELEMENTS Benchmark",
|
||||
"appId": "org.terminus",
|
||||
"productName": "Terminus",
|
||||
"compression": "normal",
|
||||
"extraResources": [
|
||||
"builtin-plugins"
|
||||
|
9
scripts/build-native.js
Normal file
9
scripts/build-native.js
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env node
|
||||
const rebuild = require('electron-rebuild').default
|
||||
const path = require('path')
|
||||
const vars = require('./vars')
|
||||
|
||||
let buildPath = path.resolve(__dirname, '../terminus-terminal')
|
||||
rebuild(buildPath, vars.electronVersion, process.arch, [], true).then(() => {
|
||||
console.log('Done')
|
||||
})
|
11
scripts/build-windows.js
Normal file
11
scripts/build-windows.js
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
const builder = require('electron-builder').build
|
||||
const vars = require('./vars')
|
||||
|
||||
builder({
|
||||
dir: true,
|
||||
win: ['squirrel'],
|
||||
extraMetadata: {
|
||||
version: vars.version,
|
||||
},
|
||||
})
|
14
scripts/install-deps.js
Normal file
14
scripts/install-deps.js
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env node
|
||||
const sh = require('shelljs')
|
||||
const path = require('path')
|
||||
const vars = require('./vars')
|
||||
|
||||
sh.exec('npm prune')
|
||||
sh.exec('npm install')
|
||||
|
||||
vars.builtinPlugins.forEach(plugin => {
|
||||
sh.cd(plugin)
|
||||
sh.exec('npm prune')
|
||||
sh.exec('npm install')
|
||||
sh.cd('..')
|
||||
})
|
19
scripts/prepackage-plugins.js
Normal file
19
scripts/prepackage-plugins.js
Normal file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env node
|
||||
const rebuild = require('electron-rebuild').default
|
||||
const builder = require('electron-builder').default
|
||||
const sh = require('shelljs')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const vars = require('./vars')
|
||||
|
||||
let target = path.resolve(__dirname, '../builtin-plugins')
|
||||
|
||||
sh.mkdir('-p', target)
|
||||
fs.writeFileSync(path.join(target, 'package.json'), '{}')
|
||||
sh.cd(target)
|
||||
vars.builtinPlugins.forEach(plugin => {
|
||||
sh.exec(`npm install ${path.join('..', plugin)}`)
|
||||
})
|
||||
sh.exec('npm dedupe')
|
||||
sh.cd('..')
|
||||
rebuild(target, vars.electronVersion, process.arch, ['node-pty', 'font-manager'], true)
|
3
scripts/vars.js
Normal file
3
scripts/vars.js
Normal file
@ -0,0 +1,3 @@
|
||||
exports.builtinPlugins = ['terminus-core', 'terminus-settings', 'terminus-terminal']
|
||||
exports.electronVersion = '1.6.2'
|
||||
exports.version = '0.0.1'
|
Loading…
Reference in New Issue
Block a user