Build Installer Process

From Vision
Revision as of 13:17, 6 April 2018 by Anw (talk | contribs) (Updated based on latest information)

Requirements

InnoSetup/InnoIDE installed on local PC. Version used here: 1.0.0.0078


Create Database Scripts

First, create the database structure and metadata SQL files. This can be done manually using MySQL Administrator or through the command line as follows:

MYSQL Administrator

Based on version 6.3

Dump the structure:

  • Connect to the database
  • Click Data Export on the Navigator tab
  • Check the database for tables to export (productivity1)
  • Check all tables and views for extraction
  • Select Dump Structure Only
  • Check Dump Stored Procedures and Functions
  • Select Export to Self-Contained File. Either accept the generated dump name and rename later or name it 'CreateDB-Struct.sql' now.
  • Check Include Create Schema
  • Optional: Check or uncheck Create Dump in a single transaction....
  • Click Start Export


Dump all the metadata:

  • Connect to the database
  • Click Data Export on the Navigator tab
  • Check the database for tables to export (productivity1)
  • Check all tables for data extraction as follows:
    • group_menus
    • last_numbers
    • master_plugin_parms
    • master_plugins
    • menu_groups
    • menu_screens
    • menus
    • ml_labels
    • ml_messages
    • rules
    • rule_category
    • rule_master
    • screens
    • system_auth
    • system_extract_points
    • system_extracts
    • system_styles
  • Select Dump Data Only
  • Uncheck Dump Stored Procedures and Functions
  • Select Export to Self-Contained File. Either accept the generated dump name and rename later or name it 'CreateDB-Data.sql' now.
  • Uncheck Include Create Schema
  • Optional: Check or uncheck Create Dump in a single transaction....
  • Click Start Export

Command Line

Dump all the metadata:

 >mysqldump.exe --no-create-info=TRUE --order-by-primary=FALSE --force=FALSE 
  --no-data=FALSE --tz-utc=TRUE --flush-privileges=FALSE --compress=FALSE 
  --replace=FALSE --insert-ignore=FALSE --extended-insert=FALSE --quote-names=TRUE 
  --hex-blob=FALSE --complete-insert=TRUE --add-locks=TRUE --disable-keys=TRUE 
  --delayed-insert=FALSE --create-options=TRUE --delete-master-logs=FALSE --comments=TRUE 
  --default-character-set=utf8 --max_allowed_packet=1G --flush-logs=FALSE --dump-date=TRUE 
  --lock-tables=TRUE --allow-keywords=FALSE --events=FALSE --host={host} --port=5306 
  --user=root --password={pwd} 
  --result-file=CreateDB-Data.sql 
  "productivity1"  "rules_category" "rules_master" "screens" "system_extract_points" 
  "system_extracts" "system styles" "menu_groups" "menus" "menu_screens" "group_menus"

Note: To dump all the data from a remote server (perhaps for support), remove everything after "productivity1"

Dump the structure:

 >mysqldump.exe --no-create-info=FALSE --order-by-primary=FALSE --force=FALSE 
  --no-data=TRUE --tz-utc=TRUE --flush-privileges=FALSE --compress=FALSE 
  --replace=FALSE --insert-ignore=FALSE --quote-names=TRUE 
  --hex-blob=FALSE --complete-insert=TRUE --add-locks=TRUE --disable-keys=TRUE 
  --delayed-insert=FALSE --create-options=TRUE --skip-extended-insert=TRUE 
  --delete-master-logs=FALSE --comments=TRUE --default-character-set=utf8 
  --max_allowed_packet=1G --flush-logs=FALSE --dump-date=TRUE --lock-tables=TRUE 
  --allow-keywords=FALSE --events=FALSE --routines 
  --result-file=CreateDB-Struct.sql 
  --host={host} --port=5306 --user=root --password={pwd} 
  "productivity1"

In these commands, replace {host} and {pwd} with your Vision Host IP address and root password.

Note: To load either file, you can use the following:

 >mysql.exe --host={host} --port=5306 --user=root --password={pwd} 
  --default-character-set=utf8 --comments <{SQL file}

Edit Metadata

The Data dump may contain data that is not required - edit the file.

  • Remove any group_menus that are not the basic menu (group 1)
  • Remove and menu_groups that are not the basic menu (group 1)
  • Remove all rules EXCEPT the first two (marked with '***'). Ensure these represent the lastest version that the installer is being built from and the latest patch file (by checking the latest in P:\271321 - Vision\_Installers\Releases)
  • Ensure all system_extracts are disabled by default.


Collate Files

Copy these files into your Vision development Database folder.

Copy all files to be distributed (including these files) and all subdirectories to a a clean Distribution folder, for building the installer. Typically this folder is C:\Inetpub\wwwroot\Vision, which should be different to your development directory. If using this folder, the standard Installer script need not be changed.

Build Installer

Open local copy or network copy of P:\271321 - Vision\_Installers\Installer\Vision.iss

Note Note: If not working on a local copy, ensure that your Distribution folder matches C:\Inetpub\wwwroot\Vision.

In the header of the install script, reflect the system version from which the app is being built (in MyAppVerName).

In the Setup section:

  • Change LicenseFile to point to your Distribution folder if necessary.
  • Change InfoBeforeFile to point to your Distribution folder if necessary.
  • Change AppCopyright to reflect the current year.
  • Change SetupIconFile to point to your Distribution folder if necessary.


In the Files section:

  • If any new screens or files have been added that are not already covered in the installer script, add them here.
  • Change the folder to point to your Distribution folder if necessary.

Click Compile. Any errors will be displayed and can be resolved from the Inno IDE.

Save all changes.

If working on a local copy, copy the changes back to the projects drive, first replacing the distribution folder as before if not set to C:\Inetpub\wwwroot\Vision.


In the project folder P:\271321 - Vision\_Installers\Installer\Output, copy and zip the file setup.exe to the parent folder and rename to:

  • INYYMMDDVision.zip

where YYMMDD is the date.


Build CD Contents

Copy the following files to P:\271321 - Vision\_Installers\CD Contents.

  • P:\271321 - Vision\_Installers\Installer\Output\setup.exe
  • Development Directory\Releases\Requirements.rtf
  • Development Directory\Releases\License.rtf

Edit CDBox.doc in this directory. Edit the document Custom properties as follows:

  • Date completed to the date the installer was built.
  • Version set to Major and Minor version ONLY of the build.
  • Optional: If building a CD for a specific client, update Client to the client name.

Update all fields in the document (CTRL-A, F9) and save.