Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

Understanding the PATCH flag


The flat PATCH has to be used, if a file shall be included into a patch product. The flag can be assigned at the moment to scp items "File" and "RegistryItem". So the patch can add or exchange files and write entries into the Windows Registry. The PATCH flag has to be assigned to every file, that was changed after the final release of a product, if this file shall be included into a following patch for this final release.

In the most simple case, you can just assign the PATCH flag directly in the scp project to a file. Example:

File gid_File_Bin_Open_Url
BIN_FILE_BODY;
Dir = gid_Dir_Program;
Name = "open-url";
Styles = (PACKED,PATCH);
End

or to a RegistryItem:

RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Productcode_Install
ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE";
ModuleID = gid_Module_Root;
Name = "INSTALLLOCATION";
Value = "";
Styles = (PATCH);
End

If the file is defined in a macro, there is a "PATCH"-macro available:

STD_RES_FILE( gid_File_Res_Abp, abp) # <- Not in Patch

STD_RES_FILE_PATCH( gid_File_Res_Abp, abp) # <- In Patch

The following macros are available, that already contain the PATCH flag:

PACKED_TXT_FILE_BODY_PATCH
ARCHIVE_TXT_FILE_BODY_PATCH
ARCHIVE_SUBST_FILE_BODY_PATCH
PACKED_LIB_FILE_BODY_PATCH
PACKED_FILTER_FILE_BODY_PATCH
STD_LIB_FILE_PATCH
STD_RES_FILE_PATCH
STD_FILTER_FILE_PATCH
STD_JAR_FILE_PATCH
UNO_JAR_FILE_PATCH
PACKED_UNO_LIB_FILE_BODY_PATCH
STD_UNO_LIB_FILE_PATCH
SPECIAL_UNO_LIB_FILE_PATCH
SPECIAL_UNO_COMPONENT_LIB_FILE_PATCH

A little bit more complicated is the case, if only a selection of files shall be integrated into a patch. This is relevant for all files, that are defined in scp project with style ARCHIVE. Such files can contain hundreds of files, from which only a very small number shall be integrated into the patch. Therefore this file has to get the flag PATCH and additionally a "Patchfiles" section, in which all files are listed in a comma separated list, that shall be included into the patch. Example:

File gid_File_Share_Config_Sofficecfg_uiconfig_Zip
TXT_FILE_BODY;
Styles = (ARCHIVE,PATCH);
Dir = gid_Dir_Share_Config_Sofficecfg;
Name = "uiconfig.zip";
Patchfiles = ("modules/dbbrowser/menubar/menubar.xml",
"modules/scalc/menubar/menubar.xml",
"modules/sglobal/accelerator/de/default.xml",
"modules/sglobal/accelerator/en-GB/default.xml",
"modules/sglobal/accelerator/en-US/default.xml",
"modules/sglobal/accelerator/es/default.xml",
"modules/sglobal/accelerator/fr/default.xml",
"modules/sweb/accelerator/de/default.xml",
"modules/sweb/accelerator/en-GB/default.xml",
"modules/sweb/accelerator/en-US/default.xml",
"modules/sweb/accelerator/es/default.xml",
"modules/sweb/accelerator/fr/default.xml",
"modules/swriter/accelerator/de/default.xml",
"modules/swriter/accelerator/en-GB/default.xml",
"modules/swriter/accelerator/en-US/default.xml",
"modules/swriter/accelerator/es/default.xml",
"modules/swriter/accelerator/fr/default.xml",
"modules/simpress/accelerator/de/default.xml",
"modules/simpress/accelerator/en-GB/default.xml",
"modules/simpress/accelerator/en-US/default.xml",
"modules/simpress/accelerator/es/default.xml",
"modules/simpress/accelerator/fr/default.xml",
"modules/simpress/menubar/menubar.xml",
"modules/sdraw/accelerator/de/default.xml",
"modules/sdraw/accelerator/en-gb/default.xml",
"modules/sdraw/accelerator/en-us/default.xml",
"modules/sdraw/accelerator/es/default.xml",
"modules/sdraw/accelerator/fr/default.xml",
"modules/sdraw/menubar/menubar.xml");
End

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.