Including Delphi Type Libraries in repository (SVN)?

霸气de小男生 提交于 2020-01-05 03:26:11

问题


What is the best way to save a Delphi Type Library in SVN.

The file changes every time you compile the Application

The file is not saved in a readable form of AscII

It is very difficult to work out what changes have been made from one version to the next

This is a major problem when more than one person is changing the file

QUESTIONS:

1) Should one save an exported ‘IDL’ file in the version control ?

2) Can one covert an ‘IDL ’ into a Delphi type library If so how ?

3) What are the best practices when working with a Delphi type library ?

4) How easy is it get rid of the type library in Delphi2009 datasnap project?

p.s. I am using BDS2006


回答1:


Prior to Delphi 2009, I would not check in the TLB file but manually put the TLB (and *_TLB.PAS file for reference) into a zip file then force that into version control. When ever I made actual changes to the TLB, I would update the zip file and check it in. The local TLB was always made read/write and ignored by the version control system. This scheme saved me several times when the TLB file would mysteriously no longer compile, I could just close my project, unzip from the zip file, reload the project and continue working.




回答2:


In Delphi 2009, this has changed completely. Type libraries are now saved in the project as plain text, RIDL files. These will play nice with source control. DataSnap is also completely changed; you can read about it here, and see a screencast here.




回答3:


There are some good answers to this question at Delphi and COM: TLB and maintenance issues.



来源:https://stackoverflow.com/questions/443226/including-delphi-type-libraries-in-repository-svn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!