Skip to main content

Utopia Bundle Installer build instruction

  1. Build all components which should be included into installer
    1a. If PrizmDoc should be included, PrizmInstaller project should be built as well. Do not forget to specify PrizmServer license key into the Strings resource of PrizmInstaller.
    1b. If ElasticSearch should be included, UtopiaSearchServiceWrapper project should be built as well

NOTE: For build installer locally you need to make sure that each project that is going to be installed as a component, that in the appsettings.json both the "RunAsService" needs to be true and the ConnectionString needs to be updated/accurate to their DB (or Utopia)

  1. Open Utopia installer project and navigate to appsettings.json file
  2. Specify all components which should be included into installer in this configuration file. By default it contains configuration for including all Utopia componets, but it can be easily changed. If some component should be excluded from installer, it just should be removed from Components section in appsettings.json. This is the appsettings.json structure:
  "BundleTargetDirectory": "[ProgramFilesFolder]eFileCabinet",- Default installation directory for bundle
  "ProjectTargetDirectory": "%ProgramFiles%\\eFileCabinet",   - Default installation directory for msi
  "BundleName": "Utopia Bundle",                              - Bundle name
  "BundleVersion": "1.0.0",                                   - Bundle version
  "ProjectName": "Utopia Solution",                           - Installer name (will be included into bundle)
  "Components": [                                             - List of components
    {
      "Identifier": "ce279e3c-8c3e-469c-9454-6f4b9035eae8",   - Unique component identifier (GUID), it is used by windows to detect if this component already installed.
      "SourceDirectory": "..\\..\\pgsql",                     - Root directory with component's files
      "ApplicationFolder": "eFileCabinetDatabaseService",     - Target component directory in installation path
      "ServiceName": "eFileCabinet Database Service",         - Feature / Service name
      "Required": true,                                       - Required for installation
      "IncludeIntoBundle" : true,                             - If true then msi will be included into the bundle
      "AfterInstall": {                                       - After install block
        "DirectoryForCheck": "data",                          - If this directory DOESN'T exist, after install actions will be executed
        "Actions": [                                          - After install actions    
          {
            "File": "bin\\initdb.exe",                        - File to execute
            "Arguments": "-D ../data -U postgres -A trust",   - Execution arguments
            "WaitForExit": true                               - Sync or async execution (in current example - sync),
            "Local": true                                     - if true then full installation path will be added to the file
          }
        ]
      },
      "BeforeUninstall": {                                    - Before Uninstall block
        "Actions": [
          {
            "Local": false,                                   
            "File": "cmd.exe",
            "Arguments": "/C \"net.exe stop ^\"eFileCabinet Database Service^\"\"",
            "WaitForExit": true
          },
          {
            "Local": false,
            "File": "cmd.exe",
            "Arguments": "/C \"sc.exe delete ^\"eFileCabinet Database Service^\"\"",
            "WaitForExit": true
          }
        ]
      }
      "DependsOn": [                                           - List of required for installation components. It WILL NOT be displayed in Feature select list
        {
          "SourceDirectory": "..\\..\\Prizm",                  - Root directory with component's files
          "ApplicationFolder": "PrizmDoc",                     - Target component directory in installation
          "AfterInstall": {                                    - After install block
            "DirectoryForCheck": "PrizmServer",                - If this directory DOESN'T exist, after install actions will be executed
            "Actions": [
              {
                "File": "PrizmInstaller.exe",                  - File to execute
                "WaitForExit": false                           - Sync or async execution (in current example - async)
              }
            ]
          }
        }
      ]
    }
]

3a. If AccusoftPreviewer (PrizmDoc) should be included, do the following steps:
3a1. Put PrizmDoc Server Installer, PrizmDoc Client installer and PrizmInstaller.exe (result of 1a) into the one directory.
3a2. Rename PrizmDoc Server Installer from PrizmDocServer-<version>.exe to PrizmDocServer.exe and PrizmDoc Client installer from PrizmDocClient-<version>.exe to PrizmDocClient.exe
image.png
3b. If ElasticSearch should be included, do the following steps:
3b1. Download OpenJDK8 (https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_windows_hotspot_8u292b10.zip ) and elasticsearch 6.* (https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.11.zip )
3b2. Unzip elasticsearch into the new folder
3b3. Unzip java into the folder from 3b2
3b4. Rename jdk8u292-b10 folder to java.
Result of 3b1 - 3b4 should be like on the screenshot below
image.png
4. Build project (It can takes more than 10 minutes). During the build installer with name <BundleName>.exe will be created. (This project can't be run, only build action is required)

Local build Issues

Missing assembly: System.Drawing

  1. The folder that this assembly sits in is mega hidden. The only way to access it is by entering the run tool (Windows + R) and then type C:\Windows\assembly\GAC_MSIL
  2. Check this repository. You're looking for System, System.Core, System.Drawing, and System.Windows.Forms
  3. Add any missing folders from here