mirror of
https://github.com/Eugeny/tabby.git
synced 2025-08-04 16:31:54 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
af458597d8 | ||
![]() |
057c642539 | ||
![]() |
0b14ae1bd6 | ||
![]() |
f1002082f2 |
9
.github/workflows/windows.yml
vendored
9
.github/workflows/windows.yml
vendored
@@ -26,6 +26,7 @@ jobs:
|
|||||||
run: node scripts/build-windows.js
|
run: node scripts/build-windows.js
|
||||||
if: github.repository == 'Eugeny/terminus' && github.event_name == 'push'
|
if: github.repository == 'Eugeny/terminus' && github.event_name == 'push'
|
||||||
env:
|
env:
|
||||||
|
DEBUG: electron-builder,electron-builder:*
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
|
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
|
||||||
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
|
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
|
||||||
@@ -40,6 +41,8 @@ jobs:
|
|||||||
mv dist/*-setup.exe artifact-setup/
|
mv dist/*-setup.exe artifact-setup/
|
||||||
mkdir artifact-portable
|
mkdir artifact-portable
|
||||||
mv dist/*-portable.exe artifact-portable/
|
mv dist/*-portable.exe artifact-portable/
|
||||||
|
mkdir artifact-appx
|
||||||
|
mv dist/*.appx artifact-appx/
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
name: Upload installer
|
name: Upload installer
|
||||||
@@ -52,3 +55,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: Portable build
|
name: Portable build
|
||||||
path: artifact-portable
|
path: artifact-portable
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@master
|
||||||
|
name: Upload APPX
|
||||||
|
with:
|
||||||
|
name: Portable build
|
||||||
|
path: artifact-appx
|
||||||
|
@@ -22,6 +22,10 @@ nsis:
|
|||||||
installerIcon: "./build/windows/icon.ico"
|
installerIcon: "./build/windows/icon.ico"
|
||||||
portable:
|
portable:
|
||||||
artifactName: terminus-${version}-portable.exe
|
artifactName: terminus-${version}-portable.exe
|
||||||
|
appx:
|
||||||
|
artifactName: terminus-${version}.appx
|
||||||
|
publisher: 'CN="Syslink GmbH",O="Syslink GmbH",PostalCode=40477,STREET="Parkstrasse 31", L=Duesseldorf, OID.2.5.4.8=NRW, C=DE'
|
||||||
|
publisherDisplayName: 'Eugene Pankov'
|
||||||
|
|
||||||
mac:
|
mac:
|
||||||
category: public.app-category.video
|
category: public.app-category.video
|
||||||
|
@@ -3,7 +3,6 @@ const builder = require('electron-builder').build
|
|||||||
const vars = require('./vars')
|
const vars = require('./vars')
|
||||||
|
|
||||||
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
||||||
const isCI = !!process.env.GITHUB_REF
|
|
||||||
|
|
||||||
builder({
|
builder({
|
||||||
dir: true,
|
dir: true,
|
||||||
|
@@ -3,7 +3,6 @@ const builder = require('electron-builder').build
|
|||||||
const vars = require('./vars')
|
const vars = require('./vars')
|
||||||
|
|
||||||
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
||||||
const isCI = !!process.env.GITHUB_REF
|
|
||||||
|
|
||||||
builder({
|
builder({
|
||||||
dir: true,
|
dir: true,
|
||||||
|
@@ -3,11 +3,10 @@ const builder = require('electron-builder').build
|
|||||||
const vars = require('./vars')
|
const vars = require('./vars')
|
||||||
|
|
||||||
const isTag = (process.env.GITHUB_REF || process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/')
|
const isTag = (process.env.GITHUB_REF || process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/')
|
||||||
const isCI = !!process.env.GITHUB_REF
|
|
||||||
|
|
||||||
builder({
|
builder({
|
||||||
dir: true,
|
dir: true,
|
||||||
win: ['nsis', 'portable'],
|
win: ['nsis', 'portable', 'appx'],
|
||||||
config: {
|
config: {
|
||||||
extraMetadata: {
|
extraMetadata: {
|
||||||
version: vars.version,
|
version: vars.version,
|
||||||
|
69
terminus-terminal/src/debug.ts
Normal file
69
terminus-terminal/src/debug.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import * as fs from 'fs'
|
||||||
|
import { Injectable } from '@angular/core'
|
||||||
|
import { TerminalDecorator } from './api/decorator'
|
||||||
|
import { TerminalTabComponent } from './components/terminalTab.component'
|
||||||
|
import { ElectronService, HostAppService } from 'terminus-core'
|
||||||
|
|
||||||
|
/** @hidden */
|
||||||
|
@Injectable()
|
||||||
|
export class DebugDecorator extends TerminalDecorator {
|
||||||
|
constructor (
|
||||||
|
private electron: ElectronService,
|
||||||
|
private hostApp: HostAppService,
|
||||||
|
) {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
|
attach (terminal: TerminalTabComponent): void {
|
||||||
|
terminal.content.nativeElement.addEventListener('keyup', e => {
|
||||||
|
if (e.which === 49 && e.ctrlKey && e.shiftKey && e.altKey) {
|
||||||
|
this.doSaveOutput(terminal)
|
||||||
|
}
|
||||||
|
if (e.which === 50 && e.ctrlKey && e.shiftKey && e.altKey) {
|
||||||
|
this.doLoadInput(terminal)
|
||||||
|
}
|
||||||
|
if (e.which === 51 && e.ctrlKey && e.shiftKey && e.altKey) {
|
||||||
|
this.doCopyOutput(terminal)
|
||||||
|
}
|
||||||
|
if (e.which === 52 && e.ctrlKey && e.shiftKey && e.altKey) {
|
||||||
|
this.doPasteOutput(terminal)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async doSaveOutput (terminal: TerminalTabComponent) {
|
||||||
|
const result = await this.electron.dialog.showSaveDialog(
|
||||||
|
this.hostApp.getWindow(),
|
||||||
|
{
|
||||||
|
defaultPath: 'output.txt',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
if (result.filePath) {
|
||||||
|
fs.writeFileSync(result.filePath, terminal.frontend.saveState())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async doCopyOutput (terminal: TerminalTabComponent) {
|
||||||
|
const data = '```' + JSON.stringify(terminal.frontend.saveState()) + '```'
|
||||||
|
this.electron.clipboard.writeText(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
async doLoadInput (terminal: TerminalTabComponent) {
|
||||||
|
const result = await this.electron.dialog.showOpenDialog(
|
||||||
|
this.hostApp.getWindow(),
|
||||||
|
{
|
||||||
|
buttonLabel: 'Load',
|
||||||
|
properties: ['openFile', 'treatPackageAsDirectory'],
|
||||||
|
},
|
||||||
|
)
|
||||||
|
if (result.filePaths.length) {
|
||||||
|
const data = fs.readFileSync(result.filePaths[0])
|
||||||
|
terminal.frontend.restoreState(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async doPasteOutput (terminal: TerminalTabComponent) {
|
||||||
|
const data = JSON.parse(this.electron.clipboard.readText())
|
||||||
|
terminal.frontend.restoreState(data)
|
||||||
|
}
|
||||||
|
}
|
@@ -31,6 +31,7 @@ import { TerminalContextMenuItemProvider } from './api/contextMenuProvider'
|
|||||||
import { TerminalColorSchemeProvider } from './api/colorSchemeProvider'
|
import { TerminalColorSchemeProvider } from './api/colorSchemeProvider'
|
||||||
import { ShellProvider } from './api/shellProvider'
|
import { ShellProvider } from './api/shellProvider'
|
||||||
import { TerminalSettingsTabProvider, AppearanceSettingsTabProvider, ShellSettingsTabProvider } from './settings'
|
import { TerminalSettingsTabProvider, AppearanceSettingsTabProvider, ShellSettingsTabProvider } from './settings'
|
||||||
|
import { DebugDecorator } from './debug'
|
||||||
import { PathDropDecorator } from './pathDrop'
|
import { PathDropDecorator } from './pathDrop'
|
||||||
import { TerminalConfigProvider } from './config'
|
import { TerminalConfigProvider } from './config'
|
||||||
import { TerminalHotkeyProvider } from './hotkeys'
|
import { TerminalHotkeyProvider } from './hotkeys'
|
||||||
@@ -77,6 +78,7 @@ import { XTermFrontend, XTermWebGLFrontend } from './frontends/xtermFrontend'
|
|||||||
{ provide: TerminalColorSchemeProvider, useClass: HyperColorSchemes, multi: true },
|
{ provide: TerminalColorSchemeProvider, useClass: HyperColorSchemes, multi: true },
|
||||||
{ provide: TerminalDecorator, useClass: PathDropDecorator, multi: true },
|
{ provide: TerminalDecorator, useClass: PathDropDecorator, multi: true },
|
||||||
{ provide: TerminalDecorator, useClass: ZModemDecorator, multi: true },
|
{ provide: TerminalDecorator, useClass: ZModemDecorator, multi: true },
|
||||||
|
{ provide: TerminalDecorator, useClass: DebugDecorator, multi: true },
|
||||||
|
|
||||||
{ provide: ShellProvider, useClass: WindowsDefaultShellProvider, multi: true },
|
{ provide: ShellProvider, useClass: WindowsDefaultShellProvider, multi: true },
|
||||||
{ provide: ShellProvider, useClass: MacOSDefaultShellProvider, multi: true },
|
{ provide: ShellProvider, useClass: MacOSDefaultShellProvider, multi: true },
|
||||||
|
Reference in New Issue
Block a user