Difference between revisions of "Carbon Interface/ja"
m |
|||
Line 9: | Line 9: | ||
The Carbon widgetset is in an early stage of development. A fully functional Lazarus IDE on Mac OS X is strongly recommended. For instructions see [[Installing Lazarus on MacOS X|Installing Lazarus on Mac OS X]]. | The Carbon widgetset is in an early stage of development. A fully functional Lazarus IDE on Mac OS X is strongly recommended. For instructions see [[Installing Lazarus on MacOS X|Installing Lazarus on Mac OS X]]. | ||
− | == | + | == carbonproof Lazarusを取得する == |
+ | *Mac OS X用のSubversionクライアントを取得します: [http://www.codingmonkeys.de/mbo/ Martin Ott]によるパッケージはすばらしいものです. | ||
*Install SVN for Mac OS X: A good package is provided by [http://www.codingmonkeys.de/mbo/ Martin Ott]. | *Install SVN for Mac OS X: A good package is provided by [http://www.codingmonkeys.de/mbo/ Martin Ott]. | ||
+ | |||
+ | *[[Installing_Lazarus/ja#Downloading_Lazarus_SVN|Lazarusのインストール-Subversionからの取得]]を行って下さい | ||
*Then follow [[Installing_Lazarus#Downloading_Lazarus_SVN]] | *Then follow [[Installing_Lazarus#Downloading_Lazarus_SVN]] | ||
+ | *Lazarusを起動します。IDEから新しいプロジェクトを開始し、空のフォームを出します。このプロジェクトを適当な名前で保存します。例えば/Users/<yourUsername>/pascal/test/project1.lpiといった具合にです。 | ||
*Start Lazarus. The IDE will start with a new project with an empty form. Save this project under a name of your choice. In the following examples we assume this to be /Users/<yourUsername>/pascal/test/project1.lpi | *Start Lazarus. The IDE will start with a new project with an empty form. Save this project under a name of your choice. In the following examples we assume this to be /Users/<yourUsername>/pascal/test/project1.lpi | ||
Revision as of 12:19, 16 May 2006
│ Deutsch (de) │ English (en) │ 日本語 (ja) │
This article applies to macOS only.
See also: Multiplatform Programming Guide
これはなんのために使いますか
Carbonウィジェットセットは開発の初期段階で、Lazarus IDE上でMac OS X向けの開発を行う際に強く推奨されます。くわしくはMac OS XでのLazarusのインストールを見てください。
The Carbon widgetset is in an early stage of development. A fully functional Lazarus IDE on Mac OS X is strongly recommended. For instructions see Installing Lazarus on Mac OS X.
carbonproof Lazarusを取得する
- Mac OS X用のSubversionクライアントを取得します: Martin Ottによるパッケージはすばらしいものです.
- Install SVN for Mac OS X: A good package is provided by Martin Ott.
- Lazarusのインストール-Subversionからの取得を行って下さい
- Then follow Installing_Lazarus#Downloading_Lazarus_SVN
- Lazarusを起動します。IDEから新しいプロジェクトを開始し、空のフォームを出します。このプロジェクトを適当な名前で保存します。例えば/Users/<yourUsername>/pascal/test/project1.lpiといった具合にです。
- Start Lazarus. The IDE will start with a new project with an empty form. Save this project under a name of your choice. In the following examples we assume this to be /Users/<yourUsername>/pascal/test/project1.lpi
Compiling the Carbon Interface
We now assume your Lazarus directory is located at /Users/<yourUsername>/pascal/lazarus/
- Start Lazarus.
- Set Environment>Environment Options>Files>Lazarus Directory to /Users/<yourUsername>/pascal/lazarus/
- Set Tools>Configure "Build Lazarus"> to
- Tools>Build Lazarus -- This will compile the Carbon Interface and put the .ppu files into /Users/<yourUsername>/pascal/lazarus/lcl/units/powerpc-darwin and /Users/<yourUsername>/pascal/lazarus/lcl/units/powerpc-darwin/carbon
Your first native Carbon App
Compiler Options
Set Project > Compiler Options > Paths > LCL Widget Type to carbon
Set Project > Compiler Options > Linkink > Options Check Pass Options to the Linker
and type in the edit field:
-framework carbon
You should now be able to compile the project without errors. It will create an executable project1, but you can not focus it. That's because Mac OS X expects some hidden resource files.
Creating the Apple Resource files
There is a tool to create these files.
Open /Users/<yourUserName>/pascal/lazarus/components/macfiles/examples/createmacapplication.lpi in the IDE. Compile.
Open a Terminal of your choice. Type:
cd /Users/<yourUserName>/pascal/project1/ /Users/<yourUserName>/pascal/lazarus/components/macfiles/examples/createmacapplication project1 ln -s ../../../project1 project1.app/Contents/MacOS/project1
Now you can start the program via its Finder icon or in the native Mac OS Terminal via ./project1.app/Contents/MacOS/project1
Carbon interface internals
If you want to help improving the carbon interface, see here