Document better
This commit is contained in:
parent
d7cd2cecbc
commit
c8b9b4cd8f
4 changed files with 30 additions and 18 deletions
|
@ -10,12 +10,6 @@ To know more about Ente, see [our main README](../README.md) or visit
|
|||
|
||||
## Building from source
|
||||
|
||||
> [!CAUTION]
|
||||
>
|
||||
> We moved a few things around when switching to a monorepo recently, and the
|
||||
> desktop app is not currently building with these instructions below. Hang
|
||||
> tight, we're on it, and will fix soon.
|
||||
|
||||
Fetch submodules
|
||||
|
||||
```sh
|
||||
|
@ -28,22 +22,32 @@ Install dependencies
|
|||
yarn install
|
||||
```
|
||||
|
||||
Run the app
|
||||
Create a binary for your platform
|
||||
|
||||
```sh
|
||||
yarn build
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
Instead of building, you can run the app in development mode
|
||||
|
||||
```sh
|
||||
yarn dev
|
||||
```
|
||||
|
||||
To recompile automatically using electron-reload, run this in a separate
|
||||
> [!CAUTION]
|
||||
>
|
||||
> `yarn dev` is currently not working (we'll fix soon). If you just want to
|
||||
> build from source and use the generated binary, use `yarn build` as described
|
||||
> above.
|
||||
|
||||
This'll launch a development server to serve the pages loaded by the renderer
|
||||
process, and will hot reload on changes.
|
||||
|
||||
If you also want hot reload for the main process, run this in a separate
|
||||
terminal:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
yarn watch
|
||||
```
|
||||
|
||||
`yarn dev` is handy during development, but if you wish, you can also create a
|
||||
binary for your platform by using
|
||||
|
||||
```sh
|
||||
yarn build
|
||||
```
|
||||
|
|
4
desktop/docs/dev.md
Normal file
4
desktop/docs/dev.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Development tips
|
||||
|
||||
* `yarn build:quick` is a variant of `yarn build` that uses the
|
||||
`--config.compression=store` flag to (slightly) speed up electron-builder.
|
|
@ -7,10 +7,10 @@
|
|||
"main": "app/main.js",
|
||||
"scripts": {
|
||||
"build": "yarn build-renderer && yarn build-main",
|
||||
"build-local": "yarn build-renderer && yarn build-main-local",
|
||||
"build-main": "tsc && electron-builder",
|
||||
"build-main-local": "tsc && electron-builder --config.compression=store",
|
||||
"build-main:quick": "tsc && electron-builder --config.compression=store",
|
||||
"build-renderer": "cd ../web && yarn install && yarn build:photos && cd ../desktop && rm -f out && ln -sf ../web/apps/photos/out",
|
||||
"build:quick": "yarn build-renderer && yarn build-main:quick",
|
||||
"dev": "concurrently \"yarn dev-main\" \"yarn dev-renderer\"",
|
||||
"dev-main": "tsc && electron build/app/main.js",
|
||||
"dev-renderer": "cd ../web && yarn install && yarn dev:photos",
|
||||
|
|
|
@ -79,6 +79,10 @@ export async function setupMainMenu(mainWindow: BrowserWindow) {
|
|||
}
|
||||
|
||||
export function setupMainHotReload() {
|
||||
// Hot reload the main process if anything changes in the source directory
|
||||
// that we're running from. In particular, this gets triggered when `yarn
|
||||
// watch` rebuilds JS files in the `app/` directory when we change the TS
|
||||
// files in the `src/` directory.
|
||||
if (isDev) {
|
||||
electronReload(__dirname, {});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue