Sign in Join
Wiki copytemporary

Code Conversion Guide/pt: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-Guia de conversão do Delphi para o Lazarus
2-
3-## Contents
4-
5- * 1 Sobre
6- * 2 Selecionando um componente ou biblioteca para conversão
7- * 2.1 Onde achar conteúdo para converter
8- * 2.2 Licenciamento
9- * 2.3 Dependências
10- * 2.4 Questões de Compilador
11- * 2.5 SO e problemas de plataforma
12- * 3 Fazendo a conversão
13- * 3.1 Montando o ambiente de Lazarus para um projeto de conversão
14- * 3.1.1 Crie um projeto teste
15- * 3.1.2 Termos iniciais para se cuidar
16- * 3.1.3 Fontes Delphi VCL, Kylix CLX no Lazarus
17- * 3.2 Problemas de conversão e soluções
18- * 3.2.1 Arquivos Delphi / Kylix equivalentes no Lazarus
19- * 3.2.2 Contentendo projetos/forms/units Delphi para Lazarus
20- * 3.2.3 Selecting the right compiler mode
21- * 3.2.4 Cross-Platform considerations
22- * 3.2.5 Useful compiler variables
23- * 3.2.6 Finding a missing identifier
24- * 3.2.7 Major unit differences between Lazarus and Delphi
25- * 3.2.8 Property and method differences Delphi -> FPC/LCL
26- * 3.2.9 Syntax differences
27- * 3.2.10 Resources
28- * 3.3 Another method to convert a Delphi or Kylix project to Lazarus
29- * 4 Getting Help
30- * 5 Packaging and Releasing your component
31- * 5.1 Creating a Lazarus package for your component(s)
32- * 5.2 Documentation
33- * 5.3 Creating a Code Release Page
34- * 5.4 Submitting the component
35- * 6 Contributors and Changes
1+Guia de conversão do Delphi para o Lazarus
362
373## Sobre
384
39-Esta página é sobre como converter um código para poder usá-lo no compilador [[Free Pascal]] e a IDE do Lazarus. O Lazarus e o Free Pascal tem aspectos em comum com o Delphi e Kylix, porém, não são clones. Há várias diferenças nos códigos e convenções... e em algumas áreas, o FPC pode exigir uma sintaxe mais correta. Por favor veja o guia [[Lazarus For Delphi Users]] para uma descrição de algumas das diferenças funcionais.
5+Esta página é sobre como converter um código para poder usá-lo no compilador [[Free Pascal]] e a IDE do Lazarus. O Lazarus e o Free Pascal tem aspectos em comum com o Delphi e Kylix, porém, não são clones. Há várias diferenças nos códigos e convenções... e em algumas áreas, o FPC pode exigir uma sintaxe mais correta. Por favor veja o guia [[Lazarus For Delphi Users]] para uma descrição de algumas das diferenças funcionais.
406
41-O propósito deste guia é documentar algumas das diferenças específicas que freqüentemente são encontradas durante o processo de conversão de código ao traduzir código existente de Delphi para Lazarus.
7+O propósito deste guia é documentar algumas das diferenças específicas que freqüentemente são encontradas durante o processo de conversão de código ao traduzir código existente de Delphi para Lazarus.
428
43-Este documento foi colocado na área de conhecimento-base de wiki para que assim pudesse ser ampliado facilmente por qualquer um que tenha encontrado um problema e gostaria de postar isto para outros estarem atentos
9+Este documento foi colocado na área de conhecimento-base de wiki para que assim pudesse ser ampliado facilmente por qualquer um que tenha encontrado um problema e gostaria de postar isto para outros estarem atentos
4410
4511## Selecionando um componente ou biblioteca para conversão
4612
4713### Onde achar conteúdo para converter
4814
49-Há MUITOS códigos possíveis na internet de serem convertidos para serem usados com o FPC e o Lazarus. Aqui tem uma [[Page Of Code Sites]] por onde você pode começar. Por favor adicione outro link se encontrar algum outro local. TurboPower Software recentemente seus produtos comerciais sob a MPL. Uma lista de packages disponíveis pode ser encontrado [aqui](<http://sourceforge.net/users/tpsfadmin/>).
15+Há MUITOS códigos possíveis na internet de serem convertidos para serem usados com o FPC e o Lazarus. Aqui tem uma [[Page Of Code Sites]] por onde você pode começar. Por favor adicione outro link se encontrar algum outro local. TurboPower Software recentemente seus produtos comerciais sob a MPL. Uma lista de packages disponíveis pode ser encontrado [aqui](http://sourceforge.net/users/tpsfadmin/).
5016
5117Para evitar retrabalho, packages que foram convertidas estão listadas em [[Components and Code examples]] Se você converteu uma package ou está convertendo, por favor adicione uma nota na página [[Current conversion projects]]
5218
5319### Licenciamento
5420
55-Licenças para a faixa de domínio de código existente freeware/domínio público para versões restritivas que proíbem a modificação, re-distribuição e uso comercial. Antes de converter qualquer pacote, é uma boa idéia analisar seu licenciamento e ter a certeza que ele vai ser compatível com o Lazarus e o compilador Free Pascal. Verificação de licença é especialmente importante com componentes, de vez que ao incorporar um a um formulário, isso pode impor a necessidade de obter uma licença, o que pode ser indesejável ​​ou incompatível para o aplicativo inteiro.
21+Licenças para a faixa de domínio de código existente freeware/domínio público para versões restritivas que proíbem a modificação, re-distribuição e uso comercial. Antes de converter qualquer pacote, é uma boa idéia analisar seu licenciamento e ter a certeza que ele vai ser compatível com o Lazarus e o compilador Free Pascal. Verificação de licença é especialmente importante com componentes, de vez que ao incorporar um a um formulário, isso pode impor a necessidade de obter uma licença, o que pode ser indesejável ​​ou incompatível para o aplicativo inteiro.
5622
57-Ao converter componentes, por favor, respeite os desejos do autor original e mantenha todos os direitos autorais e cabeçalhos de licenciamento junto com endereços de e-mail e url's. É cortês e, muitas vezes útil para informar o autor que a sua componente está sendo (ou foi) convertida... especialmente se o componente está sob uma licença restritiva. Novo interesse em um antigo ou esquecido componente, pode às vezes inspirar autores a revisar seus originais e excessivo licenciamento restritivo.
23+Ao converter componentes, por favor, respeite os desejos do autor original e mantenha todos os direitos autorais e cabeçalhos de licenciamento junto com endereços de e-mail e url's. É cortês e, muitas vezes útil para informar o autor que a sua componente está sendo (ou foi) convertida... especialmente se o componente está sob uma licença restritiva. Novo interesse em um antigo ou esquecido componente, pode às vezes inspirar autores a revisar seus originais e excessivo licenciamento restritivo.
5824
59-Em geral, Domínio Público (freeware), e o LGPL/MPL são as formas de licenciamento mais flexível para a distribuição de componentes. Para mais informações, o site [Open Source Definition](<http://www.opensource.org/docs/definition.php>) é um bom lugar para iniciar. Há também diversas comparações disponíveis para ajudar a esclarecer como os vários tipos de licenças de trabalho e qual o impacto que terá sobre o código que está sendo vinculado. Procure por "open source license comparison"
25+Em geral, Domínio Público (freeware), e o LGPL/MPL são as formas de licenciamento mais flexível para a distribuição de componentes. Para mais informações, o site [Open Source Definition](http://www.opensource.org/docs/definition.php) é um bom lugar para iniciar. Há também diversas comparações disponíveis para ajudar a esclarecer como os vários tipos de licenças de trabalho e qual o impacto que terá sobre o código que está sendo vinculado. Procure por "open source license comparison"
6026
6127### Dependências
6228
63-Outro passo antes de começar a trabalhar em uma conversão é verificar se o código não tem dependências profundas de outros pacotes que podem não estar disponíveis ou representam um desafio considerável de conversão. Algumas ofertas de freeware obrigam ou se estendem a pacotes proprietários que freqüentemente não estão disponíveis ou vêm com licenças inadequadas.
29+Outro passo antes de começar a trabalhar em uma conversão é verificar se o código não tem dependências profundas de outros pacotes que podem não estar disponíveis ou representam um desafio considerável de conversão. Algumas ofertas de freeware obrigam ou se estendem a pacotes proprietários que freqüentemente não estão disponíveis ou vêm com licenças inadequadas.
6430
6531### Questões de Compilador
6632
67-Atualmente a versão estável 1.0.x do compilador Free Pascal não suporta interfaces, threads ou registros Variant. Se o código que você está convertendo necessita desses construtores, você terá que usar o ramo de desenvolvimento 1.1 do compilador ... que não é sempre garantido para trabalhar com Lazarus.
33+Atualmente a versão estável 1.0.x do compilador Free Pascal não suporta interfaces, threads ou registros Variant. Se o código que você está convertendo necessita desses construtores, você terá que usar o ramo de desenvolvimento 1.1 do compilador ... que não é sempre garantido para trabalhar com Lazarus.
6834
69-Veja também:
35+Veja também:
7036
71- * [Problemas conhecidos](<http://www.freepascal.org/probs.html>)
72- * [Unfixed bugs](<http://www.freepascal.org/bugs/db.php3?statusfield=Unfixed>)
37+- [Problemas conhecidos](http://www.freepascal.org/probs.html)
38+- [Unfixed bugs](http://www.freepascal.org/bugs/db.php3?statusfield=Unfixed)
7339
7440### SO e problemas de plataforma
7541
76-Lazarus e o compilador Free Pascal são cross-platform e ferramentas de desenvolvimento para serem usadas também em vários sistemas operacionais. Em contraste, a maioria dos códigos escritos em Delphi são especificamente escritos para rodar em um processador Intel sob Win32. Se o seu canditado a componente possui muito código específico da plataforma Win32, seria sábio procurar uma alternativa independente da plataforma. Mas não desista... é verdadeiramente incrível o suporte LCL.
42+Lazarus e o compilador Free Pascal são cross-platform e ferramentas de desenvolvimento para serem usadas também em vários sistemas operacionais. Em contraste, a maioria dos códigos escritos em Delphi são especificamente escritos para rodar em um processador Intel sob Win32. Se o seu canditado a componente possui muito código específico da plataforma Win32, seria sábio procurar uma alternativa independente da plataforma. Mas não desista... é verdadeiramente incrível o suporte LCL.
7743
7844## Fazendo a conversão
7945
8046### Montando o ambiente de Lazarus para um projeto de conversão
8147
8248#### Crie um projeto teste
8349
84- * Coloque o código a ser convertido em um subdiretório (ex: c:\convertdir)
85- * Abra-o com o Lazarus
86- * File->Save All para o subdiretório c:\convertdir. Os nomes para o Projeto e a Unit Default são opcionais.
87- * Abra em c:\convertdir a unit "main" para ser convertida * Adicione-a ao projeto: Project->Add Active Unit to Project
88- * Clique em Tools->Quick Syntax Check ou em Run->Build All para começar.
50+- Coloque o código a ser convertido em um subdiretório (ex: c:\convertdir)
51+- Abra-o com o Lazarus
52+- File-\>Save All para o subdiretório c:\convertdir. Os nomes para o Projeto e a Unit Default são opcionais.
53+- Abra em c:\convertdir a unit "main" para ser convertida * Adicione-a ao projeto: Project-\>Add Active Unit to Project
54+- Clique em Tools-\>Quick Syntax Check ou em Run-\>Build All para começar.
8955
9056#### Termos iniciais para se cuidar
9157
92- * Nomes de arquivos são sensíveis ao letras maiúsculas e minúsculas nos compiladores da série 1.0.x Se você estiver trabalhando com uma versão como essa, faça com que todos os seus arquivos sejam escritos em minúsculas, pois do contrário, você terá como frase de erro "File not found" - arquivo não encontrado.
58+- Nomes de arquivos são sensíveis ao letras maiúsculas e minúsculas nos compiladores da série 1.0.x Se você estiver trabalhando com uma versão como essa, faça com que todos os seus arquivos sejam escritos em minúsculas, pois do contrário, você terá como frase de erro "File not found" - arquivo não encontrado.
9359
9460#### Fontes Delphi VCL, Kylix CLX no Lazarus
9561
96-Ao converter fontes de Delphi/Kylix, é freqüentemente útil fazer uma declaração sobre o que uma função específica está fazendo. A IDE Lazarus pode analisar as fontes de Delphi/Kylix. Para isto, é necessário indicar o local dos arquivos para o compilador. Pode-se conseguir isso através do menu Environment->CodeTools Defines Editor->Insert Template
62+Ao converter fontes de Delphi/Kylix, é freqüentemente útil fazer uma declaração sobre o que uma função específica está fazendo. A IDE Lazarus pode analisar as fontes de Delphi/Kylix. Para isto, é necessário indicar o local dos arquivos para o compilador. Pode-se conseguir isso através do menu Environment-\>CodeTools Defines Editor-\>Insert Template
9763
9864### Problemas de conversão e soluções
9965
10066#### Arquivos Delphi / Kylix equivalentes no Lazarus
10167
102-Delphi / Kylix | Lazarus | Descrição
103----|---|---
104-.pas .dfm / .xfm .dcu / .dpu .dpr .res .dof / .kof \--- \--- \--- | .pas, .pp .lfm .o .lpr \--- \--- .lrs .lpi .ppu | Arquivo unit de Pascal Arquivos de dados do form Arquivo da unit compilada Arquivo do Projeto Arquivo de recursos Arquivo de opções do projeto Arquivo de recursos do Lazarus Arquivo de informações do projeto Arquivo de descrição de unit FPC
105-
106-#### Contentendo projetos/forms/units Delphi para Lazarus
107-
108-Renomeie ou copie o arquivo .dpr para um arquivo .lpr. Comente ou remova a diretiva
109-
110-{$R *.res}
111-
112-e adicione
113-
114-{$mode delphi}{$H+}
115-
116-ou
68+| | | |
69+|----|----|----|
70+| Delphi / Kylix | Lazarus | Descrição |
71+| .pas .dfm / .xfm .dcu / .dpu .dpr .res .dof / .kof --- --- --- | .pas, .pp .lfm .o .lpr --- --- .lrs .lpi .ppu | Arquivo unit de Pascal Arquivos de dados do form Arquivo da unit compilada Arquivo do Projeto Arquivo de recursos Arquivo de opções do projeto Arquivo de recursos do Lazarus Arquivo de informações do projeto Arquivo de descrição de unit FPC |
11772
118-{$mode objfpc}{$H+}
73+#### Contentendo projetos/forms/units Delphi para Lazarus
11974
120-no arquivo .lpr. A IDE do Lazarus pode através do menu Tools no item "Convert Delphi Project to Lazarus Project". Ele solicita um arquivo .dpr (Delphi Project) e o converte para um .lpr; mais tarde, também cria um .lpi.
75+Renomeie ou copie o arquivo .dpr para um arquivo .lpr. Comente ou remova a diretiva
12176
122-Existe várias maneiras de converter forms do Delphi através da IDE do Lazarus que realiza o trabalho da conversão do .dfm para o .lfm. Isso pode ser encontrado como item do menu Tools com o sob o nome "Convert DFM file to LFM". Clique nele, e na caixa de dialogo escolha seu arquivo .dmf e o conversor fará o resto.
77+{\$R *.res}
12378
124-Se você precisa converter a unit inteira (com ou sem um form), o Lazarus também inclui a opção de converter uma unit Delphi para uma Unit Lazarus, através do item "Convert Delphi unit to Lazarus unit" que fará o seguinte:
79+e adicione
12580
126- 1. renomeiará os arquivos .pas and .dfm para minúsculas.
127- 2. converterá .dfm para .lfm file (atualmente sem a verificação da validade do conteúdo; somente o formato)
128- 3. criará um arquivo .lrs vazio (o conteúdo será adicionado mais tarde)
129- 4. adicionará a diretiva
81+{\$mode delphi}{\$H+}
13082
131-{$mode delphi}
83+ou
13284
133- 5. substituirá as unidades Windows por LCLIntf
134- 6. adicionará units LResources se necessário (i.e., se o unit.lrs for usado;
85+{\$mode objfpc}{\$H+}
13586
136-o uso de LResources
87+no arquivo .lpr. A IDE do Lazarus pode através do menu Tools no item "Convert Delphi Project to Lazarus Project". Ele solicita um arquivo .dpr (Delphi Project) e o converte para um .lpr; mais tarde, também cria um .lpi.
13788
138-pode ser implementado a parte)
139- 7. removerá variáveis da unit
140- 8. removerá a diretiva
89+Existe várias maneiras de converter forms do Delphi através da IDE do Lazarus que realiza o trabalho da conversão do .dfm para o .lfm. Isso pode ser encontrado como item do menu Tools com o sob o nome "Convert DFM file to LFM". Clique nele, e na caixa de dialogo escolha seu arquivo .dmf e o conversor fará o resto.
14190
142-{$R *.dfm}
91+Se você precisa converter a unit inteira (com ou sem um form), o Lazarus também inclui a opção de converter uma unit Delphi para uma Unit Lazarus, através do item "Convert Delphi unit to Lazarus unit" que fará o seguinte:
14392
144- 9. adicionará a seção de inicialização e a diretiva
93+1. renomeiará os arquivos .pas and .dfm para minúsculas.
94+2. converterá .dfm para .lfm file (atualmente sem a verificação da validade do conteúdo; somente o formato)
95+3. criará um arquivo .lrs vazio (o conteúdo será adicionado mais tarde)
96+4. adicionará a diretiva
97+ {\$mode delphi}
98+5. substituirá as unidades Windows por LCLIntf
99+6. adicionará units LResources se necessário (i.e., se o unit.lrs for usado;
100+ o uso de LResources
145101
146-{$i unit.lrs}
102+ pode ser implementado a parte)
103+7. removerá variáveis da unit
104+8. removerá a diretiva
105+ {\$R *.dfm}
106+9. adicionará a seção de inicialização e a diretiva
107+ {\$i unit.lrs}
147108
148-Isto fará uma conversão rápida e fácil da maioria das Units Delphi ao formato do Lazarus. Isto não checa a validade, ou muda a sintaxe automática. Assim, qualquer mudança na sintaxe, mudanças adicionais nos nomes das Units, mudanças necessárias por causa de diferenças nos objetos/controles, você terá que fazer manualmente.
109+Isto fará uma conversão rápida e fácil da maioria das Units Delphi ao formato do Lazarus. Isto não checa a validade, ou muda a sintaxe automática. Assim, qualquer mudança na sintaxe, mudanças adicionais nos nomes das Units, mudanças necessárias por causa de diferenças nos objetos/controles, você terá que fazer manualmente.
149110
150111#### Selecting the right compiler mode
151112
152-The [[Free Pascal]] Compiler supports 5 different pascal modes. For example TP for turbo pascal, lets you compile turbo pascal units. There is also a DELPHI compatibility mode that can be set to make existing code easier to convert. Lazarus prefers the OBJFPC mode, which almost equals the DELPHI mode, but is less ambigious than the Delphi syntax. Here are the important points:
113+The [[Free Pascal]] Compiler supports 5 different pascal modes. For example TP for turbo pascal, lets you compile turbo pascal units. There is also a DELPHI compatibility mode that can be set to make existing code easier to convert. Lazarus prefers the OBJFPC mode, which almost equals the DELPHI mode, but is less ambigious than the Delphi syntax. Here are the important points:
153114
154-The mode can be selected at command line or at the start of the source. Using the command line has the advantage, that you don't need to change the source, but the disadvantage, that others must be told.
115+The mode can be selected at command line or at the start of the source. Using the command line has the advantage, that you don't need to change the source, but the disadvantage, that others must be told.
155116
156-Most Delphi units can be compiled by the [[Free Pascal]] compiler by adding
157-```
158-{$IFDEF FPC}
159- {$MODE DELPHI}
160- {$ENDIF}
161-```
117+Most Delphi units can be compiled by the [[Free Pascal]] compiler by adding
162118
163-right after the unit name.
119+`{$IFDEF FPC}`\
120+`  {$MODE DELPHI}`\
121+`{$ENDIF}`
164122
165-For more details about [[Free Pascal]] modes see the [Free Pascal Documentation](<http://www.freepascal.org/docs-html/prog/progap4.html#progse62.html>)
123+right after the unit name.
166124
125+For more details about [[Free Pascal]] modes see the [Free Pascal Documentation](http://www.freepascal.org/docs-html/prog/progap4.html#progse62.html)
126+
167127#### Cross-Platform considerations
168128
169- * Inline assembler is always a problem because it will bind the code to the Intel architecture. Some developers do algorithm prototypes in Pascal and ifdef the their optimized assembler. Fortunately TurboPower did this in numerous places with their code. If this is the case with the package you're converting, throw the switch back to Pascal.
170- * Don't reference specific memory location like the BIOS data area. Find out what the code needs and try to find a cross platform alternative.
171- * Don't do processor specific tricks (like using the Intel TSC) without enclosing your code in an ifdef for the platform the code needs... and providing an alternative for environments that don't have the hardware capability.
172- * If you need some OS specific code, then you can use IFDEFs. See below for a list of macros.
129+- Inline assembler is always a problem because it will bind the code to the Intel architecture. Some developers do algorithm prototypes in Pascal and ifdef the their optimized assembler. Fortunately TurboPower did this in numerous places with their code. If this is the case with the package you're converting, throw the switch back to Pascal.
130+- Don't reference specific memory location like the BIOS data area. Find out what the code needs and try to find a cross platform alternative.
131+- Don't do processor specific tricks (like using the Intel TSC) without enclosing your code in an ifdef for the platform the code needs... and providing an alternative for environments that don't have the hardware capability.
132+- If you need some OS specific code, then you can use IFDEFs. See below for a list of macros.
173133
174134#### Useful compiler variables
175135
176-To write code, that behaves on different systems differently, you can use the
136+To write code, that behaves on different systems differently, you can use the
177137
178-{$IFDEF Name}
138+{\$IFDEF Name}
179139
180-directives.
140+directives.
181141
182- * {$IfDef LCL}
142+- {\$IfDef LCL}
183143
184-This variable is defined, when using the LCL package. Useful to write code, that works with the LCL and Delphi.
144+This variable is defined, when using the LCL package. Useful to write code, that works with the LCL and Delphi.
185145
186- * {$IfDef FPC}
146+- {\$IfDef FPC}
187147
188-This variable is defined, when using the FPC compiler. Useful to write code, that works with FPC and Delphi.
148+This variable is defined, when using the FPC compiler. Useful to write code, that works with FPC and Delphi.
189149
190- * {$IfDef Unix}
150+- {\$IfDef Unix}
191151
192-,
152+ ,
193153
194-{$IfDef Win32}
154+ {\$IfDef Win32}
195155
196-, ...
156+ , ...
197157
198-Defined by FPC for the current Target OS. Delphi defines "Linux", "Win32" and "MSWindows". [[Free Pascal]] runs on much more platforms and so it is recommended to use the more general items. For example "Unix" is defined for Linux, FreeBSD, NetBSD and OpenBSD, where Lazarus already runs. Use
199-```
200-{$IfDef Linux}
201- {$Define Unix}
202- {$EndIf}
203-```
158+Defined by FPC for the current Target OS. Delphi defines "Linux", "Win32" and "MSWindows". [[Free Pascal]] runs on much more platforms and so it is recommended to use the more general items. For example "Unix" is defined for Linux, FreeBSD, NetBSD and OpenBSD, where Lazarus already runs. Use
204159
205-to work around this for Kylix.
160+`{$IfDef Linux}`\
161+`  {$Define Unix}`\
162+`{$EndIf}`
206163
207-For more details see the [Free Pascal Documentation](<http://www.freepascal.org/docs-html/prog/prog.html#QQ2-23-21>).
164+to work around this for Kylix.
208165
166+For more details see the [Free Pascal Documentation](http://www.freepascal.org/docs-html/prog/prog.html#QQ2-23-21).
167+
209168#### Finding a missing identifier
210169
211-There are differences in how the LCL is organized when compared to the Delphi VCL. If you get a "not found" compiler error about a major class or identifier, the chances are good that it's in a different unit. A complete cross reference can be found by grep'ing lazarus/docs/xml or the lcl subdirectory.
170+There are differences in how the LCL is organized when compared to the Delphi VCL. If you get a "not found" compiler error about a major class or identifier, the chances are good that it's in a different unit. A complete cross reference can be found by grep'ing lazarus/docs/xml or the lcl subdirectory.
212171
213-For example the commonly used tbutton typically throws an error in Delphi code because it's located in a unit named buttons.pp. The following command finds the correct unit very quickly (in the lazarus source directory):
214-```
215-grep -in ' tbutton =' lcl/*
216-```
172+For example the commonly used tbutton typically throws an error in Delphi code because it's located in a unit named buttons.pp. The following command finds the correct unit very quickly (in the lazarus source directory):
217173
218-
174+` grep -in ' tbutton =' lcl/*`
219175
220176#### Major unit differences between Lazarus and Delphi
221177
222- * * Please add to this topic! **
178+- - Please add to this topic! **
223179
224- * Windows->Interfaces, LCLIntf, LCLType, LCLProc, VCLGlobals, ...)
180+- Windows-\>Interfaces, LCLIntf, LCLType, LCLProc, VCLGlobals, ...)
225181
226-As the LCL is not windows specific, the code that is in the Delphi Windows unit for directly accessing the Win32 API is abstracted into seperate interfaces, which can be accessed from the LCLIntf unit. Keep in mind, that Lazarus does not emulate win32, so many functions are missing and some do not work as their win32 counterparts. These functions only exist for Delphi compatibility and should only be used for quick & dirty porting. LCL also breaks out many of the types, so often LCLType, and sometimes VCLGlobals are required. LCLProc also contains a few functions which can be useful for lower level handling such as "FreeThenNil" as is in Delphi 5 and higher, "DeleteAmpersands" to remove additional ampersands from a string for controls(& vs && etc). The Interfaces unit needs to be included in the .lpr file to initialize the appropriate widgetset.
182+As the LCL is not windows specific, the code that is in the Delphi Windows unit for directly accessing the Win32 API is abstracted into seperate interfaces, which can be accessed from the LCLIntf unit. Keep in mind, that Lazarus does not emulate win32, so many functions are missing and some do not work as their win32 counterparts. These functions only exist for Delphi compatibility and should only be used for quick & dirty porting. LCL also breaks out many of the types, so often LCLType, and sometimes VCLGlobals are required. LCLProc also contains a few functions which can be useful for lower level handling such as "FreeThenNil" as is in Delphi 5 and higher, "DeleteAmpersands" to remove additional ampersands from a string for controls(& vs && etc). The Interfaces unit needs to be included in the .lpr file to initialize the appropriate widgetset.
227183
228- * Messages->LMessages
184+- Messages-\>LMessages
229185
230-TControl Messages for win32 event callbacks of the format WM_CALLBACK and the structs associated with them are often found in the Messages unit in Delphi. In the LCL these types of messages and there structs are usually found in LMessages, usually with name changes of WM to LM, so for instance WM_MOUSEENTER becomes LM_MOUSEENTER, and TWMMouse becomes TLMMouse.
186+TControl Messages for win32 event callbacks of the format WM_CALLBACK and the structs associated with them are often found in the Messages unit in Delphi. In the LCL these types of messages and there structs are usually found in LMessages, usually with name changes of WM to LM, so for instance WM_MOUSEENTER becomes LM_MOUSEENTER, and TWMMouse becomes TLMMouse.
231187
232- * Graphics, Controls->GraphTypes, GraphMath, Graphics, Controls
188+- Graphics, Controls-\>GraphTypes, GraphMath, Graphics, Controls
233189
234-To simplify some things and break complexity of circles between units, a few types have been abstracted into a shared unit called GraphType, which includes things, which in Delphi are located in Graphics or Controls, for instance the bvNone etc of panels. 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 ...
190+To simplify some things and break complexity of circles between units, a few types have been abstracted into a shared unit called GraphType, which includes things, which in Delphi are located in Graphics or Controls, for instance the bvNone etc of panels. 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 ...
235191
236- * Mask->MaskEdit
192+- Mask-\>MaskEdit
237193
238-For more intelligent naming considerations, the unit for TMaskEdit is called [MaskEdit|] instead of the slightly more nebulous Mask as in many versions of Delphi.
194+For more intelligent naming considerations, the unit for TMaskEdit is called \[MaskEdit\|\] instead of the slightly more nebulous Mask as in many versions of Delphi.
239195
240- * StdCtrls->StdCtrls,Buttons
196+- StdCtrls-\>StdCtrls,Buttons
241197
242-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.
198+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.
243199
244-#### Property and method differences Delphi -> FPC/LCL
200+#### Property and method differences Delphi -\> FPC/LCL
245201
246- * TBitmap contains a canvas in the LCL
202+- TBitmap contains a canvas in the LCL
247203
248204#### Syntax differences
249205
250206**Please add to this topic!**
251207
252-Because of the inherent strictness in FPC, some syntax changes are necessary, even though
208+Because of the inherent strictness in FPC, some syntax changes are necessary, even though
253209
254-{$Mode Delphi}
210+{\$Mode Delphi}
255211
256-does allow more laziness like Delphi does. For this reason complying as much with the syntax rules of
212+does allow more laziness like Delphi does. For this reason complying as much with the syntax rules of
257213
258-{$Mode ObjFPC}
214+{\$Mode ObjFPC}
259215
260-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 :
216+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 :
261217
218+When assigning an event handling entry point, prefix it with an "@"
219+
220+For instance, you might assign a button callback manually
221+
222+Delphi
223+
224+FPC
225+
226+begin
227+
228+if not
229+
230+Assigned(MyButton.OnClick)
231+
232+then
233+
234+`    MyButton.OnClick:= SomeFunction; `
235+
236+//@ not required
237+
238+//more code...
239+
240+end
241+
242+;
243+
244+begin
245+
246+if not
247+
248+Assigned(MyButton.OnClick)
249+
250+then
251+
252+`    MyButton.OnClick:= @SomeFunction; `
253+
254+//@ IS required
255+
256+//more code...
257+
258+end
259+
260+;
261+
262+When calling a procedure variable use this syntax
263+theprocname()
264+
265+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 -
266+
267+Delphi
268+
269+FPC
270+
271+With
272+
273+(SomeObject)
274+
275+do begin
276+
277+If
278+
279+Assigned(OnMyCallback)
280+
281+then
282+
283+`    OnMyCallback; `
284+
285+//parenthesis not required
286+
287+end
288+
289+;
290+
291+With
292+
293+(SomeObject)
294+
295+do begin
296+
297+If
298+
299+Assigned(OnMyCallback)
300+
301+then
302+
303+`    OnMyCallback(); `
304+
305+//parenthesis required
306+
307+end
308+
309+;
310+
311+When accessing values in a pointer to a record you must dereference first
312+
313+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,
314+
315+Delphi
316+
317+FPC
318+
319+Function
320+
321+GetSomeValue(ARecord: PMyRecord)
322+
262323
324+Integer;
263325
264-When assigning an event handling entry point, prefix it with an "@"
326+begin
265327
266-For instance, you might assign a button callback manually
328+If
267329
268-Delphi | FPC
269----|---
270-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;
330+Assigned(ARecord)
331+
332+then
333+
334+`    Result`
335+
271336
272-When calling a procedure variable use this syntax
273- theprocname()
337+=
274338
275-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 -
339+ARecord.SomeValue
276340
277-Delphi | FPC
278----|---
279-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;
341+else
342+
343+`    Result:= `
344+
345+0
346+
347+;
348+
349+end
350+
351+;
352+
353+Function
354+
355+GetSomeValue(ARecord: PMyRecord)
356+
280357
281-When accessing values in a pointer to a record you must dereference first
358+Integer;
282359
283-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,
360+begin
284361
285-Delphi | FPC
286----|---
287-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;
362+If
363+
364+Assigned(ARecord)
365+
366+then
367+
368+`    Result`
369+
288370
289-When accessing chars of an indexed string Property of an object, it must be enclosed in parentheses
371+=
290372
291-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
373+ARecord^.SomeValue
292374
293-Delphi | FPC
294----|---
295-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;
375+else
376+
377+`    Result:= `
378+
379+0
380+
381+;
382+
383+end
384+
385+;
386+
387+When accessing chars of an indexed string Property of an object, it must be enclosed in parentheses
388+
389+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
390+
391+Delphi
392+
393+FPC
394+
395+Type
396+
397+TSomeComponent=
398+
399+class
400+
401+(TComponent)
402+
403+//More code...
404+
405+Published
406+
407+Property
408+
409+MyString:
410+
411+String
412+
413+index
414+
415+3
416+
417+read
418+
419+GetMyString;
420+
421+//More code...
422+
423+End
424+
425+;
426+
427+var
428+
429+`  MyChar`
430+
296431
432+char;
433+
434+begin
435+
436+If
437+
438+Length(MyString)\>
439+
440+2
441+
442+then
443+
444+//no parenthesis needed
445+
446+`    MyChar:= MyString[`
447+
448+3
449+
450+\];
451+
452+//More code...
453+
454+end
455+
456+;
457+
458+Type
459+
460+TSomeComponent=
461+
462+class
463+
464+(TComponent)
465+
466+//More code...
467+
468+Published
469+
470+Property
471+
472+MyString:
473+
474+String
475+
476+index
477+
478+3
479+
480+read
481+
482+GetMyString;
483+
484+//More code...
485+
486+End
487+
488+;
489+
490+var
491+
492+`  MyChar`
493+
297494
495+char;
298496
299-You must typecast pointers to actual type when using with var or function of that type
497+begin
300498
301-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.
499+If
302500
303-For example -
501+Length(MyString)\>
304502
305-Delphi | FPC
306----|---
307-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;
503+2
504+
505+then
506+
507+//parenthesis sometimes needed
508+
509+`    MyChar:= (MyString)[`
510+
511+3
512+
513+\];
514+
515+//More code...
516+
517+end
518+
519+;
520+
521+You must typecast pointers to actual type when using with var or function of that type
522+
523+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.
524+
525+For example -
526+
527+Delphi
528+
529+FPC
530+
531+Unit 1
532+
533+Type
534+
535+TSomeObject=
536+
537+class
538+
539+(TComponent)
540+
541+//More code...
542+
543+End
544+
545+;
546+
547+Procedure
548+
549+DoSomething(Value: TSomeObject);
550+
551+Function
552+
553+GetSomeObject: TSomeObject;
554+
555+Unit 2
556+
557+Type
558+
559+TSomeComponent=
560+
561+class
562+
563+(TComponent)
564+
565+//More code...
566+
567+Published
568+
569+`  SomeObject: Pointer`
570+
571+;
572+
573+//More code...
574+
575+End
576+
577+;
578+
579+Application
580+
581+var
582+
583+`  MyComponent: TSomeComponent`
584+
585+;
586+
587+begin
588+
589+`  MyComponent.SomeObject`
590+
308591
309-#### Resources
592+=
310593
311-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.
594+GetSomeObject;
312595
313- * cd lazarus/tools
314- * make install
596+//More code...
315597
316-To add a resource to your application:
598+`  DoSomething(MyComponent.SomeObject)`
317599
318- * lazres myresource.lrs mypix.xpm anotherpix.xpm
319- * Add the LResources unit to your Uses clause
320- * Include the .lrs file you created under the initialization block
600+;
321601
322-Example:
602+end
323603
324-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.
325----
604+;
605+
606+Unit 1
607+
608+Type
609+
610+TSomeObject=
611+
612+class
613+
614+(TComponent)
615+
616+//More code...
617+
618+End
619+
620+;
621+
622+Procedure
623+
624+DoSomething(Value: TSomeObject);
625+
626+Function
627+
628+GetSomeObject: TSomeObject;
629+
630+Unit 2
631+
632+Type
633+
634+TSomeComponent=
635+
636+class
637+
638+(TComponent)
639+
640+//More code...
641+
642+Published
643+
644+`  SomeObject: Pointer`
645+
646+;
647+
648+//More code...
649+
650+End
651+
652+;
653+
654+Application
655+
656+var
657+
658+` MyComponent: TSomeComponent`
659+
660+;
661+
662+begin
663+
664+`  MyComponent.SomeObject`
665+
326666
667+=
668+
669+Pointer(GetSomeObject);
670+
671+//More code...
672+
673+`  DoSomething(TSomeObject(MyComponent.SomeObject))`
674+
675+;
676+
677+end
678+
679+;
680+
681+#### Resources
682+
683+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.
684+
685+- cd lazarus/tools
686+- make install
687+
688+To add a resource to your application:
689+
690+- lazres myresource.lrs mypix.xpm anotherpix.xpm
691+- Add the LResources unit to your Uses clause
692+- Include the .lrs file you created under the initialization block
693+
694+Example:
695+
696+function
697+
698+TForm1.LoadGlyph(
699+
700+const
701+
702+GlyphName:
703+
704+String
705+
706+): TBitMap;
707+
708+begin
709+
710+`  Result:= TPixmap.Create`
711+
712+;
713+
714+`  Result.LoadFromLazarusResource(GlyphName)`
715+
716+;
717+
718+end
719+
720+;
721+
722+//More code...
723+
724+begin
725+
726+`  Speedbutton1.glyph:= LoadGlyph('mypix')`
727+
728+;
729+
730+//More code...
731+
732+end
733+
734+;
735+
736+initialization
737+
738+{\$I unit1.lrs}
739+
740+{\$I myresource.lrs}
741+
742+end
743+
744+.
745+
327746### Another method to convert a Delphi or Kylix project to Lazarus
328747
329- * 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))
330- * Rename or copy .dpr file to .lpr
331- * Make necessary changes to .lpr file:
748+- 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))
749+- Rename or copy .dpr file to .lpr
750+- Make necessary changes to .lpr file:
332751
333- 1. Add {$mode delphi}{$H+} or {$mode objfpc}{H+} directives
334- 2. Add 'Interfaces' to uses clause
335- 3. Comment out or delete {$R *.res} or directive
752+1. Add {\$mode delphi}{\$H+} or {\$mode objfpc}{H+} directives
753+2. Add 'Interfaces' to uses clause
754+3. Comment out or delete {\$R *.res} or directive
336755
337- * Make necessary changes to all .pas unit files:
756+- Make necessary changes to all .pas unit files:
338757
339- 1. Add {$mode delphi}{$H+} or {$mode objfpc}{H+} directives
340- 2. Add 'LResources', and if the form has buttons, add 'Buttons' to uses clause
341- 3. Comment out or delete {$R *.dfm} or {$R *.xfm} directive
342- 4. Add 'Initialization' section at the end of each unit file, and add {$I unitname.lrs} directive in it
758+1. Add {\$mode delphi}{\$H+} or {\$mode objfpc}{H+} directives
759+2. Add 'LResources', and if the form has buttons, add 'Buttons' to uses clause
760+3. Comment out or delete {\$R *.dfm} or {\$R *.xfm} directive
761+4. Add 'Initialization' section at the end of each unit file, and add {\$I unitname.lrs} directive in it
343762
344- * Select Project->New Project form file
345- * Select the .lpr file
346- * At 'Create a new project' window, choose 'Application'
347- * 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.
348- * Save all, and you have a Lazarus project :-)
763+- Select Project-\>New Project form file
764+- Select the .lpr file
765+- At 'Create a new project' window, choose 'Application'
766+- 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.
767+- Save all, and you have a Lazarus project :-)
349768
350769## Getting Help
351770
352-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](<http://www.freepascal.org/docs-html/>) 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](<http://www.freepascal.org/maillist.html>) or the [FPC forums](<http://community.freepascal.org:10000/bboard/>) where a lot of experts are subscribed.
771+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](http://www.freepascal.org/docs-html/) 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](http://www.freepascal.org/maillist.html) or the [FPC forums](http://community.freepascal.org:10000/bboard/) where a lot of experts are subscribed.
353772
354-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](<http://www.tamaracka.com/search.htm>) engine specifically for the Borland usenet archives. Mer Systems Inc. provides a similar search [engine](<http://www.mers.com/searchsite.html>). Another outstanding source of information along with a sitewide [search](<http://www.efg2.com/Lab/search.htm>) capability is Earl F. Glynn's Computer Lab and Reference [Library](<http://www.efg2.com/>).
773+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](http://www.tamaracka.com/search.htm) engine specifically for the Borland usenet archives. Mer Systems Inc. provides a similar search [engine](http://www.mers.com/searchsite.html). Another outstanding source of information along with a sitewide [search](http://www.efg2.com/Lab/search.htm) capability is Earl F. Glynn's Computer Lab and Reference [Library](http://www.efg2.com/).
355774
356775## Packaging and Releasing your component
357776
358777### Creating a Lazarus package for your component(s)
359778
360-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.
779+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.
361780
362781### Documentation
363782
364-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.
783+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.
365784
366-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.
785+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.
367786
368787### Creating a Code Release Page
369788
370-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.
789+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.
371790
372-The following procedure will let you create a Code Release Page with your browser:
791+The following procedure will let you create a Code Release Page with your browser:
373792
374- * 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.
793+- 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.
375794
376- * Go to the [Component Release Template](</index.php?title=Component_Release_Template&action=edit&redlink=1> "Component Release Template \(page does not exist\)"), select all and copy. Hit the back button on your browser to return to the [[Components and Code examples]] page.
377- * Click on your new wiki component name entry and paste the release template into the blank edit box.
378- * Edit the template accordingly and hit save.
379- * Do edit-saves until your document looks the way you want it to.
795+- 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.
796+- Click on your new wiki component name entry and paste the release template into the blank edit box.
797+- Edit the template accordingly and hit save.
798+- Do edit-saves until your document looks the way you want it to.
380799
381800### Submitting the component
382801
383-If you're a release technician on the project, upload your component to the SourceForge File Release System and add it to the list of release packages. Otherwise send it to one of the project administrators ([ Tom Lisjac](</User:Tom> "User:Tom") or [ Vincent Snijders](</User:Vincent> "User:Vincent")) and we'll add it to the repository.
802+If you're a release technician on the project, upload your component to the SourceForge File Release System and add it to the list of release packages. Otherwise send it to one of the project administrators (Tom Lisjac or Vincent Snijders) and we'll add it to the repository.
384803
385-If you think you need to continue to develop on the component, we can also put it into CVS so you'll continue to have access to it.
804+If you think you need to continue to develop on the component, we can also put it into CVS so you'll continue to have access to it.
386805
387806## Contributors and Changes
388807
389-This page has been converted from the epikwiki [version](<http://lazarus-ccr.sourceforge.net/index.php?wiki=CodeConversionGuide>).
808+This page has been converted from the epikwiki [version](http://lazarus-ccr.sourceforge.net/index.php?wiki=CodeConversionGuide).
390809
391- * Initial version by Tom Lisjac and Mattias Gärtner - 9/22/2003 [ VlxAdmin](</User:Tom> "User:Tom")
392- * Moved Getting help from the main page. T. Lisjac - 9/24/2003 [ VlxAdmin](</User:Tom> "User:Tom")
393- * Added documentation templates, procedure and links. 9/25/2003 [ VlxAdmin](</User:Tom> "User:Tom")
394- * LCLLinux was renamed to LCLIntf, [ Jesus Reyes](</User:Jesusrmx> "User:Jesusrmx"), 9/27/2003
395- * added more information on Unit changes, [AndrewJohnson](<http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson>) 9/27/2003
396- * Updated Syntax differences, including some examples, [AndrewJohnson](<http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson>) 9/27/2003
397- * FPC 1.0.x doesn't support interfaces, [ Vincent Snijders](</User:Vincent> "User:Vincent") 9/28/2003
398- * Fixed some of the examples per new WikiWord definition, 9/28/2003 [ VlxAdmin](</User:Tom> "User:Tom")
399- * Made code more consistant to remove last accidental Pascal WikiWord definitions, [AndrewJohnson](<http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson>) 9/27/2003
400- * Use tables for code examples for nice blocks, and easy side by side view of Delphi->FPC differences, [AndrewJohnson](<http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson>) 10/17/2003
401- * Use pascal stylesheet to make example code more readable, [AndrewJohnson](<http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson>) 10/18/2003
402- * Some translations and small corrections in translations exist -> [User: jrxds](</index.php?title=User:Jrxds&action=edit&redlink=1> "User:Jrxds \(page does not exist\)") 12/01/2012
810+- Initial version by Tom Lisjac and Mattias Gärtner - 9/22/2003 VlxAdmin
811+- Moved Getting help from the main page. T. Lisjac - 9/24/2003 VlxAdmin
812+- Added documentation templates, procedure and links. 9/25/2003 VlxAdmin
813+- LCLLinux was renamed to LCLIntf, Jesus Reyes, 9/27/2003
814+- added more information on Unit changes, [AndrewJohnson](http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson) 9/27/2003
815+- Updated Syntax differences, including some examples, [AndrewJohnson](http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson) 9/27/2003
816+- FPC 1.0.x doesn't support interfaces, Vincent Snijders 9/28/2003
817+- Fixed some of the examples per new WikiWord definition, 9/28/2003 VlxAdmin
818+- Made code more consistant to remove last accidental Pascal WikiWord definitions, [AndrewJohnson](http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson) 9/27/2003
819+- Use tables for code examples for nice blocks, and easy side by side view of Delphi-\>FPC differences, [AndrewJohnson](http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson) 10/17/2003
820+- Use pascal stylesheet to make example code more readable, [AndrewJohnson](http://lazarus-ccr.sourceforge.net/index.php?wiki=AndrewJohnson) 10/18/2003
821+- Some translations and small corrections in translations exist -\> User: jrxds 12/01/2012
403822
404823---
405-*From the Free Pascal wiki, page "Code Conversion Guide/pt", as the Internet Archive kept it on 2025-02-15. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
824+*From the Free Pascal wiki, page "Code Conversion Guide/pt", as it stood on 2012-01-12 after a change by Jrxds, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history