ウィキのコピーミラー

これは pascal.chat のウィキのミラーです。編集、履歴、ログインはそちらで行います。

Getting Lazarus/ja

Deutsch · English · Español · Français · Polski · Português · Slovenčina · Русский · 日本語

リリース版のダウンロードとインストール

SourceForgeから

いろいろなプラットホームのバイナリリリースが、SourceForgeのダウンロードエリアで配布されています。 Lazarus Sourceforge download area.

プラットフォーム別

Lazarus for Windows の取得 - 上記の Sourceforge へのリンクから取得してください。

Lazarus for Ubuntu の取得

Lazarus for Fedora の取得

Lazarus for Suse の取得

Lazarus for Mandriva の取得

Lazarus for Mac の取得

SVN からの取得

TortoiseSVN クライアント

Windows なら TortoiseSVN クライアントが使えます。 http://tortoisesvn.tigris.org/ からダウンロードして下さい。

こちら で、SVN からのソースのダウンロードやアップデートのやり方について紹介しています。Lazarus だけでなく、FPC についても同じやり方で SVN からソースを取得できます。

Other clients

その他の多くのプラットホーム用に、SVNコマンドラインクライアントがオフィシャルSVNサイトwebsiteから提供されていますので、利用してください。

Linuxでは、ディストリビューションのパッケージ管理システムを使ってsubversionをインストールすることをお勧めします。例えば次のようなコマンドを使います。

text
sudo apt-get install subversion

Lazarus SVN 開発版の取得

コマンドラインで使う

最初にLazarusを取得するには:

端末か、コマンドプロンプトを開いて、カレントディレクトリを、インストールしたい場所にLazarusディレクトリを作ってそこに移っておいてください。そして次のようにタイプします。:

text
 svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus

Lazarusのソースをアップデートするには:

端末かコマンドプロンプトを開いて、Lazarusディレクトリに移った後、次のようにタイプします。:

text
 svn update

コンパイルについては、こちらを参照してください。

そのほかのリポジトリのURL

時々、先ほどのリポジトリはうまく動かないことがあります。なぜならsvnサーバーとの間にhttpプロクシサーバーがありからです。そのサーバーは通常'透過'プロクシとして動作するはずですが、あなたのsvnコマンドを正しくsvn.freepascal.orgサーバーへ渡さないことがあります。

一方、svn.freepascal.orgサーバーは8080ポートでもソケットを受け付けます。おそらくプロクシはそのポートのhttpトラフィックにたいして関与しません。ですから、プロクシ経由で上手くいかないばあい、次を試してみてください。

text
svn co http://svn.freepascal.org:8080/svn/lazarus/trunk lazarus

Lazarus svnリポジトリは[[fpsvnsync]を使って15分後にsourceforgeにミラーされています。sourceforgeリポジトリはhttpsプロトコルを使います。sourceforgeを使う場合、次のコマンドを使います。

text
svn co https://svn.sourceforge.net/svnroot/lazarus/trunk lazarus

FPCとLazarusのsvnリポジトリは、さらに svn2.freepascal.org へミラーされています。svn2.freepascal.org からチェックアウトする場合は次のコマンドを使います。

text
svn co http://svn2.freepascal.org/svn/lazarus/trunk lazarus

もし、独自のプロクシサーバーがある場合や、友人のプロクシサーバーを借りてアクセスしている時は、プロクシにsvnコマンドを通過するように設定してください。設定の方法は次のとおりです。:

http://subversion.tigris.org/faq.html#proxy

ここにはsquidの例があります。クライアントにもproxyを使うように設定してください。(TortoiseSVNの場合は settings / networkを参照してください。)

スクリプト

Lazarus を自動的にダウンロード、ビルドする、Windows と Linux 用のスクリプト: Scripts for Lazarus

Lazarus のコンパイルとインストール

Installing Lazarus を参照してください - 詳しいインストールガイドです。または、 http://www.stack.nl/~marcov/buildfaq.pdf - さらに詳細なガイドです。

Using the command-line

Lazarus 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).

The tool allows you to compile the lazarus from command-line easily. You need to have fpc and fpc-packages installed and configured first.

To compile go to Lazarus directory in your terminal and type

text
 make

This should rebuild LCL and Lazarus IDE (with basic packages installed).

Make targets

Following compiling targets can be specified for the make tool:

If no target is specified LCL and IDE Lazarus (with basic set of components) is rebuilt.

Make parameters

There're also additional parameters, can be used for 'making' Lazarus.

the %compiler_switches is passed to each fpc call. The option is useful for specifying defines

For example:

text
 make bigide OPT="-dNoGdkPixBufLib -gw2"

makes LCL and ide with NoGdkPixBufLib defined and dwarf2 debug info.

%platform is the target Widgetset. It can be win32,gtk,gtk2,qt,carbon or cocoa.

For example:

text
 make LCL_PLATFORM=gtk2

Rebuilds LCL and IDE for gtk2 widgetset

%compiler_path is the path to a custom compiler binary you want to build the target with.

Getting FPC SVN development version

Here 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 the Free Pascal Compiler.

Then create a directory and download FPC from SVN:

text
mkdir -p ~/freepascal
cd ~/freepascal
svn co http://svn.freepascal.org/svn/fpc/trunk fpc

This will take some time.

You can also use TortoiseSVN client on Windows as explained earlier.

FPC のコンパイルとインストール

FPC のコンパイルとインストール方法はいくつかあります。

In either case Lazarus must finally be configured for the new FPC.

Building and installing Free Pascal in UNIXe

The following instructions work in UNIX platforms, such as Linux, but also Mac OS X.

Building 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.

Step 1 - Make sure you have a compatible starting compiler installed.

Usually this will mean having installed the latest stable release.

Step 2 - Download the source of the new compiler

The 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:

text
svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 fpcfixes2_4

Step 3 - Build the compiler

Now enter the newly created directory and build and install Free Pascal:

text
 cd fpcfixes2_4
 make clean all install INSTALL_PREFIX=~

This will compile the compiler in 3 cycles, first using the already installed compiler and then using the newly compiled compiler.

It 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.

Step 4 - Update your fpc.cfg file

Then create a file

text
 ~/.fpc.cfg

It 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.

text
 #include /etc/fpc.cfg
 -Fu~/lib/fpc/$fpcversion/units/$fpctarget
 -Fu~/lib/fpc/$fpcversion/units/$fpctarget/*
 -Fu~/lib/fpc/$fpcversion/units/$fpctarget/rtl

This allows installing any future fpc versions into PREFIX=~ without touching that config file.

To 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) :

text
 export PATH=~/lib/fpc/2.5.1:$PATH

Note that path separator is ":" under Linux (";" under Windows). Now see "Configure Lazarus for the new fpc" below for the next step.

Build a debian/ubuntu package

Important: This script does not create the official debian/ubuntu packages. It creates a fpc package that contains the compiler and all packages.

To build the package you need to install some packages:

text
sudo apt-get install libgpmg1-dev fakeroot libncurses5-dev build-essential

Go into your lazarus source directory. The directory must be writable.

text
cd ~/freepascal/lazarus/tools/install
./create_fpc_deb.sh fpc ~/freepascal/fpc

If 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:

text
 sudo dpkg -i fpc_2.5.1-091121_i386.deb

The file name is different for you.

Build a RPM package

ToDo...

Configure Lazarus for the new FPC

Now 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.

If you have not yet downloaded the lazarus svn, do it now: Development versions from SVN. For example:

text
cd ~/freepascal
svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus

This will take some time, continue with:

text
cd ~/freepascal/lazarus
make clean all

If this gives linker errors, you have to install some packages (build-essential, libgtk2.0-dev,libgdk-pixbuf-dev). Start the IDE:

text
cd ~/freepascal/lazarus
./lazarus

This is a minimal IDE without any extra packages. Now the IDE must be setup and can be built with packages:

Getting Lazarus from the GitLab server

Development version of Lazarus[edit] To get Lazarus for the first time, using command line:

text
git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus

A new directory "lazarus" is then created under the current directory.

Development versions from Mercurial

There is a Hg mirror of the official SubVersion repository being maintained on florianklaempfl.de.

This mirror does not exist any more. See the message from Florian Klämpfl.

Daily Snapshotの方法

もし、svnディレクトリを使いたくない場合、daily snapshotを使ってみてください。 Lazarus Snapshots Downloadsページに、ミラーのリストがあります。

ソースリポジトリをWebブラウザで見る

SVNアーカイブの内容はWebブラウザから、 this viewcvs を通して見ることができます。

Lazarus ディストリビューション

LazarusとFree Pascalが含まれるいくつかの非公式なディストリビューションを見つけることができます。

http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso

上記のmd5sumファイル http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso.md5.

Original contributors and changes

This page has been converted from the epikwiki version.


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.

第3版、最終更新:WikiArchive 。