Bom dia.
Tenho um componente "XBoleto" na empresa onde trabalho.
Esse componente XBoleto utiliza os fontes de boleto do ACBr para emitir boleto.
Precisei atualizar o ACBr hoje (não era atualizado há bastante tempo)... e após a atualização, ao entrar no projeto do XBoleto e tentar dar um build nele, deu erro de unit não encontrada. Até, aí tudo bem, pois fui adicionando os caminhos no path
do Delphi, conforme necessário.
Após adicionar todos os caminhos necessários no path, consegui dar build no meu projeto.
Porém ao tentar desinstalar/instalar o componente novamente, deu o seguinte erro:
Eu utilizo o ACBr apenas para emissão de boleto.
Esse "spdgovbase_d10t.bpl" é referente ao componente da Tecnospeed (utilizo para transmitir nota fiscal).
Ao procurar no fonte, verifiquei que o problema ocorre por causa do register da unit "ACBr\Fontes\Terceiros\Ole\ACBrMSXML2_TLB.pas".
Ele está tentando registrar o componente TDOMDocument40, mas esse nome já é utilizado por um componente utilizado pelo componente da Tecnospeed.
Vendo o fonte da unit ACBrMSXML2_TLB.pas, verifiquei que alguns nomes lá já estavam diferentes do original.
Por exemplo TDOMDocument30 estava como TmsDOMDocument30.
Então segui a mesma ideia e fui alterando o nome dos componentes que estava dando erro para adicionar esse "ms" (exemplo, DOMDocument40 para msDOMDocument40, DOMDocument50 para msDOMDocument50, de XSLTemplate40 para msXSLTemplate40, etc)
Isso resolveu o problema, aparentemente, pois consigo agora instalar o meu componente XBoleto normalmente.
No entanto, o problema está no trabalho que tive, pois até renomear todos os componentes/métodos que estavam dando problema, levei um bom tempo.
Se toda vez que eu precisar atualizar o ACBr, precisar fazer esse trabalho todo, se tornará um processo muito oneroso.
O que eu verifiquei nos comentários da unit ACBrMSXML2_TLB.pas é que é uma unit gerada automaticamente. E também achei o seguinte trecho:
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //
// $Rev: 52393 $
// File generated on 22/02/2017 03:07:20 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\WINDOWS\SysWow64\msxml5.dll (1)
// LIBID: {F5078F18-C551-11D3-89B9-0000F81FE221}
// LCID: 0
// Helpfile:
// HelpString: Microsoft XML, v5.0
// DepndLst:
// (1) v2.0 stdole, (C:\Windows\SysWOW64\stdole2.tlb)
// SYS_KIND: SYS_WIN32
// Errors:
// Hint: Symbol 'DOMDocument' renamed to 'msDOMDocument'
// Hint: Symbol 'DOMDocument26' renamed to 'msDOMDocument26'
// Hint: Symbol 'DOMDocument30' renamed to 'msDOMDocument30'
// Hint: Symbol 'FreeThreadedDOMDocument' renamed to 'msFreeThreadedDOMDocument'
// Hint: Symbol 'FreeThreadedDOMDocument26' renamed to 'msFreeThreadedDOMDocument26'
// Hint: Symbol 'FreeThreadedDOMDocument30' renamed to 'msFreeThreadedDOMDocument30'
// Hint: Symbol 'XMLSchemaCache' renamed to 'msXMLSchemaCache'
// Hint: Symbol 'XMLSchemaCache26' renamed to 'msXMLSchemaCache26'
// Hint: Symbol 'XMLSchemaCache30' renamed to 'msXMLSchemaCache30'
// Hint: Symbol 'XSLTemplate' renamed to 'msXSLTemplate'
// Hint: Symbol 'XSLTemplate26' renamed to 'msXSLTemplate26'
// Hint: Symbol 'XSLTemplate30' renamed to 'msXSLTemplate30'
// Hint: Symbol 'DSOControl' renamed to 'msDSOControl'
// Hint: Symbol 'DSOControl26' renamed to 'msDSOControl26'
// Hint: Symbol 'DSOControl30' renamed to 'msDSOControl30'
// Hint: Symbol 'XMLHTTP' renamed to 'msXMLHTTP'
// Hint: Symbol 'XMLHTTP26' renamed to 'msXMLHTTP26'
// Hint: Symbol 'XMLHTTP30' renamed to 'msXMLHTTP30'
// Hint: Symbol 'ServerXMLHTTP' renamed to 'msServerXMLHTTP'
// Hint: Symbol 'ServerXMLHTTP30' renamed to 'msServerXMLHTTP30'
// Hint: Symbol 'SAXXMLReader' renamed to 'msSAXXMLReader'
// Hint: Symbol 'SAXXMLReader30' renamed to 'msSAXXMLReader30'
// Hint: Symbol 'MXXMLWriter' renamed to 'msMXXMLWriter'
// Hint: Symbol 'MXXMLWriter30' renamed to 'msMXXMLWriter30'
// Hint: Symbol 'SAXAttributes' renamed to 'msSAXAttributes'
// Hint: Symbol 'SAXAttributes30' renamed to 'msSAXAttributes30'
// Hint: Parameter 'type' of IXMLDOMNode.nodeType changed to 'type_'
// Hint: Member 'implementation' of 'IXMLDOMDocument' changed to 'implementation_'
// Hint: Parameter 'type' of IXMLDOMDocument.createNode changed to 'type_'
// Hint: Parameter 'var' of IXMLDOMSchemaCollection.add changed to 'var_'
// Hint: Symbol 'type' renamed to 'type_'
// Hint: Parameter 'type' of ISchemaElement.type changed to 'type_'
// Hint: Parameter 'type' of ISchemaAttribute.type changed to 'type_'
// ************************************************************************ //
Ou seja, aparentemente esses componentes que já estavam renomeados quando abri a unit, foram renomeados por um processo automático,
então acredito que tem como eu executar algum passo para que da próxima vez que eu precise atualizar o ACBr eu não precise renomear todos os componentes manualmente novamente,
mas eu não sei qual o passo correto que eu preciso fazer.