From e976fcfc04805aa03951fa94c7c4dbed44990f7e Mon Sep 17 00:00:00 2001 From: Richard Lora Date: Mon, 23 Jun 2025 00:30:41 -0400 Subject: [PATCH] docs: clarify and fix desktop build instructions (#12881) This PR changes documentation files related to building the desktop client app to allow other contributors to develop and test without becoming stuck due to outdated docs. ## Summary by CodeRabbit - **Documentation** - Improved build instructions for native dependencies and E2E testing, including updated commands and clearer server startup steps. - Enhanced desktop client app documentation with clarified build steps, corrected artifact paths, and added Linux installation guidance. --- docs/BUILDING.md | 8 ++++---- docs/building-desktop-client-app.md | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 59dfc6c73e..9d72a88e62 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -86,7 +86,7 @@ Run the following script. It will build the native module at [`/packages/fronten This could take a while if you build it for the first time. Note: use `strip` from system instead of `binutils` if you are running MacOS. [see problem here](https://github.com/toeverything/AFFiNE/discussions/2840) -``` +```sh yarn affine @affine/native build ``` @@ -102,7 +102,8 @@ Adding test cases is strongly encouraged when you contribute new features and bu We use [Playwright](https://playwright.dev/) for E2E test, and [vitest](https://vitest.dev/) for unit test. To test locally, please make sure browser binaries are already installed via `npx playwright install`. -Also make sure you have built the `@affine/core` workspace before running E2E tests. + +Start server before tests by following [`docs/developing-server.md`](./developing-server.md) first. ### Unit Test @@ -115,6 +116,5 @@ yarn test ```shell # there are `affine-local`, `affine-migration`, `affine-local`, `affine-prototype` e2e tests, # which are run under different situations. -cd tests/affine-local -yarn e2e +yarn workspace @affine-test/affine-local e2e ``` diff --git a/docs/building-desktop-client-app.md b/docs/building-desktop-client-app.md index 81b68db7b4..7a306986df 100644 --- a/docs/building-desktop-client-app.md +++ b/docs/building-desktop-client-app.md @@ -37,6 +37,8 @@ On Windows, you must enable symbolic links this code repo. See [#### Windows](./ ## Build, package & make the desktop client app +> repos/AFFiNE/.github/workflows/release-desktop.yml contains real order to build the desktop client app, but here we will explain the steps in a more detailed way. Up-to date. + ### 0. Build the native modules Please refer to `Build Native Dependencies` section in [BUILDING.md](./BUILDING.md#Build-Native-Dependencies) to build the native modules. @@ -46,6 +48,8 @@ Please refer to `Build Native Dependencies` section in [BUILDING.md](./BUILDING. On Mac & Linux ```shell +BUILD_TYPE=canary yarn affine @affine/electron build + BUILD_TYPE=canary yarn affine @affine/electron generate-assets ``` @@ -110,7 +114,7 @@ Once the build is complete, you can find the paths to the binaries in the termin ``` Finished 2 bundles at: - › Artifacts available at: /packages/frontend/electron/out/make + › Artifacts available at: /packages/frontend/apps/electron/out/canary/make ``` ## CI