Best way to pack a mute browser?

I am working on desktop software for the client, and I was thinking about the user interface, I would use standard web technologies such as HTML5 + JS, and planned to simply pack my software into the headless version of a modern browser such as Chrome / Firefox. For example, it will only be part of the browser page / view / render browser without borders / menues / tabs / shortcuts / profiles, etc. What is the easiest way to make this platform independent. I know that Mozilla had projects like Prism / Chromeless but they have not been updated for more than a year.

+4
source share
9 answers

These days, the electron is best suited: http://electron.atom.io/

0
source

Do you find the XUL language from Mozilla? This is the XML language used by Mozilla to create user interfaces. It is created by their gecko engine in the standalone Mozilla Xulrunner, which can be packaged with your XML and javascript into an executable package.

+1
source

If size is not a problem, you can use titanium from http://www.appcelerator.com/
It works on almost every platform. This is what they use to create a wunderlist. http://www.6wunderkinder.com/wunderlist/
If you need size, you can create a simple shell that launches a custom browser that does not have any controls or toolbars.

+1
source

QtWebkit should be a smart choice. You can make a simple application with the Qt SDK or QtCreator. You can embed HTML / CSS / JS in the application in the Qt resource file. Check out the source code below:

#include <QtGui/QApplication> #include <QWebView> #include <QNetworkProxy> class MainWin : public QWebView { public: explicit MainWin(QWidget * parent = 0) { m_network = new QNetworkAccessManager(this); // Setup the network proxy when required! //m_network->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, "10.1.1.80", 80)); page()->setNetworkAccessManager(m_network); // You can use the internal HTML/Javascrip/CSS by // specify qrc:// URLs refer to resources. See resource.qrc QUrl startURL = QUrl("http://www.google.com"); // Load web content now! setUrl(startURL); } private: QNetworkAccessManager * m_network; }; int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWin w; w.show(); return a.exec(); } 

This is a working example with a window frame! Look like this! It works like a browser.

+1
source

Have you viewed Adobe AIR?

0
source

I think I'll go for Arora in your case. It has not been supported since 2010, but provided that it works stably as it is, it has several excellent pros:

it runs on an impressive number of platforms and has a good match between HTML and Javascript since it is based on Webkit. (Which apple safari is built on.) In addition, it would be possible to solve any minor problems, since you are supposedly developing your application more or less from scratch. The potential of an approach to an approach like yours also lies in the fact that you can easily replace the connected browser with some other in the future, if that suits you.

Or use Qt, which is a very cross platform and can also implement Webkit .

0
source

I have already used WebKit for this purpose (relying on Cocoa's WebView control system and using the Brent Fulgham Cairo WebKit port for Windows).

The WebKit project on webkit.org includes this port (both Qt and GTK +, and many others).

0
source

I suggest Adobe AIR. I saw that you mentioned that you do not like Adobe products and their expensive IDEs. However, AIR is free and you can use any IDE that suits you ( Aptana is a good choice built on top of Eclipse).

I made a music player with Adobe AIR. That was about a year ago, and they have since released Adobe AIR 3 . The full list of functions is very long, but, in short, it supports both normal browser material (JS, Flex, etc.), as well as some native things. For example, you can view files on a computer or display PDF files. Well worth a try.

0
source

Should it be a single browser? Consider using webkit on OSX and IE on windows. Then you can create a small wrapper with a small interface. The advantage is that you do not need to pack your own browser, but use what is provided by the operating system, which leads to a smaller program.

0
source

Source: https://habr.com/ru/post/1395754/


All Articles