Web app or Desktop app

Develop and Deploy Cross-Browser Web Apps .

Web app or Desktop app

Postby joedarock » Thu May 19, 2016 12:19 pm

I want to make my app deployable as either a desktop exe app or a web browser app and behave appropriately according to which kind of deployment it is. For instance, if running as a desktop app, I would pop up a url input box where the user would enter the address of the server the app needs to connect to. In the web installation, this is implicit in the browser and no other address is necessary.

Is there a way the application can know if it's running as a web deployed app or as a desktop exe app?
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm

Re: Web app or Desktop app

Postby support » Mon May 23, 2016 2:22 am

you can try this: http://nwjs.io

CrossUI use nwjs too.
support
 
Posts: 350
Joined: Sat Apr 27, 2013 9:22 am

Re: Web app or Desktop app

Postby joedarock » Mon May 23, 2016 9:51 am

I'm not sure what to do with this link. Can you provide an example?
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm

Re: Web app or Desktop app

Postby support » Tue May 24, 2016 2:24 am

You can learn it from nwjs.

http://docs.nwjs.io/en/latest/
support
 
Posts: 350
Joined: Sat Apr 27, 2013 9:22 am

Re: Web app or Desktop app

Postby joedarock » Tue May 24, 2016 11:26 am

Well, sure, I can learn anything if I read enough voluminous sites, but I thought the purpose of this forum was to be able to ask focused questions about CrossUI and get knowledgeable answers from experts.

There are many pages on that site (which I already sifted through, BTW).

If you don't know the answer, please say that and I'll ask somewhere else.
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm

Re: Web app or Desktop app

Postby support » Fri May 27, 2016 2:28 am

if( (window.nw && nw.gui) || (window.require && require('nw.gui')) ){
// in nwjs
}else{
// in normal browser
}
support
 
Posts: 350
Joined: Sat Apr 27, 2013 9:22 am

Re: Web app or Desktop app

Postby joedarock » Fri May 27, 2016 10:57 am

Thanks. I will try this and report.
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm


Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 0 guests

cron