Comments (26)
We could use node-webkit for this.
from rocket.chat.
I'd personally suggest Electron because it's pretty slick. I've used it
to much success at $DAYJOB and to minor success with a toy IRC client.
Both times it's been very trivial to get started and to keep progressing.
On 5/29/2015 12:48 PM, Stephen Reid wrote:
We could use node-webkit for this.
—
Reply to this email directly or view it on GitHub
#37 (comment).
Rylee Fowler
PGP: 41EA 1D94 F261 8602 6CD4 B2B5 05A6 3421 F637 E333
Never heard of PGP? See https://emailselfdefense.fsf.org/en/ !
https://keybase.io/rylee
from rocket.chat.
Electron seems great, but as I never used this solutions I really can't opine.
Can you help us with this?
from rocket.chat.
I like the http://electron.atom.io/ idea 👍
from rocket.chat.
Potentially. I don't have a lot of free time, unfortunately, but I could
see what I could do.
On 5/30/2015 1:11 PM, Rodrigo Nascimento wrote:
Electron seems great, but as I never used this solutions I really can't
opine.Can you help us with this?
—
Reply to this email directly or view it on GitHub
#37 (comment).
Rylee Fowler
PGP: 41EA 1D94 F261 8602 6CD4 B2B5 05A6 3421 F637 E333
Never heard of PGP? See https://emailselfdefense.fsf.org/en/ !
https://keybase.io/rylee
from rocket.chat.
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!
from rocket.chat.
Hi @edoardocavazza we do need help! How can I help you help us? :)
from rocket.chat.
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
from rocket.chat.
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:
-
//fonts.googleapis.com/css?family=Roboto:500,300,700,400&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic
, because Electron and NW usefile
protocol. -
//www.googletagmanager.com/gtm.js?id=GTM-MLJ76N Failed to load resource: net::ERR_FILE_NOT_FOUND
, because Electron and NW usefile
protocol. -
/sockjs/info?cb=xxxxxx
should address to the absolute socket url, not relative. -
/images/logo/logo.svg
is resolved tofile:///images/logo/logo.svg
. Do not use trailing /. -
/favicon.ico?v=2
same as above. -
/fonts/fontello.*
same as above. -
/images/logo/*x*.png
same as above.
Javascript issues:
Uncaught error: Cannot find module jquery
. jQuery looks formodule
variable definition in order to load using RequireJS or attaching itself to the window object. Electron hasmodule
defined, but with different behavior.Uncaught ReferenceError: Favico is not defined
same as above.
from rocket.chat.
I have made a shell script for compiling and preparing the Electron app.
First of ll, install Electron npm install electron-prebuilt -g
.
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:
../build-electron.sh --server <your server url here>
from rocket.chat.
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?
So we are going to build the leader board app as a desktop app, but only the client part of the Meteor app. Like a cordova app but with Electron if you prefer. It can work offline and get updated by the server.
https://medium.com/@guidouil/cross-platform-desktop-apps-with-meteor-and-electron-5355eb9e351
and:
Electrometeor combines Electron and Meteor to allow you to easily create desktop applications that work both 100% offline & online.
https://github.com/sircharleswatson/Electrometeor
https://sircharleswatson.github.io/2015/04/30/Electrometeor-Build-Desktop-Applications-With-Electron-Meteor.html
https://forums.meteor.com/t/electrometeor-desktop-applications-w-electron-meteor/3768/2
from rocket.chat.
I have tried to follow this guide
I am trying to do too many things at once.. I've just noticed the link now... stupid me.
from rocket.chat.
@edoardocavazza can you add your shell script to the root directory on a PR?
from rocket.chat.
Maybe meteor build . --server $url
should be meteor build . --mobile-server $url
to solve the issue with the /sockjs/info
url?
from rocket.chat.
It seems that --mobile-server
is not a valid flag for meteor build
, it is not working for me :(
from rocket.chat.
i think it is just for meteor run :(
from rocket.chat.
I am not sure why we need to rename the JS and CSS files? Just a matter of taste?
from rocket.chat.
ok, I have found out that the index.html
used by the shell script won't work. I am trying to figure out how to dynamically create a new one. Once I have found a solution, I will PR the script!
from rocket.chat.
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?
from rocket.chat.
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?
from rocket.chat.
@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?
from rocket.chat.
@Sing-Li I don't see why not. Specifically, are we talking about http long-polling, or web-sockets?
from rocket.chat.
@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:
- any REST or REST-like API will make the client second-class citizen due to the push to pull+poll conversion
- any websocket based API will just duplicate DDP and introduce an additional point of failure; not to mention async websocket protocols like DDP takes a long long time to mature and perfect (over 3 yrs in Meteor's case)
from rocket.chat.
@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:
The Slack APIs allow you to integrate complex services with Slack to go beyond the integrations we provide out of the box.
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.
from rocket.chat.
@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.
from rocket.chat.
We will move the work on the Native Cross-Platform Desktop Application via Electron to
https://github.com/RocketChat/Rocket.Chat.Electron
If anyone wants to join the DesktopApp team, let me know.
from rocket.chat.
Related Issues (20)
- Kicked users still can access the messages and message on the channel. HOT 1
- Cannot change settings, password required, but no accounts have a password (oauth) HOT 2
- Refreshing the page is changing the language back and not respecting the User Preference HOT 2
- rocket chat HOT 1
- Picture with Whitesapce as Name Doesn't Load HOT 10
- Jumping on chat screen insteaed of only referenceed reply, it is happening with every message HOT 3
- Notify on reaction to a message HOT 2
- Exploding .wt collection file HOT 7
- Snap Versions 6.3-6.7 Include Wrong Version of NodeJS. 6.7 Keeps crashing. HOT 3
- Emails not queued and ignored when sending limit reached HOT 4
- Missing Authentication in iOS Push Notification API Request HOT 1
- Slack Bridge (via Slack App) not working but Legacy API works in one way (from RocketChat to Slack) HOT 1
- Channels unread messages don't always get marked as read when entered (counter remains) HOT 3
- yarn dev ERROR HOT 1
- 6.7 File Upload->Allowed Media Types (blank) does not allow to remove the restriction HOT 3
- Registration Bug HOT 8
- Scrollbars are impossible to see HOT 8
- No audio notifications HOT 1
- Check internet connection error HOT 1
- Right click on a message to access options on the right under 3 doted menu items like, Star, edit/delete message or Quote & reaction etc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocket.chat.