Node-webkit update resources from server?

0 favourites
  • 12 posts
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • 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.

  • 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.

  • 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.

  • 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".

  • 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?

  • 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.

  • 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.

  • 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.

  • 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?

  • 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.

    en.wikipedia.org/wiki/List_of_installation_software

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Blinx123 The best way to do with AJAX and Browser, we upload our php file in the server to check app version, if is newer version, then check it's using windows, mac or Linux... If is window, then use Browser to Invoke download an installer for windows from URL of latest build.

    It's pretty simple, isn't?

  • Blinx123 - the cross-domain issue is easily solved by adding the Access-Control-Allow-Origin HTTP header.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)