PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
  • Principle
  • 1. Opening the "WD WDSETUP Plugin" project
  • 2. Adapting the "WD WDSETUP Plugin" project
  • 3. Generating the "WD WDSETUP Plugin" project library
  • 4. Modifying the setup program
  • Interactions with the plug-in according to the types of setup
  • Simple setup
  • Setup with automatic update in local network
  • Setup with automatic update by HTTP
  • Setup with automatic update on 2 levels (HTTP then LAN)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
In a setup program, you may want to customize some actions, add planes into the wizard, add new processes, ...
Until version 21, you had to modify the source code of the setup program by using the "WDSetup" project supplied with the product. For each new version, the modifications had to be applied to the new version of WDSetup. See Modifying WDSetup to manage additional languages for more details.
In version 21, you have the ability to create a plug-in and to modify the standard setup program. This plug-in is created form the "WD WDSETUP Plugin" example supplied with WINDEV.
This allows you to benefit from the evolutions of the standard setup while performing customizations.
How to proceed?

Principle

  1. Open the "WD WDSETUP Plugin" project.
  2. Modify the project.
  3. Generate the library.
  4. Modify the setup program of your application.
Note: See Interactions with the plug-in according to the types of setup to find out the order in which the procedures must be started according to the type of setup.

1. Opening the "WD WDSETUP Plugin" project

  1. Open the "WD WDSETUP Plugin" project. This project is available in the training examples of WINDEV.
    Note: We advise you to perform a backup copy of this example in order to customize it without any risk of overwriting when installing a new version.
  2. This sample project is used to create a sample plugin: associating the WDINFO file with the application.
  3. This project contains:
    • An internal window named "IW_INSTALLCUSTOMPLANE". This internal window corresponds to the new information displayed by the plug-in. Each plane of the internal window corresponds to a new wizard plane. To see the different planes in the editor, press the [Previous page] and [Next page] keys on the keyboard. The first plane corresponds to the example (associating the WDINFO file with the application).
    • A set of procedures named "SET_WDSETUPPLUGIN". This set of procedures contains the prototype procedures of procedures to modify for the plug-in.
    • A set of procedures named "SET_SHELL_ASSOCIATION". This set of procedures contains the procedures used by the plug-in example.

2. Adapting the "WD WDSETUP Plugin" project

To create a plug-in, the project must contain:
  • The set of procedures named "SET_WDSETUPPLUGIN".
  • An internal window.
  • A set of procedures containing the plug-in procedures.
The set of procedures named "SET_WDSETUPPLUGIN"

The set of procedures named "SET_WDSETUPPLUGIN" contains the prototype of functions that will be called by the main setup program. The name of these functions must not be modified.
The code of these functions must be filled according to the process that will be added into the plugin.
This functions are (in alphabetical order):
  • BeforeAutoModif: Procedure called before the automatic data modification.
  • AfterAutoModif: Procedure called after the automatic data modification.
  • BeforeInstall: Procedure called when starting the setup.
  • AfterInstall: Procedure called after the setup.
  • Startup: Procedure for initializing the plug-in, called when starting the setup.
  • BeforeUpload: Procedure called before sending by FTP (HTTP reference setup).
  • AfterUpload: Procedure called after sending by FTP (HTTP reference setup).
  • sCustomPlane: Procedure used to declare an internal window to display in the setup wizard.
    This procedure must:
    • return an empty string if there is no internal window to display,
    • return the name of the internal window to display during the call to the plugin ("IW_INSTALLCUSTOMPLANE" in the example).
To find out the sequence of functions according to the type of setup, see Interactions with the plug-in according to the types of setup.
The internal window

This internal window contains the different custom steps of the setup wizard. Each new step corresponds to a plane of the internal window. The planes of this internal window will be displayed in the setup wizard, before the plane for ending the setup.
The name of this internal window is not important. It must be used in the sCustomPlane procedure.
The internal window must contain:
  • one or more planes. These planes correspond to the information displayed by the plug-in.
  • 3 local procedures. These local procedures are used to manage the initialization of planes, to perform checks and to indicate the sequence of planes. The 3 procedures must respect the following prototypes:
    • Init: procedure used to initialize the controls found in the different planes.
    • bControl: procedure used to validate (or not) the move to the next plane (sequence of planes.
    • nNextPlane: procedure used to return the number of the plane to display (plane 1 by default).

3. Generating the "WD WDSETUP Plugin" project library

To generate the project library, on the "Project" pane, in the "Generation" group, click "Generate". The wizard for library creation starts. Follow the different wizard steps. The library is generated in the Exe directory of the project.

4. Modifying the setup program

To include the plug-in:
  1. Open the requested project in WINDEV.
  2. Start the wizard for creating the setup program: on the "Project" pane, in the "Generation" group, expand "Setup procedure" and select "Create the setup procedure".
  3. Create the executable and follow the different wizard steps.
  4. In the "Setup media" step, click the "Advanced options of installer" button.
  5. In the window that is displayed, display the "Plug-in" tab and select the file corresponding to the plug-in library that was created beforehand (wdl file).
  6. End the wizard for creating the setup program.
Note: The plug-in characteristics can also be defined in the setup editor WDInst ("Setup parameters .. Installer options").
Interactions with the plug-in according to the types of setup
This paragraph presents the different interactions between the setup and the plug-in. The available types of setup are as follows:

Simple setup

The steps for creating and installing an application with simple setup are as follows:
  • Wizard for setup creation/WDInst
    1. Choosing the different options: directories, tools, automatic data modification, ...
    2. Ability to add a customization plug-in via a library (.wdl) based on the "WD WDSETUP Plugin" project (optional).
    3. Generating the setup.
  • Starting the setup on the user computer
    1. If the plug-in is used, call to the "Startup" method.
    2. Displaying the first step of the setup (first plane).
    3. Displaying the different steps of the setup (planes corresponding to the destination directories, ...).
    4. If the plug-in is used, call to the "sCustomPlane" method.
      In case of custom planes, the internal window calls the "Init", "bControl" and "nNextPlane" procedures.
    5. In case of Synchronization of Deployed Data (SDD/Auto modif):
      • If the plug-in is used, call to the "BeforeAutoModif" method.
      • Starting the Synchronization of Deployed Data (SDD/Auto modif).
      • If the plug-in is used, call to the "AfterAutoModif" method.
    6. If the plug-in is used, call to the "BeforeInstall" method.
    7. Installing the application update
    8. If the plug-in is used, call to the "AfterInstall" method.
    9. Updating the registry if necessary.
    10. Updating the ini file if necessary.
    11. Starting the executable at the end of setup if this option was requested.

Setup with automatic update in local network

The steps for creating and installing an application with automatic update in local network are as follows:
  • Wizard for setup creation/WDInst
    1. Choosing the different options: directories, tools, automatic data modification, ...
    2. Ability to add a customization plug-in via a library (.wdl) based on the "WD WDSETUP Plugin" project (optional).
    3. Generate the setup.
  • Starting the setup to update the local reference server
    1. If the plug-in is used, call to the "Startup" method.
    2. Displaying the first step of the setup (first plane).
    3. Displaying the different steps of the setup (planes corresponding to the destination directories, ...).
    4. If the plug-in is used, call to the "sCustomPlane" method.
      In case of custom planes, the internal window calls the "Init", "bControl" and "nNextPlane" procedures.
    5. In case of Synchronization of Deployed Data (SDD/Auto modif):
      • If the plug-in is used, call to the "BeforeAutoModif" method.
      • Starting the Synchronization of Deployed Data (SDD/Auto modif).
      • If the plug-in is used, call to the "AfterAutoModif" method.
    6. If the plug-in is used, call to the "BeforeInstall" method.
    7. Installing the update of the reference version.
    8. If the plug-in is used, call to the "AfterInstall" method.
    9. Updating the registry if necessary.
    10. Updating the ini file if necessary.
  • Starting the reference setup on the user computer (or push or application update): see "Simple setup".

Setup with automatic update by HTTP

The steps for creating and installing an application with automatic update by HTTP are as follows:
  • Wizard for setup creation/WDInst
    1. Choosing the different options: directories, tools, automatic data modification, ...
    2. Ability to add a customization plug-in via a library (.wdl) based on the "WD WDSETUP Plugin" project (optional).
    3. Generate the setup.
  • Starting the setup to update the reference HTTP server
    1. If the plug-in is used, call to the "Startup" method.
    2. Displaying the step (plane) for updating the HTTP server by FTP.
    3. Uploading the update on the reference HTTP server.
    4. If the plug-in is used, call to the "AfterInstall" method.
  • Starting the HTTP setup from the user computer (or application update): see "Simple setup".

Setup with automatic update on 2 levels (HTTP then LAN)

The steps for creating and installing an application with automatic update on 2 levels (HTTP then LAN) are as follows:
  • Wizard for setup creation/WDInst
    1. Choosing the different options: directories, tools, automatic data modification, ...
    2. Ability to add a customization plug-in via a library (.wdl) based on the "WD WDSETUP Plugin" project (Optional).
    3. Generate the setup.
  • Starting the setup to update the reference HTTP server
    1. If the plug-in is used, call to the "Startup" method.
    2. Displaying the step (plane) for updating the HTTP server by FTP.
    3. If the plug-in is used, call to the "BeforeInstall" method.
    4. If the plug-in is used, call to the "BeforeUpload" method.
    5. Uploading the update on the reference HTTP server.
    6. If the plug-in is used, call to the "AfterUpload" method.
    7. If the plug-in is used, call to the "AfterInstall" method.
  • Starting the HTTP setup from a local reference server (or automatic update via the scheduled task if it is already installed): see "Setup with automatic update in local network".
Minimum required version
  • Version 21
Comments
Click [Add] to post a comment