mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
fix directory names in build-linux.md. also fix reload accelerator for Linux (keybindings)
This commit is contained in:
parent
b3ada77c39
commit
766b7b90ce
27
BUILD.md
27
BUILD.md
@ -1,28 +1,31 @@
|
|||||||
# Build Instructions for Wave Terminal
|
# Build Instructions for Wave Terminal
|
||||||
|
|
||||||
These instructions are for setting up the build on MacOS.
|
These instructions are for setting up the build on MacOS.
|
||||||
If you're developing on Linux please use the [Linux Build Instructions](./build-linux.md).
|
If you're developing on Linux please use the [Linux Build Instructions](./build-linux.md).
|
||||||
|
|
||||||
## Running the Development Version of Wave
|
## Running the Development Version of Wave
|
||||||
|
|
||||||
If you install the production version of Wave, you'll see a semi-transparent sidebar, and the data for Wave is stored in the directory ~/.waveterm. The development version has a blue sidebar and stores its data in ~/.waveterm-dev. This allows the production and development versions to be run simultaneously with no conflicts. If the dev database is corrupted by development bugs, or the schema changes in development it will not affect the production copy.
|
If you install the production version of Wave, you'll see a semi-transparent gray sidebar, and the data for Wave is stored in the directory ~/.waveterm. The development version has a blue sidebar and stores its data in ~/.waveterm-dev. This allows the production and development versions to be run simultaneously with no conflicts. If the dev database is corrupted by development bugs, or the schema changes in development it will not affect the production copy.
|
||||||
|
|
||||||
## Prereqs and Tools
|
## Prereqs and Tools
|
||||||
|
|
||||||
Download and install Go (must be at least go 1.18):
|
Download and install Go (must be at least go 1.18):
|
||||||
|
|
||||||
```
|
```
|
||||||
brew install go
|
brew install go
|
||||||
```
|
```
|
||||||
|
|
||||||
Download and install ScriptHaus (to run the build commands):
|
Download and install ScriptHaus (to run the build commands):
|
||||||
|
|
||||||
```
|
```
|
||||||
brew tap scripthaus-dev/scripthaus
|
brew tap scripthaus-dev/scripthaus
|
||||||
brew install scripthaus
|
brew install scripthaus
|
||||||
```
|
```
|
||||||
|
|
||||||
You also need a relatively modern nodejs with npm and yarn installed.
|
You also need a relatively modern nodejs with npm and yarn installed.
|
||||||
* Node can be installed from [https://nodejs.org](https://nodejs.org).
|
|
||||||
* npm can install yarn using:
|
- Node can be installed from [https://nodejs.org](https://nodejs.org).
|
||||||
|
- npm can install yarn using:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install -g yarn
|
npm install -g yarn
|
||||||
@ -40,16 +43,17 @@ git clone git@github.com:wavetermdev/waveterm.git
|
|||||||
scripthaus run build-backend
|
scripthaus run build-backend
|
||||||
```
|
```
|
||||||
|
|
||||||
This builds the Golang backends for Wave. The binaries will put in waveshell/bin and wavesrv/bin respectively. If you're working on a new plugin or other pure frontend changes to Wave, you won't need to rebuild these unless you pull new code from the Wave Repository.
|
This builds the Golang backends for Wave. The binaries will put in waveshell/bin and wavesrv/bin respectively. If you're working on a new plugin or other pure frontend changes to Wave, you won't need to rebuild these unless you pull new code from the Wave Repository.
|
||||||
|
|
||||||
## One-Time Setup
|
## One-Time Setup
|
||||||
|
|
||||||
Install modules (we use yarn):
|
Install modules (we use yarn):
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
Electron also requires specific builds of node_modules to work (because Electron embeds a specific node.js version that might not match your development node.js version). We use a special electron command to cross-compile those modules:
|
Electron also requires specific builds of node_modules to work (because Electron embeds a specific node.js version that might not match your development node.js version). We use a special electron command to cross-compile those modules:
|
||||||
|
|
||||||
```
|
```
|
||||||
scripthaus run electron-rebuild
|
scripthaus run electron-rebuild
|
||||||
@ -57,7 +61,7 @@ scripthaus run electron-rebuild
|
|||||||
|
|
||||||
## Running WebPack
|
## Running WebPack
|
||||||
|
|
||||||
We use webpack to build both the React and Electron App Wrapper code. They are both run together using:
|
We use webpack to build both the React and Electron App Wrapper code. They are both run together using:
|
||||||
|
|
||||||
```
|
```
|
||||||
scripthaus run webpack-watch
|
scripthaus run webpack-watch
|
||||||
@ -65,15 +69,16 @@ scripthaus run webpack-watch
|
|||||||
|
|
||||||
## Running the WaveTerm Dev Client
|
## Running the WaveTerm Dev Client
|
||||||
|
|
||||||
Now that webpack is running (and watching for file changes) we can finally run the WaveTerm Dev Client! To start the client run:
|
Now that webpack is running (and watching for file changes) we can finally run the WaveTerm Dev Client! To start the client run:
|
||||||
|
|
||||||
```
|
```
|
||||||
scripthaus run electron
|
scripthaus run electron
|
||||||
```
|
```
|
||||||
|
|
||||||
To kill the client, either exit the Electron App normally or just Ctrl-C the ```scripthaus run electron``` command.
|
To kill the client, either exit the Electron App normally or just Ctrl-C the `scripthaus run electron` command.
|
||||||
|
|
||||||
Because we're running webpack in watch mode, any changes you make to the typescript will be automatically picked up by the client after a refresh. Note that I've disabled hot-reloading in the webpack config, so to pick up new changes you'll have to manually refresh the WaveTerm Client window. To do that use "Command-Shift-R" (Command-R is used internally by WaveTerm and will not force a refresh).
|
Because we're running webpack in watch mode, any changes you make to the typescript will be automatically picked up by the client after a refresh. Note that I've disabled hot-reloading in the webpack config, so to pick up new changes you'll have to manually refresh the WaveTerm Client window. To do that use "Option-R" (Command-R is used internally by WaveTerm and will not force a refresh).
|
||||||
|
|
||||||
## Debugging the Dev Client
|
## Debugging the Dev Client
|
||||||
|
|
||||||
You can use the regular Chrome DevTools to debug the frontend application. You can open the DevTools using the keyboard shortcut `Cmd-Option-I`.
|
You can use the regular Chrome DevTools to debug the frontend application. You can open the DevTools using the keyboard shortcut `Cmd-Option-I`.
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
# Build Instructions for Wave Terminal on Linux
|
# Build Instructions for Wave Terminal on Linux
|
||||||
|
|
||||||
These instructions are for setting up the build on Linux (Ubuntu).
|
These instructions are for setting up the build on Linux (Ubuntu).
|
||||||
If you're developing on MacOS please use the [MacOS Build Instructions](./BUILD.md).
|
If you're developing on MacOS please use the [MacOS Build Instructions](./BUILD.md).
|
||||||
If you are working on a different Linux distribution, you may need to adapt some of these instructions to fit your environment.
|
If you are working on a different Linux distribution, you may need to adapt some of these instructions to fit your environment.
|
||||||
|
|
||||||
## Running the Development Version of Wave
|
## Running the Development Version of Wave
|
||||||
|
|
||||||
If you install the production version of Wave, you'll see a semi-transparent sidebar, and the data for Wave is stored in the directory ~/prompt. The development version has a red/brown sidebar and stores its data in ~/prompt-dev. This allows the production and development versions to be run simultaneously with no conflicts. If the dev database is corrupted by development bugs, or the schema changes in development it will not affect the production copy.
|
If you install the production version of Wave, you'll see a semi-transparent gray sidebar, and the data for Wave is stored in the directory ~/.waveterm. The development version has a blue sidebar and stores its data in ~/.waveterm-dev. This allows the production and development versions to be run simultaneously with no conflicts. If the dev database is corrupted by development bugs, or the schema changes in development it will not affect the production copy.
|
||||||
|
|
||||||
## Prereqs and Tools
|
## Prereqs and Tools
|
||||||
|
|
||||||
Download and install Go (must be at least go 1.18). We also need gcc installed to run a CGO build (for Golang).
|
Download and install Go (must be at least go 1.18). We also need gcc installed to run a CGO build (for Golang).
|
||||||
zip is required to build linux deployment packages (not required for running and debugging dev builds).
|
zip is required to build linux deployment packages (not required for running and debugging dev builds).
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -36,7 +36,7 @@ sudo cp scripthaus /usr/local/bin
|
|||||||
|
|
||||||
## Install nodejs, npm, and yarn
|
## Install nodejs, npm, and yarn
|
||||||
|
|
||||||
We use [nvm](https://github.com/nvm-sh/nvm) to install nodejs on Linux (you can use an alternate installer if you wish). You must have a relatively recent version of node in order to build the terminal. Different distributions and shells will require different setup instructions. These instructions work for Ubuntu 22 using bash (will install node v20.8.1):
|
We use [nvm](https://github.com/nvm-sh/nvm) to install nodejs on Linux (you can use an alternate installer if you wish). You must have a relatively recent version of node in order to build the terminal. Different distributions and shells will require different setup instructions. These instructions work for Ubuntu 22 using bash (will install node v20.8.1):
|
||||||
|
|
||||||
```
|
```
|
||||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
|
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
|
||||||
@ -50,10 +50,9 @@ Now we can install yarn:
|
|||||||
npm install -g yarn
|
npm install -g yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Clone the Wave Repo
|
## Clone the Wave Repo
|
||||||
|
|
||||||
Move out of the `scripthaus` directory if you're still in it. Clone the wave repository into the directory that you'd like to use for development.
|
Move out of the `scripthaus` directory if you're still in it. Clone the wave repository into the directory that you'd like to use for development.
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone git@github.com:wavetermdev/waveterm.git
|
git clone git@github.com:wavetermdev/waveterm.git
|
||||||
@ -62,11 +61,12 @@ git clone git@github.com:wavetermdev/waveterm.git
|
|||||||
## One-Time Setup
|
## One-Time Setup
|
||||||
|
|
||||||
Install Wave modules (we use yarn):
|
Install Wave modules (we use yarn):
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
Electron also requires specific builds of node_modules to work (because Electron embeds a specific node.js version that might not match your development node.js version). We use a special electron command to cross-compile those modules:
|
Electron also requires specific builds of node_modules to work (because Electron embeds a specific node.js version that might not match your development node.js version). We use a special electron command to cross-compile those modules:
|
||||||
|
|
||||||
```
|
```
|
||||||
scripthaus run electron-rebuild
|
scripthaus run electron-rebuild
|
||||||
@ -81,12 +81,11 @@ cd waveterm
|
|||||||
scripthaus run build-backend
|
scripthaus run build-backend
|
||||||
```
|
```
|
||||||
|
|
||||||
This builds the Golang backends for Wave. The binaries will put in waveshell/bin and wavesrv/bin respectively. If you're working on a new plugin or other pure frontend changes to Wave, you won't need to rebuild these unless you pull new code from the Wave Repository.
|
This builds the Golang backends for Wave. The binaries will put in waveshell/bin and wavesrv/bin respectively. If you're working on a new plugin or other pure frontend changes to Wave, you won't need to rebuild these unless you pull new code from the Wave Repository.
|
||||||
|
|
||||||
|
|
||||||
## Running WebPack
|
## Running WebPack
|
||||||
|
|
||||||
We use webpack to build both the React and Electron App Wrapper code. They are both run together using:
|
We use webpack to build both the React and Electron App Wrapper code. They are both run together using:
|
||||||
|
|
||||||
```
|
```
|
||||||
scripthaus run webpack-watch
|
scripthaus run webpack-watch
|
||||||
@ -94,15 +93,16 @@ scripthaus run webpack-watch
|
|||||||
|
|
||||||
## Running the WaveTerm Dev Client
|
## Running the WaveTerm Dev Client
|
||||||
|
|
||||||
Now that webpack is running (and watching for file changes) we can finally run the WaveTerm Dev Client! To start the client run:
|
Now that webpack is running (and watching for file changes) we can finally run the WaveTerm Dev Client! To start the client run:
|
||||||
|
|
||||||
```
|
```
|
||||||
scripthaus run electron
|
scripthaus run electron
|
||||||
```
|
```
|
||||||
|
|
||||||
To kill the client, either exit the Electron App normally or just Ctrl-C the ```scripthaus run electron``` command.
|
To kill the client, either exit the Electron App normally or just Ctrl-C the `scripthaus run electron` command.
|
||||||
|
|
||||||
Because we're running webpack in watch mode, any changes you make to the typescript will be automatically picked up by the client after a refresh. Note that I've disabled hot-reloading in the webpack config, so to pick up new changes you'll have to manually refresh the WaveTerm Client window. To do that use "Command-Shift-R" (Command-R is used internally by Wave and will not force a refresh).
|
Because we're running webpack in watch mode, any changes you make to the typescript will be automatically picked up by the client after a refresh. Note that I've disabled hot-reloading in the webpack config, so to pick up new changes you'll have to manually refresh the WaveTerm Client window. To do that use "Command-Shift-R" (Command-R is used internally by Wave and will not force a refresh).
|
||||||
|
|
||||||
## Debugging the Dev Client
|
## Debugging the Dev Client
|
||||||
|
|
||||||
You can use the regular Chrome DevTools to debug the frontend application. You can open the DevTools using the keyboard shortcut `Cmd-Option-I`.
|
You can use the regular Chrome DevTools to debug the frontend application. You can open the DevTools using the keyboard shortcut `Cmd-Option-I`.
|
||||||
|
@ -176,7 +176,7 @@ function readAuthKey() {
|
|||||||
}
|
}
|
||||||
return authKeyStr.trim();
|
return authKeyStr.trim();
|
||||||
}
|
}
|
||||||
|
const reloadAcceleratorKey = unamePlatform == "darwin" ? "Option+R" : "Super+R";
|
||||||
let menuTemplate: Electron.MenuItemConstructorOptions[] = [
|
let menuTemplate: Electron.MenuItemConstructorOptions[] = [
|
||||||
{
|
{
|
||||||
role: "appMenu",
|
role: "appMenu",
|
||||||
@ -202,7 +202,7 @@ let menuTemplate: Electron.MenuItemConstructorOptions[] = [
|
|||||||
{
|
{
|
||||||
role: "viewMenu",
|
role: "viewMenu",
|
||||||
submenu: [
|
submenu: [
|
||||||
{ role: "reload", accelerator: "Option+R" },
|
{ role: "reload", accelerator: reloadAcceleratorKey },
|
||||||
{ role: "toggleDevTools" },
|
{ role: "toggleDevTools" },
|
||||||
{ type: "separator" },
|
{ type: "separator" },
|
||||||
{ role: "resetZoom" },
|
{ role: "resetZoom" },
|
||||||
|
Loading…
Reference in New Issue
Block a user