Archive for the ‘Deployment’ Category


Posted: 2017-01-17 in Deployment

In the app builder when I click Web App View my app opens in dev view-mode and when I click ‘Preview’ it opens in the browser as it would appear at runtime.
For this to work I assume then that clicking ‘Preview’ actually deploys the app to the local server – but ONLY the app, db and other files need to be deployed manually.
If this is correct then what is the purpose of the ‘Deploy’ button on the Web App View?
Deploy deploys the App without opening your default browser.
Preview deploys and opens your default browser.

I am having difficulty deploying my first app to a windows client. I have downloaded the windows installer, created an installer file, chose my app and database and it completes the compile without errors. Upon launch, the install program runs and completes, but when I go to the app center I cannot log on as an admin.

I initially tried the default password, but then thought I might have changed it so I changed it again in the app builder and reinstalled. Still cannot gain access. I then had a second log in created for a different user with the same roles as the admin. This one I can log into but it give me a notice that it has no published apps available.

Any suggestions on 1 how to gain admin access to the app center and determine if the app actually installed?
I have compiled the program and installed it into the app center without errors in the process.
All data files appear to be where the installer said it would put them, but I get the errors below upon launch of the app in the app center. and if I try to open a record, it says no table found.
On the client machine where you have run your installer, have a look at the drive:\lianja\log\log.txt file. This will include the dataDirectory and other directory settings it is using.
Check that this directory contains the databases that you are expecting.
You can also use the –debug command line switch in your Lianja App Center shortcut, e.g. if installed on C:

C:\lianja\bin\lianjaruntime.exe –debug

This will then output debugging information to the debug.txt and/or debug_client.txt files in the C:\lianja\debug directory.

I tried to deploy my App locally on my desktop. The creation of the exe file went well and the installation of the package. However when I created the shortcut and tried to run the app it failed.
I went back to my APP builder to try to access my app; it failed also. Checking database directory, I saw that 2 tables missed and I restored them from my backup.
But unfortanatly when I restart my APP builder, it failed again and 1 of the two tables disappeared.

Table missed in the directory as if it was deleted; only the index file (dbx) remained. This issue happened every time the app failed.
I restored it and once again the APP builder failed and everytime it failed, the table is missed.
I restored the app from the backup I made before the deployment but the same issue persist. So in last ressort, I re-install the APP builder, but the issue is still there.
You need to rebuild the database so that tables are included in the database catalog if you have copied them in externally. You can issue the REBUILD DATABASE command from the Lianja/VFP command window in the Console, or use the right-click context menu in the Data workspace.

Note: if you are running an installer on your development machine, make sure that you do not include the Lianja App Center in the installer.
If you install the App Center on top of the App Builder, you change the Lianja root directories for data, Apps etc. Now you have the App Builder reinstalled, these will have been set back to the correct directories.
If you just want to test your App in the App Center on your development machine, there is no need to build an installer, just deploy
If you are testing an installer, then ideally run this on another machine or VM, but if you must test it on your development machine, it is important not to include the App Center.
After I reinstall the APP builder everthing is ok now; I can use agian my app in the APP builder.
For the deployment, I understand the mistake; I included the App center in the installer.

a server (file server: drive mapped to Z[IMG]file:///C:/Users/Kruno/AppData/Local/Temp/enhtmlclip/Image(3).png[/IMG]:
some client (win)
I did deploy the application on the server:
copying application and data
I installed the runtime on the client.
Then, launch:

C:\lianja\bin>lianjaruntime -a z:\Lianja\cloudserver\tenants\public\apps\martinel li_articoli\martinelli_articoli.lianja

I’ve try this:

lianjaruntime -a –runtimedatadir Z:\Lianja\cloudserver\tenants\public\data\cogema –networkshare z:\Lianja\cloudserver\tenants\public\apps\martinel li_articoli\martinelli_articoli.lianja


C:\lianja\bin\lianjaruntime.exe –runtimedir Z: -a martinelli_articoli

where Z: is mapped to the parent drive or directory of the lianja directory on the server.

C:\lianja\bin\lianjaruntime.exe –tenancy Z: -a martinelli_articoli

where Z: is mapped to the \lianja\cloudserver\tenants\public directory on the server.
Note: –runtimedir may be deprecated in favour of –tenancy from Lianja v2.1.

In this way, app and data are stored on the server. But when I run the app, is executed locally, right?
A: Correct

I deployed my app on a windows server 2k8 and built the desktop installer to install on the desktop machines.
I created a local drive Z: pointing to the shared folder on the server containing the deployed application \lianja\cloudserver\tenants\public.
The shortcut to the application has the following command to run the application

c:\lianja\bin\lianjaruntime.exe –tenancy Z: –app gesavoc (app name)

The application is executed properly but I can’t get the authentication screen, the main form of the application automatically.
I deployed the system and application databases on the server and the application has the “published” and “Login required” properties are set to “true”.
The –app <appname> command line switch causes the App to be loaded without the App Center login page being displayed.
With no switch, the user logs in then sees the App Center and all published Apps available to them.

The switch you need to use is –loginapp <appname>. With this, the user logs in then goes straight to the App you specify without seeing any other published Apps.

the –runtimedir will be the same as the –tenancy parameter which use the mapped network shared folder.
No, –runtimedir points to the root drive or directory where the lianja sub-directory contains the runtime path for Apps, Library and Data, e.g. F: (where files are located in F:\lianja\cloudserver\tenants\public\…).

I had to deploy my app from the laptop to my win server. I installed the APaas Dev on the server and I deployed the application in a the shared folder. So I used the server itself as the development machine and the application was deployed properly.
I created users and roles on the server and also deployed the system and application in the server.
Now I have to install client machines to access to the application. For this purpose I built an installer file to install the application on client machines.
It is done but when I launched the application, it is displaying directly the starting page of the application without the authentication screen.
I used a shortcut on the client machine with the tenancy parameter refereing to the mapped local drive.

I would like to have my client machines display the login screen prior to launch the application main form.
In my case files and programs are located in the server and the \lianja\cloudserver\tenants\public is shared and mapped to a local drive on client machine.
So should I share the drive where lianja is installed in the server and map this drive also to a local disk?
Yes, exactly.

when a DB is deployed from the app builder the entire database is copied in as-is (structure and data) to the cloud server. This means that if I have a live running app and I make a change to the database in app builder (eg. add a column) and I then re-deploy, this will overwrite everything in the live database?

If this is correct then it seems that the database should actually not be part of the deployment at all, but rather it should be created completely in code which would run the startup prg. I had (incorrectly, it seems) assumed that deployment of a database would sync structure changes but keep the live data intact.

Also, what is the process to deploy to a client that is running an on-premise cloud-server? is there a package that can be sent to the remote site to update the app or similar?
With regards to deployment, best practices dictate that you have:

1. Development database and apps. This is where you use the app builder to build the apps with live views against the development data.

2. Staging database and apps. This is where you deploy to from the app builder and “Preview“. It’s normally on the development machine.

3. Customer deployment target at a remote site. Build an installer package using the installer of your choice. See below.

As part of your release management, build a company branded installer, include an upgrade script as a .rsp page that upgrades the database using the functions mentioned in this thread:…tabase+compare

Alternatively if you are deploying in a public cloud such as AWS you can sftp your files up as well as your upgrade_version.rsp script then run it to update the database.
Well, the cloud server can run rsp pages on a remote site so this is the simplest way to perform the upgrade.
Many web based applications (e.g. CMS) perform system upgrades this way.

For some individual developers, its possible that they may develop and deploy on a single server (not ideal – I know).
Or perhaps they develop and use the same box for UAT before deploying to a production server.
I was wondering if it’s possible to open the production database from inside the app builder to get all the data definitions for comparison.

Something like

Open database C:\lianja\cloudserver\tenants\public\data\Southwin d

The best way to handle this is take a snapshot of your database schema at the time you release version 1. You can right-click on the database name in the data workplace and choose “Copy…” then give it a name such as:


It is then just a matter of creating your own “diff” using the functions provided and creating an updatedb.prg script (possibly as the open database trigger from v1.0 of your database).

Each time you release a new version that has schema changes take a snapshot…



You then have a general updater that will modify the schema and provide continuous delivery of schema changes by generating a new updatedb.prg and replacing it in the database.

You also have a complete history of schema changes for all versions that you have deployed.
Thats the way I would handle schema changes onto a live site.

I have compiled the program and installed it into the app center without errors in the process.
I am getting runtime errors when I launch the app from the app center. In the app builder, the app runs with out any runtime errors. It appears that the database is either unavailable or it is not pointing to the correct location since it is not loading my memory variables and when I search for a record it says no record found. I included the databases when I created the build. Is there a place to look to see if it is pointing to the correct location for the database?

Below is the file location call out in the builder. invoice being the name of the database.

SetOverwrite ifnewer
SetOutPath “${PRODUCT_SHAREDINSTALLDRIVE}\lianja\cloudser ver\ tenants\public\data\system”
File /r /x *.bak “${LIANJA_INSTALLDIR}\data\system\*.*”
SetOutPath “${PRODUCT_SHAREDINSTALLDRIVE}\lianja\cloudser ver\ tenants\public\data\invoicer”
File /r /x *.bak “${LIANJA_INSTALLDIR}\data\invoicer\*.*”

On the client machine where you have run your installer, have a look at the drive:\lianja\log\log.txt file. This will include the dataDirectory and other directory settings it is using. Check that this directory contains the databases that you are expecting.

You can also use the –debug command line switch in your Lianja App Center shortcut, e.g. if installed on C:

C:\lianja\bin\lianjaruntime.exe –debug

This will then output debugging information to the debug.txt and/or debug_client.txt files in the C:\lianja\debug directory.
One of my tables was in a separate folder so when I built the installer it was not included. After moving the table to the correct database folder and rebuilding the database, everything worked.

I am having difficulty deploying my first app to a windows client. I have downloaded the windows installer, created an installer file, chose my app and database and it completes the compile without errors. Upon launch, the install program runs and completes, but when I go to the app center I cannot log on as an admin.
To publish the app, open the app, go to Settings (lower left), and then check the Publish checkbox (upper right). Save, exit, deploy.

Whether an app is published or not is contained in the .lianja file for the app.
The App Center inspects the .lianja files in their App directories, and publishes the ones that are marked as published.
There is no such thing as “administrative access,” in other words. So, if you were to open up the .lianja files in your deployed app directory, you could find the <apppublished> element and change the value to 1.
Then when you reopen the app center you will see the app icon.

As for users tied to an App: it may be the case that if the app isn’t published, they aren’t allowed into the app center. You’ll see. If there are still issues, it is likely due to your setup of the roles.

that’s what makes Lianja so special: write once, deploy anywhere.

I’m trying to deploy my app on my production server where I already installed the cloud server and shared the public tenancy folder.
The deployement log show that all data where copied successfully but nothing was written on the server. The production server is running Win 2k8 server R2.
Below are some last lines of the logfile

Copying Selected Library files.
Copying file ‘C:\Lianja\library\report.rsp’ to ‘d:\Lianja\cloudserver\tenants\public\library\repo rt.rsp’
Copying file ‘C:\Lianja\library\report.rsp’ to ‘d:\Lianja\cloudserver\tenants\public\wwwroot\libr ary\report.rsp’
Copying file ‘C:\Lianja\library\login_forgot_password.rsp’ to ‘d:\Lianja\cloudserver\tenants\public\library\logi n_forgot_password.rsp’
Copying file ‘C:\Lianja\library\login_forgot_password.rsp’ to ‘d:\Lianja\cloudserver\tenants\public\wwwroot\libr ary\login_forgot_password.rsp’
Copying file ‘C:\Lianja\library\login_learn_more.rsp’ to ‘d:\Lianja\cloudserver\tenants\public\library\logi n_learn_more.rsp’
Copying file ‘C:\Lianja\library\login_learn_more.rsp’ to ‘d:\Lianja\cloudserver\tenants\public\wwwroot\libr ary\login_learn_more.rsp’
Deployment completed successfully.

If you mapped your server drive to drive D:, than it is copied OK.
From log file, I suspect all is copied to (development) local drive D:
Good structure but wrong drive, I think.
You can check your local drive D: .

You should map your server drive to X: or something and set it to copy to X:


Posted: 2017-01-17 in Deployment

I have the app builder trial on my mac and am trying to deploy a desktop app to a couple of people on the network but am failing miserably.
The app is built and works fine and I’ve gotten the other guys to download and install the app centre but am unsure how to deploy to them. I tried creating a folder on the shared drive, which they have pointed to as the app folder during installation of App Centre but when they go to run app centre they get a blank screen without the user name and password text boxes. One of them got the text boxes after reinstalling and presumably pointing to the another folder as the app folder but it looked like it was unable to find it’s css file as the formatting was awful and the “login” link did nothing.
Also, which files should I deploy with the app? DO I need to deploy any system tables or files so that the formatting of the app looks correct or is that all copied to the deployment folder automatically?
Setup.exe and building windows installers is not relevant to deploying on macs.
The default deployment location for Lianja desktop Apps on WIndows is to the sub-folders of ‘C:\lianja\cloudserver\tenants\public\‘.
Apps – C:\lianja\cloudserver\tenants\public\apps\
Data – C:\lianja\cloudserver\tenants\public\data\
Library files – C:\lianja\cloudserver\tenants\public\library

For an alternative runtimedir (set during Installation, Command Switch or LIANJA_RUNTIMEDIR environment variable), the same folder structure needs to be in place drive:\lianja\cloudserver\tenants\public\…
The drive:\lianja\cloudserver\appcenter sub-folder and its files are also required. It contains the Lianja App Center Home screen/login pages.
If possible, install the App Center distribution on the deployment target then the folder structure and appcenter login files will be in place.
If you have set up users and roles for your App, then you need to deploy your system database as well as the database for your App.
Apps need to have their ‘Published‘ setting set to True or they will not appear in the App Center.

By deploying I still get the message “Redistribution file LianjaAppCenter 1.5 Windows cannot be found, download it and place it in c:\Lianja\redist.”
You need to download the distribution for the Lianja App Center. Do not install it, just place the downloaded distribution in your redist directory, then you can build installers that include the Lianja App Center distribution.

Just before an App is loaded if any of the following files exist in the app directory they are executed just before the app itself is loaded.

setup.prg (app builder)
setup.dbo (app center runtime)

The init delegate is then executed

The app UI is then loaded.

Followed by other delegates in this order for the App, the pages, the sections of each page and the fields and gadgets of the sections.

load delegates
ready delegates

when an App Center already exists, and I may not want to update it to the version we’re using in development, using an LPK would be, well, quick and easy
I’m afraid not. To install an lpk file you need the app builder installed.
it probably isn’t a bad idea if lianjaruntime.exe can take a few new command line arguments.
–install name.lpk
–upgrade name.lpk
Submit an ER.

A deployment problem. I select the database and click on Preview Changes, then I get “You must specify a remote server”. The only field to enter any server information is disabled.
The default settings for deployment are in the App Settings. If the Publisher is set to Copy, localhost is assumed and the Server is blank. For SFTP a Server is required.

If you create a new Deployment Settings profile as described here, you can edit the individual Deployment Settings to your requirements in the Deploy workspace itself (the example shown is deploying to a share point).

I followed these steps to generate an executable:

1. Select “Deploy”
2. Double click the “template” installer at the top left of the tree.
3. Click the build button.
4. Wait and watch.
5. Copy c: \ lianja \ installers \ template \ template-setup.exe to another machine.
6. Install it. This will install all the demo Apps. Customize it for whatever you want to install.

But then install and run correctly, run the lianjaruntime.exe and not my application appears Am I avoiding something? (All this I am doing the same PC where I am developing) … Can I send my App to “Lianja App Center” without building an .exe from my development environment?
To run on the same PC, an installer is not necessary. Publish & Deploy

In addition, do not install the independent Lianja App Centre in the development team.

Your App is working as you expect in the Lianja App Builder, but after you deploy it and click on its tile in the Lianja App Center nothing happens.

Check whether you have set the Dynamic contents App Setting to True.

If Dynamic contents is True, the App does not open, it is used as a Tile to display dynamic contents. Have a look at the 3 examples included in the distribution.


Posted: 2015-11-07 in Deployment

You have to download the Lianja App Center separately and put it in the .\redist\ folder if you want to build an installer package.

When deploying to a client site, you deploy the system database to include the specified users and their passwords.The App Center is the desktop client. On a new installation it has a default username/password of admin/admin.
To run the development environment, you need to run the App Builder. By default you will be logged in automatically. You can also use the in-built admin/admin login. The admin account can be changed, and other users added, in the Users Workspace

Can you submit a ticket and attach the output
and the full deployment log details when you try to deploy?
Have you previously deployed the database or is this the first time?
I had a failure the other day when I forgot I already had the database (in the deployed location) open in a client.

Please upgrade your Lianja App Builder to the v1.1.2 release. Download the Lianja App Center 1.1.2. Do not install the Lianja App Center, but place the downloaded file in the drive:\lianja\redist\ directory.

The Template Installer script includes commands to install the Lianja App Center if it is not already installed. This is discussed at the beginning of this Forum thread. You do not have to include the Lianja App Center in your Installer if your users already have it.
If the Lianja App Center is included in the Installer, it should be the same version as your Lianja App Builder where you do your development. When you download the Lianja App Builder, download the Lianja App Center too, but do not install it. Just put the Lianja App Center download in your drive:\lianja\redist\ directory.

The template installer defaults to not installing the Lianja App Center if it is already installed, but you can change this. If I comment out the lines, as in the screenshot, the Lianja App Center will be installed.

So, before you deploy your App, make sure you check the ‘Published’ attribute in Settings, save the App and close it then Deploy.
Once published and deployed your App will be available in the App Center. Fire up the App Center from the desktop shortcut, login (remember default admin/admin) and you will see your App. Back in the App Builder in the Settings, you can also configure Tile information for the App.

I understand I don’t have to compile the app, but how can my client run the application?
Your clients run the Lianja App Center (or Lianja Web or Mobile Client for Lianja Cloud). Your Apps are packaged up using ‘Build package’ in the Deploy Workspace – you need to add the database, App files and any required Library files. You will also be able to ‘Build installer’ in the Deploy Workspace to install the App Center and packages

The runtime reads from the \lianja\cloudserver\tenants\public directory so deploy first then build your installer from those directories.

I’m confused about the develop / Deploy stuff… Are we only working with dbfs while on the App Builder? I want to import data from our current apps into Liange… Will I be importing them into my App Builder or the SQL server… I want the data to end up in the SQL Server…. Also.. when I create a database and it’s tables while in the app builder and I deploy.. wil it create the database and its tables in the SQL Server?
Lianja databases and tables are in exactly the same format whether used by the Lianja App Builder or the Lianja SQL Server and the Lianja App Center. The only difference is where the development product (Lianja App Builder) and the client/runtime/user products (Lianja SQL server and the Lianja App Center) have set as their default data directory. Any databases and tables you create in the Lianja App Builder, whether they are imported or created natively, can be deployed for use by the Lianja SQL Server or the Lianja App Center.

The quickest way to test your app deployment is actually deploy it through the deploy workspace then just edit the desktop shortcut for the Lianja App Center to add the –app switch. That’s how you would fire your app up after creating an installer and deploying to your customers. You would create a desktop shortcut with your own icon and run the lianjaruntime (with various switches e.g –app xxx –splashscreen xxx etc) which is the royalty free runtime distribution.

Just to make you all aware that there is a licensing API built into Lianja for use by ISVs.
Once you start selling your Apps you can license them based on a license key that you request from us for a particular customer.
The API is quite straightforward as it just uses some internal SYS() functions to check that your applications are licensed and if not to be able to activate them.
The licensing also handles trial licenses. We will be building this facility into the Lianja Hosted Cloud also for ISV use.
If you have not considered an ISV subscription you may want to think about it as it will not only save you money in distributing your Apps but it will also help you better monetize them based on licensing.

Many of the modern browsers support multiple tabs and the have a lot of extra functionality that you may sometimes not want when running an “Information kiosk”.
To allow you to deploy your Lianja Web Apps in “kiosk” mode in v1.2.2 you can now but a desktop shortcut like this:

C:\lianja\bin\lianja.exe http://localhost:8001/login.rsp --fullscreen

or to run an App directly without logging in:

C:\lianja\bin\lianja.exe http://localhost:8001/apps/example_webapp1/index.html

Alternatively you can run these when the machine boots up if you are deploying Information Kiosks on the factory floor to operate in unattended boot mode.
This will keep the users captive in the browser with no window title or ability to exit the “Information kiosk”.

You build an installer which is a .exe file that installs everything the user needs to run your App(s).
Lianja is for desktop, web and mobile. There is no concept of an “exe” in the web.
You cannot build an “exe” for desktop that will run without any data or other supporting files that Lianja needs.

make sure you are deploying to the correct runtime directory.

just deploy on your development machine into the runtime directory then test in the app center.

I’ve deployed a test app to LCS, but am not seeing the index.html.
example_webapp comes up ok. And my files did get deployed (used the copy method, as it’s all on my desktop/notebook). But there is no index.html to point to. 
When you “Save” an App from the ‘Pages” workspace, if you have checked off “Desktop”, “Web”, “Tablet”, or “Phone” in the app settings then the following files will be generated and placed in the required location.


You can first of all try and run it by opening up a “Web App View” then clicking “Preview”. That will save the App generating the code and run it in the default desktop browser.
Your HTML5/JavaScript Apps will be located relative to the apps directory in the Cloud Server settings.
On windows the default is:


So if you have an app called “hank” the file will be in:

C:\lianja\cloudserver\tenants\public\wwwroot\apps\ hank\index.html

So in the browser you can type this in the address bar of the browser:

The index.html file is always saved when you save an app and you have “Web” checked in the app settings.
the app files are copied when you save.
the library files are not so you may need to deploy them if you are using some custom ones.
your data will need deployed; this is shared by desktop runtime, web, tablet and phone.
There is a new icon in the header of the library and apps workspace that allows you to save an edited file and deploy it.

The Lianja runtime will will only run compiled code.
The compiler is only enabled in the App Builder — development mode, as that is the licensed product.
This is to prevent piracy.
Lianja is runtime royalty free desktop distribution but requires the apps to be compiled within the App Builder.