How To: Automate Windows GUI Installation

This page outlines how to automate the Liquibase Enterprise GUI installation on a Windows machine using a .bat file.

  • The page also provides a sample build.yml file for running via a GitHub Action.

This automation performs the following using an install.bat file:

  1. Moves any existing DaticalDB / LiquibaseDesktop installation folder to DaticalDB-YYYY-MM-DD-hh-mm-ss

  2. Renames the installation files from eg. DaticalDB-win32.win32.x86_64-8.5.229.jar to datical.jar, DaticalDBCompositeRepo-8.5.229.zip to datical.zip, and CustomerEnterpriseLicense.lic to datical.lic

  3. Does a silent install of the GUI using an install_script.xml

  4. Installs the Datical license

  5. Installs the Datical drivers on the CLI

  6. Installs the Datical drivers on the GUI

  7. Copies the Datical license to the install’s repl folder

Step 1: Download necessary installation files and license

 

Step 2: Create an install_script.xml or customize the following example install_script.xml

Install scripts can be generated by performing a manual install and then selecting “Generate an automatic installation script” at the end of the installation.

image-20240709-202020.png

Versions 8.x

  • If you are using the below sample install_script.xml, update the <installpath> references in the below install_script.xml. In the sample below the <installpath> is set as C:\Users\Administrator\LiquibaseDesktop

    • Make similar adjustments to the <shortcut> nodes below to match the <installpath>

  • Ensure the java path is set correctly.

  • This file needs to also be placed on the Agent in the datical_install folder.

    • Alternatively you can check this file into source control along with any build scripts for this automation.

install_script.xml for versions 8.x

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <AutomatedInstallation langpack="eng"> <com.izforge.izpack.panels.HelloPanel id="UNKNOWN (com.izforge.izpack.panels.HelloPanel)"/> <com.izforge.izpack.panels.LicencePanel id="UNKNOWN (com.izforge.izpack.panels.LicencePanel)"/> <com.izforge.izpack.panels.TargetPanel id="UNKNOWN (com.izforge.izpack.panels.TargetPanel)"> <installpath>C:\Users\Administrator\LiquibaseDesktop</installpath> </com.izforge.izpack.panels.TargetPanel> <com.izforge.izpack.panels.PacksPanel id="UNKNOWN (com.izforge.izpack.panels.PacksPanel)"> <pack index="0" name="Liquibase Enterprise Desktop" selected="true"/> <pack index="1" name="Liquibase Enterprise CLI" selected="true"/> <pack index="2" name="Liquibase Enterprise license manager" selected="true"/> <pack index="3" name="Java 11 Runtime" selected="true"/> <pack index="4" name="Oracle Instant Client" selected="true"/> <pack index="5" name="Edbplus Client" selected="true"/> </com.izforge.izpack.panels.PacksPanel> <com.izforge.izpack.panels.UserInputPanel id="SelectLicenseFilePanel"> <userInput> <entry key="license.path" value=""/> </userInput> </com.izforge.izpack.panels.UserInputPanel> <com.izforge.izpack.panels.InstallPanel id="UNKNOWN (com.izforge.izpack.panels.InstallPanel)"/> <com.izforge.izpack.panels.ShortcutPanel id="UNKNOWN (com.izforge.izpack.panels.ShortcutPanel)"> <programGroup name="Liquibase"/> <shortcut KdeSubstUID="false" categories="" commandLine="" createForAll="false" description="This starts Liquibase Enterprise" encoding="" group="false" icon="C:\Users\Administrator\LiquibaseDesktop\img\liquibase.ico" iconIndex="0" initialState="1" mimetype="" name="Liquibase Enterprise" target="C:\Users\Administrator\LiquibaseDesktop\datical.exe" terminal="" terminalOptions="" tryexec="" type="2" url="" usertype="0" workingDirectory="C:\Users\Administrator\LiquibaseDesktop"/> <shortcut KdeSubstUID="false" categories="" commandLine="" createForAll="false" description="This starts Liquibase Enterprise" encoding="" group="true" icon="C:\Users\Administrator\LiquibaseDesktop\img\liquibase.ico" iconIndex="0" initialState="1" mimetype="" name="Liquibase Enterprise" target="C:\Users\Administrator\LiquibaseDesktop\datical.exe" terminal="" terminalOptions="" tryexec="" type="1" url="" usertype="0" workingDirectory="C:\Users\Administrator\LiquibaseDesktop"/> <shortcut KdeSubstUID="false" categories="" commandLine="-jar &quot;C:\Users\Administrator\LiquibaseDesktop\Uninstaller\uninstall.jar&quot;" createForAll="false" description="Liquibase Enterprise Uninstaller" encoding="" group="true" icon="C:\Users\Administrator\LiquibaseDesktop\img\recycle.ico" iconIndex="0" initialState="0" mimetype="" name="Liquibase Enterprise Uninstaller" target="C:\Program Files\Eclipse Adoptium\jdk-11.0.23.9-hotspot\bin\javaw.exe" terminal="" terminalOptions="" tryexec="" type="1" url="" usertype="0" workingDirectory=""/> </com.izforge.izpack.panels.ShortcutPanel> <com.izforge.izpack.panels.FinishPanel id="UNKNOWN (com.izforge.izpack.panels.FinishPanel)"/> </AutomatedInstallation>

Versions 7.x

  • If you are using the below sample install_script.xml, update the <installpath> if required. Currently set to C:\Users\Administrator\DaticalDB

    • Make similar adjustments to the <shortcut> nodes below to match the <installpath>

  • Ensure the java path is set correctly.

  • This file needs to also be placed on the Agent in the datical_install folder.

    • Alternatively you can check this file into source control along with any build scripts for this automation.

install_script.xml for versions 7.x

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <AutomatedInstallation langpack="eng"> <com.izforge.izpack.panels.HelloPanel id="UNKNOWN (com.izforge.izpack.panels.HelloPanel)"/> <com.izforge.izpack.panels.LicencePanel id="UNKNOWN (com.izforge.izpack.panels.LicencePanel)"/> <com.izforge.izpack.panels.TargetPanel id="UNKNOWN (com.izforge.izpack.panels.TargetPanel)"> <installpath>C:\Users\Administrator\DaticalDB</installpath> </com.izforge.izpack.panels.TargetPanel> <com.izforge.izpack.panels.PacksPanel id="UNKNOWN (com.izforge.izpack.panels.PacksPanel)"> <pack index="0" name="Datical DB UI" selected="true"/> <pack index="1" name="Datical DB CLI" selected="true"/> <pack index="2" name="Datical DB license manager" selected="true"/> <pack index="3" name="Java 8 Runtime" selected="true"/> <pack index="4" name="Oracle Instant Client" selected="true"/> <pack index="5" name="Edbplus Client" selected="true"/> </com.izforge.izpack.panels.PacksPanel> <com.izforge.izpack.panels.UserInputPanel id="SelectLicenseFilePanel"> <userInput> <entry key="license.path" value=""/> </userInput> </com.izforge.izpack.panels.UserInputPanel> <com.izforge.izpack.panels.InstallPanel id="UNKNOWN (com.izforge.izpack.panels.InstallPanel)"/> <com.izforge.izpack.panels.ShortcutPanel id="UNKNOWN (com.izforge.izpack.panels.ShortcutPanel)"> <programGroup name="Datical"/> <shortcut KdeSubstUID="false" categories="" commandLine="" createForAll="false" description="This starts Datical DB" encoding="" group="false" icon="C:\Users\Administrator\DaticalDB\img\datical.ico" iconIndex="0" initialState="1" mimetype="" name="Datical DB" target="C:\Users\Administrator\DaticalDB\datical.exe" terminal="" terminalOptions="" tryexec="" type="2" url="" usertype="0" workingDirectory="C:\Users\Administrator\DaticalDB"/> <shortcut KdeSubstUID="false" categories="" commandLine="" createForAll="false" description="This starts Datical DB" encoding="" group="true" icon="C:\Users\Administrator\DaticalDB\img\datical.ico" iconIndex="0" initialState="1" mimetype="" name="Datical DB" target="C:\Users\Administrator\DaticalDB\datical.exe" terminal="" terminalOptions="" tryexec="" type="1" url="" usertype="0" workingDirectory="C:\Users\Administrator\DaticalDB"/> <shortcut KdeSubstUID="false" categories="" commandLine="-jar &quot;C:\Users\Administrator\DaticalDB\Uninstaller\uninstall.jar&quot;" createForAll="false" description="Datical DB Uninstaller" encoding="" group="true" icon="C:\Users\Administrator\DaticalDB\img\recycle.ico" iconIndex="0" initialState="0" mimetype="" name="Datical DB Uninstaller" target="C:\Program Files (x86)\Java\jre1.8.0_271\bin\javaw.exe" terminal="" terminalOptions="" tryexec="" type="1" url="" usertype="0" workingDirectory=""/> </com.izforge.izpack.panels.ShortcutPanel> <com.izforge.izpack.panels.FinishPanel id="UNKNOWN (com.izforge.izpack.panels.FinishPanel)"/> </AutomatedInstallation>

 

 

Step 3: Call the following install.bat file

The following install.bat file can be called to perform the installation. The following values must be passed to the install.bat:

  1. home_dir, eg. C:\Users\Administrator (this needs to be the same <installpath> in Step 2)

  2. install_files_dir, eg. C:\Users\Administrator\datical_install (this needs to be the same as the datical_install directory in Step 1)

  3. Call the install.bat as: ./install.bat "C:\Users\Administrator" "C:\Users\Administrator\datical_install"

SET home_dir=%1 SET install_files_dir=%2 SET product_dir=%home_dir%\DaticalDB SET REPO=jar:file:/%install_files_dir%/datical.zip!/ echo 'Home Directory: %home_dir%' echo 'Product Directory: %product_dir%' echo 'Install Files Directory: %install_files_dir%' move %product_dir% %product_dir%-%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%-%time:~-11,2%-%time:~-8,2%-%time:~-5,2% rename %install_files_dir%\*.lic datical.lic rename %install_files_dir%\*.jar datical.jar rename %install_files_dir%\*CompositeRepo*.zip datical.zip cd install_files java -jar %install_files_dir%/datical.jar %install_files_dir%/install_script.xml echo 'Install License' call hammer installLicense %install_files_dir%\datical.lic echo 'Show License' call hammer show license echo 'Install Drivers for the CLI' call hammer installDrivers %REPO% echo 'Check Drivers for the CLI' call hammer checkDrivers echo 'Install Drivers for the GUI' %product_dir%\eclipsec.exe -application org.eclipse.equinox.p2.director ^ -noSplash ^ -repository %REPO% ^ -destination %product_dir% ^ -installIUs ^ com.datical.db.drivers.mssql.feature.feature.group,^ com.datical.db.drivers.oracle.feature.feature.group,^ com.datical.db.drivers.db2.feature.feature.group,^ com.datical.db.drivers.postgresql.feature.feature.group,^ com.datical.db.drivers.DaticalJDBC.feature.group %product_dir%\eclipsec.exe -application org.eclipse.equinox.p2.director ^ -noSplash ^ -repository %REPO% ^ -destination %product_dir%\repl ^ -installIUs ^ com.datical.db.drivers.mssql.feature.feature.group,^ com.datical.db.drivers.oracle.feature.feature.group,^ com.datical.db.drivers.db2.feature.feature.group,^ com.datical.db.drivers.postgresql.feature.feature.group,^ com.datical.db.drivers.DaticalJDBC.feature.group echo 'Copy license to repl folder for CLI' copy %install_files_dir%\datical.lic %product_dir%\repl echo 'Copy license to product folder for GUI' copy %install_files_dir%\datical.lic %product_dir%

Sample build.yml file for calling the install.bat script via a GitHub Action:

 

 

 

Copyright © Datical 2012-2020 - Proprietary and Confidential