Sign in Join
Wiki copytemporary

Getting Lazarus/ja: what changed

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

OldNewLine
11## リリース版のダウンロードとインストール
22
33### SourceForgeから
44
55いろいろなプラットホームのバイナリリリースが、SourceForgeのダウンロードエリアで配布されています。 [Lazarus Sourceforge download area](http://sourceforge.net/project/showfiles.php?group_id=89339).
66
77### プラットフォーム別
88
99Lazarus for Windows の取得 - 上記の Sourceforge へのリンクから取得してください。
1010
1111[[Lazarus release version for Ubuntu|Lazarus for Ubuntu の取得]]
1212
1313[[Install on Fedora|Lazarus for Fedora の取得]]
1414
1515[[Lazarus release version for Suse|Lazarus for Suse の取得]]
1616
1717[[Lazarus release version for Mandriva|Lazarus for Mandriva の取得]]
1818
1919[[Installing Lazarus on macOS|Lazarus for Mac の取得]]
2020
2121## SVN からの取得
2222
2323### TortoiseSVN クライアント
2424
2525Windows なら TortoiseSVN クライアントが使えます。 <http://tortoisesvn.tigris.org/> からダウンロードして下さい。
2626
2727[[TortoiseSvn|こちら]] で、SVN からのソースのダウンロードやアップデートのやり方について紹介しています。Lazarus だけでなく、FPC についても同じやり方で SVN からソースを取得できます。
2828
2929### Other clients
3030
3131その他の多くのプラットホーム用に、SVNコマンドラインクライアントがオフィシャルSVNサイト[website](http://subversion.tigris.org/)から提供されていますので、利用してください。
3232
3333Linuxでは、ディストリビューションのパッケージ管理システムを使ってsubversionをインストールすることをお勧めします。例えば次のようなコマンドを使います。
3434
35-`sudo apt-get install subversion`
35+```text
36+sudo apt-get install subversion
37+```
3638
3739## Lazarus SVN 開発版の取得
3840
3941### コマンドラインで使う
4042
4143最初にLazarusを取得するには:
4244
4345端末か、コマンドプロンプトを開いて、カレントディレクトリを、インストールしたい場所にLazarusディレクトリを作ってそこに移っておいてください。そして次のようにタイプします。:
4446
45-` svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus`
47+```text
48+ svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
49+```
4650
4751Lazarusのソースをアップデートするには:
4852
4953端末かコマンドプロンプトを開いて、Lazarusディレクトリに移った後、次のようにタイプします。:
5054
51-` svn update`
55+```text
56+ svn update
57+```
5258
5359コンパイルについては、こちらを参照してください。
5460
5561### そのほかのリポジトリのURL
5662
5763時々、先ほどのリポジトリはうまく動かないことがあります。なぜならsvnサーバーとの間にhttpプロクシサーバーがありからです。そのサーバーは通常'透過'プロクシとして動作するはずですが、あなたのsvnコマンドを正しくsvn.freepascal.orgサーバーへ渡さないことがあります。
5864
5965一方、svn.freepascal.orgサーバーは8080ポートでもソケットを受け付けます。おそらくプロクシはそのポートのhttpトラフィックにたいして関与しません。ですから、プロクシ経由で上手くいかないばあい、次を試してみてください。
6066
61-`svn co http://svn.freepascal.org:8080/svn/lazarus/trunk lazarus `
67+```text
68+svn co http://svn.freepascal.org:8080/svn/lazarus/trunk lazarus
69+```
6270
6371Lazarus svnリポジトリは\[\[fpsvnsync\]を使って15分後にsourceforgeにミラーされています。sourceforgeリポジトリはhttpsプロトコルを使います。sourceforgeを使う場合、次のコマンドを使います。
6472
65-`svn co https://svn.sourceforge.net/svnroot/lazarus/trunk lazarus`
73+```text
74+svn co https://svn.sourceforge.net/svnroot/lazarus/trunk lazarus
75+```
6676
6777FPCとLazarusのsvnリポジトリは、さらに svn2.freepascal.org へミラーされています。svn2.freepascal.org からチェックアウトする場合は次のコマンドを使います。
6878
69-`svn co http://svn2.freepascal.org/svn/lazarus/trunk lazarus`
79+```text
80+svn co http://svn2.freepascal.org/svn/lazarus/trunk lazarus
81+```
7082
7183もし、独自のプロクシサーバーがある場合や、友人のプロクシサーバーを借りてアクセスしている時は、プロクシにsvnコマンドを通過するように設定してください。設定の方法は次のとおりです。:
7284
7385<http://subversion.tigris.org/faq.html#proxy>
7486
7587ここにはsquidの例があります。クライアントにもproxyを使うように設定してください。(TortoiseSVNの場合は settings / networkを参照してください。)
7688
7789### スクリプト
7890
7991Lazarus を自動的にダウンロード、ビルドする、Windows と Linux 用のスクリプト: [[LazarusScripts|Scripts for Lazarus]]
8092
8193## Lazarus のコンパイルとインストール
8294
8395[[Installing Lazarus]] を参照してください - 詳しいインストールガイドです。または、 <http://www.stack.nl/~marcov/buildfaq.pdf> - さらに詳細なガイドです。
8496
8597### Using the command-line
8698
8799Lazarus is shipped with Makefile for gnu make util. (Be warned, if you also have Codegear (or Borland) tools installed, it might conflict with gnu "make" util).
88100
89101The tool allows you to compile the lazarus from command-line easily. You need to have fpc and fpc-packages installed and configured first.
90102
91103To compile go to Lazarus directory in your terminal and type
92104
93-` make`
105+```text
106+ make
107+```
94108
95109This should rebuild LCL and Lazarus IDE (with basic packages installed).
96110
97111### Make targets
98112
99113Following compiling targets can be specified for the make tool:
100114
101115- **clean** - the command will clean all compiled LCL and IDE units. Warning, this might make your project uncompilable (even though IDE still run, since binary is not deleted). For example: "*make clean*"
102116
103117- **bigide** - the command rebuilds LCL and IDE with additional packages. For example: "*make bigide*"
104118
105119- **lcl** - the command rebuild LCL only. IDE is left untouched. The command is very useful if you're making changes to LCL and need to test the changes on your project without breaking Lazarus. Rebuild LCL only is faster than rebuilding both LCL and IDE. For example: "*make lcl*"
106120
107121- **components**
108122- **packager/registration**
109123- **ideintf**
110124- **packager**
111125- **bigidecomponents**
112126- **ide**
113127- **idepkg**
114128- **idebig**
115129- **bigide**
116130- **starter** - the command rebuilds startlazarus binary.
117131- **lazbuilder**
118132- **tools**
119133- **all**
120134- **cleanide**
121135- **purge**
122136- **examples** - the command rebuilds examples lazarus
123137- **install**
124138- **lazbuild**
125139
126140If no target is specified LCL and IDE Lazarus (with basic set of components) is rebuilt.
127141
128142### Make parameters
129143
130144There're also additional parameters, can be used for 'making' Lazarus.
131145
132146- **OPT**=%compiler_switches
133147
134148the %compiler_switches is passed to each fpc call. The option is useful for specifying defines
135149
136150For example:
137151
138-` make bigide OPT="-dNoGdkPixBufLib -gw2" `
152+```text
153+ make bigide OPT="-dNoGdkPixBufLib -gw2"
154+```
139155
140156makes LCL and ide with NoGdkPixBufLib defined and dwarf2 debug info.
141157
142158- **LCL_PLATFORM**=%platform
143159
144160%platform is the target Widgetset. It can be win32,gtk,gtk2,qt,carbon or cocoa.
145161
146162For example:
147163
148-` make LCL_PLATFORM=gtk2`
164+```text
165+ make LCL_PLATFORM=gtk2
166+```
149167
150168Rebuilds LCL and IDE for gtk2 widgetset
151169
152170- **FPC**=%compiler_path
153171
154172%compiler_path is the path to a custom compiler binary you want to build the target with.
155173
156174## Getting FPC SVN development version
157175
158176Here are some hints how to get and install the development version of FPC (at the moment 2.5.1), which contains new features, bug fixes but is less stable and contains new bugs. The compiler is not included in the Lazarus SVN, but has its own FPC SVN. You *must* install first the latest released FPC. Download it from here <http://sourceforge.net/projects/freepascal/> and install, or see more details here: [[Installing Lazarus|Installing the Free Pascal Compiler]].
159177
160178Then create a directory and download FPC from SVN:
161179
162-`mkdir -p ~/freepascal`\
163-`cd ~/freepascal`\
164-`svn co `[`http://svn.freepascal.org/svn/fpc/trunk`](http://svn.freepascal.org/svn/fpc/trunk)` fpc`
180+```text
181+mkdir -p ~/freepascal
182+cd ~/freepascal
183+svn co http://svn.freepascal.org/svn/fpc/trunk fpc
184+```
165185
166186This will take some time.
167187
168188You can also use TortoiseSVN client on Windows as explained earlier.
169189
170190## FPC のコンパイルとインストール
171191
172192FPC のコンパイルとインストール方法はいくつかあります。
173193
174194- Use plain *make*.
175195- Build a FPC package for your Linux distribution (.deb or .rpm file). The package allows to easily uninstall, upgrade and downgrade FPC and makes sure that all files are installed at the common places. So if something goes wrong, other users know how to help you.
176196
177197In either case Lazarus must finally be configured for the new FPC.
178198
179199### Building and installing Free Pascal in UNIXe
180200
181201The following instructions work in UNIX platforms, such as Linux, but also Mac OS X.
182202
183203Building Free Pascal from source code can be useful in a number of situations. One example is when debugging a problem in the compiler, in the RTL or in the FCL. The distributed FPC installs come without debug info, but the install created from the makefiles constains debug info by default. Another use is testing the development version of the compiler, although often there are also snapshots available for that.
184204
185205Step 1 - Make sure you have a compatible starting compiler installed.
186206
187207Usually this will mean having installed the latest stable release.
188208
189209Step 2 - Download the source of the new compiler
190210
191211The first thing to do is downloading the Free Pascal source code for the version you desire to build. For example, to download the latest fixes 2.4 branch do:
192212
193-`svn checkout `[`http://svn.freepascal.org/svn/fpc/branches/fixes_2_4`](http://svn.freepascal.org/svn/fpc/branches/fixes_2_4)` fpcfixes2_4`
213+```text
214+svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 fpcfixes2_4
215+```
194216
195217Step 3 - Build the compiler
196218
197219Now enter the newly created directory and build and install Free Pascal:
198220
199-` cd fpcfixes2_4`\
200-` make clean all install INSTALL_PREFIX=~`
221+```text
222+ cd fpcfixes2_4
223+ make clean all install INSTALL_PREFIX=~
224+```
201225
202226This will compile the compiler in 3 cycles, first using the already installed compiler and then using the newly compiled compiler.
203227
204228It install all needed files in the specified directory. You can install to any other directory if needed. You just have to use the root account if the directory does not allow writing with your normal user account.
205229
206230Step 4 - Update your fpc.cfg file
207231
208232Then create a file
209233
210-` ~/.fpc.cfg`
234+```text
235+ ~/.fpc.cfg
236+```
211237
212238It is a hidden file (note the first dot). Enter the following contents to the file. If you installed to another directory, use that instead of your home dir.
213239
214-` #include /etc/fpc.cfg`\
215-` -Fu~/lib/fpc/$fpcversion/units/$fpctarget`\
216-` -Fu~/lib/fpc/$fpcversion/units/$fpctarget/*`\
217-` -Fu~/lib/fpc/$fpcversion/units/$fpctarget/rtl`
240+```text
241+ #include /etc/fpc.cfg
242+ -Fu~/lib/fpc/$fpcversion/units/$fpctarget
243+ -Fu~/lib/fpc/$fpcversion/units/$fpctarget/*
244+ -Fu~/lib/fpc/$fpcversion/units/$fpctarget/rtl
245+```
218246
219247This allows installing any future fpc versions into PREFIX=~ without touching that config file.
220248
221249To run fpc, ~/bin must be in PATH environment variable. Usually it is there by default. You also must add path ~/lib/fpc/2.5.1 to PATH because the actual compiler binary is located there. Most Linux systems now use bash shell and this configuration can be added to ~/.bashrc (a hidden file again) :
222250
223-` export PATH=~/lib/fpc/2.5.1:$PATH`
251+```text
252+ export PATH=~/lib/fpc/2.5.1:$PATH
253+```
224254
225255Note that path separator is ":" under Linux (";" under Windows). Now see "Configure Lazarus for the new fpc" below for the next step.
226256
227257### Build a debian/ubuntu package
228258
229259**Important**: This script does not create the official debian/ubuntu packages. It creates a fpc package that contains the compiler and all packages.
230260
231261To build the package you need to install some packages:
232262
233-`sudo apt-get install libgpmg1-dev fakeroot libncurses5-dev build-essential`
263+```text
264+sudo apt-get install libgpmg1-dev fakeroot libncurses5-dev build-essential
265+```
234266
235267Go into your lazarus source directory. The directory must be writable.
236268
237-`cd ~/freepascal/lazarus/tools/install`\
238-`./create_fpc_deb.sh fpc ~/freepascal/fpc`
269+```text
270+cd ~/freepascal/lazarus/tools/install
271+./create_fpc_deb.sh fpc ~/freepascal/fpc
272+```
239273
240274If you get an error about a missing file or tool you may have to install a missing package. If you get a compilation error your installed fpc is not the released compiler or you were unlucky and fetched a fpc svn reversion that contains a bug. Search help on the mailing list, forum or chat. If it ran through you now have a deb file, which you can install:
241275
242-` sudo dpkg -i fpc_2.5.1-091121_i386.deb`
276+```text
277+ sudo dpkg -i fpc_2.5.1-091121_i386.deb
278+```
243279
244280The file name is different for you.
245281
246282### Build a RPM package
247283
248284ToDo...
249285
250286### Configure Lazarus for the new FPC
251287
252288Now fpc is installed either by "make install" or by using a distro specific package. The next step is to compile lazarus svn with the new compiler and tell the IDE to use the directory */home/username/freepascal/fpc* as *FPC source directory*.
253289
254290If you have not yet downloaded the lazarus svn, do it now: [[Getting Lazarus|Development versions from SVN]]. For example:
255291
256-`cd ~/freepascal`\
257-`svn co `[`http://svn.freepascal.org/svn/lazarus/trunk`](http://svn.freepascal.org/svn/lazarus/trunk)` lazarus`
292+```text
293+cd ~/freepascal
294+svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
295+```
258296
259297This will take some time, continue with:
260298
261-`cd ~/freepascal/lazarus`\
262-`make clean all`
299+```text
300+cd ~/freepascal/lazarus
301+make clean all
302+```
263303
264304If this gives linker errors, you have to install some packages (build-essential, libgtk2.0-dev,libgdk-pixbuf-dev). Start the IDE:
265305
266-`cd ~/freepascal/lazarus`\
267-`./lazarus`
306+```text
307+cd ~/freepascal/lazarus
308+./lazarus
309+```
268310
269311This is a minimal IDE without any extra packages. Now the IDE must be setup and can be built with packages:
270312
271313- Go to Environment / Options / Environment
272314- Set lazarus directory to */home/username/freepascal/lazarus*
273315- Set *FPC source directory* to */home/username/freepascal/fpc*
274316- Click *Ok* to close the dialog
275317- Tools / Configure Build Lazarus / Quick Build Options / Build IDE with packages
276318- Click *Build*.
277319- Restart the IDE
278320- Now you have the latest and greatest IDE built with the latest and greatest FPC.
279321
280322## Getting Lazarus from the GitLab server
281323
282324Development version of Lazarus\[edit\] To get Lazarus for the first time, using command line:
283325
284-`git clone `[`https://gitlab.com/freepascal.org/lazarus/lazarus.git`](https://gitlab.com/freepascal.org/lazarus/lazarus.git)` lazarus`
326+```text
327+git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus
328+```
285329
286330A new directory "lazarus" is then created under the current directory.
287331
288332## Development versions from Mercurial
289333
290334There is a Hg mirror of the official SubVersion repository being maintained on [florianklaempfl.de](http://florianklaempfl.de:8000/lazarustrunk/).
291335
292336This mirror does not exist any more. See the [message](http://lists.freepascal.org/lists/fpc-devel/2010-June/020442.html) from Florian Klämpfl.
293337
294338## Daily Snapshotの方法
295339
296340もし、svnディレクトリを使いたくない場合、daily snapshotを使ってみてください。 [[Lazarus Snapshots Downloads|Lazarus Snapshots Downloadsページに]]、ミラーのリストがあります。
297341
298342## ソースリポジトリをWebブラウザで見る
299343
300344SVNアーカイブの内容はWebブラウザから、 [this viewcvs](http://www.freepascal.org/cgi-bin/viewcvs.cgi/?root=lazarus) を通して見ることができます。
301345
302346## Lazarus ディストリビューション
303347
304348LazarusとFree Pascalが含まれるいくつかの非公式なディストリビューションを見つけることができます。
305349
306350- オーストリア大学 応用科学部
307351
308352<http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso>
309353
310354上記のmd5sumファイル <http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso.md5>.
311355
312356## Original contributors and changes
313357
314358This page has been converted from the epikwiki [version](http://lazarus-ccr.sourceforge.net/index.php?wiki=GettingLazarus).
315359
316360---
317361*From the Free Pascal wiki, page "Getting Lazarus/ja", as it stood on 2022-01-13 after a change by Trev, 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).*
318362Category: Lazarus/ja

Back to history