There have been some significant improvements made in Lianja 9.5.12 for building standalone executables for windows.
As detailed in this blog article you can visually build standalone apps as well as desktop, web and mobile apps that are run from the Lianja App Center.
In Lianja 9.5 you can build these tabbed form apps (and custom coded apps such the example_timeclock app) as a standalone executable that contains everything needed to run the app on a computer that does not have Lianja runtime installed.
Quickstart:
1. Open the example_timeclock app
2. Look at the App attributes under "Standalone Options" and you will see that you can check to add the library files (Standalone Lib), create a Standalone Zip file and/or a Standalone self extracting exe file.
3. Click the run icon in the apps workspace headerbar
The App will be built as a standalone exe and placed in:
C:\lianja\installers\standalone\example_timeclock
with a self extracting zip file in C:\lianja\installers\standalone\example_timeclock-windows-installer.exe
If you look in the example_timeclock app you will notice that there are several txt files in the app
dependencies.txt (this is automatically created)
This file contains references to any WebViewWidgets used in the app.
and
includes.txt
This file contains any additional library files that you want to copy into the standalone library.
The standalone library will only contain dependencies of any WebViewWidgets used in the app and any other library files specified in includes.txt
You can use wildcards e.g. mylib.* in the includes.txt file
and @filename to include lib:/ files specified in lib:/filename.dependencies (This is how WebViewWidget dependencies are handled)
Runtime Notes:
When a standalone App is run if the file setup.prg (setup.py or setup.js) exists in the App it is executed.
In setup.prg you can check to see if database and table exists and if not create them.
You can also change the location of the data directory containing your data using the set datadir to command.
The setup.prg file in the example_timeclock App checks to see if the App is running standalone and if not it returns and does nothing. (setup is also called for any Apps as they are loaded).
Code:
// this is called when the app runs to setup databases, tables etc.
if not Lianja.standalone
return
endif
barry_debug("setup was executed for " + Lianja.standalonefilepath)
Bookmarks