Hello Gino,
adding a Custom Action to the installation is very simple (although I
will have to simplify this process in the near future ;-) )
I.
The source code for the CustomAction has to be defined in cvs module
setup_native (setup_native/source/win32/customactions). You can create a
new library or use an existing library for which you create a new entry
point for the Windows Installer.
II.
(Only if you create a new library) A new library has to be defined in
scp2. Then it will be included into the installation set.
Example in file_library_ooo.scp:
#ifdef WNT
File gid_File_Lib_Reg4msdocmsi
TXT_FILE_BODY;
Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
Dir = gid_Dir_Program;
Name = "reg4msdocmsi.dll";
End
#endif
Flags:
BINARYTABLE: The file is included into the msi database.
BINARYTABLE_ONLY: The file is not installed into the program-directory,
it is only part of the msi database.
III.
The entry point of the library has to be defined for the Windows
Installer. This has to happen in the future also in the scp project, but
is currently only implemented in cws module solenv
(solenv/bin/make_installer.pl).
At the end of the file you find the following three code lines:
# adding the custom action for the regactivex in executesequence table
into the product (CustomAc.idt and InstallE.idt)
$added_customaction =
installer::windows::idtglobal::set_custom_action($customactionidttable,
$binarytable, "Regactivexdll1", "65", "regactivex.dll",
"InstallActiveXControl", 1, $filesinproductlanguageresolvedarrayref,
$customactionidttablename);
if ( $added_customaction ) {
installer::windows::idtglobal::add_custom_action_to_install_table($installexecutetable,
"regactivex.dll", "Regactivexdll1", "\&FEATURETEMPLATE=3 And Not PATCH",
"end", $filesinproductlanguageresolvedarrayref, $installexecutetablename); }
First "set_custom_action" sets "$added_customaction" only to true, if
the library is part of the product. It defines the CustomAction in the
table "CustomAction". Therefore you need a Custom Action name
("Regactivexdll1"), the correct type ("65", means 1+64, 1: library in
binary table, 64: synchronous execution, ignoring exit code), the
library ("regactivex.dll"), the entry point (target
"InstallActiveXControl") and a value ("1") showing that the library is
part of the binary table.
If the Custom Action was added (returning $added_customaction) it has to
be called in the InstallExecuteSequence or in the InstallUISequence (or
both). The necessary line is written into the table in the function
"add_custom_action_to_install_table". Parameter are again the library
name, the name of the Custom Action, a condition and a position in the
table.
That's it. Then you have to build setup_native, scp2 and
instsetoo_native and everything should work fine.
Regards
Ingo
Gino wrote:
hello everybody.
I want to add a custom action in openoffice.org win32 installation.
what should I do? and where could I find documents talking about the
custom action?
thank you. :-)
Regards
Gino
June.07.2005
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]