Difference between revisions of "Code Conversion Guide/ja"

From Free Pascal wiki
Jump to navigationJump to search
Line 202: Line 202:
 
* Graphics, Controls->GraphTypes, GraphMath, Graphics, Controls に置き換えます。
 
* Graphics, Controls->GraphTypes, GraphMath, Graphics, Controls に置き換えます。
  
(グラフィックスのための)いくつかの事柄を簡素にしたり、ユニット間の複雑さの連鎖を断ち切るため、GraphTypeと呼ばれる共有ユニットで、いくつかの型が抽象化されました。それは、Delphiの中では、GraphicsやControlで定義されていたものを含んでいます。たとえば、PanelのbvNoneなどの定義などで、そのため、GraphTypeはインクルードしなくてはなりません。また、Delphiと互換性はありませんが、GraphMathという便利な機能をもつ
+
(グラフィックスのための)いくつかの事柄を簡素にしたり、ユニット間の複雑さの連鎖を断ち切るため、GraphTypeと呼ばれる共有ユニットで、いくつかの型が抽象化されました。それは、Delphiの中では、GraphicsやControlで定義されていたものを含んでいます。たとえば、PanelのbvNoneなどの定義などで、そのため、GraphTypeはインクルードしなくてはなりません。また、Delphiと互換性はありませんが、GraphMathという便利な機能をもつユニットがあります。それは、小数点の位置をもてるTFloatPointや、ベジェ曲線、直線、円弧などを扱えます。また、TPointやTRectの演算子オーバーロードをおこなっていますので、
 
+
点の位置を加算するのに
So sometimes you have to include it. Also a unit which, although incompatible with Delphi, adds other useful functionality is GraphMath, which adds a TFloatPoint for precision, misc routines for dealing with beziers, lines, and arcs, as well as some operator overloading for use with TPoints and TRect, such as for instance Point1 := Point2 + Point3, and comparing two rects like if (rect1 = rect2) then ...
+
 Point1 := Point2 + Point3 としたり、
 +
2個の矩形を比較するのに、
 +
 if (rect1 = rect2) then ...
 +
と書くことができるようになります。
  
 
* Mask->MaskEdit に置き換えます。
 
* Mask->MaskEdit に置き換えます。
Line 212: Line 215:
 
* StdCtrls->StdCtrls,Buttons に置き換えます。
 
* StdCtrls->StdCtrls,Buttons に置き換えます。
  
In many version of Delphi TButton is located in StdCtrls, while TSpeedButton and TBitBtn are in Buttons. For consistency and simplicity the LCL puts all button types in Buttons, which can occasionally break code conversion, so it is always a good idea to include.
+
多くのバージョンのDelphiでは、TButtonはStdCtrlsにありますが、TSpeedButtonやTBitBtnはButtonsユニットにあります。LCLでは、一貫性と簡潔性から、全てのボタンの定義はButtonでおこなっています。これは、includeするのにいいアイディアだと思いますよ。
  
 
==== Delphiのプロパティとメソッドの違い -> FPC/LCL ====
 
==== Delphiのプロパティとメソッドの違い -> FPC/LCL ====

Revision as of 11:53, 14 January 2007

Deutsch (de) English (en) español (es) français (fr) 日本語 (ja) português (pt) русский (ru) slovenčina (sk)

日本語版メニュー
メインページ - Lazarus Documentation日本語版 - 翻訳ノート - 日本語障害情報

このページでは、すでにDelphiやKylixで書いたコードを Free PascalコンパイラやLazarus IDEで動くようにするための方法を説明します。 LazarusとFree PascalコンパイラはDelphiやKylixと同じ方向性をもっていますが、LazarusやFree Pascalは、それらのクローンではありません。 沢山のライブラリコールや使い方に違いがあります。そして、いくつかの場面において、FPCは拡張されており、また、より正しい文法を要求することがあります。

Lazarus For Delphi Users/ja を見て、機能的な違いを確認してください。

このガイドの目的は、Delphiの既存のコードをLazarusに変換するときに、よく出会う特徴的な違いを、きちんと文書化することです。

この文書はWikiの知識ベースに置かれていますので、だれでも問題に出会ったときに他の人にも知らせることができるよう、拡張できます。

変換時のコンポーネントやライブラリの選択

変換するコードの場所を見つける

ネット上には、変換すればFPCやLazarusで使える、沢山の利用可能なコードがあります。たとえば、このページPage Of Code Sitesがスタートとなるでしょう。他のもっといいコードサイトのURLなどを知っていれば書き加えてください。

TurboPowerソフトウエア社は、最近彼らの商用製品をMPLのライセンスの元でリリースしました。使えるパッケージは、http://sourceforge.net/users/tpsfadmin/ ここ]にあります。 作業が重複するのを避けるため、変換されたパッケージはComponents and Code examplesページにあります。 もし、あなたが変換したパッケージや、変換中のものがあれば、Current conversion projects ページに書き加えてください。

ライセンス

Licenses for existing code range from freeware/public domain to restrictive versions that prohibit modification, re-distribution and commercial use. Before converting any package, it's a good idea to examine its licensing and make sure it's going to be compatible with Lazarus and the Free Pascal Compiler. License selection is especially important with components since dropping one on a form can impose an unwanted or incompatible license on an entire application.

When converting components, please respect the wishes of the original author and retain all copyright and licensing headers along with email addresses and url's. It's courteous and often useful to inform the author that their component is being converted... especially if the component is under a restrictive license. New interest in an old or forgotten component can sometimes inspire authors to revise their original and overly restrictive licensing.

In general, Public Domain (freeware), and the LGPL/MPL are the the most flexible for distributing components. For more information, the Open Source Definition is a good place to start. There are also several comparisons available to help clarify how the various types of licenses work and what impact they'll have on code they're linked to. Search for "open source license comparison"

依存関係

変換をはじめる前のもう一つのステップは、それらのコードが、利用できないか、簡単には変換できそうもない他のパッケージと深い依存関係をもっていないことを確認することです。 いくつかのフリーウエアはいまや使われないような利用できないパッケージや、あるいは適切でないライセンスをもつパッケージと結合しているか、拡張されていることがあります。

コンパイラの問題

下記を見てください:

プラットホームとOSの問題

LazarusとFree Pascal Compilerはクロスプラットホームであり、クロスプラットホームアーキテクチャ開発ツールです。DelphiのほとんどのコードはWin32でのインテルCPUで実行されるように設計されていることと比較してみてください。 もし、あなたのコンポーネントが多くのWin32に特化したコードを使っていれば、すこしでもプラットホームに依存しないようにしてみることをお勧めします。 しかし、多くのWindowsに特化したコードをつかっているからといって、LCLに挑戦することをやめないでください。本当にLCLはすばらしい機能を提供しています。

変換をおこなう

変換するプロジェクトのためのLazarusの環境を設定する

テストプロジェクトを作成する

  • サブディレクトリ(例: convertdir)に、変換されるほうのコードを置く。
  • Lazarusを起動する
  • File->Save All でthe convertdirのサブディレクトリに保存する。 プロジェクト名に意味の名前を付ける。デフォルトユニットの名前をつけるのは好きにしてよい。
  • converdirで、変換するメインとなるユニットを開く。
  • それをプロジェクトに加える。: Project->Add Active Unit
  • Run Tools->Quick Syntax Check をするか、 Run Build All で開始してみる。

最初に目を向ける事柄

  • 1.0.x系のコンパイラでは、ファイル名は大文字小文字を判別します。もし、このバージョンで作業していたら、全ファイル名を小文字にしてください。そうしなかったら、 "File not found" エラーになります。

Lazarus上でのDelphi VCL, Kylix CLXのソース

DelphiやKylixのソースを変換しているとき、特定の機能の関数がなにをやっているか、宣言を探すことは、よく役に立ちます。LazarusのIDEは、DelphiやKylixのソースコードを解析できます。これをするためには、検索パスとコンパイラ設定をきちんとおこなわなくてはなりません。これらは、Environment->CodeTools Defines Editor->Insert Templateで簡単におこなうことができます。

変換に関する問題と解決方法

LazarusでのDelphi / Kylix ファイルとの対応

Delphi / Kylix Lazarus Description
.pas

.dfm / .xfm .dcu / .dpu .dpr (main project file) .res .dof / .kof --- --- ---

.pas, .pp

.lfm .o .lpr --- --- .lrs .lpi (main project file) .ppu

Pascal unit file

Form data file Compiled unit file Project file Resource file Project options file Lazarus resource file Lazarus project information file FPC unit description file

Delphi プロジェクト/フォーム/ユニットを Lazarus に変換する

.dprファイルを.lprへcopyするか、名前を変更します。

{$R *.res}

ディレクティブをコメントアウトするか、削除して、

{$mode delphi}{$H+}

{$mode objfpc}{$H+}

ディレクティブを.lprファイルへ加えます。

Toolsメニューの中には、変換に便利な"Convert Delphi Project to Lazarus Project"という項目があり、lazarus IDEは変換を手助けします。 この項目を実行すると、.dprファイルを.lprに変換するかどうか聞きます。そして、.lpiファイルを作って、全てのユニットを変換します。多くのすでにあるDelphiフォームは、Lazarusが .dfmを.lfmフォームに変換します。これは、Toolsメニューの"Convert DFM file to LFM"という項目で出来ます。ファイルダイアログが立ち上がり、dfmファイルを選択すると、自動で変換をおこないます。

もしフォームであろうがなかろうが、全ユニットを変換する場合、Lazarusの"Convert Delphi unit to Lazarus unit"では次のようにおこないます。

  1. includeのファイル名とuses部分の大文字小文字を修正します。
  2. .dfm ファイルを .lfm ファイルに変換します。(currently without content check, just format)
  3. 空の.lrs ファイルを作成します。 (中身は後で生成されます。)
  4. {$mode delphi}
    ディレクティブを追加します。
  5. windowsユニットをLCLIntfに置き換えます。
  6. 必要であれば LResources ユニットを付け加えます。(もし unit.lrs が使われている場合
    uses LResources
    をimplementation 部分に入れます)
  7. variants ユニットは削除します。
  8. {$R *.dfm}
    ディレクティブは削除します。
  9. initialization 部分に
    {$i unit.lrs}
    ディレクティブを加えます。

この方法でほとんどのユニットをDelphiフォーマットをLazarusフォーマットへ迅速に変換できます。この方法は、正当性のチェックや、自動的な文法の変換をするものではありませんが、いろいろなウイザードがそのようなことや変換などををするので、文法上の変換したり、他のユニット名を変換したり、コンポーネントやコントロールの違いで、dfm/pasファイルを手で変更する必要はありません。

正しいコンパイラモードを選択する

Free Pascalコンパイラには5つの異なったパスカルモードがあります。たとえば、TPはTurbo Pascal互換モードですが、これをつかってTurbo Pascalのユニットをコンパイルできます。また、DELPHI互換モードがあり、既存のDELPHIコードの変換を簡単にします。Lazarusにおいては、DELPHIモードよりもOBJFPCモードをお勧めします。このモードはほとんどDELPHIのモードと似ていますが、DELPHIの文法よりもあいまいさがすくなくなっています。 下記に重要な点を示します。

モードはコマンドラインか、もしくは、ソースコードの最初に指定します。もしソースを変更する必要が無いなら、コマンドラインを使うほうが良いですが、他の諸々を指定しなくてはならない場合は、使わないほうが良いでしょう。

ほとんどのDelphiのユニットは下記のようにすることでFree Pascalでコンパイルできます。

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

ユニット名の直後におきます。

Free Pascalのモードについて、詳しくは、Free Pascal Documentation をご覧下さい。

クロスプラットホームで考慮すべきこと

  • インラインアセンブラは、大抵の場合インテルアーキテクチャに依存しているので問題を引き起こします。ある開発者たちは、Pascalでプロトタイプを書いて、IFDEFでアセンブラで最適化しています。幸いなことにTurboPower社では、そのように多くのコードを書いています。もしこういう場合を見つけたら、IFDEFでPascalに戻すようにしてください。
  • BIOSの特定のデータエリアを参照しないでください。コードが何をしようとしているのか見つけて、クロスプラットホーム環境ではどのように書いたらいいか、挑戦してみてください。

(訳注:おもにシリアル通信やパラレルの制御などで、特定のIOポートやハードウエアを制御していることがあるが、APIやエスケープファンクションに置換することができるが、そのようなものまでクロスプラットホームにできるようにPascalの標準IFが準備されているわけもないので、ある程度OSには依存してしまうだろう。)

  • 固有のプラットホームのためのIFDEFで囲むことなく、プロセッサの特殊な機能(IntelのTSC命令のような)を使わないでください。そして、別のハードウエアの環境のために、代わりとなる方法を提供できるようにしてください。
  • OSに依存するコードが必要なばあい、IFDEFを使ってください。下記にそのマクロのリストを示します。

便利なコンパイラ変数

異なったシステムで異なった動きをするコードを書くために、

{$IFDEF Name}

指令を使うことができます。

  • {$IfDef LCL}

この値はLCLパッケージを使っているときに定義されています。LCLとDelphiの両方で動くコードを書くときに便利です。

  • {$IfDef LCLGtk}
    ,
    {$IfDef LCLWin32}
    ,
    {$IfDef LCLQt}
    , ...

これらの値は、LCLが特定のwidgetsetで使われているときに定義されています。 LCLが特定のプラットホームで動くときのコードを書くときに便利です。

  • {$IfDef FPC}

この値はFPCコンパイラ定数を使っているときに定義されています。FPCとDelphiの両方で動くコードを書くときに便利です。

  • {$IfDef Unix}
    ,
    {$IfDef Win32}
    , ...

FPCによって現在のターゲットOSのために定義されています。Delphi(やKylix)は"Linux", "Win32" and "MSWindows"を定義します。Free Pascalはさらに多くのプラットホームで動作し、一般的に使われることが推奨されています。 たとえば、"Unix"はLinux、FreeBSD,NetBSD、OpenBSDで定義されていて、すでにLazarusが動いています。

Kylixでも動くようにするためには、

{$IfDef Linux}
  {$Define Unix}
{$EndIf}

としてください。

もっと詳しいことは、こちらをみてください。Free Pascal Documentation.

失った識別子を見つける

Delphi VCLと、LCLを比較すると構成の方法に違いがあります。 もし、"not found"というコンパイラエラーが、主要なクラスや識別子で出たときは、多くの場合異なったユニットにあります。

完全なクロスリファレンスは、lazarus/docs/xml か LCLのサブディレクトリをgrepしてください。

たとえば、一般的によく使われるTButtonのDelphiのコードは、Lazarusではbuttons.ppというユニットにあるので、コンパイル時にエラーになります。 次のコマンドは、正しいユニットをLazarusのソースディレクトリから高速に見つけ出します。

 grep -in ' tbutton =' lcl/*

LazarusとDelphiの主要なユニットの違い

このトピックに書き加えてください。

  • Windows->Interfaces, LCLIntf, LCLType, LCLProc, VCLGlobals, ...)に置き換えます。

LCLはWindowsに限ったものではないので、DelphiのWin32APIに直接アクセスするためのWindowsユニットは、インターフェースに抽象化されてLCLIntfユニットからアクセスするようになります。 覚えておいて頂きたいことは、Lazarusはwin32をエミュレートするのではないので、多くの関数が欠落していたり、Win32と同等な働きをしない関数があります。これらの関数はDelphiとの互換性だけのためにあり、とにかく移植するだけのためにあります。LCLは多くの型を利用し、LCLTypeやVCLGlobalsを必要とします。LCLProcは、FreeThenNilのようなDelphi5以降で導入された便利ないくつかの関数や、コントロールのばめに余分なアンパーサンドを取り除くDeleteAmpersandsのようなものを含みます。 Interfacesユニットは、適切なwidgetsetを初期化するための.lprファイルをインクルードするために必要です。

  • Messages->LMessagesに置き換えます。

Delphiでは、TControlメッセージ(Win32イベントコールバックでは、WM_CALLBACK形式になっています。)とそれらに関連するメッセージはMessageユニットにあります。 LCLでは、これらの型やメッセージ、構造体などの定義は、LMessagesユニットにあります。大抵の場合、WM_MOUSEENTER は LM_MOUSEENTER に、TWMMouse は TLMMouseに、といった具合に、WMをLMに変更されています。

  • Graphics, Controls->GraphTypes, GraphMath, Graphics, Controls に置き換えます。

(グラフィックスのための)いくつかの事柄を簡素にしたり、ユニット間の複雑さの連鎖を断ち切るため、GraphTypeと呼ばれる共有ユニットで、いくつかの型が抽象化されました。それは、Delphiの中では、GraphicsやControlで定義されていたものを含んでいます。たとえば、PanelのbvNoneなどの定義などで、そのため、GraphTypeはインクルードしなくてはなりません。また、Delphiと互換性はありませんが、GraphMathという便利な機能をもつユニットがあります。それは、小数点の位置をもてるTFloatPointや、ベジェ曲線、直線、円弧などを扱えます。また、TPointやTRectの演算子オーバーロードをおこなっていますので、 点の位置を加算するのに  Point1 := Point2 + Point3 としたり、 2個の矩形を比較するのに、  if (rect1 = rect2) then ... と書くことができるようになります。

  • Mask->MaskEdit に置き換えます。

TMaskEditのためのユニットは、多くのバージョンのDelphiのようにMaskという安直なものではなく、よりよい名前を考えると、[MaskEdit|] と呼んだほうがよいでしょう。

  • StdCtrls->StdCtrls,Buttons に置き換えます。

多くのバージョンのDelphiでは、TButtonはStdCtrlsにありますが、TSpeedButtonやTBitBtnはButtonsユニットにあります。LCLでは、一貫性と簡潔性から、全てのボタンの定義はButtonでおこなっています。これは、includeするのにいいアイディアだと思いますよ。

Delphiのプロパティとメソッドの違い -> FPC/LCL

  • LCLではTBitmapにCanvasがあります。

文法上の違い

Please add to this topic!

Because of the inherent strictness in FPC, some syntax changes are necessary, even though

{$Mode Delphi}

does allow more laziness like Delphi does. For this reason complying as much with the syntax rules of

{$Mode ObjFPC}

as possible is highly recommended, even when the codebase is still going to be shared between Delphi and the LCL. Some of these are simply better coding practices, and sometimes because Delphi mode is not entirely accurate, or in a few instances Delphi acceptible code does not function as expected with FPC, even though it might compile. To that end even though not all such are strictly required, the following list of changes should be considered mandatory :


When assigning an event handling entry point, prefix it with an "@"

For instance, you might assign a button callback manually

Delphi FPC
begin
if not
Assigned(MyButton.OnClick)
then
MyButton.OnClick:= SomeFunction;
//@ not required
//more code...
end
;
begin
if not
Assigned(MyButton.OnClick)
then
MyButton.OnClick:= @SomeFunction;
//@ IS required
//more code...
end
;
When calling a procedure variable use this syntax
theprocname()

In Delphi there is no difference between a function result and a variable, however there is in FPC, so to call a function, even if it has no parameters, you must append parenthesis. For Example -

Delphi FPC
With
(SomeObject)
do begin
If
Assigned(OnMyCallback)
then
OnMyCallback;
//parenthesis not required
end
;
With
(SomeObject)
do begin
If
Assigned(OnMyCallback)
then
OnMyCallback();
//parenthesis required
end
;
When accessing values in a pointer to a record you must dereference first

In Delphi it is not required to de-reference a pointer to a record to access values within it, it can, in fact, be treated just like the record itself, or any other object. In FPC it must be first de-referenced. As an example,

Delphi FPC
Function
GetSomeValue(ARecord: PMyRecord)
:
Integer;
begin
If
Assigned(ARecord)
then
Result
:=
ARecord.SomeValue
else
Result:=
0
;
end
;
Function
GetSomeValue(ARecord: PMyRecord)
:
Integer;
begin
If
Assigned(ARecord)
then
Result
:=
ARecord^.SomeValue
else
Result:=
0
;
end
;
When accessing chars of an indexed string Property of an object, it must be enclosed in parentheses

With Delphi it is possible to treat a Property exactly like some other const or var, even to accessing for instance individual chars of a string directly, while this is not always possible in FPC, specifically for indexed properties. Instead it must be enclosed in parentheses, to make distinct. While this may not always hold true it is probably a good practice to consider anyway. For example

Delphi FPC
Type
TSomeComponent=
class
(TComponent)
//More code...
Published
Property
MyString:
String
index
3
read
GetMyString;
//More code...
End
;
var
MyChar
:
char;
begin
If
Length(MyString)>
2
then
//no parenthesis needed
MyChar:= MyString[
3
];
//More code...
end
;
Type
TSomeComponent=
class
(TComponent)
//More code...
Published
Property
MyString:
String
index
3
read
GetMyString;
//More code...
End
;
var
MyChar
:
char;
begin
If
Length(MyString)>
2
then
//parenthesis sometimes needed
MyChar:= (MyString)[
3
];
//More code...
end
;


You must typecast pointers to actual type when using with var or function of that type

Sometimes in Delphi you will have a null pointer variable representing an object. While it might seem a complex situation, it is oddly quite common especially in large component packs as a method of preventing too many circular includes between objects in different units. In Delphi it is then possible to send this null pointer to a function expecting that object, without bothering to typecast to actual type, in fpc you must typecast.

For example -

Delphi FPC
Unit 1
Type
TSomeObject=
class
(TComponent)
//More code...
End
;
Procedure
DoSomething(Value: TSomeObject);
Function
GetSomeObject: TSomeObject;
Unit 2
Type
TSomeComponent=
class
(TComponent)
//More code...
Published
SomeObject: Pointer
;
//More code...
End
;
Application
var
MyComponent: TSomeComponent
;
begin
MyComponent.SomeObject
:=
GetSomeObject;
//More code...
DoSomething(MyComponent.SomeObject)
;
end
;
Unit 1
Type
TSomeObject=
class
(TComponent)
//More code...
End
;
Procedure
DoSomething(Value: TSomeObject);
Function
GetSomeObject: TSomeObject;
Unit 2
Type
TSomeComponent=
class
(TComponent)
//More code...
Published
SomeObject: Pointer
;
//More code...
End
;
Application
var
MyComponent: TSomeComponent
;
begin
MyComponent.SomeObject
:=
Pointer(GetSomeObject);
//More code...
DoSomething(TSomeObject(MyComponent.SomeObject))
;
end
;

リソース

Delphi resource files are win32 specific and not compatible with Lazarus, so you'll have to recreate and compile them using the lazres. Lazres can be found in the lazarus/tools subdirectory. If you've downloaded the Lazarus sources, you'll need to compile it first.

  • cd lazarus/tools
  • make install

To add a resource to your application:

  • lazres myresource.lrs mypix.xpm anotherpix.xpm
  • Add the LResources unit to your Uses clause
  • Include the .lrs file you created under the initialization block

Example:

function
TForm1.LoadGlyph(
const
GlyphName:
String
): TBitMap;
begin
Result:= TPixmap.Create
;
Result.LoadFromLazarusResource(GlyphName)
;
end
;
//More code...
begin
Speedbutton1.glyph:= LoadGlyph('mypix')
;
//More code...
end
;
initialization
{$I unit1.lrs}
{$I myresource.lrs}
end
.



DelphiやKylixプロジェクトをLazarusに変換する他の方法

  • Rename or copy all .dfm or .xfm files to .lfm (Early Delphi versions do not produce a text-based .dfm file. The convert utility, if present in the \bin folder can be used to covert the .dfm first))
  • Rename or copy .dpr file to .lpr
  • Make necessary changes to .lpr file:
  1. Add {$mode delphi}{$H+} or {$mode objfpc}{H+} directives
  2. Add 'Interfaces' to uses clause
  3. Comment out or delete {$R *.res} or directive
  • Make necessary changes to all .pas unit files:
  1. Add {$mode delphi}{$H+} or {$mode objfpc}{H+} directives
  2. Add 'LResources', and if the form has buttons, add 'Buttons' to uses clause
  3. Comment out or delete {$R *.dfm} or {$R *.xfm} directive
  4. Add 'Initialization' section at the end of each unit file, and add {$I unitname.lrs} directive in it
  • Select Project->New Project form file
  • Select the .lpr file
  • At 'Create a new project' window, choose 'Application'
  • Build project and make further necessary corrections to get proper compilation, at this point the .lpi file is generated automaticaly. You may also get 'Error reading Form' messages, click on 'Continue Loading' if you do.
  • Save all, and you have a Lazarus project :-)

ヘルプを見つける

If you encounter a problem during conversion that you just can't solve, there are a wide variety of places to get help. For pure Object Pascal and FPC issues, the best place to start is the Free Pascal Documentation by Michaël Van Canneyt and Florian Klämpfl. For more Lazarus oriented problems, the Lazarus Project Documentation in the Lazarus-CCR Knowledgebase Main Page is the next place to look. Finally you can post a question on any of the mailing lists for the Free Pascal Compiler or the FPC forums where a lot of experts are subscribed.

There are some outstanding search and knowledge bases online that can also be a great help for learning new techniques and solving problems. Tamarack Associates operates a fast search engine specifically for the Borland usenet archives. Mer Systems Inc. provides a similar search engine. Another outstanding source of information along with a sitewide search capability is Earl F. Glynn's Computer Lab and Reference Library.

コンポーネントをパッケージしてリリースする

コンポーネントのLazarusパッケージを作る

Creating a package makes installing the code you've converted a much easier process... especially if you're providing more then one component. Mattias Gärtner has written an overview of Lazarus Packages that should be read before beginning this process.

文書

The purpose of this site and the wiki format is to make the generation of professional documentation an easy and quick process. The wiki also makes it possible to see the results of your posting immediately and make any changes you'd like in real time.

Using the Lazarus-CCR wiki to create nice looking documentation is very easy. If you've never used wiki markup before, you can get familiar with it in the Sand Box practice area.

コードリリースページを作る

The Code Release Page contains vital information about your component that a potential downloader will need to know, such as license, intended platform, status (alpha, beta, stable...), where to download it, who wrote it, is support available... etc.

The following procedure will let you create a Code Release Page with your browser:

  • Edit the Components and Code examples page and add a project name wiki link entry for your component in the "Released Components" section. Save the modified page.
  • Go to the Component Release Template, select all and copy. Hit the back button on your browser to return to the Components and Code examples page.
  • Click on your new wiki component name entry and paste the release template into the blank edit box.
  • Edit the template accordingly and hit save.
  • Do edit-saves until your document looks the way you want it to.

コンポーネントをサブミットする

もし、プロジェクトのリリース技術者であれば、あなたのコンポーネントをSourceForgeファイルリリースシステムにアップロードして、リリースパッケージのリストに含めてください。そうでなければ、我々プロジェクト管理者(Tom Lisjac or Vincent Snijders)に送っていただければ、リポジトリに加えます。

もし、コンポーネントの開発を続ける必要性があるなら、CVSにおきます。そうすれば、それにアクセスし続けることができます。(訳注:現在はCVSではなくsub versionで管理している)

Contributors and Changes

This page has been converted from the epikwiki version.

  • Initial version by Tom Lisjac and Mattias Gärtner - 9/22/2003 VlxAdmin
  • Moved Getting help from the main page. T. Lisjac - 9/24/2003 VlxAdmin
  • Added documentation templates, procedure and links. 9/25/2003 VlxAdmin
  • LCLLinux was renamed to LCLIntf, Jesus Reyes, 9/27/2003
  • added more information on Unit changes, AndrewJohnson 9/27/2003
  • Updated Syntax differences, including some examples, AndrewJohnson 9/27/2003
  • FPC 1.0.x doesn't support interfaces, Vincent Snijders 9/28/2003
  • Fixed some of the examples per new WikiWord definition, 9/28/2003 VlxAdmin
  • Made code more consistant to remove last accidental Pascal WikiWord definitions, AndrewJohnson 9/27/2003
  • Use tables for code examples for nice blocks, and easy side by side view of Delphi->FPC differences, AndrewJohnson 10/17/2003
  • Use pascal stylesheet to make example code more readable, AndrewJohnson 10/18/2003
  • Added 'Another method to convert a Delphi or Kylix project to Lazarus' section , George Lober, 2/17/2006