Getting Lazarus/ja: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Getting Lazarus/ja
| Old | New | Line | |
|---|---|---|---|
| 1 | + | ## リリース版のダウンロードとインストール | |
| 2 | + | ||
| 3 | + | ### SourceForgeから | |
| 4 | + | ||
| 5 | + | いろいろなプラットホームのバイナリリリースが、SourceForgeのダウンロードエリアで配布されています。 [Lazarus Sourceforge download area](http://sourceforge.net/project/showfiles.php?group_id=89339). | |
| 6 | + | ||
| 7 | + | ### プラットフォーム別 | |
| 8 | + | ||
| 9 | + | Lazarus for Windows の取得 - 上記の Sourceforge へのリンクから取得してください。 | |
| 10 | + | ||
| 11 | + | [[Lazarus release version for Ubuntu|Lazarus for Ubuntu の取得]] | |
| 12 | + | ||
| 13 | + | [[Install on Fedora|Lazarus for Fedora の取得]] | |
| 14 | + | ||
| 15 | + | [[Lazarus release version for Suse|Lazarus for Suse の取得]] | |
| 16 | + | ||
| 17 | + | [[Lazarus release version for Mandriva|Lazarus for Mandriva の取得]] | |
| 18 | + | ||
| 19 | + | [[Installing Lazarus on macOS|Lazarus for Mac の取得]] | |
| 20 | + | ||
| 21 | + | ## SVN からの取得 | |
| 22 | + | ||
| 23 | + | ### TortoiseSVN クライアント | |
| 24 | + | ||
| 25 | + | Windows なら TortoiseSVN クライアントが使えます。 <http://tortoisesvn.tigris.org/> からダウンロードして下さい。 | |
| 26 | + | ||
| 27 | + | [[TortoiseSvn|こちら]] で、SVN からのソースのダウンロードやアップデートのやり方について紹介しています。Lazarus だけでなく、FPC についても同じやり方で SVN からソースを取得できます。 | |
| 28 | + | ||
| 29 | + | ### Other clients | |
| 30 | + | ||
| 31 | + | その他の多くのプラットホーム用に、SVNコマンドラインクライアントがオフィシャルSVNサイト[website](http://subversion.tigris.org/)から提供されていますので、利用してください。 | |
| 32 | + | ||
| 33 | + | Linuxでは、ディストリビューションのパッケージ管理システムを使ってsubversionをインストールすることをお勧めします。例えば次のようなコマンドを使います。 | |
| 34 | + | ||
| 35 | + | `sudo apt-get install subversion` | |
| 36 | + | ||
| 37 | + | ## Lazarus SVN 開発版の取得 | |
| 38 | + | ||
| 39 | + | ### コマンドラインで使う | |
| 40 | + | ||
| 41 | + | 最初にLazarusを取得するには: | |
| 42 | + | ||
| 43 | + | 端末か、コマンドプロンプトを開いて、カレントディレクトリを、インストールしたい場所にLazarusディレクトリを作ってそこに移っておいてください。そして次のようにタイプします。: | |
| 44 | + | ||
| 45 | + | ` svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus` | |
| 46 | + | ||
| 47 | + | Lazarusのソースをアップデートするには: | |
| 48 | + | ||
| 49 | + | 端末かコマンドプロンプトを開いて、Lazarusディレクトリに移った後、次のようにタイプします。: | |
| 50 | + | ||
| 51 | + | ` svn update` | |
| 52 | + | ||
| 53 | + | コンパイルについては、こちらを参照してください。 | |
| 54 | + | ||
| 55 | + | ### そのほかのリポジトリのURL | |
| 56 | + | ||
| 57 | + | 時々、先ほどのリポジトリはうまく動かないことがあります。なぜならsvnサーバーとの間にhttpプロクシサーバーがありからです。そのサーバーは通常'透過'プロクシとして動作するはずですが、あなたのsvnコマンドを正しくsvn.freepascal.orgサーバーへ渡さないことがあります。 | |
| 58 | + | ||
| 59 | + | 一方、svn.freepascal.orgサーバーは8080ポートでもソケットを受け付けます。おそらくプロクシはそのポートのhttpトラフィックにたいして関与しません。ですから、プロクシ経由で上手くいかないばあい、次を試してみてください。 | |
| 60 | + | ||
| 61 | + | `svn co http://svn.freepascal.org:8080/svn/lazarus/trunk lazarus ` | |
| 62 | + | ||
| 63 | + | Lazarus svnリポジトリは\[\[fpsvnsync\]を使って15分後にsourceforgeにミラーされています。sourceforgeリポジトリはhttpsプロトコルを使います。sourceforgeを使う場合、次のコマンドを使います。 | |
| 64 | + | ||
| 65 | + | `svn co https://svn.sourceforge.net/svnroot/lazarus/trunk lazarus` | |
| 66 | + | ||
| 67 | + | FPCとLazarusのsvnリポジトリは、さらに svn2.freepascal.org へミラーされています。svn2.freepascal.org からチェックアウトする場合は次のコマンドを使います。 | |
| 68 | + | ||
| 69 | + | `svn co http://svn2.freepascal.org/svn/lazarus/trunk lazarus` | |
| 70 | + | ||
| 71 | + | もし、独自のプロクシサーバーがある場合や、友人のプロクシサーバーを借りてアクセスしている時は、プロクシにsvnコマンドを通過するように設定してください。設定の方法は次のとおりです。: | |
| 72 | + | ||
| 73 | + | <http://subversion.tigris.org/faq.html#proxy> | |
| 74 | + | ||
| 75 | + | ここにはsquidの例があります。クライアントにもproxyを使うように設定してください。(TortoiseSVNの場合は settings / networkを参照してください。) | |
| 76 | + | ||
| 77 | + | ### スクリプト | |
| 78 | + | ||
| 79 | + | Lazarus を自動的にダウンロード、ビルドする、Windows と Linux 用のスクリプト: [[LazarusScripts|Scripts for Lazarus]] | |
| 80 | + | ||
| 81 | + | ## Lazarus のコンパイルとインストール | |
| 82 | + | ||
| 83 | + | [[Installing Lazarus]] を参照してください - 詳しいインストールガイドです。または、 <http://www.stack.nl/~marcov/buildfaq.pdf> - さらに詳細なガイドです。 | |
| 84 | + | ||
| 85 | + | ### Using the command-line | |
| 86 | + | ||
| 87 | + | 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). | |
| 88 | + | ||
| 89 | + | The tool allows you to compile the lazarus from command-line easily. You need to have fpc and fpc-packages installed and configured first. | |
| 90 | + | ||
| 91 | + | To compile go to Lazarus directory in your terminal and type | |
| 92 | + | ||
| 93 | + | ` make` | |
| 94 | + | ||
| 95 | + | This should rebuild LCL and Lazarus IDE (with basic packages installed). | |
| 96 | + | ||
| 97 | + | ### Make targets | |
| 98 | + | ||
| 99 | + | Following compiling targets can be specified for the make tool: | |
| 100 | + | ||
| 101 | + | - **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*" | |
| 102 | + | ||
| 103 | + | - **bigide** - the command rebuilds LCL and IDE with additional packages. For example: "*make bigide*" | |
| 104 | + | ||
| 105 | + | - **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*" | |
| 106 | + | ||
| 107 | + | - **components** | |
| 108 | + | - **packager/registration** | |
| 109 | + | - **ideintf** | |
| 110 | + | - **packager** | |
| 111 | + | - **bigidecomponents** | |
| 112 | + | - **ide** | |
| 113 | + | - **idepkg** | |
| 114 | + | - **idebig** | |
| 115 | + | - **bigide** | |
| 116 | + | - **starter** - the command rebuilds startlazarus binary. | |
| 117 | + | - **lazbuilder** | |
| 118 | + | - **tools** | |
| 119 | + | - **all** | |
| 120 | + | - **cleanide** | |
| 121 | + | - **purge** | |
| 122 | + | - **examples** - the command rebuilds examples lazarus | |
| 123 | + | - **install** | |
| 124 | + | - **lazbuild** | |
| 125 | + | ||
| 126 | + | If no target is specified LCL and IDE Lazarus (with basic set of components) is rebuilt. | |
| 127 | + | ||
| 128 | + | ### Make parameters | |
| 129 | + | ||
| 130 | + | There're also additional parameters, can be used for 'making' Lazarus. | |
| 131 | + | ||
| 132 | + | - **OPT**=%compiler_switches | |
| 133 | + | ||
| 134 | + | the %compiler_switches is passed to each fpc call. The option is useful for specifying defines | |
| 135 | + | ||
| 136 | + | For example: | |
| 137 | + | ||
| 138 | + | ` make bigide OPT="-dNoGdkPixBufLib -gw2" ` | |
| 139 | + | ||
| 140 | + | makes LCL and ide with NoGdkPixBufLib defined and dwarf2 debug info. | |
| 141 | + | ||
| 142 | + | - **LCL_PLATFORM**=%platform | |
| 143 | + | ||
| 144 | + | %platform is the target Widgetset. It can be win32,gtk,gtk2,qt,carbon or cocoa. | |
| 145 | + | ||
| 146 | + | For example: | |
| 147 | + | ||
| 148 | + | ` make LCL_PLATFORM=gtk2` | |
| 149 | + | ||
| 150 | + | Rebuilds LCL and IDE for gtk2 widgetset | |
| 151 | + | ||
| 152 | + | - **FPC**=%compiler_path | |
| 153 | + | ||
| 154 | + | %compiler_path is the path to a custom compiler binary you want to build the target with. | |
| 155 | + | ||
| 156 | + | ## Getting FPC SVN development version | |
| 157 | + | ||
| 158 | + | 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 Lazarus|Installing the Free Pascal Compiler]]. | |
| 159 | + | ||
| 160 | + | Then create a directory and download FPC from SVN: | |
| 161 | + | ||
| 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` | |
| 165 | + | ||
| 166 | + | This will take some time. | |
| 167 | + | ||
| 168 | + | You can also use TortoiseSVN client on Windows as explained earlier. | |
| 169 | + | ||
| 170 | + | ## FPC のコンパイルとインストール | |
| 171 | + | ||
| 172 | + | FPC のコンパイルとインストール方法はいくつかあります。 | |
| 173 | + | ||
| 174 | + | - Use plain *make*. | |
| 175 | + | - 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. | |
| 176 | + | ||
| 177 | + | In either case Lazarus must finally be configured for the new FPC. | |
| 178 | + | ||
| 179 | + | ### Building and installing Free Pascal in UNIXe | |
| 180 | + | ||
| 181 | + | The following instructions work in UNIX platforms, such as Linux, but also Mac OS X. | |
| 182 | + | ||
| 183 | + | 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. | |
| 184 | + | ||
| 185 | + | <b>Step 1 - Make sure you have a compatible starting compiler installed.</b> | |
| 186 | + | ||
| 187 | + | Usually this will mean having installed the latest stable release. | |
| 188 | + | ||
| 189 | + | <b>Step 2 - Download the source of the new compiler</b> | |
| 190 | + | ||
| 191 | + | 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: | |
| 192 | + | ||
| 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` | |
| 194 | + | ||
| 195 | + | <b>Step 3 - Build the compiler</b> | |
| 196 | + | ||
| 197 | + | Now enter the newly created directory and build and install Free Pascal: | |
| 198 | + | ||
| 199 | + | ` cd fpcfixes2_4`\ | |
| 200 | + | ` make clean all install INSTALL_PREFIX=~` | |
| 201 | + | ||
| 202 | + | This will compile the compiler in 3 cycles, first using the already installed compiler and then using the newly compiled compiler. | |
| 203 | + | ||
| 204 | + | 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. | |
| 205 | + | ||
| 206 | + | <b>Step 4 - Update your fpc.cfg file</b> | |
| 207 | + | ||
| 208 | + | Then create a file | |
| 209 | + | ||
| 210 | + | ` ~/.fpc.cfg` | |
| 211 | + | ||
| 212 | + | 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. | |
| 213 | + | ||
| 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` | |
| 218 | + | ||
| 219 | + | This allows installing any future fpc versions into PREFIX=~ without touching that config file. | |
| 220 | + | ||
| 221 | + | 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) : | |
| 222 | + | ||
| 223 | + | ` export PATH=~/lib/fpc/2.5.1:$PATH` | |
| 224 | + | ||
| 225 | + | Note that path separator is ":" under Linux (";" under Windows). Now see "Configure Lazarus for the new fpc" below for the next step. | |
| 226 | + | ||
| 227 | + | ### Build a debian/ubuntu package | |
| 228 | + | ||
| 229 | + | **Important**: This script does not create the official debian/ubuntu packages. It creates a fpc package that contains the compiler and all packages. | |
| 230 | + | ||
| 231 | + | To build the package you need to install some packages: | |
| 232 | + | ||
| 233 | + | `sudo apt-get install libgpmg1-dev fakeroot libncurses5-dev build-essential` | |
| 234 | + | ||
| 235 | + | Go into your lazarus source directory. The directory must be writable. | |
| 236 | + | ||
| 237 | + | `cd ~/freepascal/lazarus/tools/install`\ | |
| 238 | + | `./create_fpc_deb.sh fpc ~/freepascal/fpc` | |
| 239 | + | ||
| 240 | + | 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: | |
| 241 | + | ||
| 242 | + | ` sudo dpkg -i fpc_2.5.1-091121_i386.deb` | |
| 243 | + | ||
| 244 | + | The file name is different for you. | |
| 245 | + | ||
| 246 | + | ### Build a RPM package | |
| 247 | + | ||
| 248 | + | ToDo... | |
| 249 | + | ||
| 250 | + | ### Configure Lazarus for the new FPC | |
| 251 | + | ||
| 252 | + | 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*. | |
| 253 | + | ||
| 254 | + | If you have not yet downloaded the lazarus svn, do it now: [[Getting Lazarus|Development versions from SVN]]. For example: | |
| 255 | + | ||
| 256 | + | `cd ~/freepascal`\ | |
| 257 | + | `svn co `[`http://svn.freepascal.org/svn/lazarus/trunk`](http://svn.freepascal.org/svn/lazarus/trunk)` lazarus` | |
| 258 | + | ||
| 259 | + | This will take some time, continue with: | |
| 260 | + | ||
| 261 | + | `cd ~/freepascal/lazarus`\ | |
| 262 | + | `make clean all` | |
| 263 | + | ||
| 264 | + | If this gives linker errors, you have to install some packages (build-essential, libgtk2.0-dev,libgdk-pixbuf-dev). Start the IDE: | |
| 265 | + | ||
| 266 | + | `cd ~/freepascal/lazarus`\ | |
| 267 | + | `./lazarus` | |
| 268 | + | ||
| 269 | + | This is a minimal IDE without any extra packages. Now the IDE must be setup and can be built with packages: | |
| 270 | + | ||
| 271 | + | - Go to Environment / Options / Environment | |
| 272 | + | - Set lazarus directory to */home/username/freepascal/lazarus* | |
| 273 | + | - Set *FPC source directory* to */home/username/freepascal/fpc* | |
| 274 | + | - Click *Ok* to close the dialog | |
| 275 | + | - Tools / Configure Build Lazarus / Quick Build Options / Build IDE with packages | |
| 276 | + | - Click *Build*. | |
| 277 | + | - Restart the IDE | |
| 278 | + | - Now you have the latest and greatest IDE built with the latest and greatest FPC. | |
| 279 | + | ||
| 280 | + | ## Getting Lazarus from the GitLab server | |
| 281 | + | ||
| 282 | + | Development version of Lazarus\[edit\] To get Lazarus for the first time, using command line: | |
| 283 | + | ||
| 284 | + | `git clone `[`https://gitlab.com/freepascal.org/lazarus/lazarus.git`](https://gitlab.com/freepascal.org/lazarus/lazarus.git)` lazarus` | |
| 285 | + | ||
| 286 | + | A new directory "lazarus" is then created under the current directory. | |
| 287 | + | ||
| 288 | + | ## Development versions from Mercurial | |
| 289 | + | ||
| 290 | + | <s>There is a Hg mirror of the official SubVersion repository being maintained on [florianklaempfl.de](http://florianklaempfl.de:8000/lazarustrunk/).</s> | |
| 291 | + | ||
| 292 | + | This mirror does not exist any more. See the [message](http://lists.freepascal.org/lists/fpc-devel/2010-June/020442.html) from Florian Klämpfl. | |
| 293 | + | ||
| 294 | + | ## Daily Snapshotの方法 | |
| 295 | + | ||
| 296 | + | もし、svnディレクトリを使いたくない場合、daily snapshotを使ってみてください。 [[Lazarus Snapshots Downloads|Lazarus Snapshots Downloadsページに]]、ミラーのリストがあります。 | |
| 297 | + | ||
| 298 | + | ## ソースリポジトリをWebブラウザで見る | |
| 299 | + | ||
| 300 | + | SVNアーカイブの内容はWebブラウザから、 [this viewcvs](http://www.freepascal.org/cgi-bin/viewcvs.cgi/?root=lazarus) を通して見ることができます。 | |
| 301 | + | ||
| 302 | + | ## Lazarus ディストリビューション | |
| 303 | + | ||
| 304 | + | LazarusとFree Pascalが含まれるいくつかの非公式なディストリビューションを見つけることができます。 | |
| 305 | + | ||
| 306 | + | - オーストリア大学 応用科学部 | |
| 307 | + | ||
| 308 | + | <http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso> | |
| 309 | + | ||
| 310 | + | 上記のmd5sumファイル <http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso.md5>. | |
| 311 | + | ||
| 312 | + | ## Original contributors and changes | |
| 313 | + | ||
| 314 | + | This page has been converted from the epikwiki [version](http://lazarus-ccr.sourceforge.net/index.php?wiki=GettingLazarus). | |
| 315 | + | ||
| 316 | + | --- | |
| 317 | + | *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).* | |
| 318 | + | Category: Lazarus/ja |
