This page outlines how to automate the Liquibase Enterprise GUI installation on a Windows machine using a .bat file.
...
Moves any existing DaticalDB / LiquibaseDesktop installation folder to DaticalDB-YYYY-MM-DD-hh-mm-ss
Renames the installation files from eg. DaticalDB-win32.win32.x86_64-78.175.7272229.jar to datical.jar, DaticalDBCompositeRepo-78.175.7272229.zip to datical.zip, and CustomerEnterpriseLicense.lic to datical.lic
Does a silent install of the GUI using an install_script.xml
Installs the Datical license
Installs the Datical drivers on the CLI
Installs the Datical drivers on the GUI
Copies the Datical license to the install’s repl folder
...
The below necessary files have been downloaded from http://software.datical.com and are located in a datical_install folder on the Windows machine, eg.
C:\Users\Administrator\datical_install
. Filenames need to end in .jar, .zip, and .lic.
Examples:DaticalDB-win32.win32.x86_64-7.XX.XXXX.jar
DaticalDBCompositeRepo-7.XX.XXXX.zip
CustomerEnterpriseLicense.lic
Ensure there is only one version of the install files located in the datical_install folder.
...
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.
...
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
Code Block |
---|
<?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 "C:\Users\Administrator\LiquibaseDesktop\Uninstaller\uninstall.jar"" 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.build scripts for this automation.
install_script.xml for versions 7.x
Code Block |
---|
<?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 "C:\Users\Administrator\DaticalDB\Uninstaller\uninstall.jar"" 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
...
home_dir, eg.
C:\Users\Administrator
(this needs to be the same <installpath> in Step 2)install_files_dir, eg.
C:\Users\Administrator\datical_install
(this needs to be the same as the datical_install directory in Step 1)Call the install.bat as:
./install.bat "C:\Users\Administrator" "C:\Users\Administrator\datical_install
(this needs to be the same as the datical_install directory in Step 1)"
Code Block |
---|
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:
...