Building Electron Apps

From Lianjapedia
Jump to: navigation, search

Electron Apps require a connection to Lianja Cloud Server running either on-premises or in the Cloud.

Bm-noteicon.png
Quick Start Guide

Select the "Build" workspace.
You configure Electron Apps in the "Electron" Tab of the “Build” workspace.
You can build electron Apps for Windows x86, Windows x64, Linux x64 and macOS.
When you click the build button the electron App will be built locally.


Building an Electron App step by step

Init

Electron Build



Click the Init button.

This copies the template Electron files to the electron sub-directory of your App.


Electron Build



When the copy is complete, the App is now ready to build with Electron message will be displayed.


Files

Electron Build



From the Files pulldown, select the template files you want to edit in a popup editor.


Electron Build



Edit the package.json file to define the configuration of your Electron App.

The template file shows the format required.

Note: the version refers to your App version.


Electron Build



The debug-main.js file is used when you build in Debug mode.

It includes the instruction to automatically open the developer tools when the App is run.

(mainWindow.webContents.openDevTools())


Electron Build



When building in Release mode, the release-main.js file is used.


Electron App Settings

Electron Build



Click New to create a new configuration then edit the Electron App Settings as required.

Specify the Lianja Cloud Server URL and any optional settings.

Then click Save to save your changes or Cancel to exit without saving.


Build

Electron Build



Check that the Platform, Architecture and Config pulldowns are displaying the correct values for your intended build.

Then click the Build button to build your Electron App.


Run

Electron Build



Once the Electron Build Log output window displays Build complete, click the Run button to run your App.


Note that here the App has been built in Debug mode, so the developer tools are automatically loaded.


Electron Build



Your App will be displayed in a popup window.

Log in as usual.


Electron Build



And test your App.


Electron Build



And here's the same App built in Release mode.


Deploy

The files required to deploy your Electron App are created in:

<drive>:\lianja\apps\<appname>\electron\dist\<app>-<platformname>-<architecture>

For example, in the screenshots above the files are created in:

C:\lianja\apps\lianja_mobiledemo\electron\dist\lianja_mobiledemo-win32-ia32