Skip to content

tchapgouv/tchap-desktop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

280 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

Tchap desktop is still experimental, disruptive changes can occur and the stable release is planned for T1 2026

tchap-logo

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.

Tchap Desktop

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.

Prerequisites

For windows installation

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)

Dev local using local frontend

  • 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.json file. So modify the build: devUrl to match your dev frontend

Dev using a specific web archive version

  • Tchap web is compatible with Tauri platform from the version 4.15.2 and above.

  • You need to remove build: devUrl from the tauri.conf.json file. Otherwise it will wait for a local frontend to be running.

  • you can change in package.json the version of tchap-web that you want to use in tchapConfig.tchap-web_version and tchapConfig.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

Dev using a github branch from a remote repository

  • You need to remove build: devUrl from the tauri.conf.json file. Otherwise it will wait for a local frontend to be running.

  • In package.json you need to put tchapConfig.tchap-web_github.use_github : true and complete tchapConfig.tchap-web_github.branch and tchapConfig.tchap-web_github.repo

  • You can also select the environment in tchapConfig.tchap-web_github.env that 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

Build

npm install

npm run fetch-package -- prod

cargo tauri build

Github workflow

  • 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.yml workflow. This workflow will build the app for windows platform. It will use the tauri.conf.prod.json.

  • TODO : Run tests

Create a release

  • 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.sh script 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.json file. It can be a specific version, a specific branch or the latest version on the master branch.

  • 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 the package.json file.

  • 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-web archive used in the app to the latest version on the master branch of the tchap-web repository.

Updater

To update clients automatically, we use the updater plugin.

Generate new icons

  • Modify ./src-tauri/app-icon.png to the desire icon and then run
cargo tauri icon
  • This will automatically generate all the icons needed.

Troubleshoot

About

Desktop app for Tchap

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors