- What is a patch?
- Operating mode of patches
- Re-creating an executable
- Patches and branches of SCM
Once an application was installed, the application library had to be reinstalled whenever a modification was performed (WDL file).
This operation can be tedious, for example:
- when the modification affects a single window out of 500 application windows
- when updating the application by Internet, because of the library size.
You have the ability to provide additional resources (windows, reports, ...) as patches. Patches are additional libraries.
If "The executable will take into account the updates by patch" was checked when creating the executable, the elements found in the patch will replace the elements found in the application library when starting the application.
What is a patch?
A patch is an additional library that contains the elements that will replace elements found in the source library.
A patch does not necessarily contain all the elements of the source WDL: only the modified elements are required.
The name of the patch files has the following format: <Name>.<WDL>.NNN (example: Application.WDL.001, Application.WDL.002, ...).
Operating mode of patches
A patch is automatically loaded when loading the library (WDL file) or when loading the executable that includes the library. To do so, the physical file corresponding to the patch must have the same name (without the extension) as the file corresponding to the library.
For example, the <Name>.WDL library accepts the patches named <Name>.WDL.001.
The <Name>.EXE executable with included WDL accepts the patches named <Name>.WDL.001.
If the library or the executable does not have the same name as the project, you must modify the physical name of the patch (without changing the extension).
Re-creating an executable
When the executable (or the entire WDL) is re-created, the patches created for the previous versions are ignored.
|Creating the executable version 1 that contains the "Window1" and Window2" windows.||File name: <ProjectName>.EXE|
|Creating a patch 001 that corrects the "Window1" window.|
When the application is run, the "Window1" window found in the patch will be taken into account.
|File name: <ProjectName>.WDL.001|
|Creating a patch 002 that corrects the "Window1" and "Window2" windows.|
When the application is run, the "Window1" and "Window2" windows found in the patch will be taken into account.
|File name: <ProjectName>.WDL.002|
|Creating the executable version 2 that contains the "Window1" and Window2" windows.|
This executable ignores the two previous patches. These patches can be deleted from the setup directory of the application (no automatic deletion is performed).
|File name: <ProjectName>.EXE|
|Creating a patch 003 that corrects the "Window1" window.|
When the application is run, the "Window1" window found in patch 003 will be taken into account.
|File name: <ProjectName>.WDL.003|
Patches and branches of SCM
You have the ability to create patches from a branch found in the SCM.
We advise you not to mix the patches performed in a branch with the ones of the main version.
To apply a modification performed in the main version, this operation must be performed in the sources of the branch then the patch must be generated from the branch.