Fix docs and build script for desktop build (#34395)
* Fix some documentation for element-desktop Some of these links got broken, or outdated, during the monorepo switch. * Fix desktop docker build script It will fail with 'workspace_node_modules: no such file or directory' if the directory does not exist. This got broken by https://github.com/element-hq/element-web/pull/33641. * Clarify native modules doc Most of this stuff does not apply when using the docker build. * update snapshot
This commit is contained in:
@@ -1,9 +1,4 @@
|
|||||||

|

|
||||||

|
|
||||||
[](https://localazy.com/p/element-web)
|
|
||||||
[](https://sonarcloud.io/summary/new_code?id=element-desktop)
|
|
||||||
[](https://sonarcloud.io/summary/new_code?id=element-desktop)
|
|
||||||
[](https://sonarcloud.io/summary/new_code?id=element-desktop)
|
|
||||||
|
|
||||||
# Element Desktop
|
# Element Desktop
|
||||||
|
|
||||||
@@ -63,7 +58,7 @@ ln -s ../web/webapp ./
|
|||||||
|
|
||||||
TODO: List native pre-requisites
|
TODO: List native pre-requisites
|
||||||
|
|
||||||
Optionally, [build the native modules](https://github.com/vector-im/element-desktop/blob/develop/docs/native-node-modules.md),
|
Optionally, [build the native modules](https://github.com/element-hq/element-web/blob/develop/docs/native-node-modules.md),
|
||||||
which include support for searching in encrypted rooms and secure storage. Skipping this step is fine, you just won't have those features.
|
which include support for searching in encrypted rooms and secure storage. Skipping this step is fine, you just won't have those features.
|
||||||
|
|
||||||
Then, run
|
Then, run
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ if [ $? != 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p docker/node_modules docker/.hak docker/.gnupg
|
mkdir -p \
|
||||||
|
docker/workspace_node_modules \
|
||||||
|
docker/node_modules \
|
||||||
|
docker/.hak \
|
||||||
|
docker/.gnupg
|
||||||
|
|
||||||
# Taken from https://www.electron.build/multi-platform-build#docker
|
# Taken from https://www.electron.build/multi-platform-build#docker
|
||||||
# Pass through any vars prefixed with INDOCKER_, removing the prefix
|
# Pass through any vars prefixed with INDOCKER_, removing the prefix
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ export default class EventIndexPanel extends React.Component<EmptyObject, IState
|
|||||||
);
|
);
|
||||||
} else if (EventIndexPeg.platformHasSupport() && !EventIndexPeg.supportIsInstalled()) {
|
} else if (EventIndexPeg.platformHasSupport() && !EventIndexPeg.supportIsInstalled()) {
|
||||||
const nativeLink =
|
const nativeLink =
|
||||||
"https://github.com/element-hq/element-web/blob/develop/apps/desktop/" +
|
"https://github.com/element-hq/element-web/blob/develop/" +
|
||||||
"docs/native-node-modules.md#" +
|
"docs/native-node-modules.md#" +
|
||||||
"adding-seshat-for-search-in-e2e-encrypted-rooms";
|
"adding-seshat-for-search-in-e2e-encrypted-rooms";
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ exports[`<EventIndexPanel /> when event indexing is supported but not installed
|
|||||||
Element is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom Element Desktop with
|
Element is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom Element Desktop with
|
||||||
<a
|
<a
|
||||||
class="mx_ExternalLink"
|
class="mx_ExternalLink"
|
||||||
href="https://github.com/element-hq/element-web/blob/develop/apps/desktop/docs/native-node-modules.md#adding-seshat-for-search-in-e2e-encrypted-rooms"
|
href="https://github.com/element-hq/element-web/blob/develop/docs/native-node-modules.md#adding-seshat-for-search-in-e2e-encrypted-rooms"
|
||||||
rel="noreferrer noopener"
|
rel="noreferrer noopener"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ INDOCKER_SQLCIPHER_BUNDLED=1 pnpm docker:build:native
|
|||||||
```
|
```
|
||||||
|
|
||||||
The above will build `matrix-seshat` in
|
The above will build `matrix-seshat` in
|
||||||
`docker/node_modules/matrix-seshat`. You can then either run `pnpm docker:build`
|
`docker/.hak/hakModules/matrix-seshat`. You can then either run `pnpm docker:build`
|
||||||
to build the app inside docker, or:
|
to build the app inside docker, or:
|
||||||
|
|
||||||
```
|
```
|
||||||
pnpm link docker/node_modules/matrix-seshat
|
pnpm link ./docker/.hak/hakModules/matrix-seshat
|
||||||
```
|
```
|
||||||
|
|
||||||
... and build the app with `pnpm build` or run it with `pnpm start`.
|
... and build the app with `pnpm build` or run it with `pnpm start`.
|
||||||
@@ -53,7 +53,7 @@ pnpm run build:native
|
|||||||
|
|
||||||
If you need to build for a specific architecture, see [here](#compiling-for-specific-architectures).
|
If you need to build for a specific architecture, see [here](#compiling-for-specific-architectures).
|
||||||
|
|
||||||
## Adding Seshat for search in E2E encrypted rooms
|
### Adding Seshat for search in E2E encrypted rooms
|
||||||
|
|
||||||
Seshat is a native Node module that adds support for local event indexing and
|
Seshat is a native Node module that adds support for local event indexing and
|
||||||
full text search in E2E encrypted rooms.
|
full text search in E2E encrypted rooms.
|
||||||
@@ -90,7 +90,7 @@ as usual using:
|
|||||||
|
|
||||||
pnpm start
|
pnpm start
|
||||||
|
|
||||||
### Statically linking libsqlcipher
|
#### Statically linking libsqlcipher
|
||||||
|
|
||||||
On Windows & macOS we always statically link libsqlcipher for it is not generally available.
|
On Windows & macOS we always statically link libsqlcipher for it is not generally available.
|
||||||
On Linux by default we will use a system package, on debian & ubuntu this is `libsqlcipher0`,
|
On Linux by default we will use a system package, on debian & ubuntu this is `libsqlcipher0`,
|
||||||
@@ -101,9 +101,9 @@ link sqlcipher, including a static build of OpenSSL.
|
|||||||
More info can be found at https://github.com/matrix-org/seshat/issues/102
|
More info can be found at https://github.com/matrix-org/seshat/issues/102
|
||||||
and https://github.com/vector-im/element-web/issues/20926.
|
and https://github.com/vector-im/element-web/issues/20926.
|
||||||
|
|
||||||
## Compiling for specific architectures
|
### Compiling for specific architectures
|
||||||
|
|
||||||
### macOS
|
#### macOS
|
||||||
|
|
||||||
On macOS, you can build universal native modules too:
|
On macOS, you can build universal native modules too:
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ To bundle a universal build for macOS, run:
|
|||||||
pnpm run build:universal
|
pnpm run build:universal
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
#### Windows
|
||||||
|
|
||||||
If you're on Windows, you can choose to build specifically for 32 or 64 bit:
|
If you're on Windows, you can choose to build specifically for 32 or 64 bit:
|
||||||
|
|
||||||
@@ -144,14 +144,14 @@ or
|
|||||||
pnpm run build:64
|
pnpm run build:64
|
||||||
```
|
```
|
||||||
|
|
||||||
### Cross compiling
|
#### Cross compiling
|
||||||
|
|
||||||
Compiling a module for a particular operating system (Linux/macOS/Windows) needs
|
Compiling a module for a particular operating system (Linux/macOS/Windows) needs
|
||||||
to be done on that operating system. Cross-compiling from a host OS for a different
|
to be done on that operating system. Cross-compiling from a host OS for a different
|
||||||
target OS may be possible, but we don't support this flow with Element dependencies
|
target OS may be possible, but we don't support this flow with Element dependencies
|
||||||
at this time.
|
at this time.
|
||||||
|
|
||||||
### Switching between architectures
|
#### Switching between architectures
|
||||||
|
|
||||||
The native module build system keeps the different architectures
|
The native module build system keeps the different architectures
|
||||||
separate, so you can keep native modules for several architectures at the same
|
separate, so you can keep native modules for several architectures at the same
|
||||||
|
|||||||
Reference in New Issue
Block a user