-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native Cross-platform Desktop Application using Electron.Atom #37
Comments
We could use node-webkit for this. |
I'd personally suggest Electron because it's pretty slick. I've used it On 5/29/2015 12:48 PM, Stephen Reid wrote:
Rylee Fowler |
Electron seems great, but as I never used this solutions I really can't opine. Can you help us with this? |
I like the http://electron.atom.io/ idea 👍 |
Potentially. I don't have a lot of free time, unfortunately, but I could On 5/30/2015 1:11 PM, Rodrigo Nascimento wrote:
Rylee Fowler |
If you need help, I could do an analysis of what are the steps to do (issues to resolve, configurations, etc...). I have experienced with Electron and NW.js both! |
Hi @edoardocavazza we do need help! How can I help you help us? :) |
Some ideas on https://github.com/danielfbm/meteor-cordova-web-example are very interesintg. From https://forums.meteor.com/t/different-interfaces-based-on-devices/264/19 |
I have tried to follow this guide but I found a lot of problems with relative paths (many of them have the trailing '/', good for web, but not for Electron or Cordova). In my opinion, this is the first issue to manage! Path issues:
Javascript issues:
|
I have made a shell script for compiling and preparing the Electron app. First of ll, install Electron Then navigate to the project, and run this script: #!/bin/sh
url="https://rocket.chat/home"
if [ "$1" == "--server" ] && [ "$2" != "" ]; then
url=$2
fi
# remove old files
if [ -e "./Rocket.Chat.tar.gz" ]; then
unlink "./Rocket.Chat.tar.gz"
fi
if [ -e "./bundle" ]; then
rm -rf "./bundle"
fi
# build
meteor build . --server $url
tar xzf ./Rocket.Chat.tar.gz
# make it an electron project
mv ./bundle/programs/web.browser/*.css ./bundle/programs/web.browser/app.css
mv ./bundle/programs/web.browser/*.js ./bundle/programs/web.browser/app.js
curl -o ./bundle/programs/web.browser/index.html $url
touch './bundle/programs/web.browser/package.json'
echo '{"name":"Rocket.Chat","version":"0.0.1","main":"main.js"}' >> './bundle/programs/web.browser/package.json'
touch './bundle/programs/web.browser/main.js'
echo 'var app=require("app"),BrowserWindow=require("browser-window");require("crash-reporter").start();var mainWindow=null;app.on("window-all-closed",function(){"darwin"!=process.platform&&app.quit()}),app.on("ready",function(){mainWindow=new BrowserWindow({width:800,height:600}),mainWindow.loadUrl("file://"+__dirname+"/index.html"),mainWindow.openDevTools(),mainWindow.on("closed",function(){mainWindow=null})});' >> './bundle/programs/web.browser/main.js'
sed -i -e 's/<link rel="stylesheet" type="text\/css" class="__meteor-css__" href=".*">/<link rel="stylesheet" type="text\/css" class="__meteor-css__" href="app.css">/g' ./bundle/programs/web.browser/index.html
sed -i -e 's/<script type="text\/javascript" src=".*">/<script type="text\/javascript" src="app.js">/g' ./bundle/programs/web.browser/index.html
# run
electron ./bundle/programs/web.browser You can also specify the server url: |
Hi @edoardocavazza thank you so much for the help and welcome to the team! I'll try to fix what you have listed here. Have you seen this links?
and:
|
I am trying to do too many things at once.. I've just noticed the link now... stupid me. |
@edoardocavazza can you add your shell script to the root directory on a PR? |
Maybe |
It seems that |
i think it is just for meteor run :( |
I am not sure why we need to rename the JS and CSS files? Just a matter of taste? |
ok, I have found out that the |
I'd really love to work on this, since I need something like this for a few projects (and I'd rather pick RocketChat instead of Slack, but the need for a native client is pretty strong). My intention is to use Qt for this, to keep it simple and lightweight, but I'm not seeing any public API for RocketChat (and the README says it's in the roadmap). Is it still on the roadmap? Is anyone willing to pick up the API part if I'm to work on a native desktop client? |
Oh, I only just noticed that this issue's title doesn't match with what the README states (I got here by it). Maybe the README needs updating, or we need a separate issue for a 100% native client? |
@hobarrera Can Qt work with a 100% publish-subscribe API? That is, can the UI components sit idle pending incoming events/changes while yielding 100% to the OS without polling or freezing? |
@Sing-Li I don't see why not. Specifically, are we talking about http long-polling, or web-sockets? |
@hobarrera - it can be either, actually - because the engine underneath Rocket.Chat : Meteor, rides on sockjs and it adaptively uses either long-polling or websocket depending on the vintage of the client's browser. In any case, if Qt can handle pub-sub, then the 'API' is essentially already in-place. Because all that Rocket.Chat is, on a server-data level, is this set of Collections. And also their changes over time (addition, deletion, mutations, and so on) conveyed via messages over sockjs using the DDP protocol. So you can data-bind the Qt widgets to the collections, init the 'app', prime your subscriptions, then just wait for published DDP messages. And hook in the business logic and app behavior depending on the incoming messages. There are at least two github projects that has gone down this path: Qondrite and ddpcpp, perhaps making interfacing easier. There are really no simple choice for a native client because:
|
@Sing-Li - I agree the current API format is good enough to create an alternative front-end as @hobarrera intends. But as Slack points out:
Even though the back-end has an API in place, a more friendly way of interacting with Rocket Chat could really help the project gain more adoption. I'm one that's waiting the REST API before I can deploy RC at my company. Anyway, there's meteor-rest -- a set of packages that makes it easy to make your Meteor app's data accessible over HTTP -- that could be of some help. |
@guarilha - I would agree 100% re: REST API for external integrations (or 'complex services'). My comments are specifically directed towards an 'alternative native client' implementation. |
We will move the work on the Native Cross-Platform Desktop Application via Electron to If anyone wants to join the DesktopApp team, let me know. |
- Added check, if the application is running, because this lead to errors - Added option to add a shortcut to the autostart folder (RocketChat#57) - Added option to launch the app after the installation (RocketChat#37) - Added option to choose the installation directory (RocketChat#41) - Added the shortcuts as options, so you can choose, if you want a desktop, autostart or start menu shortcut (a part of RocketChat#96) - Enabled / Added these pages: components, browse installation folder, finish page - Extended the comments, so it's easier to find the correct spots
This definitely increases user engagement and satisfaction, at least at my workplace. It'd be really nice to have this.
The text was updated successfully, but these errors were encountered: