Node-webkit update resources from server?

Discussion and feedback on Construct 2

Post » Mon May 20, 2013 7:40 pm

I was wondering could node-webkit support in following example:

http://stackoverflow.com/questions/13752984/html5-file-api-downloading-file-from-server-and-saving-it-in-sandbox

Because node-webkit are compiled in stand-alone app that we cannot add more files inside, but it would be nice to replace with newest version. I'm not sure it would delete save data.

The reason is why is comfortable to download new update via in-app instead of a lot of people do not like download a complete package with newer version again from browser.
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Tue May 21, 2013 1:19 am

The reason most people wanted node-webkit was so it came bundled with all its files. Do you think an "empty shell" node-webkit exporter would be useful? It would just browse to your website and display it in the app, so then it would auto-update like ordinary browser games, and still work offline. I'm not sure what the advantage of that over just installing Chrome would be though; the web is better at delivering updates than downloadable applications.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue May 21, 2013 2:06 am

Only thing I can think of is that he wants the webkit export able to patch the game, but since it's a solid container file there is no way to edit it through the game itself

For example, if someone were to make a largescale game(MMO of some sort) with C2 and wanted to have a native client but also patch and hotfix without redistributing the entire package each time.

It should technically be possible to use the offlinecache technology to have it check for a new version compared to the contained exported version, and then use the node-webkit cache location to store and read the updated files (Storing a log of what files were updated somewhere to read on startup).
Although I don't know if node-webkit has that capability.

Granted as Ashley said, a webpage would be better suited to keeping people up to date.Thndr2013-05-21 02:07:38
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Tue May 21, 2013 11:00 am

Granted, it's still missing some automation. But the easiest thing you could do is create a batch script of some sorts, name it "updater.bat" and tell it to download and repack the content each time someone is launching that "updater.bat".

B
6
S
2
Posts: 206
Reputation: 1,685

Post » Tue May 21, 2013 5:19 pm

@Ashley We already know about that online web browser can automatically update games but is not related to node-webkit as stand alone app, it's off-topic.

In browser version, Who says that all games should be free?


This is an issue that we will avoid the loss of time to re-distributions every updates that are not reported to users, some users decide if they want notifications by e-mail or not.



@Thndr I've researched it before, for apps using node-webkit, it's less useful because there is only that it could replace old .exe to new .exe without worrying webstorage, it's stored in ~/.config/<app name in package.json> under linux and %LOCALAPPDIR%/<app name> under windows, @Blinx123 Yeah it's a good idea, it makes me wonder if script can check version number, if is old, it could download new ".exe" to replace old .exe, about .bat is a script which is exclusive to windows. What are scripts to Linux and Mac? Is possible to download our latest games in own server?
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Tue May 21, 2013 5:24 pm

If node-webkit doesn't come bundled with the files, it's effectively just the Google Chrome browser. So it seems to me, why not just get the user to install Google Chrome, which auto-updates itself as well?

It's still standard practice to re-download a desktop app for updates. We do this with Construct 2 itself. You can make an AJAX request to see if there's a new version available, and prompt the user to download it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue May 21, 2013 5:28 pm

Does node-webkit support local files? If so, you can design your game in a way that allows importing content and patches by distributing additional package files.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue May 21, 2013 6:22 pm

@Mipey - yes, the latest betas support reading and writing local files with the node-webkit plugin, as well as loading local files via the AJAX object.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue May 21, 2013 7:25 pm

@Ashley Using AJAX to compare the versions, if is new, it could alert the users to download new app, it would be nice solution.

I think it would be enough, what's installer creator would support to crossplatform such as windows, mac and linux?

Another question, will you add custom icon pipeline to Title bar icon in node-webkit exporter?Joannesalfa2013-05-21 19:25:33
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sat May 25, 2013 8:48 pm

@Joannesalfa

Yea. .Bat/.VBS are Windows exclusive scripting technologies. However, Linux and MacOSX feature similar batch scripting engines.

At least on MacOSX, it will be pretty easy to create an update script that will keep your old files. Node-Webkit for MacOSX simply copies and replaces existing files inside the .App container, while Node-Webkit for Linux and Windows concatenates two or more binary files.


As for multiplatform installer builders, you might want to take a look here.

http://en.wikipedia.org/wiki/List_of_installation_software#Cross-platform

@Ashley

Isn't the cross-domain issue still persistent with your Ajax implementation? Wouldn't be worth much if it didn't allow for cross-domain actions.
B
6
S
2
Posts: 206
Reputation: 1,685

Next

Return to Construct 2 General

Who is online

Users browsing this forum: doomredmage and 19 guests