From: Florent O. <ou...@us...> - 2006-03-23 21:30:34
|
Update of /cvsroot/jcl/jcl/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31288/install Modified Files: JclInstall.pas Removed Files: MSHelpServices_TLB.pas Log Message: Help 2.0 code moved to runtime units Fixed compilation of TLB files for BCB --- MSHelpServices_TLB.pas DELETED --- Index: JclInstall.pas =================================================================== RCS file: /cvsroot/jcl/jcl/install/JclInstall.pas,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** JclInstall.pas 22 Mar 2006 19:52:17 -0000 1.99 --- JclInstall.pas 23 Mar 2006 21:29:59 -0000 1.100 *************** *** 572,578 **** Help2HxSFile = 'JCLHelp.HxS'; Help2HxIFile = 'JCLHelp.HxI'; - Help2BorlandNameSpace = 'Borland.BDS%d'; - Help2Default = '_DEFAULT'; - JclChmHelpFile = 'help' + DirDelimiter + 'JCLHelp.chm'; --- 572,575 ---- *************** *** 1981,1990 **** procedure TJclInstallation.RegisterHelp2Files; var ! HxRegisterSession: IHxRegisterSession; ! HxPlugin: IHxPlugIn; ! HxRegister: IHxRegister; CurrentDir: string; ! NameSpace, Collection, Description, Identifier, HxSFile, HxIFile, ! BorlandNameSpace, Default: WideString; LangId: Integer; begin --- 1978,1984 ---- procedure TJclInstallation.RegisterHelp2Files; var ! Help2Manager: TJclHelp2Manager; CurrentDir: string; ! NameSpace, Collection, Description, Identifier, HxSFile, HxIFile: WideString; LangId: Integer; begin *************** *** 2002,2029 **** HxSFile := Help2HxSFile; HxIFile := Help2HxIFile; - BorlandNameSpace := Format(Help2BorlandNameSpace, [Target.VersionNumber]); - Default := Help2Default; CurrentDir := GetCurrentDir; if SetCurrentDir(Distribution.Path + 'help\') then try ! HxRegisterSession := CoHxRegisterSession.Create; ! ! // WARNING all interface methods are safecall ! // an OLE exception is raised on failure ! HxRegisterSession.CreateTransaction(''); ! WriteLog('Getting registration interface...'); ! if Supports(HxRegisterSession.GetRegistrationObject(HxRegisterSession_IHxRegister), IHxRegister, HxRegister) then ! begin ! WriteLog('...success'); ! WriteLog('Registering namespace...'); ! HxRegister.RegisterNamespace(NameSpace, Collection, Description); ! WriteLog('...success'); ! WriteLog('Registering help file...'); ! HxRegister.RegisterHelpFileSet(NameSpace, Identifier, LangId, HxSFile, HxIFile, '', '', 0, 0, 0, 0); ! WriteLog('...success'); ! end else WriteLog('...failed'); --- 1996,2019 ---- HxSFile := Help2HxSFile; HxIFile := Help2HxIFile; CurrentDir := GetCurrentDir; if SetCurrentDir(Distribution.Path + 'help\') then try ! Help2Manager := TJclBDSInstallation(Target).Help2Manager; ! if Help2Manager.CreateTransaction then ! WriteLog('Transaction created') ! else ! WriteLog('Failed to create a transaction'); ! ! WriteLog('Registering namespace...'); ! if Help2Manager.RegisterNameSpace(NameSpace, Collection, Description) then ! WriteLog('...success') ! else ! WriteLog('...failed'); ! WriteLog('Registering help file...'); ! if Help2Manager.RegisterHelpFile(NameSpace, Identifier, LangId, HxSFile, HxIFile) then ! WriteLog('...success') else WriteLog('...failed'); *************** *** 2031,2047 **** if OptionSelected(ioJclHelpHxSPlugin) then begin ! WriteLog('Getting plugin registration interface...'); ! if Supports(HxRegisterSession.GetRegistrationObject(HxRegisterSession_IHxPlugIn), IHxPlugin, HxPlugin) then ! begin ! WriteLog('...success'); ! WriteLog('Registering plugin...'); ! HxPlugin.RegisterHelpPlugIn(BorlandNameSpace, Default, NameSpace, Default, '', 0); ! WriteLog('...success'); ! end else ! WriteLog('Error: could not get plugin registration interface'); end; ! HxRegisterSession.CommitTransaction; finally SetCurrentDir(CurrentDir); --- 2021,2035 ---- if OptionSelected(ioJclHelpHxSPlugin) then begin ! WriteLog('Registering plugin...'); ! if Help2Manager.PlugNameSpaceInBorlandHelp(NameSpace) then ! WriteLog('...success') else ! WriteLog('...failed'); end; ! if Help2Manager.CommitTransaction then ! WriteLog('Transaction committed') ! else ! WriteLog('Failed to commit the transaction'); finally SetCurrentDir(CurrentDir); *************** *** 2260,2269 **** procedure TJclInstallation.UnregisterHelp2Files; var ! HxRegisterSession: IHxRegisterSession; ! HxPlugin: IHxPlugIn; ! HxRegister: IHxRegister; CurrentDir: string; ! NameSpace, Identifier, HxSFile, HxIFile, ! BorlandNameSpace, Default: WideString; LangId: Integer; begin --- 2248,2254 ---- procedure TJclInstallation.UnregisterHelp2Files; var ! Help2Manager: TJclHelp2Manager; CurrentDir: string; ! NameSpace, Identifier, HxSFile, HxIFile: WideString; LangId: Integer; begin *************** *** 2279,2330 **** HxSFile := Help2HxSFile; HxIFile := Help2HxIFile; - BorlandNameSpace := Format(Help2BorlandNameSpace, [Target.VersionNumber]); - Default := Help2Default; CurrentDir := GetCurrentDir; if SetCurrentDir(Distribution.Path + 'help\') then try ! try ! HxRegisterSession := CoHxRegisterSession.Create; ! ! // WARNING all interface methods are safecall ! // an OLE exception is raised on failure ! ! HxRegisterSession.CreateTransaction(''); ! ! WriteLog('Getting plugin registration interface...'); ! if Supports(HxRegisterSession.GetRegistrationObject(HxRegisterSession_IHxPlugIn), IHxPlugin, HxPlugin) then ! begin ! WriteLog('...success'); ! ! WriteLog('Unregistering plugin...'); ! HxPlugin.RemoveHelpPlugIn(BorlandNameSpace, Default, NameSpace, Default, ''); ! WriteLog('...success'); ! end ! else ! WriteLog('Error: could not get plugin registration interface'); ! WriteLog('Getting registration interface...'); ! if Supports(HxRegisterSession.GetRegistrationObject(HxRegisterSession_IHxRegister), IHxRegister, HxRegister) then ! begin ! WriteLog('...success'); ! WriteLog('Unregistering help file...'); ! HxRegister.RemoveHelpFile(NameSpace, Identifier, LangId); ! WriteLog('...success'); ! WriteLog('Unregistering namespace...'); ! HxRegister.RemoveNamespace(NameSpace); ! WriteLog('...success'); ! end ! else ! WriteLog('...failed'); ! HxRegisterSession.CommitTransaction; ! finally ! SetCurrentDir(CurrentDir); ! end; ! except end; end; --- 2264,2302 ---- HxSFile := Help2HxSFile; HxIFile := Help2HxIFile; CurrentDir := GetCurrentDir; if SetCurrentDir(Distribution.Path + 'help\') then try ! Help2Manager := TJclBDSInstallation(Target).Help2Manager; ! if Help2Manager.CreateTransaction then ! WriteLog('Transaction created') ! else ! WriteLog('Failed to create a transaction'); ! WriteLog('Unregistering plugin...'); ! if Help2Manager.UnPlugNameSpaceFromBorlandHelp(NameSpace) then ! WriteLog('...success') ! else ! WriteLog('...failed'); ! WriteLog('Unregistering help file...'); ! if Help2Manager.UnregisterHelpFile(NameSpace, Identifier, LangId) then ! WriteLog('...success') ! else ! WriteLog('...failed'); ! WriteLog('Unregistering namespace...'); ! if Help2Manager.UnregisterNameSpace(NameSpace) then ! WriteLog('...success') ! else ! WriteLog('...failed'); + if Help2Manager.CommitTransaction then + WriteLog('Transaction committed') + else + WriteLog('Failed to commit the transaction'); + finally + SetCurrentDir(CurrentDir); end; end; *************** *** 2671,2674 **** --- 2643,2650 ---- // $Log$ + // Revision 1.100 2006/03/23 21:29:59 outchy + // Help 2.0 code moved to runtime units + // Fixed compilation of TLB files for BCB + // // Revision 1.99 2006/03/22 19:52:17 outchy // Fixed c5 and d5 compilation |