Code Monkey home page Code Monkey logo

rocket.chat.electron's Introduction

Rocket.Chat Desktop App

Travis CI Build Status AppVeyor Build Status Codacy Badge Project Dependencies GitHub All Releases GitHub

Desktop application for Rocket.Chat available for macOS, Windows and Linux using Electron.

Rocket.Chat Desktop App


Engage with us

Share your story

We’d love to hear about your experience and potentially feature it on our Blog.

Subscribe for Updates

Once a month our marketing team releases an email update with news about product releases, company related topics, events and use cases. Sign Up!


Download

You can download the latest version from the Releases page.

Get it from the Snap Store

Install

Launch the installer and follow the instructions to install.

Windows Options

On Windows you can run a silent install by adding the /S flag. You can also add the options below:

  • /S - Silent install
  • /allusers - Install for all users (requires admin)
  • /currentuser - Install only the for current user (default)
  • /disableAutoUpdates - Disable automatic updates

Development

Quick start

Prerequisites:

Now just clone and start the app:

git clone https://github.com/RocketChat/Rocket.Chat.Electron.git
cd Rocket.Chat.Electron
yarn
yarn start

Structure of the project

The source is located in the src folder. Everything in this folder will be built automatically when running the app with yarn start.

The build process compiles all stuff from the src folder and puts it into the app folder, so after the build has finished, your app folder contains the full, runnable application.

TypeScript

Following the ongoing changes in Rocket.Chat codebase, the app was rewritten in TypeScript 4 to address issues regarding maintainability.

The build pipeline

The build process is founded upon rollup bundler. There are three entry files for your code:

  • src/main.ts, the script running at the main Electron process, orchestrating the whole application;

  • src/rootWindow.ts, the script that renders the UI of the root window, the app's main window;

  • and src/preload.ts, which runs in a privileged mode to connect the app and the webviews rendering Rocket.Chat's web client.

Adding Node.js modules

Remember to respect the split between dependencies and devDependencies in package.json file. Only modules listed in dependencies will be included into distributable app.

Troubleshooting

node-gyp

Follow the installation instruction on node-gyp readme.

Ubuntu

You will need to install the following packages:

build-essential
libevas-dev
libxss-dev

Fedora

You will need to install the following packages:

libX11
libXScrnSaver-devel
gcc-c++

Windows 7

On Windows 7 you may have to follow option 2 of the node-gyp install guide and install Visual Studio.

Testing

Unit tests

yarn test

We use Jest testing framwork with the Jest electron runner. It searches for all files in src directory that match the glob pattern *.(spec|test).{js,ts,tsx}.

Making a release

To package your app into an installer use command:

yarn release

It will start the packaging process for operating system you are running this command on. Ready for distribution file will be outputted to dist directory.

All packaging actions are handled by electron-builder. It has a lot of customization options.

Default servers

The servers.json file will define what servers the client will connect to and will populate the server list in the sidebar. It contains a list of default servers which will be added the first time the user runs the app (or when all servers are removed from the list). The file syntax is as follows:

{
  "Demo Rocket Chat": "https://demo.rocket.chat",
  "Open Rocket Chat": "https://open.rocket.chat"
}

Pre-Release Configuration

You can bundle a servers.json with the install package, the file should be located in the root of the project application (same level as the package.json). If the file is found, the initial "Connect to server" screen will be skipped and it will attempt to connect to the first server in the array that has been defined and drop the user right at the login screen. Note that the servers.json will only be checked if no other servers have already been added, even if you uninstall the app without removing older preferences, it will not be triggered again.

Post-Install Configuration

If you can't (or don't want to) bundle the file inside the app, you can create a servers.json in the user preferences folder which will overwrite the packaged one. The file should be located in the %APPDATA%/Rocket.Chat/ folder or the installation folder in case of a installation for all users (Windows only).

For Windows, the full paths are:

  • ~\Users\<username>\AppData\Roaming\Rocket.Chat\
  • ~\Program Files\Rocket.Chat\Resources\

On macOS, the full paths are:

  • ~/Users/<username>/Library/Application Support/Rocket.Chat/
  • ~/Applications/Rocket.Chat.app/Contents/Resources/

On Linux, the full paths are:

  • /home/<username>/.config/Rocket.Chat/
  • /opt/Rocket.Chat/resources/

License

Released under the MIT license.

rocket.chat.electron's People

Contributors

tassoevan avatar rodrigok avatar engelgabriel avatar szwacz avatar alexbrazier avatar gdelavald avatar happytobi avatar sampaiodiego avatar geekgonecrazy avatar black-snow avatar vcapretz avatar edipox avatar dependabot[bot] avatar romannekhor avatar abicur avatar misteral avatar brandonhamilton avatar brunosquadros avatar floriangoeldi avatar jgtoriginal avatar cadetmsv avatar subesokun avatar lfcavalcanti avatar ura14h avatar ingro avatar crazy-max avatar antoinepairet avatar schultzer avatar cbajohr avatar idleberg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.