Difference between revisions of "Target Darwin"

From Lazarus wiki
Jump to navigationJump to search
(→‎Installation: Update + remove dead links)
(Fixed heading levels + add warning out of date)
Line 2: Line 2:
 
{{Platform only|iOS}}
 
{{Platform only|iOS}}
 
{{LanguageBar}}
 
{{LanguageBar}}
= Introduction =
+
 
 +
{{Warning|Much of this page appears out of date}}
 +
 
 +
== Introduction ==
  
 
Darwin is the target for macOS and iOS, both PowerPC, ARM, i386 and X86_64. Programs may also be run on a machine with only Darwin installed.
 
Darwin is the target for macOS and iOS, both PowerPC, ARM, i386 and X86_64. Programs may also be run on a machine with only Darwin installed.
  
= Installation =
+
== Installation ==
  
 
See [[Installing Lazarus on macOS]].
 
See [[Installing Lazarus on macOS]].
  
= Usage =
+
== Usage ==
  
 
1) Any Editor (AlphaX, BBedit, ...) and command line (fpc your_pascal_program.pas)
 
1) Any Editor (AlphaX, BBedit, ...) and command line (fpc your_pascal_program.pas)
Line 34: Line 37:
 
Lazarus is a Delphi-style RAD environment: http://forum.lazarus.freepascal.org
 
Lazarus is a Delphi-style RAD environment: http://forum.lazarus.freepascal.org
  
= Universal binaries =
+
== Universal binaries ==
  
 
Normally for each processor - operating system combination there is one executable, but in Mac OS X you can combine a PowerPC and a x86 binary into a so called "Universal Binary". To do this the PowerPC and i386 executables have to be compiled separately and then combined using the ''lipo'' command line tool.
 
Normally for each processor - operating system combination there is one executable, but in Mac OS X you can combine a PowerPC and a x86 binary into a so called "Universal Binary". To do this the PowerPC and i386 executables have to be compiled separately and then combined using the ''lipo'' command line tool.
Line 40: Line 43:
 
The Free Pascal installer for x86 already installs a PowerPC cross-compiler so you only need to use ppcppc instead of fpc to build your project to have the PowerPC binary. If have a PowerPC computer, then the simplest solution is to build the x86 binary in a different computer with x86 architecture, or use an emulator to run Mac OS X running in x86 architecture.
 
The Free Pascal installer for x86 already installs a PowerPC cross-compiler so you only need to use ppcppc instead of fpc to build your project to have the PowerPC binary. If have a PowerPC computer, then the simplest solution is to build the x86 binary in a different computer with x86 architecture, or use an emulator to run Mac OS X running in x86 architecture.
  
= More =
+
== More ==
  
 
* Mac OS Pascal universal interfaces are part of the fpc packages: check packages/univint
 
* Mac OS Pascal universal interfaces are part of the fpc packages: check packages/univint

Revision as of 02:16, 14 April 2021

macOSlogo.png

This article applies to macOS only.

See also: Multiplatform Programming Guide

Apple iOS new.svg

This article applies to iOS only.

See also: Multiplatform Programming Guide

English (en)

Warning-icon.png

Warning: Much of this page appears out of date

Introduction

Darwin is the target for macOS and iOS, both PowerPC, ARM, i386 and X86_64. Programs may also be run on a machine with only Darwin installed.

Installation

See Installing Lazarus on macOS.

Usage

1) Any Editor (AlphaX, BBedit, ...) and command line (fpc your_pascal_program.pas)

2) Xcode

The FPC installer disk images contain installers with Xcode templates.

3) Lightweight IDE

An free IDE in the classic Mac style: http://www.ragnemalm.se/lightweight/

4) PascalGladiator

A free graphical IDE for FPC and debugger front-end for GDB: http://www.thealchemistguild.com/pascalgladiator/

5) DOS-like IDE

A description of how to get the IDE running is here: How to get the fpc ide running under Mac OS X

6) Lazarus

Lazarus is a Delphi-style RAD environment: http://forum.lazarus.freepascal.org

Universal binaries

Normally for each processor - operating system combination there is one executable, but in Mac OS X you can combine a PowerPC and a x86 binary into a so called "Universal Binary". To do this the PowerPC and i386 executables have to be compiled separately and then combined using the lipo command line tool.

The Free Pascal installer for x86 already installs a PowerPC cross-compiler so you only need to use ppcppc instead of fpc to build your project to have the PowerPC binary. If have a PowerPC computer, then the simplest solution is to build the x86 binary in a different computer with x86 architecture, or use an emulator to run Mac OS X running in x86 architecture.

More

  • Mac OS Pascal universal interfaces are part of the fpc packages: check packages/univint
  • IDE already works, except for some graphic glitches on the user output screen,
  • Can mouse events be supported with Terminal.app and X11.app? how?
    • It is not possible to support the mouse in Terminal.app. In xterm (X11) it should be possible.