Step 3 – Preparing the Packages

In this article

Open PowerShell window

Create a license package

Update Project.json file

Download packages

Create POS bundle

Create the Offline POS installer

Videos

The following steps are to be executed in the Update Service Server. The steps are a quick start to prepare the required packages and bundles for the installation of Offline POSs.

Open PowerShell window

  1. Click the Windows Start button, locate Windows PowerShell (or Windows PowerShell ISE), and select Run as administrator.
  2. In the PowerShell window, change the directory to the project directory (default is C:\LS Retail\Offline POS).

Create a new License Package

When deploying the POSs on-premises, you must install a .bclicense file during the LS Central installation. You need to create a package that will include your customer’s license and import this package to the Update Service Server, to be included in the POS bundle.

If your customer is under the Bridge 2 Cloud (B2C) promo, they should have access to a Dual Usage Right license (DUR) and this should be the recommended version to be included in the license package.

Learn more about the Dual Usage Right License (DUR).

If you do not have an existing license package in Update Service, follow these steps to create a new one:

  1. Copy the license to the Files\License directory.
    • Most likely, you are using the customer license, but you can use the partner license instead, if required to be used for some reason.
  2. Run:
    Copy
    .\NewLicensePackage.ps1 -Import

    This creates a new license package from the Files\License directory and imports it into your Update Service server. The package will be named your prefix license. You can view it on the Update Service Server, under Packages.

For more information on how to update the license package, see License Packages.

Update Project.json file

The project.json file must be updated to match the packages versions you want to be installed.

The platform and application versions to be installed on the POS should match the platform and application versions installed on Business Central online.

These versions, however, can differ for several reasons.

Business Central platform and applications

For Business Central, the build and revision number will most likely differ between the Business Central online and on-premises, because Microsoft does not use the same build or revision on both environments, so our advice is that you to enter the minor version only.

For the BcPlatformVersion and BcAppVersion properties in the Project.json file, include only the minor version, for example "24.0" or "24.1" - skipping the build and revision.

  • As an alternative, you could set the BCPlatformVersion and BCAppVersion parameters to null and Update Services will check the dependencies for the LS Central package and download the proper BC packages.

To check for the Platform version:

  • Open the Business Central online instance.
  • Click the Help button (1) in the top-right corner (shortcut: Ctrl+F1).
  • Click Help & Support (2) in the Other resources section.
  • Check the Platform version in the Troubleshooting section (3).

    A screenshot of a computer

Description automatically generated

In the image above you can see that:

  • The Business Central online instance is running Platform v24.0.23002.0, so the BcPlatformVersion property in the Project.json file should be "24.0".

Note: These steps are also valid for retrieving the Application version, but only for the Business Central apps.

Alternatively, for the Business Central applications version, follow these steps:

  1. Open the Business Central online instance.
  2. Search and open the Extension Management page (type Extension Management in the Tell Me window (shortcut: Alt+Q) to search for it).

    A screenshot of a computer

Description automatically generated

In the image above you see that:

  • The Business Central online instance is running Base Application v24.4.22295.24490, so the BcAppVersion property in the Project.json file would be "24.4".

LS Central applications

For LS Central the applications are the same, so most likely you will want the same minor version to be installed but also the same build or revision, to have the POS running the same hotfix version as on SaaS.

Note: This is not mandatory and sometimes you might want to have a specific hotfix to be installed, either on SaaS or on-premises, and that is when the versions will not match.

Third-party or custom extensions should work the same way as LS Central.

  • For the LsCentralVersion property in the Project.json file, you have both options:
    • Include only the minor version, for example "24.0" or "24.1", and the latest hotfix for this minor version will be installed.
    • Include the build (but skip the revision), for example "24.0.12" or "24.1.5", and this specific hotfix will be installed.

To check which LS Central version is running on SaaS:

  1. Open the Business Central online instance.
  2. Search and open the Extension Management page (type Extension Management in the Tell Me window (shortcut: Alt+Q) to search for it).

    A screenshot of a computer

Description automatically generated

In the image above you see that:

  • The LS Central app version is 24.0.12.799, so the LsCentralVersion property in the Project.json file would be "24.0.12".

    If, for some reason, you want the POS to run on the latest hotfix available for v24.0, then you could enter "24.0" instead, and Update Service will use the package for the latest hotfix available.

The Project.json file should look like this:

A screenshot of a computer

Description automatically generated

Learn more about LS Central and Business Central versions.

Download packages

For more information about Packages in Update Service see Packages in the Update Service help.

The next step is to download some of the necessary packages from LS Retail’s Update Service Server to your Update Service Server, based on the Project.json file and the packages included in the GetLsCentralPackages.ps1 script.

To download the packages, run:

Copy
.\GetLsCentralPackages.ps1

This might take a while, as the packages are downloaded from LS Retail's Update Service Server to yours.

To get an overview of the packages (components) that will be downloaded, just edit the GetLsCentralPackages.ps1 file.

A screen shot of a computer program

Description automatically generated

When the operation has finished, you can view all the packages on the Update Service server, under Packages.

Create POS bundle

For more information about Bundles in Update Service, see POS Bundle in the Update Service help. .

In the previous step, you downloaded the packages that include the components that can later be installed on the POSs.

Next, you create the POS bundle where you can specify which packages should be included in the bundle to be installed in the POS.

The POS bundle creation is included in the NewBundlePackage.ps1 script. To look at the packages to be included and to make necessary changes, edit the NewBundlePackage.ps1 file.

Note: The script creates two different bundles, with two different purposes.

1. POS Bundle

The purpose of this bundle is to set up a regular new POS. The bundle includes: 

  • Packages for regular POS creation

    • SQL Server Express (optional)
    • Business Central platform
    • Business Central System and Base apps
    • LS Central apps
    • License package
    • Can also contain additional customized apps, Windows apps like the AppShell and Hardware Station or OPOS drivers for printers (see below).
  • Additional packages to handle the basic setup on the POS for the replication and the automatic web services subscriptions step.

    • ls-central-web-replication-azure-storage-data:

      This package is responsible for injecting the minimum required setup to run the scheduler job on the POS to communicate to the Headoffice/Azure Storage for the replication.

    • ls-central-pos-webservice-auto-subscription:

      This package is responsible for triggering the web services subscription in the POS, so the user does not need to do it manually after the installation.

Optional packages in the POS Bundle

Hardware Station

By default, the Hardware Station package is included in the POS bundle to be installed and make the maintenance easier. If you do not want it, feel free to comment out the Hardware Station line:

@{ Id = 'ls-hardware-station'; Version = $Config.LsCentralVersion }

AppShell for LS Central

By default, the AppShell package is included in the POS bundle to be installed and make the maintenance easier. If you do not want it, feel free to comment out the AppShell line:

@{ Id = 'ls-central-appshell'; Version = '' }

OPOS drivers

By default, an OPOS drivers package is not included in the POS bundle. To include it, you must follow these guidelines on how to create a new package.

Then you must add the line with your OPOS package.

Example:

@{ Id = 'my-opos-package'; Version = '1.0.0' }

Customer extensions

If there are custom extensions that need to be included in the POS bundle to be installed on the POS, you must create a package for the extension using the NewAppPackages.ps1 script, and include the new package in the POS bundle, in the NewBundlePackage.ps1 script.

For more information on how to create new or update the App Package, see App Package in the Update Service help.

Final step

After updating the NewBundlePackage.ps1, you must run the script to create the bundle and import it into the Update Service Server by running:

Copy
.\NewBundlePackage.ps1 -Import

After running the script, you can view the bundle on the Update Service server, under Packages.

Create the Offline POS installer

To create an installer that you can run in the POS to have all the components installed, run the NewInstallerCreator.ps1 script:

Copy
.\NewInstallerCreator.ps1

After running the script, you can view and download the installer on the Update Service server, under Installers.

Note: You can also do it manually from the Update Service Management console, but running the PowerShell script is the easiest way to do it.

For more information on how to create a POS installer, see Create an installer in the Update Service help.

Videos

Offline POS: Creating Update Service packages (2/3)