Warning
Tchap desktop is still experimental, disruptive changes can occur and the stable release is planned for T1 2026
Bienvenue sur Tchap! Le système de messagerie instantanée du secteur public français
Site web de présentation - Contactez-nous
Tchap desktop is the desktop app of tchap web which allows you to chat through the matrix protocol for the French public service.
Desktop client for Tchap web build on top of Tauri (https://tauri.app). Code is inspired by element desktop which used electron as his backend.
Tchap-desktop is strongly dependant of tchap-web since it is only the desktop wrapper around tchap-web.
A TauriPlatform has been created in tchap-web (which is a soft fork of element-web) in order to support Tauri as his backend platform.
-
Install prerequisites (https://v2.tauri.app/start/prerequisites/)
-
Install Node and npm using a version manager like nvm. The frontend required a node version = 20.
Two different type of builds are proposed :
- With no updater : the admin of the fleets will have the burden to push new version of the app
- With auto updates: updates will be pushed automatically to users by Tchap team
The .msi installer which include the auto-update is perUser only whereas the .exe is both (will take perMachine mode by default so will ask admin privileges to install). Whereas the .msi installer with no updater is perMachine, it will require admin rights to install the app
| MSI | NSIS (exe) | |
|---|---|---|
| with auto Updates | perUser (cf custom mmain.wxs template) | both (admin by default cf doc Tauri) |
| without auto updates | perMachine (admin context) | both (admin by default) |
-
Live testing with tchap-web (symbolic link doesn't work)
-
Go to your frontend folder
git checkout develop_tchap
yarn install
yarn start- Go back to your tauri app and run
cargo tauri dev
- It will automatically use your frontend configured on the url in the
tauri.conf.jsonfile. So modify thebuild: devUrlto match your dev frontend
-
Tchap web is compatible with Tauri platform from the version 4.15.2 and above.
-
You need to remove
build: devUrlfrom thetauri.conf.jsonfile. Otherwise it will wait for a local frontend to be running. -
you can change in
package.jsonthe version of tchap-web that you want to use intchapConfig.tchap-web_versionandtchapConfig.tchap-web_version. -
Then you can run
npm install
npm run fetch-package -- dev
cargo install tauri-cli --version "^2.0.0" --locked
# You can remove "devUrl": "http://localhost:8080" in `tauri.conf.json` to use tchap-web in tchap-desktop/src
cargo tauri dev-
You need to remove
build: devUrlfrom thetauri.conf.jsonfile. Otherwise it will wait for a local frontend to be running. -
In
package.jsonyou need to puttchapConfig.tchap-web_github.use_github : trueand completetchapConfig.tchap-web_github.branchandtchapConfig.tchap-web_github.repo -
You can also select the environment in
tchapConfig.tchap-web_github.envthat you want to use. This will determine which config.json to select for the build. If no value is set (prod, preprod or dev), it will use prod as default. -
Then you can run the same step as the dev using a specific web archive version
npm install
npm run fetch-package -- prod
cargo tauri build
-
Publish : This workflow will be trigger when a new tag is created.
-
Test on build: This will only test the build of the app. From the build of the webapp to the build of the tauri app.
-
To build tauri we use the
build-tauri.ymlworkflow. This workflow will build the app for windows platform. It will use thetauri.conf.prod.json. -
TODO : Run tests
-
Create a new branch from
master. -
The release version is taken from the tauri-conf file. So before creating a new tag for release, you need to run the
update-version.shscript with the new version. This script will update the version in the tauri-conf file, the package.json and the updater plugin in the tauri-conf file. -
The updater url is generated with the new version and will be used to auto update the app. A PR will need to be created to update the url of the conf file served by the nginx backend.
-
Check carefully which archive of the frontend webapp you want to use inside the
package.jsonfile. It can be a specific version, a specific branch or the latest version on themasterbranch. -
Commit, push your branch and create a PR.
-
Once the PR is merged, you can create the release tag.
-
The tag need to follow the format
tchap-*and be identical to the version in thepackage.jsonfile. -
The workflow will be triggered and will build the app, create a release on github and upload the app to the release.
-
The workflow will also update the
tchap-webarchive used in the app to the latest version on themasterbranch of thetchap-webrepository.
To update clients automatically, we use the updater plugin.
- Modify
./src-tauri/app-icon.pngto the desire icon and then run
cargo tauri icon
- This will automatically generate all the icons needed.