monicanagent/cypherpoker.js

Add desktop application support via Electron

monicanagent opened this issue · 1 comments

Combine existing web and server components of CypherPoker.JS into a single, standalone desktop Electron application.

Ideally the desktop code will reside in a desktop folder and load both (web and server) components from their current locations so that desktop builds pick up the latest changes. If this is not possible then the code should either be copied prior to each build (which is not be ideal due to the copy time requirements and possible conflicts), or the desktop code may need to exist at a higher level (also less than ideal since it makes the folder structure less clear).

Additional investigation will need to be done to determine differences between Windows, MacOS, and Linux builds:

  • can they exist in the same folder?
  • are there conflicts in generated binaries?
  • are there significant differences in file URLs that must be taken into account?

Update this issue with additional findings or questions.

Updated in revision 113 (a3a68f2).

Native desktop support now implemented and tested in WIndows 10. A local SQLite 3 database and custom adapter is used instead of a remote or in-memory one--though both can still be used.

In addition:

  • The current "web" and "server" directories have been maintained so that the code that's used in the web version mirrors that used in the desktop version. However, some bootstrapping code is used to launch the desktop version and a patch is applied after "npm install" to fix an incompatibility with Electron >= 4.x.x, bitcoinjs-lib, and the BIP32 library (electron/electron#16454).
  • Electron binaries are installed using "npm install" in the target OS and platform so there are no inherent incompatibilities between builds. However, some path changes may be required when creating a standalone or installer (to be investigated).