Creating a Common Desktop App Installer

  - Title: Creating a Common Desktop App Installer

  - Date made available: Mar 26, 2020
- Built with: Xojo 2019R1.1 (64-bit Windows and macOS)

 

Goal

A Windows app installer copies the app and its DLLs to Program Files\ and also installs it’s support files. On the Mac, the installer copies the app to Applications/ folder. It is the app’s responsibility to load it’s support files if they don’t already exist. With Xojo's build automation feature, there is a process and a class object that makes an app installer common on both macOS and Windows.

 

The Sample Test App

A test app, KN-UDI Test, provides a visual log. Sample screen captures used to verify the status of loading app support data in the tutorial:

Code

A common unified desktop app installer class, called clsUDI, is provided. When an app starts, the first thing it should do is create the class, test if the app's support data exists, and create the app support folders before loading the data:

 

Dim udi As New lsmUDI.clsUDI(kUDI_strCompany, kUDI_strAppName)

Dim intResult As Integer

 

If (udi.doesAppSupportFolderExist > 0) Then

  gintAppSupportFoldersCreated = udi.createAppSupportFolder

  If (gintAppSupportFoldersCreated > 0) Then

    If (udi.loadFile("ReadMe.txt", "") = 0) Then

      intResult = udi.loadFolder("Logs", "Application Support")

 

Documentation

The documentation to use clsUDI has a unique 4-page newspaper format:

CONTACT US ABOUT
THE WORKSHOP

 

 

 

1201-1440

 . . .

A Windows app installer copies the app and its DLLs to Program Files\ and also installs it’s support files. On the Mac, the installer copies the app to Applications/ folder. It is the app’s responsibility to load it’s support files if they don’t already exist. With Xojo's build automation feature, there is a process and a class object that makes an app installer common on both macOS and Windows.

1025-1200

601-1024

 .

A Windows app installer copies the app and its DLLs to Program Files\ and also installs it’s support files. On the Mac, the installer copies the app to Applications/ folder. It is the app’s responsibility to load it’s support files if they don’t already exist. With Xojo's build automation feature, there is a process and a class object that makes an app installer common on both macOS and Windows.

375-600