|
|
|
|
|
- Overview
- How to?
- 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)
Customizing the setup program (Plug-in)
Warning
From version 2024, this feature is no longer available. To customize the setup program, you need to modify the WDSetup example. This example is provided with the product examples. For more details, see WDSetup: Manage additional languages.
In an installation program, it may be necessary to customize certain actions, to add plans to the wizard, to add new treatments, and so on. 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. For more details, see Modifying WDSetup to manage additional languages. 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 provided with WINDEV. This allows you to benefit from the evolutions of standard setup while performing customizations. 1. Opening the "WD WDSETUP Plugin" project - Open the "WD WDSETUP Plugin" project. This project is available in the training examples of WINDEV.
Note: It is advisable to make a copy of this example in order to customize it without the risk of overwriting it when installing a new version. - This example project is used to implement an example plugin: the association of the WDINFO file type with the WDINFO application.
- 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 step of the wizard. To see the different planes in the editor, press [Page Up] or [Page Down]. 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 automatic data modification.
- AfterAutoModif: Procedure called after automatic data modification.
- BeforeInstall: Procedure called at installation startup.
- AfterInstall: Procedure called after installation.
- Startup Plug-in initialization procedure, called when the installation is launched.
- BeforeUpload: Procedure called before FTP upload (HTTP reference installation).
- AfterUpload: Procedure called after FTP upload (HTTP reference installation).
- sCustomPlane Procedure for declaring an internal window to be displayed in the installation 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).
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 setup completion step. 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 for initializing the fields contained in the various plans.
- bControl procedure for confirming or rejecting the transition to the next plan (plan sequence).
- nNextPlane procedure to set the number of the plane to be displayed (default: plane 1).
3. Generating the "WD WDSETUP Plugin" project library To generate the project library, go to the "Project" tab, "Generation" group and click "Generate". The library creation wizard opens. Follow the different steps of the wizard. The library is generated in the Exe directory of the project. 4. Modifying the setup program To include the plug-in: - Open the desired project in WINDEV.
- Launch the wizard to create the installation program: in the "Project" pane, in the "Generation" group, pull down "Setup procedure" and select "Create installation procedure".
- Create the executable and follow the different steps of the wizard.
- In the "Setup media" step, click the "Advanced options of installer" button.
- 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).
- End the setup program creation wizard.
Note: Plug-in characteristics can also be defined in the WDInst installation editor ("Installation parameters .. Installer options" option).. 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: - Setup creation wizard/WDInst
- Choice of options: directories, tools, automatic data modification, etc.
- Ability to add a customization plug-in via a library (.wdl) based on the "WD WDSETUP Plugin" project (optional).
- Generating setup.
- Starting the setup on the user computer
- If the plug-in is used, call to the "Startup" method.
- Displaying the first step of the setup (first plane).
- Display of the various installation stages (plans corresponding to destination directories, etc.).
- 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. - 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.
- If the plug-in is used, call to the "BeforeInstall" method.
- Installing the application update
- If the plug-in is used, call to the "AfterInstall" method.
- Updating the registry if necessary.
- Updating the ini file if necessary.
- 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: - Setup creation wizard/WDInst
- Choice of options: directories, tools, automatic data modification, etc.
- Ability to add a customization plug-in via a library (.wdl) based on the "WD WDSETUP Plugin" project (optional).
- Generating the installation.
- Starting the setup to update the local reference server
- If the plug-in is used, call to the "Startup" method.
- Displaying the first step of the setup (first plane).
- Display of the various installation stages (plans corresponding to destination directories, etc.).
- 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. - 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.
- If the plug-in is used, call to the "BeforeInstall" method.
- Installing the update of the reference version.
- If the plug-in is used, call to the "AfterInstall" method.
- Updating the registry if necessary.
- Updating the ini file if necessary.
- Launch reference installation on user workstation (or push or update application): 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: - Setup creation wizard/WDInst
- Choice of options: directories, tools, automatic data modification, etc.
- Ability to add a customization plug-in via a library (.wdl) based on the "WD WDSETUP Plugin" project (optional).
- Generating the installation.
- Starting the setup to update the reference HTTP server
- If the plug-in is used, call to the "Startup" method.
- Displaying the step (plane) for updating the HTTP server by FTP.
- Uploading the update on the reference HTTP server.
- If the plug-in is used, call to the "AfterInstall" method.
- Launch HTTP installation from user station (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: - Setup creation wizard/WDInst
- Choice of options: directories, tools, automatic data modification, etc.
- Ability to add a customization plug-in via a library (.wdl) based on the "WD WDSETUP Plugin" project (Optional).
- Generating the installation.
- Starting the setup to update the reference HTTP server
- If the plug-in is used, call to the "Startup" method.
- Displaying the step (plane) for updating the HTTP server by FTP.
- If the plug-in is used, call to the "BeforeInstall" method.
- If the plug-in is used, call to the "BeforeUpload" method.
- Uploading the update on the reference HTTP server.
- If the plug-in is used, call to the "AfterUpload" method.
- If the plug-in is used, call to the "AfterInstall" method.
- Launch HTTP installation from local reference server (or automatic update via scheduled task if already installed): see "Setup with automatic update in local network".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|