Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML5 Deployment
I'm just finishing up a project for a client. It consists of an HTML5 application that is run from the local filesystem (a USB stick). The application includes the Chromium browser.
 
The client has just requested a new feature: they'd like the software to be able to auto-update.
 
Enumerating and fetching an update is no problem... but I'm not sure how I'll deploy back to the filesystem. I can't use fileapi because the saved content would be sandboxed.
 
We don't want the user to have to download a zip and save files to the stick -- that's way above the average user's ability.
 
Flash/Silverlight/AIR etc are not options (that's why it was written for HTML5).
 
Maybe a chromium extension?
 
Suggestions are welcome.
Posted 26-Feb-13 11:13am
Comments
Sergey Alexandrovich Kryukov at 26-Feb-13 16:43pm
   
You are not asking about something certain, because it heavily depends on how the site is hosted.
—SA
Yvan Rodrigues at 26-Feb-13 16:47pm
   
How so? On the client side there is no hosting to speak of. The user interacts with offline HTML stored on the filesystem.
 
Currently the only server involved is a web service that the client calls to register the software (IIS7/.NET4). To update, the client would poll the web service to see if an update is available, and then pull it.
Sergey Alexandrovich Kryukov at 26-Feb-13 16:55pm
   
Do you mean update the site through the site interface itself? Then I did not get you. If so, my response would be just the opposite: what's the problem? Millions of sites do that, including CodeProject, in a way.
You just need to create a secure update interface on the site, protected from other members...
—SA
Yvan Rodrigues at 26-Feb-13 17:01pm
   
Hi Sergey, you're losing me -- there's no mention of a site in the original post.
 
Let's say you have a file on your desktop called foo.html. It has never been on a "site" in its life. I want foo.html to update itself when the web service says there is a new foo.html.
Sergey Alexandrovich Kryukov at 26-Feb-13 17:09pm
   
OOPS! Sorry... Is all sounds unusual... an HTML file used locally, from USB stick... But are you going to have a local software process to access the Web service and update the file? Should it be a service (permanently running, detecting insertion of the flash memory) or not? What's the problem, anyway? And why such rigid and weird settings..?
—SA
Yvan Rodrigues at 26-Feb-13 19:47pm
   
If it wasn't unusual I wouldn't be asking for help :)
 
It's actually no different from running LibreOffice, Notepad++, Chrome, or anything else from a usb stick. Absolutely nothing is installed on the computer.
 
In the case of my client's software, you buy it from them, they send you a stick, you put it in your PC or Mac and double-click the icon. It runs whether you have an internet connection or not.
 
It's no different any other cross-platform software except instead of Flash, AIR, Java, Mono, Qt, ___ I'm using HTML5 and C# (cross-compiled to javascript). It's used in school classrooms where if there is an internet connection at all, it is probably heavily firewalled and/or filtered.
 
The previous version of the software (written by another company) used AIR and it was a huge problem because it required an installer, and school computers often have neither administrator access or an IT department to install software.
 
The ONLY process that is run is the web browser, although most users won't even realize they are using a web browser because it is run in Chromium app mode and looks like any other native application.
 
So back to the "problem". Since the application consists of .html, .js, and .css files, I'd like to be able to replace them. There are two ways to get a file from a remote server and save it on the filesystem from a web browser. (a) you issue a GET and let the browser ask where they would like the file saved; (b) you GET a file and save it in the filesystem using the HTML fileapi. Neither of these work. In the case of (a) we don't want the user to download a bunch of individual files or a zip and expect them to put them all in the right places; (b) the fileapi can't access parts of the filesystem outside of the sandbox.
 
I'm hoping someone has a (c).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100