Sign in Join
Wiki copytemporary

Getting Lazarus/ja: what changed

Revision 1 to 2. 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
3535`sudo apt-get install subversion`
3636
3737## Lazarus SVN 開発版の取得
3838
3939### コマンドラインで使う
4040
4141最初にLazarusを取得するには:
4242
4343端末か、コマンドプロンプトを開いて、カレントディレクトリを、インストールしたい場所にLazarusディレクトリを作ってそこに移っておいてください。そして次のようにタイプします。:
4444
4545` svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus`
4646
4747Lazarusのソースをアップデートするには:
4848
4949端末かコマンドプロンプトを開いて、Lazarusディレクトリに移った後、次のようにタイプします。:
5050
5151` svn update`
5252
5353コンパイルについては、こちらを参照してください。
5454
5555### そのほかのリポジトリのURL
5656
5757時々、先ほどのリポジトリはうまく動かないことがあります。なぜならsvnサーバーとの間にhttpプロクシサーバーがありからです。そのサーバーは通常'透過'プロクシとして動作するはずですが、あなたのsvnコマンドを正しくsvn.freepascal.orgサーバーへ渡さないことがあります。
5858
5959一方、svn.freepascal.orgサーバーは8080ポートでもソケットを受け付けます。おそらくプロクシはそのポートのhttpトラフィックにたいして関与しません。ですから、プロクシ経由で上手くいかないばあい、次を試してみてください。
6060
6161`svn co http://svn.freepascal.org:8080/svn/lazarus/trunk lazarus `
6262
6363Lazarus svnリポジトリは\[\[fpsvnsync\]を使って15分後にsourceforgeにミラーされています。sourceforgeリポジトリはhttpsプロトコルを使います。sourceforgeを使う場合、次のコマンドを使います。
6464
6565`svn co https://svn.sourceforge.net/svnroot/lazarus/trunk lazarus`
6666
6767FPCとLazarusのsvnリポジトリは、さらに svn2.freepascal.org へミラーされています。svn2.freepascal.org からチェックアウトする場合は次のコマンドを使います。
6868
6969`svn co http://svn2.freepascal.org/svn/lazarus/trunk lazarus`
7070
7171もし、独自のプロクシサーバーがある場合や、友人のプロクシサーバーを借りてアクセスしている時は、プロクシにsvnコマンドを通過するように設定してください。設定の方法は次のとおりです。:
7272
7373<http://subversion.tigris.org/faq.html#proxy>
7474
7575ここにはsquidの例があります。クライアントにもproxyを使うように設定してください。(TortoiseSVNの場合は settings / networkを参照してください。)
7676
7777### スクリプト
7878
7979Lazarus を自動的にダウンロード、ビルドする、Windows と Linux 用のスクリプト: [[LazarusScripts|Scripts for Lazarus]]
8080
8181## Lazarus のコンパイルとインストール
8282
8383[[Installing Lazarus]] を参照してください - 詳しいインストールガイドです。または、 <http://www.stack.nl/~marcov/buildfaq.pdf> - さらに詳細なガイドです。
8484
8585### Using the command-line
8686
8787Lazarus 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).
8888
8989The tool allows you to compile the lazarus from command-line easily. You need to have fpc and fpc-packages installed and configured first.
9090
9191To compile go to Lazarus directory in your terminal and type
9292
9393` make`
9494
9595This should rebuild LCL and Lazarus IDE (with basic packages installed).
9696
9797### Make targets
9898
9999Following compiling targets can be specified for the make tool:
100100
101101- **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*"
102102
103103- **bigide** - the command rebuilds LCL and IDE with additional packages. For example: "*make bigide*"
104104
105105- **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*"
106106
107107- **components**
108108- **packager/registration**
109109- **ideintf**
110110- **packager**
111111- **bigidecomponents**
112112- **ide**
113113- **idepkg**
114114- **idebig**
115115- **bigide**
116116- **starter** - the command rebuilds startlazarus binary.
117117- **lazbuilder**
118118- **tools**
119119- **all**
120120- **cleanide**
121121- **purge**
122122- **examples** - the command rebuilds examples lazarus
123123- **install**
124124- **lazbuild**
125125
126126If no target is specified LCL and IDE Lazarus (with basic set of components) is rebuilt.
127127
128128### Make parameters
129129
130130There're also additional parameters, can be used for 'making' Lazarus.
131131
132132- **OPT**=%compiler_switches
133133
134134the %compiler_switches is passed to each fpc call. The option is useful for specifying defines
135135
136136For example:
137137
138138` make bigide OPT="-dNoGdkPixBufLib -gw2" `
139139
140140makes LCL and ide with NoGdkPixBufLib defined and dwarf2 debug info.
141141
142142- **LCL_PLATFORM**=%platform
143143
144144%platform is the target Widgetset. It can be win32,gtk,gtk2,qt,carbon or cocoa.
145145
146146For example:
147147
148148` make LCL_PLATFORM=gtk2`
149149
150150Rebuilds LCL and IDE for gtk2 widgetset
151151
152152- **FPC**=%compiler_path
153153
154154%compiler_path is the path to a custom compiler binary you want to build the target with.
155155
156156## Getting FPC SVN development version
157157
158158Here 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]].
159159
160160Then create a directory and download FPC from SVN:
161161
162162`mkdir -p ~/freepascal`\
163163`cd ~/freepascal`\
164164`svn co `[`http://svn.freepascal.org/svn/fpc/trunk`](http://svn.freepascal.org/svn/fpc/trunk)` fpc`
165165
166166This will take some time.
167167
168168You can also use TortoiseSVN client on Windows as explained earlier.
169169
170170## FPC のコンパイルとインストール
171171
172172FPC のコンパイルとインストール方法はいくつかあります。
173173
174174- Use plain *make*.
175175- 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.
176176
177177In either case Lazarus must finally be configured for the new FPC.
178178
179179### Building and installing Free Pascal in UNIXe
180180
181181The following instructions work in UNIX platforms, such as Linux, but also Mac OS X.
182182
183183Building 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.
184184
185-<b>Step 1 - Make sure you have a compatible starting compiler installed.</b>
185+Step 1 - Make sure you have a compatible starting compiler installed.
186186
187187Usually this will mean having installed the latest stable release.
188188
189-<b>Step 2 - Download the source of the new compiler</b>
189+Step 2 - Download the source of the new compiler
190190
191191The 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:
192192
193193`svn checkout `[`http://svn.freepascal.org/svn/fpc/branches/fixes_2_4`](http://svn.freepascal.org/svn/fpc/branches/fixes_2_4)` fpcfixes2_4`
194194
195-<b>Step 3 - Build the compiler</b>
195+Step 3 - Build the compiler
196196
197197Now enter the newly created directory and build and install Free Pascal:
198198
199199` cd fpcfixes2_4`\
200200` make clean all install INSTALL_PREFIX=~`
201201
202202This will compile the compiler in 3 cycles, first using the already installed compiler and then using the newly compiled compiler.
203203
204204It 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.
205205
206-<b>Step 4 - Update your fpc.cfg file</b>
206+Step 4 - Update your fpc.cfg file
207207
208208Then create a file
209209
210210` ~/.fpc.cfg`
211211
212212It 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.
213213
214214` #include /etc/fpc.cfg`\
215215` -Fu~/lib/fpc/$fpcversion/units/$fpctarget`\
216216` -Fu~/lib/fpc/$fpcversion/units/$fpctarget/*`\
217217` -Fu~/lib/fpc/$fpcversion/units/$fpctarget/rtl`
218218
219219This allows installing any future fpc versions into PREFIX=~ without touching that config file.
220220
221221To 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) :
222222
223223` export PATH=~/lib/fpc/2.5.1:$PATH`
224224
225225Note that path separator is ":" under Linux (";" under Windows). Now see "Configure Lazarus for the new fpc" below for the next step.
226226
227227### Build a debian/ubuntu package
228228
229229**Important**: This script does not create the official debian/ubuntu packages. It creates a fpc package that contains the compiler and all packages.
230230
231231To build the package you need to install some packages:
232232
233233`sudo apt-get install libgpmg1-dev fakeroot libncurses5-dev build-essential`
234234
235235Go into your lazarus source directory. The directory must be writable.
236236
237237`cd ~/freepascal/lazarus/tools/install`\
238238`./create_fpc_deb.sh fpc ~/freepascal/fpc`
239239
240240If 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:
241241
242242` sudo dpkg -i fpc_2.5.1-091121_i386.deb`
243243
244244The file name is different for you.
245245
246246### Build a RPM package
247247
248248ToDo...
249249
250250### Configure Lazarus for the new FPC
251251
252252Now 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*.
253253
254254If you have not yet downloaded the lazarus svn, do it now: [[Getting Lazarus|Development versions from SVN]]. For example:
255255
256256`cd ~/freepascal`\
257257`svn co `[`http://svn.freepascal.org/svn/lazarus/trunk`](http://svn.freepascal.org/svn/lazarus/trunk)` lazarus`
258258
259259This will take some time, continue with:
260260
261261`cd ~/freepascal/lazarus`\
262262`make clean all`
263263
264264If this gives linker errors, you have to install some packages (build-essential, libgtk2.0-dev,libgdk-pixbuf-dev). Start the IDE:
265265
266266`cd ~/freepascal/lazarus`\
267267`./lazarus`
268268
269269This is a minimal IDE without any extra packages. Now the IDE must be setup and can be built with packages:
270270
271271- Go to Environment / Options / Environment
272272- Set lazarus directory to */home/username/freepascal/lazarus*
273273- Set *FPC source directory* to */home/username/freepascal/fpc*
274274- Click *Ok* to close the dialog
275275- Tools / Configure Build Lazarus / Quick Build Options / Build IDE with packages
276276- Click *Build*.
277277- Restart the IDE
278278- Now you have the latest and greatest IDE built with the latest and greatest FPC.
279279
280280## Getting Lazarus from the GitLab server
281281
282282Development version of Lazarus\[edit\] To get Lazarus for the first time, using command line:
283283
284284`git clone `[`https://gitlab.com/freepascal.org/lazarus/lazarus.git`](https://gitlab.com/freepascal.org/lazarus/lazarus.git)` lazarus`
285285
286286A new directory "lazarus" is then created under the current directory.
287287
288288## Development versions from Mercurial
289289
290-<s>There is a Hg mirror of the official SubVersion repository being maintained on [florianklaempfl.de](http://florianklaempfl.de:8000/lazarustrunk/).</s>
290+There is a Hg mirror of the official SubVersion repository being maintained on [florianklaempfl.de](http://florianklaempfl.de:8000/lazarustrunk/).
291291
292292This mirror does not exist any more. See the [message](http://lists.freepascal.org/lists/fpc-devel/2010-June/020442.html) from Florian Klämpfl.
293293
294294## Daily Snapshotの方法
295295
296296もし、svnディレクトリを使いたくない場合、daily snapshotを使ってみてください。 [[Lazarus Snapshots Downloads|Lazarus Snapshots Downloadsページに]]、ミラーのリストがあります。
297297
298298## ソースリポジトリをWebブラウザで見る
299299
300300SVNアーカイブの内容はWebブラウザから、 [this viewcvs](http://www.freepascal.org/cgi-bin/viewcvs.cgi/?root=lazarus) を通して見ることができます。
301301
302302## Lazarus ディストリビューション
303303
304304LazarusとFree Pascalが含まれるいくつかの非公式なディストリビューションを見つけることができます。
305305
306306- オーストリア大学 応用科学部
307307
308308<http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso>
309309
310310上記のmd5sumファイル <http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso.md5>.
311311
312312## Original contributors and changes
313313
314314This page has been converted from the epikwiki [version](http://lazarus-ccr.sourceforge.net/index.php?wiki=GettingLazarus).
315315
316316---
317317*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).*
318318Category: Lazarus/ja

Back to history