Installing Lazarus/ja

From Free Pascal wiki
Jump to navigationJump to search

Deutsch (de) English (en) español (es) suomi (fi) français (fr) magyar (hu) 日本語 (ja) 한국어 (ko) polski (pl) português (pt) русский (ru) slovenčina (sk) Tiếng Việt (vi) 中文(中国大陆)‎ (zh_CN)

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


概要

すぐにでも Lazarus をインストールしプログラミングをはじめたい人たちのための、最も手軽な手法としては、 安定版としてリリースされている最新のバイナリーをダウンロードしてインストールすることです(Linux なら RPM パッケージ、Windows ならインストーラ、Mac OS X なら dmg パッケージなど)。Linux や Windows 環境のセクションにある“FPC バイナリ”と、Linux や Windows 環境への Lazarus のインストールのセクションの最初のパラグラフを読んでください:それ以外の箇所は読まなくても大丈夫です。 ただ、コンパイラや IDE の開発に参加しようとする方、最新のツールにアップデートしたい方は、ソースからのインストールが必要となり、残りの情報が関連してきます。

Lazarus は次の2つで構成されています。:

  • LCL - Lazarus コンポーネントライブラリ
  • IDE - RAD ツール(グラフィカルな開発統合環境)

下の略語は次のような意味です:

  • FPC - FreePascal コンパイラ
  • FCL - FreePascal コンパイラのライブラリ。Lazarus で使用するグラフィカルでないコンポーネントのほとんどが含まれています。

Lazarus システム要件

  1. FreePascal コンパイラ、パッケージ、ソースファイル。(*重要*: 同じバージョンで同じ日付のもの)
  2. ウィジェットツールキット
    Win32
    The native Win32 API can be used
    Linux/xxxBSD
    GTK+ 1.2.x : ほとんどの Linux ディストリビューションや *BSD(FreeBSDやNetBSDなど)はあらかじめ GTK+ 1.2.x ライブラリがインストールされています。またそれらは http://www.gtk.org から見つける事が出来ます。
    また gdk-pixbuf についても 0.13 以降のもの(できれば 0.18 以降のもの)があった方がいいでしょう。これらは過去2年から最も新しいディストリビューションから探し出すことができます。ソースは ftp://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/ から入手することが出来ます。
    Mac OS X
    GTK+ 1.2.x : Apple のデベロッパーツール、X11、GTK1.2 が必要です。Mac OS X でのインストールの箇所を参照して下さい。
    GTK+ 2.x
    注意 : (lazarus の)GTK インターフェースはまだコンパイルされておらず、まだテスト段階です。
    最近のディストリビューションから見つける事が出来ます。ソースについては、http://www.gtk.org を参照して下さい。

The FAQ - FAQ(Frequently Asked Questions file:よくある質問) は http://www.lazarus.freepascal.org から参照できます。幾つかの質問はローカルファイルの'FAQ'から見つけることが出来ます。

以降のセクションは FreePascal の取得の方法と、Lazarus をどのように適切にインストールするかについて述べます。

Free Pascal コンパイラのインストール

この http://www.stack.nl/~marcov/buildfaq.pdf では、Free Pascal コンパイラをどのように構築し、どのようにインストールするかについて行われた膨大な議論を参照できます - これはおそらく何人かのユーザにはとても細かいことかもしれませんが、とても総合的なことです。

Lazarus は fpc (FreePascal) の 2.2.2 バージョン以降が必要ですが、さらに fpc ライブラリ(バイナリ)と同じバージョンの fpc ソースについても必要となります。

Linux 環境での Free Pascal のインストール

FPC バイナリ

FreePascal の最新版のリリースは version 3.0.4 です。これは FreePascal の Web サイト(http://www.freepascal.org/download.html, ミラーサイトを選択します) 、もしくは SourceForge (http://sourceforge.net/projects/lazarus) から入手す出来ます。

Lazarus のダウンロードセクション (http://www.lazarus.freepascal.org )では、パッケージ化された Free Pascal コンパイラ(linux用)の RPM や DEB ファイルを入手することが出来ます。もし RPM ベースのDebianディストリビューションでないのなら、 http://www.freepascal.org から tar ファイル(ソースファイル) をダウンロードしてインストールすることができます。もし、自分でコンパイルしたい方は、BSD のセクションを参照して下さい。

操作方法の説明: 注意: もし RPM を使っていないなら(もし alien を使う計画であるなら)、最善の方法は、最新の安定版の fpc (現時点では3.0.4)を入手し、ソースから Lazarus をインストールすることです。

Linux を起動し、root でログインしてください。

http://sourceforge.net/project/showfiles.php?group_id=89339 から最新のファイルを取得してください。(例)

       * fpc-2.2.2-0.i386.rpm
       * fpc-src-2.2.2-081004.i386.rpm
       * lazarus-0.9.26-0.i386.rpm

次に、これらを下記のようにしてインストールします:

       * rpm -Uvh fpc-2.2.2-0.i386.rpm
       * rpm -Uvh fpc-src-2.2.2-0.i386.rpm
       * rpm -Uvh lazarus-0.9.26-0.i386.rpm

Debian ユーザは alien もしくはソースからのインストールを行なう必要があります。 (注意:alien を使った場合、fpc.cfg は生成されません)

FPC ソース

バージョン2.0リリース版以降、FPC は Subversion(SVN)に移行しました。これは CVS ミラーを使用していません。FPC ソースを入手するには SVN を使用しなければなりません。

開発ツリーから 日次更新ソーススナップショットをダウンロードする(version 2.3.x)

SVN ソースリポジトリから、2.3.x 系の開発バージョンの今日の日次スナップショットをダウンロードできます: これらのスナップショットは基本的に毎日更新され、ソースリポジトリに反映されます。これらのファイルはSVNアーカイブとしてサイト内で保管されます。 v2.3.x の公開ソースのアーカイブ: fpc.zip (24 MB)

リリースツリーからの日次ソーススナップショットのダウンロード (version 2.2.x)

SVN ソースリポジトリから、2.2.x 系のリリースバージョンの今日の日次スナップショットをダウンロードできます: これらのスナップショットは基本的に毎日更新され、ソースリポジトリに反映されます。これらのファイルはSVNアーカイブとしてサイト内で保管されます。 v2.2.x の公開ソースのアーカイブfpc.zip (24 MB)

SVNのソースリポジトリへの接続 (CVS 接続のセクションから移動)

SVN ソースコードの zip ファイルの取得とは別の入手方法があります。SVN リポジトリへは、読み取り専用ですが誰でもアクセスできるようになっています。つまり、zip で圧縮されたものではなく、取得するタイミングの直前のコードを直接取得することができるということです。一度のダウンロードを行えば(SVN のコマンド checkout をすれば)、少ない帯域で取得ができるということでもあります。

Development snapshots

下に手順を述べます。 (当然、SVNをインストールしておく必要があります。一連のやり方については here を見てください)

開発に使用する領域の親ディレクトリに(cd コマンドで)移動してください。例えば次のようにします。

[]$ cd /home/username/FreePascal

全てのソースリポジトリ、全ての公開されたモジュールを取得するには、次のようにタイプします。

[]$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc

普通はこのステップだけで済むはずです。

上述でダウンロードしたソースをアップデートする場合は次のようにします。

[]$svn update fpc
2.2.x への修正

修正を行なうには別のディレクトリを作成する必要があります。'fixes'という別のディレクトリを作成し、そこに移動します。そして修正用の URL http://svn.freepascal.org/svn/fpc/branches/fixes_2_2 を引数にして、上述のチェックアウトコマンドを実行します。

[]$ cd mysvn/fixes
[]$ svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_2 fpc

アップデートするには次のようにします:

[]$ svn update fpc

ドキュメントのソースは fpcdoc と呼ばれるリポジトリの方に置かれています。これは次のコマンドで入手できます。

[]$ svn checkout http://svn.freepascal.org/svn/fpcdocs/trunk fpcdocs

Subversion についてもっと学びたいのなら、フォーマットが異なるのですがオンラインで自由に読むことが可能な、すばらしい Subversion book を読んでください。

好奇心旺盛の方へ: 読み取り専用です。間違ってもコミットしようとしないように。

より多くの情報については、この Web サイトFreePascal をご覧下さい。

Windows 環境での Free Pascal のインストール

Windows 用 FPC バイナリ

Free Pascal を最も手軽にインストールする方法は、Sourceforge リポジトリから Lazarus のカレントバージョンの Windows バイナリインストーラをダウンロードすることです。このインストーラには、lazarus IDE だけでなくカレントバージョンの FreePascal コンパイラと FreePascal ライブラリが含まれています。 もしソースからのインストールを希望するなら、ここを読んでください!

Free Pascal のダウンロードセクション(http://www.freepascal.org/download.html, ここからミラーを選んでください)から fpc 2.2.2 の zip インストーラを入手できます。 ソースからのインストール -- 取得の方法について知りたいのなら次のセクションを見てください。初心者向きではありません。また始めるにはコンパイラが必要となります。

Windows 用 FPC ソース

<<<< 上述の Linux 用の FPC ソース を見て下さい。ここでは SVN の使い方について述べています >>>>

Fee Pascal のソースを取得するのに最も簡単な方法は、SVN を利用することです。これ以上については、次のセクションを見てください。パッケージの全てを取得することが出来ます -- 2.3.x デイリースナップショットのツリーについては http://www.freepascal.org/develop.html を見てください。

SVN を介した Windows 用の FPC ソースの取得

まず、TortoiseSVN のような SVN クライアントをインストールする必要があります。正確なコマンドは svn クライアントによって変わります。The exact commands vary between SVN clients; the ones given below are to be used under SVN home's client, which is available for download here.

まず、ソースを置く用のディレクトリを作成します。通常のユーザであればこれを実行するだけで構いません。fpc用のディレクトリ(例 c:\Source)を作成し、コマンドプロンプトで次のように実行します:

 C:\Source> svn co http://svn.freepascal.org/svn/fpc/trunk fpc

ヒント: 最新の状態のものをダウンロード/アップデートしたいなら、次のようなシンプルな方法で出来ます

 C:\> cd Source\FPC
 C:\Source\FPC> svn up

ToDo: Write me.

http://www.freepascal.org/down-win32.html を参照して下さい。http://www.freepascal.org/sdown.html ではミラーのリストを見つけることが出来ます。FPC は大きなファイルですが、これをダウンロードして、unzip で解凍し、install.exe を実行して下さい。

fpc ディレクトリにパスを通して下さい:

  • Win98: autoexec.bat を編集し、PATH=%PATH%;C:\pp\bin\bin\win32 を加えて下さい
  • WinXP/2k: マイコンピュータを右クリックし、プロパティー->詳細設定->環境変数を選択し、システム環境変数にある PATH の項目に、"C:\pp\bin\bin\win32" を追加して下さい

設定後、Windows を再起動します。

ToDo: Explain how to download fpc sources and build the compiler

FreeBSD 環境への Free Pascal のインストール(自動)

最新の FreeBSD ports コレクションは、ports/lang/fpc2 に 2.0.2(もうすぐ2.0.4)の安定バージョンが登録されています。殆どの場合、この port をインストールする必要があります。もし Lazarus を使用とするなら"gtk"をまずインストールする必要があるのですが。

手動でするなら root で次のように実行します:

[]# cd /usr/ports/lang/fpc2 && make install && make clean

他の手法は portinstall を使うことです。

[]# portinstall fpc2

一度 fpc をインストールすれば、シンプルなコマンドを実行することで動作チェックをすることができます。

[]$ fpc

しかしながら、FreeBSD と FPC の間には1つ問題があります。port はすべてのパッケージと FCL をインストールするのですが、(lazarus で必要となる)glib と gtk の最新の ports ツリーでは名称変更がなされているのです。これは lazarus でリンク処理をする際に、"cannot find library -lglib" というエラーメッセージが発生することを意味しています。次の2つの方法のうちどちらか1つで修正することができます。

1. fpc ソースの中の該当箇所を修正し、りコンパイルする[推奨しません]
2. 従来のライブラリ名称へのシンボリックリンクを作成する

2. の方法については、次のように行ないます。

[]$ cd /usr/local/lib && ln -s libglib-12.so libglib12.so
[]$ cd /usr/X11R6/lib && ln -s libgtk-12.so libgtk12.so

この変更をしてから、Lazarus でコンパイル・リンクを行なって下さい。

BSD 環境 での Free Pascal のインストール(手動)

Effectively, you need

A file with all sources, or two (fpc and lazarus)

1. e.g. for fpc ftp://ftp.freepascal.org/fpc/dist/Linux/separate/sources.tar preferably an export (no CVS/ dirs). The above file misses this.
2. Lazarus のソースのスナップショット

  • _any_ starting compiler from the 2.0.2 branch) You can do a check by parsing the output of ppc386 -i if it is 2.0.2 .. 2.1.x it is ok.
  • - dependant packages. (for FreeBSD that is gtk12, glib12 and gdk_pixbuf and GNU make, iconv and gettext)

FPC の構築:

1. (fetch) necessary files (FPC source, starting compiler)
2. (extract) Then de-tgz in work directory,
3. (build) enter work/fpc/ and run

 $MAKE all OPT='-gl'  PP=/path/to/startingcompiler-name-ppc386
(/path/to/ can be omitted when ppc386 is in the path)
($MAKE is make on linux and gmake on BSD)

4. (install) then, again in work/fpc, run

$MAKE install PP=compiler/ppc386 PREFIX=$THEPREFIX
(THEPREFIX= usually is /usr/lcoal, but e.g. on NetBSD it is /usr/pkg for ports)
Create a symlink:
  ln -s $THEPREFIX/lib/fpc/2.0.2/ppc386 $THEPREFIX/bin/ppc386
     install sourceinstall PREFIX=$THEPREFIX

5. (configure) run compiler/utils/samplecfg $THEPREFIX/lib/fpc/2.0.1 $ETCDIR
6. (optional, test), see if ppc386 -i gives output, else give a warning that user need to add $PREFIX/bin to his current path. Try to compiler a program with -viwn, and see if that gives errors. Notes:

  • If you need fpcmake package lists, you need to generate or supply them yourself, (in the port, or in an extra archive) either way, do a dummy install to /tmp/pack and determine the files installed with find . >ll
  • $THEPREFIX and $ETCDIR should be user configurable. Otherwise local installs aren't possible.
  • BSDHIER=1 on all make commands forces BSD hierarchy conventions.

Mac OS X 環境での Free Pascal のインストール

Mac OS X の場合、他に Apple Developer tools、X11、GTK 1.2 が必要となります。

Apple Developer-tools
OS X のインストレーション CD(DVD) の中に含まれています。もしくは、Apple の ADC(無償だが要登録)に参加し、ダウンロードするという方法があります。http://developer.apple.com/ 参照。
Apple X11
  • 新しいシステムの場合: インストールダイアログの中で"カスタマイズ"を選び、"X11"にチェックを入れて下さい。
  • インストール済みのMac OS Xに追加する場合:
GTK 1.2
GTKパッケージをダウンロードし正しくインストールするには、かなり時間がかかる場合があります。そのため、さまざまなパッケージマネジャがあります。そのうちの一つがfinkです。finkによってGTK 1.2をインストールするには次のようにします:
fink をURL http://fink.sourceforge.net/download/index.php?phpLang=en からダウンロードし、ターミナル上で次のコマンドを実行して下さい。
       sudo /sw/bin/apt-get install gdk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc gtk-engines

X11 アプリケーションは /Applications/Utilities/X11 にインストールされます。ドラッグ&ドロップでドックに置いておけば、いつでもクリック1回で起動できます。

Tip: Lazarus を含めてほとんどの X11 プログラムは、ユーザが Window 上をクリックした際にフォーカスが取得できることを前提にしています。MacOSX 上では、この機能は非アクティブにされています。ターミナル上で次のコマンドを実行することで、すべての X11 アプリケーションでこれをアクティブにすることができます。

       defaults write com.apple.x11 wm_click_through -bool true
Free Pascal Compiler
次の URL から Free Pascal Compiler (バージョン2.0.2) をダウンロードし、インストールします:
https://sourceforge.net/project/showfiles.php?group_id=89339

GTK 関連のソフトウェアをコンパイルする時には、次の2行を fpc.cfg ファイルに追加してライブラリを有効にする必要があります:

-Fl/sw/lib
-Fl/usr/X11R6/lib

Lazarusを利用するためには、FPCのソースも必要です:

  • MacOSX 用の SVN のインストール: おすすめのパッケージがこのサイト Martin Ott から配布されています。
    ディレクトリを作成し、ソースをそこに置きます。root権限 でこれをする必要はありません。普通のユーザアカウントで構いません。
    1. 最初に fpc 用のディレクトリを作成します (例 /Users/username/freepascal)
    2. そしてターミナルを開き次のコマンドを実行します。
[]$ svn co http://svn.freepascal.org/svn/svn/trunk fpc
これにより 'fpc' という名前のディレクトリが作成されます。これは後で IDE から使用されます。

ヒント: 最新のダウンロード/アップデートに更新するには、次のようなシンプルな方法で実施します

[]$ cd /Users/username/freepascal/fpc
[]$ svn up

Lazarus のインストール

Linux 環境での Lazarus のインストール

Ubuntu / Debian

Lazarusをインストールする最も簡単な方法はSourceForgeのリポジトリからFreePascalとLazarusのdebファイルをダウンロードすることです。

説明はこちら: Getting_Lazarus/ja.

Note that installing from the default Ubuntu sources will not install the Free Pascal Source Libraries - use the method above.

UbuntuデフォルトのインストールではFree Pascalのソースライブラリがインストールされないことに注意してください。

追記: Debian系Linux(Ubuntu等)ではRPMパッケージからのインストールはできません。 debパッケージを使用してインストールすることをお勧めします。 特にUbuntu DeskTopではソフトウェアセンターからのインストールが非常に簡単です。 UbuntuソフトウェアセンターでLazarusをインストール後、同様にUbuntuソフトウェアセンターでfpc-sourceをインストールしてください。 (Lazarusのインストールで一緒にfpcもインストールされますが、fpc-sourceは別途インストールする必要があります。 ※Ubuntu10.10の場合)

Building debs the easy way

The easiest way to get a current working installation of Lazarus is to download build your own .deb packages by following the instructions at:

How_to_setup_a_FPC_and_Lazarus_Ubuntu_repository

Problems compiling GTK2 apps with FPC 2.2.2

From this post by Michalis Kamburelis:

In case someone wonders how to workaround this bug (occurs with GTK >= 2.13.4, e.g. on Ubuntu 8.10 we have GTK 2.14):

I found that the quick workaround that works is to pass --noinhibit-exec to ld, that is "-k--noinhibit-exec" to FPC command-line. The ld will then treat unresolved references as mere warnings, and will produce working executable (assuming your program doesn't actually call obsoleted GTK2 functions).

Of course, you can also upgrade to FPC from SVN. Above workaround is useful only if you have to stick to released FPC 2.2.2.

RPM を用いたインストール

Lazarus の現行のインストーラを取得することが最も簡単な方法で、それは SourceForge のリポジトリから FreePascal と Lazarus の RPM をダウンロードすることです。

指定のバージョンをダウンロードする必要があります

  • コンパイラ (例: fpc-2.2.4-0.i586.rpm)
  • pascal ソースライブラリ (例: fpc-src-2.2.4-0.i386.rpm)
  • lazarus パッケージ (例: lazarus-0.9.28-0.i386.rpm).

次のスクリプトは0.9.28をダウンロードしてインストールもしくはアップデートする例です。"InstallLazarus.sh"などと名前を付けて保存し、実行パーミッションを与え、suでroot権限をとってから実行してください。新規インストールでrpm evに際し、"インストールされていません"とのメッセージが出ても問題ありません。

 #!/bin/sh
 URL=http://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20i386%20RPM/Lazarus%200.9.28
 wget $URL/fpc-2.2.4-0.i386.rpm/download
 wget $URL/fpc-src-2.2.4-0.i386.rpm/download
 wget $URL/lazarus-0.9.28-0.i386.rpm/download
 rpm -ev lazarus
 rpm -ev fpc
 rpm -ev fpc-src
 rpm -ivh fpc-*
 rpm -ivh lazarus-*

Installing on Mandriva

Lazarus 0.9.26 on Mandriva 2009 (2009.0) (i386) (GTK-1)

Not much has changed compared to Mandriva 2007. The following instruction shall not differ for an x86_64 architecture.

1/ Do not install FPC from Drake. If you have done so, desinstall it. Since Mandriva does not provide the complete set of tools (FPC+sources+documentation+Lazarus) it is better, in my opinion, to have complete control on all of them through rpms.

2/ Collect fresh rpms on sourceforge (http://sourceforge.net/project/showfiles.php?group_id=89339): select the RPM version of the latest lazarus release compatible with your architecture and download fpc, fpc-src, fpc-docs and lazarus RPMs.

3/ Browse the directory where you downloaded the RPMs (with Nautilus or whatever file browser your using) and double click on the RPMs in this ordrer:

  (a) fpc-<version>-<arch>.rpm
  (b) fpc-docs-<version>-<arch>.rmp
  (c) fpc-src-<version>-<arch>.rpm
  (d) lazarus-<version>-<arch>.rpm

4/ It is possible that the Drake (the software that will manage your RPMs) will complain about missing libraries or tools. Use Drake to collect them. For instance, you shall have installed developpement tools such as "GNU Make". Search and if necessary install "GNU Make". You might be missing the ld (the linkage utility), you can install for instance the "gcc" package.

5/ As before, it is possible to search for and install "galaxy-gnome" and "gtk-switch" with Drake. Nonetheless, they are not required for Lazarus to work properly. Gnome Galaxy are a set of cool themes you can use in the System menu->Preferences->Themes.

6/ Lazarus might complain about the FPC sources that are not correctly set. Go to Configuration->Environement then set the FPC sources directory to your local installation (it should be /usr/local/fpcsrc/<version>/).

7/ When launched, the libcanberra-module-gtk might not be found. I tried to build a symlink (ln -s) but if Lazarus manages to find this library... it crashes. It might be safer to ignore this error.

8/ Have fun with the coolest RAD of the Free World.

Lazarus 0.9.26 on Mandriva 2007 (2007.0) (i386) (GTK-1)

Installation in Mandriva is very easy. However, there are a few points to check as the installation proceeds. Here is a typical installation using the .tar modules (see the trick for the theme at the end of the procedure!):

- During the Mandriva installation, select the "Gnome desktop" group. Although you will use lazarus in KDE or other desktop, this will install some GTK modules needed by the lazarus environment.

- Install the FPC 2.2.2 compiler using either the .rpm or .tar, modules. Using the .tar modules you would type: "sh install.sh" then RETURN many times. I do this in superuser mode.

- Install the compiler source code. just untar the file "fpc-src-2.2.2.source.tgz" in the folder /usr/local/src/fpc/ then rename the created folder "fpc" to "2.2.2" . When complete, you have the folder /usr/local/src/fpc/2.2.2/ that contains all the source code. The source code is only needed by lazarus editor, but you can recompile FPC and have an optimized version of the libraries, and show that everything is working well:

- If you want to compile FPC (optional), then go to the FPC source directory (/usr/local/src/fpc/2.2.2/) and type "./configure", "make clean","make all","make install","make clean". FPC is now installed. Check the content of "/etc/fpc.cfg". This file has to be modified when the make fails.

- Lazarus can be installed in user mode: just unzip/untar the file "lazarus-0.9.26.0.tar.gz" in your user directory. Then just type "make clean all" in the user mode. The last phase of the process (link) usually fails due to missing library files:

- Check in the directory /usr/lib/ for the following symbolic links:

libglib.so -> libglib-1.2.so.0

libgtk.so -> libgtk-1.2.so.0.9.1

libgdk.so -> libgdk-1.2.so.0.9.1

libgdk_pixbuf.so -> libgdk_pixbuf.so.2.0.0

The file "libgdk_pixbuf.so.2.0.0" is included in the module "libgdk_pixbuf-2.0.22.0-10mdv2007.0.rpm" This file name is critical. In particular, DO NOT use "libgdk_pixbuf-2.0.so.0" (misleading isn't!).

After all the links have been fixed, the "Linking ../lazarus" stage will not crash any more and the "./lazarus" command should start the program!

- Go to the "environment/environment options" menu and change the "FPC source directory" to /user/local/src/fpc/2.2.2

USEFUL TO KNOW:

- The last step is to fix the theme. The package "galaxy-gnome-1.0.4-3mdv2007.0" is available in the Mandriva control center. Install it.

- The package "gtk-theme-switch-1.0.1-4mdv2007.0.i586.rpm" is available on the web! (strangely it did not show in the control center) Install it manually by typing "rpm -iv --test gtk-theme-switch-1.0.1-4mdv2007.0.i586.rpm" then retype the line without the "--test" in my case there was a warning message related to the signature. I decided to ignore it!

- in the USER MODE, type "switch", then chose "galaxy" theme.

The Lazarus / FPC tool is now installed!

Lazarus 0.9.26 on Mandriva 2007/or -2006 32 bit

Write this urpmi-command as root:

urpmi http://surfnet.dl.sourceforge.net/sourceforge/lazarus/lazarus-0.9.26-0.i386.rpm http://surfnet.dl.sourceforge.net/sourceforge/lazarus/fpc-2.2.2-0.i386.rpm http://surfnet.dl.sourceforge.net/sourceforge/lazarus/fpc-docs-2.2.2-0.i386.rpm http://surfnet.dl.sourceforge.net/sourceforge/lazarus/fpc-src-2.2.2-0.i386.rpm

Lazarus 0.9.26 depends on fpc 2.2.2 and Mandriva 2007 is shipped with fpc-2.1.1-0.2mdk.i586. To prevent your system to upgrade to fpc-2.1.1 or newer in the future, when you run commands as urpmi --auto-select, you can write fpc in /etc/urpmi/skip.list.

Lazarus 0.9.26 on Mandriva 2009 32 bit

Installation needs similar action as above. Because the distribution comes with fpc-2.2.2-1, it is necessary to uninstall this package. Write following commands as root:

rpm -e fpc
urpmi http://surfnet.dl.sourceforge.net/sourceforge/lazarus/lazarus-0.9.26-0.i386.rpm http://surfnet.dl.sourceforge.net/sourceforge/lazarus/fpc-2.2.2-0.i386.rpm http://surfnet.dl.sourceforge.net/sourceforge/lazarus/fpc-docs-2.2.2-0.i386.rpm http://surfnet.dl.sourceforge.net/sourceforge/lazarus/fpc-src-2.2.2-081004.i386.rpm

And place fpc in /etc/urpmi/skip.list.

Lazarus untested snapshot on Mandriva 2007 32 bit
urpmi $(for RPM in $(lynx --source http://michael-ep3.physik.uni-halle.de/Lazarus/ | grep i386.rpm | cut -d '"' -f 4-4) ; do echo -n http://michael-ep3.physik.uni-halle.de/Lazarus/$RPM ' '; done )
Installing Lazarus + fpc For Mandriva X86_64

This has worked for Mandriva 2007.0 X86_64 (AMD X2 4800+).

fpc-2.2.2-0.x86_64.rpm
fpc-src-2.2.2-081004.x86_64.rpm
lazarus-0.9.26-0.x86_64.rpm
  • To download and install the current snapshot:

urpmi $(for RPM in $(lynx --source http://michael-ep3.physik.uni-halle.de/Lazarus/ | grep 64.rpm | cut -d '"' -f 4-4) ; do echo -n http://michael-ep3.physik.uni-halle.de/Lazarus/$RPM ' '; done )
You might have to install lynx and make first: urpmi lynx make.

  • Once the RPMs have been installed. Run lazarus for the first time. It will pop up a dialog complaining that the "/usr/bin/ppc386" and "/usr/lib/lazarus" are not valid. Accept ("OK") the alternate choices it suggests.
  • When compiling your first project, you may find that lazarus complains of missing libs (e.g. gdk, glib, etc.). Install the necessary libs as needed, I installed these (that I recall, YMMV):
glib-devel
lib64gtk+1.2-devel
lib64gtk+2.0_0-devel
lib64gdk-pixbuf2
lib64gdk-pixbuf2-devel

Installing on Slackware

Installing Lazarus 0.9.26, for Slackware 12.0 users

This have worked in Slackware-12.0 on a Pentium-3 computer:

  • The Free Pascal Compiler (FPC) is installed in SUPERUSER mode
  • The lazarus in installed in USER mode
  • The FPC compiler will be recompiled
  • The lazarus Integrated Development Environment (IDE) source code is loaded from the SVN server
  • The GTK-2 widget set is used ("LCL_PLATFORM=gtk2")

-- Download "fpc-2.2.2.i386-linux.tar" in a user folder and install it. Go to this folder and type:

 bash-3.1$ tar -xvf fpc-2.2.2.i386-linux.tar
 bash-3.1$ su 
 bash-3.1$ password:xxxxxx
 bash-3.1# sh install.sh
 ...
 (use the default answers for the next 6 questions: press "return" 6 times)
 ...
 bash-3.1# exit
 bash-3.2$ fpc
 free pascal compiler version 2.2.2 [] for i386 
 Copyright (c) 2008 ...
 ...
 ...

You have installed the compiler. You may want to recompile it or not, but in any case you will need to download the source code as it is required by the lazarus IDE.

-- Download "fpc-2.2.2.source.tar.gz" in a temporary folder. If you do not want to recompile the source then just skip this section. If you would like to run your own compiled version of FPC, then just type:

 bash-3.1$ tar -xvzf fpc-2.2.2.source.tar.gz
 bash-3.1$ cd fpc-2.2.2
 bash-3.1$ make clean all
 bash-3.1$ su
 bash-3.1$ password: xxxxxxxx
 bash-3.1# make install
 bash-3.1# exit
 bash-3.1$ fpc
 free pascal compiler version 2.2.2 [...] for i386 
 Copyright (c) 2008 ...
 ...
 ...

Now you have your own compiled version working.

-- The lazarus IDE editor needs to look at the FPC source code. Even if you do not want to recompile FPC, you need its source code. However, in order to save some space, I only keep a clean (not compiled) copy of the source code. I start from the file "fpc-2.2.2.source.tar.gz" again and I copy it to the /usr/local/src/FPC folder:

 bash-3.1$ su
 bash-3.1$ password: xxxxxxxx
 bash-3.1# cp fpc-2.2.2.source.tar.gz /usr/local/src/
 bash-3.1# cd /usr/local/src/
 bash-3.1# tar -xvzf fpc-2.2.2.source.tar.gz
 bash-3.1# rm fpc-2.2.2.source.tar.gz
 bash-3.1# exit

The version number is included in the folder name "fpc-2.2.2". This way I can keep many versions the the compiler source and eventually switch between them.

-- The lazarus IDE is kept in my USER "~/lazarus" folder and always compiled in USER mode. I usually download the "lazarus-0.9.26-0.tar.gz" file, but here we can also get the latest development version from the SVN server:

  bash-3.1$ svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus

This is for the first time you load it. Next time you will only need to type:

  bash-3.1$ svn update

If you do not have SVN installed on your computer, here is how to get it quickly:

--Download the two files: "subversion-1.4.6.tar.gz" and "subversion-deps-1.4.5.tar.gz" (or later versions). Type:

  bash-3.1$ tar -xvzf subversion-1.4.6.tar.gz
  bash-3.1$ tar -xvzf subversion-deps-1.4.6.tar.gz
  bash-3.1$ cd subversion-1.4.6
  bash-3.1$ ./configure
  bash-3.1$ make
  bash-3.1$ su
  bash-3.1$ password:xxxxxx
  bash-3.1# make install
  bash-3.1$ exit

-- At this point you have the folder "~/lazarus" containing the source code. You should compile it very simply:

  bash-3.1$ make clean all LCL_PLATFORM=gtk2

The "LCL_PLATFORM=gtk2" means of course that you will develop your applications in GTK-2. The default widget set for lazarus is GTK-1 but you will not be able to use it in Slackware 12.0. I strongly recommend that you use the "LCL_PLATFORM=gtk2" option now. After a few minutes, the compiler stops:

  ...
  ...
  Linking ../Lazbuild
  987 linescompiled ...
  make [2] leaving ...
  make [1] leaving ...
  bash-3.1$

-- Just type:

  bash-3.1$ ./lazarus

WOW! You get a message: "Free Pascal sources not found". Just follow the instructions and indicate your Free Pascal Compiler source directory in the panel: "Environment->Environment_Options->Files". As explained earlier, on my computer this should point to "/usr/local/src/fpc-2.2.2". Note that when you change this folder, you should click on "Environment / Rescan_FPC_source_directory".

Voila!

openSUSEへのインストール

openSUSE 11.1 ユーザのためのLazarus 0.9.28 のインストール

Free Pascal コンパイラには次のものが必要です: - Gnu バイナリ (gnu as, gnu ld, gnu make) 次のコマンドで簡単にそれらをインストールできます。

 # zypper in -t pattern devel_basis

バイナリファイルをダウンロードします(RPM)

  • fpc-2.2.4-0.i386.rpm
  • fpc-src-2.2.4-0.i386.rpm

ターミナルを開き、それをインストールします(マウスの右ボタン -> Menu: terminal を開く)

 # rpm -Uvh fpc-2.2.4-0.i386.rpm
 # rpm -Uvh fpc-src-2.2.4-0.i386.rpm
 # rpm -Uvh lazarus-0.9.28-0.i386.rpm

ソースからのインストール

ソースからの自分自身でコンパイルしてインストールするのがお好みでしたら、以下のように行って下さい。lazarus関連のファイルはすべて一つのディレクトリに保存されるため、アンインストールはきわめて簡単で、インストールするのにrootになる必要もありません。ダウンロードページからfpcとfpcsrcとlazarusのtgzファイルをダウンロードできますし、svnから直接ダウンロードすることもできます。

以下は0.9.18をUbuntu 6.06にインストールする場合の例です。Linuxのコマンドやbashスクリプトをある程度ご存知でしたら、何をすればよいのかおわかりでしょう。スクリプトをコピーし(新しいバージョンが出ていたら番号を書き換え), テキストエディタに貼り付けて"install_lazarus.sh"などと名前を付けて保存してください。そのshファイルに実行許可を与え、コンソールで実行してください。 注意:この例ではfpcは/optにインストールされますので、'Install prefix'を聞かれたら'/opt/fpc'と入力してください。

 #!/bin/sh
 
 #installing required packages
 sudo apt-get install build-essential
 sudo apt-get install libgtk2.0-dev
 sudo apt-get install libgdk-pixbuf-dev
 
 #installing FreePascal source
 cd /opt
 sudo wget http://nchc.dl.sourceforge.net/lazarus/fpc-src-2.0.4.source.tgz
 sudo tar -xvf fpc-src-2.0.4.source.tgz
 sudo mv fpc fpcsrc
 
 #installing FreePascal
 sudo mkdir fpc
 cd fpc
 sudo wget http://nchc.dl.sourceforge.net/lazarus/fpc-2.0.4.i386-linux.tar
 sudo tar -xvf fpc-2.0.4.i386-linux.tar
 sudo sh install.sh
 
 #adding fpc path to the PATH
 echo "#FPC PATH" >> ~/.bash_profile
 echo "if [ -d /opt/fpc/bin ] ; then" >> ~/.bash_profile 
 echo PATH=/opt/fpc/bin:"${PATH}" >> ~/.bash_profile
 echo "fi" >> ~/.bash_profile
 
 #installing Lazarus
 cd ../
 sudo wget http://nchc.dl.sourceforge.net/lazarus/lazarus-0.9.18-0.tar.gz
 sudo tar -zxvf lazarus-0.9.18-0.tar.gz
 PATH=/opt/fpc/bin:"${PATH}"
 sudo chmod -R 777 lazarus
 cd lazarus
 make clean all
 ./lazarus

注意:環境オプションでfpc-srcのパスを手動で指定する必要があります。 注意:UIの日本語が文字化けしています。さしあたりこちらの方法で対処してください。

Lazarus SVN のダウンロード

lazarusレポジトリはcvsからsvn(のサブバージョン)に移行しました。SVNを使用することにより、修正箇所のみをダウンロードして簡単にソースを最新版に保つことができます。相当な時間の節約になり、お薦めします。これにはインターネットへの接続が必要です。rootになる必要はありません。Lazarusはインストール時にも実行時にも特別なパーミッションは必要ありません。

移行にともない私達はlazarusソースのディレクトリ構成を変えました。最も大きな違いは全てのIDEソースが主ディレクトリ(root)から別々のサブディレクトリに移ったことです。おわかりのように、このことはMakefilesやサーチパスなどに影響を与えます。私達はここからくる諸問題に取り組んでいますので、もし何かがうまく機能しない場合はどうぞお知らせ下さい。

では、最も大事なこと....ソースを入手しましょう
 []$ svn checkout http://svn.freepascal.org/svn/lazarus/trunk/ lazarus

(あるいはソースを置きたい任意のディレクトリ)

アップデートしたい時には、ただ次のようにタイプしてください

 []$ svn update lazarus

サブバージョンに関するより詳細な情報: http://subversion.tigris.org/

注意: CVSにもまだアクセスできますが、アップデートが停止しています。

コンパイルと実行

cvs もしくは svn のどちらからのチェックアウトであっても、次のステップとなります:

lazarus をコンパイルする
[]$ cd lazarus
[]$ make  (gmake on BSD)

fpc が正しくインストールされていれば、コンパイラは問題なく動くはずです。そうでなければ FAQ を見て下さい。

lazarus を起動する
[]$ ./lazarus

IDEが起動するはずです。ターミナルからlazarusを起動した場合、いくつかの足りない設定についての注意書きが表示されます。初回の起動においてはそれが当り前です。IDEは自動的に最もよく使われるディレクトリを探すことにより、FreePascalコンパイラとそのソースがどこにあるかを見つけます。

パスを確認して下さい
IDE メニューを使って次の通り進みます
Environment -> Environment Options -> Files

'FPCソースディレクトリ'にあなたのfpcソースディレクトリを指定してください。このディレクトリはふつう/fpc/や/fpcsrc/ (例えば/usr/src/fpcsrcや/home/username/freepascal/fpc)が末尾につき、'compiler', 'docs', 'fcl', 'rtl','packages'などのディレクトリを含みます。

ヒント

lazarus をアップデートするなら次の通りにします

[]$ svn update lazarus

それからどのアップデート経路であろうとも:

[]$ make clean all   (BSDならばgmake)

これによりlazarusが再構築され、IDEがlazarusパッケージなしに作成されます。あなたがインストールしたパッケージをインストールするには上記のに:

[]$ make idepkg

Debian GNU/Linux 環境への Lazarus のインストール

There are preliminary Debian packages for lazarus available for download. They are not the latest versions, however. Make sure you read /usr/share/doc/lazarus/README.Debian carefully before you start using it. Feedback is needed and appreciated; please send your comments to Carlos Laviola <claviola@debian.org>.

Note that for a fully working Lazarus install, no older or incompatible versions of, for example, the fpc source or fpc compiler must be installed. Remove them by typing

 dpkg -r <package name>   

without .deb extension. And then install the newest versions as described.

Debian 環境への Lazarus をインストールする別の方法

Added by User:Kirkpatc.

Debian 環境で簡単に Lazarus をインストールする方法です

(assume new Debian installation, without development libraries loaded)

SourceForge のリポジトリから fpc、fpclib、lazarus リリース版の最新をダウンロードします; http://lazarus.freepascal.org にアクセスして、"downloads" をマウスの左ボタンでクリックし、"binaries" をクリック、次に "linux"、次に "Current Lazarus RPM" をクリックします。This will bring you to

http://sourceforge.net/project/showfiles.php?group_id=89339

そして次のファイルをダウンロードします(より新しいものがあればそれをダウンロードして下さい)

  • fpc-2.0.0-0.i586.rpm
  • fpcsrc-2.0.0-0.i386.rpm
  • lazarus-0.9.8-fpc_2.0.0_0.i386.rpm

cd to the directory where these files are stored, then become root (su) and type:

alien -c fpc*     //this will convert both the fpc and fpcsrc files to debian format and convert the install scripts
alien -c laz*

そして、作成された Debian パッケージ(.deb)を root 権限でインストールします:

dpkg -i fpc*.deb laz*.deb

or use kpackage or a similar utility to install the generated fpc, fpcsrc and lazarus .deb files.

もし alien がインストールされていないのなら次のようにします:

apt-get install alien 

Please note that, on Linux distributions like Ubuntu, you'll have to add 'sudo' in front of all commands. In Ubuntu previous command would be

sudo apt-get install alien

You need to produce a configuration file, which will reside in /etc/fpc.cfg. Still as root, cd to the main fpc directory /usr/lib/fpc/2.0.0 and then type

sh ./samplecfg /usr/lib/fpc/2.0.0 /etc

Check the contents of your new configuration file (cat /etc/fpc.cfg) and make any changes you want using vi or another text editor. Also make sure that there are no old configuration files in for example your home directory (~/.fpc.cfg).

GTK と pixbuf ライブラリの開発パッケージをインストールする必要があります。

apt-get install libgtk2.0-dev
apt-get install libgdk-pixbuf-dev

これでプログラミングをはじめることが出来ます!

Windows 環境での Lazarus のインストール

Windows 版 Lazarus の現行バージョンのインストールは非常に簡単です。本体のハードディスク以外にもインストールできます。

もし使用する Windows 上にソフトウェアをインストールすることが許されていないか、管理者権限がなくてインストールできないといった場合、256 MB 以上の USB ドライブに Lazarus/FPC パッケージをインストールして使用することも可能です。この場合、コンパイラや環境設定オプション、fpc.cfg ファイルなどで、パスの指定に注意する必要があります。また USB ドライブ上にテスト用のディレクトリを用意し、保持しておいた方がいいと思います。

<< Q:DOES ANYONE KNOW HOW TO SET UP RELATIVE PATHS IN THESE TAGS AND FILES, SO THAT THE ADDRESSING WORKS WHEN YOU MOVE THE USB DEVICE TO ANOTHER MACHINE WHERE IT HAS A DIFFERENT DRIVE LETTER?

A: This is what I do. It's relatively convoluted, but it's the best solution I've found. I have a "bin" directory on my USB drive, where I have several scripts and utilities installed. Inside that directory is a batch file called "setenv.bat" which sets an environment variable called THUMBDRIVE. It is set by using this command in the batch file:

  set THUMBDRIVE=%CD:~0,2%

This is used in setenv.bat to set some paths to other things I have installed on the USB drive. I also have a link in the root directory of the thumb drive with this property:

 %SystemRoot%\system32\cmd.exe /k bin\setenv

so that when I click on that link when the thumb drive folder is diplayed after inserting it, it will open a command prompt at the thumb drive with the environment variables set from setenv.bat.

Also inside the bin directory is sed (the actual binary is one I obtained from the mingw distribution). So I created another batch file called fixlaz.bat which takes one argument, the drive letter which is currently in the Lazarus/fpc settings files that you want to change (note that this is the previous drive letter the last time you ran fixlaz.bat, not the current one of your USB drive which fixlaz.bat already knows). You will need to create this batch file to fit where you installed Lazarus in the root directory structure of the drive if you didn't install it directly in the root folder, and then repeat these lines also for the editoroptions.xml and fpc.cfg files (fpc.cfg is the the fpc bin directory, which might be buried deep in the lazarus folder):

 copy %THUMBDRIVE%\lazarus\environmentoptions.xml %THUMBDRIVE%\lazarus\environmentoptions.bak
 sed -e 's/%1/%THUMBDRIVE%/g' %THUMBDRIVE%\lazarus\environmentoptions.bak > %THUMBDRIVE%\lazarus\environmentoptions.xml

So to use it, I would type at the command prompt of the USB drive:

 fixlaz G:

if "G:" was the previous drive letter used the last time I ran it. This will then scan the file(s) and replace "G:" with the current drive letter of the USB drive, which is in the %THUMBDRIVE% environment variable (after running setenv.bat). Note that you could write it to save the current drive letter in a separate file, so that you wouldn't have to remember it yourself the next time. But this works well enough for me right now. >>


Linux 用、Windows 用のバイナリーパッケージは次の URL からダウンロードできます。

http://sourceforge.net/project/showfiles.php?group_id=89339

最新のリリースのもの(現在は Lazarus-0.9.26-fpc-2.2.2-win32.exe)をダウンロードし、これを実行して下さい。

典型的な Windows インストールでインストールできます。以前のバージョンの Lazarus と FPC(多くの場合 c:\pp ディレクトリにあります)をアンインストールしておけば、特に致命的な問題もなく、FPC コンパイラとソースライブラリが Lazarus のディレクトリ構成と同じディレクトリの中にインストールされ、IDE が起動します。

Windows 用のスナップショットを利用することが出来ます。Lazarus Snapshots Downloadsからダウンロードできます。

ソースからのインストール

もしソースからのインストールを行いたい場合、これらの説明を見て下さい (Thanks to Joe for the initial Step-by-step description)

まず、lazarus のソースを Lazarus Snapshots Downloads からダウンロードする必要があります:

次に、c:\lazarus などのディレクトリに解凍して下さい。なお、fpc-2.2.2 をインストールしておく必要があります。fpc-2.3.1 のスナップショットでも構いません。 私はこのようにコンパイルして、lazarus.exe を実行しています。私の fpc のパスは c:\pp\bin\win32 です。このディレクトリには沢山の実行ファイル(make, grep, ppc386 など)が置かれています。

コマンドプロンプトを起動します。スタートメニュー->全てのプログラム->...->MS-DOS のアイコンのコマンドプロンプトを選択します。

次のようにタイプして下さい:

cd c:\lazarus
set path=c:\pp\bin\win32;c:\lazarus  //もちろん、ここはあなたの環境に合わせて
                                     //書き換えて下さい
windres -i lazarus.rc -o lazarus.res
make

幸運にも無事コンパイルができたら、lazarus.exe と入力して下さい。ソースエディタ、ダイアログ、プロパティエディタが起動してきます。しかし、これで完璧ではありません。引き続き操作を行って下さい。

サンプルは次の手順でコンパイルします:

cd examples
make

もし、他のドライブ(例えば D ドライブなど)に lazarus をインストールしている場合、make をする際に GNU ユーティリティーが必要になってきます。もし、既にインストールしてあるのなら、環境変数の PATH にパスを通すことで(例えば set PATH=%PATH%;<gmakepath>)、解決します。でも d:\ を選ばない方が簡単です。

これで全てです。

Installing Lazarus under FreeBSD

FreeBSD 5+

The latest version of Lazarus into FreeBSD port tree is 0.9.26. We can to install lazarus using FreeBSD ports.

[]# cd /usr/ports/editors/lazarus && make install clean clean-depends

If you get the messages about missing source files, go to [menu bar >> Environment >> Environment Options >> Files Tab: FPC source library] and enter the directory of the FPC source files. It can be obtained from /usr/ports/distfiles/freepascal

Good luck, that worked for me. --Jrmarino 21:29, 4 Jan 2006 (CET)

FreeBSD 4.10+

上のテキストでも述べていますが、まず GTK+ 1.2 をインストールしておく必要があります。私はそれをしていなかったので、まず最初に root になってこれをインストールしました:

> pkg_add -r gtk
> pkg_add -r gdk-pixbuf
> cd /path-to-lazarus
> gmake
> ./startlazarus

もしソースファイルがないというメッセージがでたら、[menu bar >> Environment >> Environment Options >> Files Tab: FPC source library] に進み、FPC のソースファイルのあるディレクトリに移ってください。私は上で述べたように SVN からそれを入手しました。

Good luck, that worked for me. --Jrmarino 21:29, 4 Jan 2006 (CET)

6.0 でも同じ方法です。しかし、これには2つの潜在的な問題があります。

1. 起動後、lazarus のソースエディタでいくつかの壊れたフォントがあるように見えます。これはフォントの指定が間違っているためです。修正は簡単です。エディタオプションに進み、他の他のフォントを選択してください。(clean works for me).

2. もしパッケージとlazarus のセルフビルド機能を使用したいのなら、Linux とは異なり、自分で環境オプションでgmake (make ではなく) のパスを明示的に指定しなければなりません。


PC-BSD 1.0rc1+ 環境でのLazarusにインストール

PBI Dirから Lazarus PBI をダウンロードして、PB-BSD 上にインストールすることが出来ます。

注意として、/usr/port/devel/glib* にある glib* ポート、もしくは pkg_add -r glib12 glib20 を実行して glib パッケージをインストールする必要があります。 私は新しい PBI リリースでこれを修正するつもりです。

You can install Lazarus on PB-BSD by simply downloading the Lazarus PBI from PBI Dir

Note that you must install glib* port from /usr/port/devel/glib* or glib packages by pkg_add -r glib12 glib20. I will fix this in new PBI releases.

[他の OpenBSD/NetBSD/DragonFlyBSD はここから]

Installing Lazarus under Mac OS X

作業的には Linux 環境でのインストールとよく似ています。しかし、予め Apple developer ツールと X11 と GTK 1.2 をインストールしておく必要があります。

snaphot servers を利用して、Lazarus のスナップショットを簡単にインストールすることができます。

3つの .dmg スナップショットファイルをインストールすれば、それで FPCコンパイラ、FPCのソース、Larazusのソースもまた全てインストールしたことになります。後は Lazarus を実行して、ご自身のアプリケーションを開発するだけです。前記のような方法で FPC や Lazarus のソースを別にインストールする必要はありません。Lazarus をリビルドする必要があったり、Lazarus 自体の開発に参加したかったりするなら、前記のような方法で Lazarus ソースを read-write パーミッションを持ったフォルダにインストールする必要があります。

Carbon ウィジェットセットインターフェースのテストや開発については、 Carbon Interfaceを参照のこと。

OS Xで Lazarus を起動するには、少なくとも二つの方法があります:

X11を起動し、ターミナルウィンドウで次のようにタイプします:
cd /usr/local/share/lazarus
./lazarus
また、Lazarus を X11 メニューから起動することもできます。Applications | Customize を選択し、Add Item をクリックし、Nameの下に Lazarus と、Command の下に:
open -a /usr/local/share/lazarus/lazarus
と入力します。Doneをクリックすれば、Applications | Lazarus を選択することで Lazarus を起動することができるようになります。

Additional experiences and advice on installing FPC and Lazarus

On linux, getting Lazarus to work can be complicated if you have an older version installed. If you have already installed earlier versions of FPC and/or Lazarus, you have to take great care that the PATHS are adjusted so that only your new versions are called.

私が SuSE Linux 上で様々な試みから経験した落とし穴についてです:

rpm バージョンは場合によっては FPC を /bin や /usr/bin に、ライブラリを /lib や /usr/lib にインストールします。もし .tar.gz を使ってソースバージョンからインストールしたら、デフォルトでは実行ファイルを /usr/local/bin に、ライブラリを /usr/local/lib にインストールします。

Pitfalls that I have experienced in various attempts with SuSE linux include:

The rpm versions often install FPC in /bin or /usr/bin, with the libraries in /lib or /usr/lib.

If you perform a make install on a source version or use a .tar.gz, the compiler is usually installed in /usr/local/bin with the libraries in /usr/local/lib.

So if earlier versions have been installed from rpm, make sure all links are changed to reflect the directory structure of your new compiler. The place to make the changes is in /etc/fpc.cfg ; make sure there are no remnant configuration files in your home directory or in your FPC download directory. Typically they are found in ~/.fpc.cfg

Make sure the links in /etc/fpc.cfg point to the correct versions of the libraries (particularly if you have older versions still lurking around).

In /usr/local/bin or /usr/bin there is a file called fpc ; this is the executable that is called when you invoke the compiler. One of the first things it does is to open ppc386 in the same directory. This has to be the same version as the fpc file, or can be a link pointing to the true ppc386 in some other directory (such as a library directory, or the fpc directory in your own development space); be sure to update your link if you install a newer version of the compiler.

Try running the compiler from the command line using one of the simple example programs or one which you wrote yourself.

Turning to Lazarus:

If you use a downloaded snapshot (.tar.gz) or get the source from CVS, enter your lazarus directory and type

make
./lazarus 

and hopefully the IDE should load. There may be a message saying it can't find the sources; if so, go to the menu at the top and select Environment -> Environment options and insert the name of the directory where you expect to find your lazarus files (eg ~/FreePascal/lazarus), your compiler (e.g. /usr/local/bin/ppc386), the FreePascal source directory (e.g. /usr/local/lib/fpc/$version/fpc or a directory in your own space e.g. ~/FreePascal/fpc). Then close the dialog and start programming.

You may find further problems when you start programming or compiling; most of these will be related to PATH selection.

Many of the difficulties are dealt with in the Lazarus FAQ, found either on this WiKi site, or a more complete list on the main Lazarus site

http://www.lazarus.freepascal.org/modules.php?op=modload&name=FAQ&file=index

From the top menu select Run -> Compiler Options (or Project -> Compiler Options in more recent releases of Lazarus) and select the Paths tab on the resulting dialog. There are several boxes for entry of paths for Unit files, Include files, Other source files, Libraries etc. For each of these, it is worth pressing the ... (ellipsis) button on the right, and you will be given a blank window for inserting path information, and a lower window giving some suggestions. Select as many as you like (or ALL!) and press the ADD button to transfer the selections to the upper window. When your selection is complete, press OK and move on to the next box. If you know of other paths which need to be followed, press the Browse button associated with each box, and insert the additional paths.

When you think you have got your paths right, try to compile your application. If there are further path-related errors ('can't find unit .......') then go back and check your paths, both in /etc/fpc.cfg and in your Run -> Compiler Options dialog (or Project -> Compiler Options depending on your version).

Once you have got the environment and PATHS correct, it is worth saving the settings to a file, otherwise you will have to go through this process for each new project. In the Run -> Compiler options dialog there is a Load/Save button; select this and then save the setings to the filename of your choice: mine is ~/FreePascal/default.cfg. Then each time I start a new project, I can go to the Run -> Compiler Options dialog (or Project -> Compiler Options), select Load/Save, and load my default.cfg file to the new project. You can, of course, modify the options for each new project if you so desire.