mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
fix: cleanup electron build script (#1813)
This commit is contained in:
@@ -9,37 +9,43 @@
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before you start building AFFiNE Desktop Client Application, please follow the [Tauri getting started > prerequisites guide](https://tauri.app/v1/guides/getting-started/prerequisites) to set up your environment.
|
||||
Before you start building AFFiNE Desktop Client Application, please [install Rust toolchain first](https://www.rust-lang.org/learn/get-started).
|
||||
|
||||
Note that if you encounter any issues with installing Rust and crates, try following [this guide (zh-CN)](https://course.rs/first-try/slowly-downloading.html) to set up alternative registries.
|
||||
|
||||
## Development
|
||||
|
||||
To run AFFiNE Desktop Client Application locally, run the following commands in apps/desktop:
|
||||
To run AFFiNE Desktop Client Application locally, run the following commands:
|
||||
|
||||
```sh
|
||||
|
||||
# in repo root
|
||||
yarn install
|
||||
yarn build:preload
|
||||
yarn dev:app
|
||||
yarn dev
|
||||
|
||||
# in apps/electron
|
||||
yarn generate-assets
|
||||
yarn dev
|
||||
```
|
||||
|
||||
Now you should see the Electron app window popping up shortly.
|
||||
|
||||
## Build
|
||||
|
||||
To build the desktop client application, run `yarn build:app` in `apps/desktop`.
|
||||
To build the desktop client application, run `yarn make` in `apps/electron`.
|
||||
|
||||
Note: you may want to comment out `osxSign` and `osxNotarize` in `forge.config.js` to avoid signing and notarizing the app.
|
||||
|
||||
Once the build is complete, you can find the paths to the binaries in the terminal output.
|
||||
|
||||
```
|
||||
Finished 2 bundles at:
|
||||
/Users/affine/Documents/GitHub/AFFiNE/apps/desktop/src-tauri/target/release/bundle/macos/AFFiNE.app
|
||||
/Users/affine/Documents/GitHub/AFFiNE/apps/desktop/src-tauri/target/release/bundle/dmg/AFFiNE_0.0.2_aarch64.dmg
|
||||
› Artifacts available at: <affine-repo>/apps/electron/out/make
|
||||
```
|
||||
|
||||
## CI
|
||||
|
||||
Please refer to `.github/workflows/client-app.yml` for the CI workflow. It will:
|
||||
Please refer to `.github/workflows/release-desktop-app.yml` for the CI workflow. It will:
|
||||
|
||||
- run for pull requests and pushes to `master` branch
|
||||
- build the app for all supported platforms
|
||||
- upload the artifacts to GitHub Actions
|
||||
|
||||
Reference in New Issue
Block a user