Is this possible with Electron? Specific app requirement


#1

Hi all,

I’m looking for a platform to package HTML5 + JS content into an offline app for Win + Mac. The problem is that I have some specific requirements and would like to know if Electron is the right way forward with this.

The content will be coming from Adobe Animate and I have a mockup project with ‘all’ required functionality here:

Is this something I can build in Electron fairly simply?

Running html version can be found here: https://avtconnect.github.io/

Requirements for Desktop App build

  1. Works with HTML5/JS export from Adobe Animate
  2. Offline
  3. Win & Mac application
  4. No installer
  5. Simple package download (i.e. ZIP file)
  6. No security prompt (UAC or otherwise)
  7. Function the same as online version (click to view document in default application, save file to disk)
  8. Executable file only, or only one/few subfolder(s)
  9. Must run on older Win systems (i.e. no HTML5 capable browser, Windows XP?)

Optional

  1. Auto-update if online access on launch

Thanks,
PJ


#2

Electron is basically Chrome, so it ought to run on all computers that can run an equivalent version of Chrome. Since it’s a browser with most of the functionality filed off, it’s very easy to point it at any HTML/JS code you want. You just need to write a script for your main process that opens a BrowserWindow and points the BrowserWindow at your HTML page.


#3

What about access to local filesystem? Read from a subfolder and save to disk? Or point no. 8 - executable only or only one /few subfolder(s)?

I have a running example of the pages here (for some reason the preloader gif doesn’t seem to work): https://avtconnect.github.io/


#4

The other significant building block of Electron is Node.js. You can import the fs module and run its functions just like you would with a Node script.

The number of subfolders in your project is up to you. If you want, you can ship a package with an executable and an archive with all of your code and assets obscured from most users (this isn’t secure against interlopers with any amount of tech savvy, but the worst thing a non-savvy user could do is delete it).


#5

Thanks for the info @DamnedScholar

I got it running in electron and packaged it but there still are a lot of files in the root. It seems asar only archives the actual project files, not files related to executing. Is there any way to avoid or move those into a resources subfolder (without creating an installer)?


#6

I just know about it from documentation and using Electron applications. I’m not an Electron developer, so I don’t have any experience with asar from the inside, but since it’s a tar-like file, I would expect it to be capable of holding other kinds of assets. It’s just as likely that I’m talking from inexperience, though.