Software, services and procedure used to bundle the E-Weekly App as an installation for an executable desktop application.
- Sync, load, and display packages with optional expiry date
- Silent installer for packaging and distribution
You will need the following:
- E-Weekly App, a modified version of the E-Briefing App
- PHP Desktop v57.0 for Windows
- Nullsoft Scriptable Install System v3.04
Download PHP Desktop and replace the www
folder with the one generated from your compiled E-Weekly App. Add the provided syncpage.php
file in your new www
folder, as shown by the following structure:
- www/
- assets/
- build/
- main.js
- syncpage.php
Modify your build/main.js
file and edit the SyncPage.prototype.syncData
function for the following features:
- To allow the Sync functionality to refresh the current Trip:
SyncPage.prototype.syncData = function () {
window.open('syncpage.php?api_key=' + this.globals.api_key + '&trip_id=' + this.globals.trip_id + '&api_url=' + this.globals.api_url);
};
- To allow the Sync functionality to let the user choose their Trip:
SyncPage.prototype.syncData = function () {
var trip_id = prompt('Please enter Trip ID:');
window.open('syncpage.php?api_key=' + this.globals.api_key + '&trip_id=' + trip_id + '&api_url=' + this.globals.api_url);
};
You can then use PHP Desktop's executable to launch the E-Weekly App with the relevant features.
Please note that instructions to include an optional expiry date have been commented into syncpage.php
.
Close any open instances of PHP Desktop and run installerscript.nsi
with Nullsoft Scriptable Install System to generate your package installer.
Please note that you may need to edit the script to adjust for file differences in your build. A generic installer script can be generated with HM NIS Edit, as needed.
var GlobalsProvider = (function () {
function GlobalsProvider() {
this.api_key = '';
this.trip_id = '';
this.api_url = '';
}
}());
!define FOLDER_NAME ""
!define FILE_NAME ""
!define PRODUCT_NAME ""
!define PRODUCT_VERSION ""
!define PRODUCT_PUBLISHER ""
!define PRODUCT_WEB_SITE ""