构建跨平台的 Delphi 应用程序

发布于 2024-10-12 05:35:30 字数 286 浏览 10 评论 0原文

我下载了 Lazarus,但也使用过 Embarcadero Delphi IDE。我有一个关于构建跨平台 Delphi 应用程序的问题。

如何在win32环境下构建它们?我从 Lazarus 网站阅读了 wiki,它解释了如何做到这一点,但我仍然不明白。是否可以在 Linux 和 MacOS 的 win32 环境下构建和编译应用程序?如果可能的话,有人可以详细解释一下如何做到这一点。

编辑: 现在是时候讨论新的 XE2 版本的 Delphi IDE 我认为:)

谢谢

I downloaded Lazarus, but have worked with Embarcadero Delphi IDE too. I have a question about building cross-platform Delphi applications.

How can I build them under win32 environment? I read the wiki from Lazarus site, that explains how to do it, but I still do not understand it. Is is possible to build and compile application under win32 environment for Linux and MacOS? If it is possible, can someone explain ste-by-step how to do it exactly.

EDIT:
Now is the time for talking about the new XE2 version of the Delphi IDE I think :)

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

煮酒 2024-10-19 05:35:30

您所要求的内容已存在于 lazarus wiki 网站中,你需要阅读这些文章。

What you're asking for already exists in the lazarus wiki site, you need to read these articles.

夜清冷一曲。 2024-10-19 05:35:30

虽然交叉编译到非 Windows 目标是可能的(而且并不难),但在第一步中习惯 fpc/lazarus 和交叉编译是一座遥远的桥梁。这是因为 Linux 不是一个非常同质的目标,处理这种变化需要对库和链接在 Linux 上的工作方式有一定的了解。这击败了“通用”linux 的一键可下载交叉编译设置。我知道,这种开箱即用的一键式功能对每个人来说都是很棒的,但它只是不会发生(或者仅适用于非常有限的发行版本组合)

使用 FPC 进行交叉编译并不是非常困难或火箭科学,但是大量的术语和细节可能会让外行人大吃一惊,如果没有背景知识,就很难诊断由于轻微配置错误而导致的问题。

我建议您首先熟悉 Lazarus/FPC,然后才进行交叉编译飞跃。 (并且已经提到的 buildfaq 列出了一些原因)。

底线:在 Windows 上安装 lazarus 并开始移植您的应用程序。如果成功,请开始使用 Linux 安装(或 VM)来熟悉 Linux 及其下的 Lazarus。无论如何,您都需要安装 Linux 来进行测试。

然后才开始考虑交叉编译来加速这个过程。

While crosscompiling to a non windows target is possible (and not that hard), getting used to fpc/lazarus and crosscompiling in one first step is a bridge too far. This because Linux is not a very homogenous target and dealing with this variation requires some understanding how libraries and linking works on Linux. This defeats one-button downloadable cross-compile setups to "general" linux. I know, such one-button thingies that work out of the box for everyone would be great, but it is just not going to happen (or only forvery limited distribution-version combinations)

Crosscompiling with FPC is not extremely difficult or rocket science, but the amount of jargon and details can flabbergast uninitiated people, and without background knowledge it is hard to diagnose problems as a result of minor misconfigurations

I recommend to first familiarize yourself with Lazarus/FPC, and only then make the crosscompilation leap. (and the already mentioned buildfaq names some reasons).

Bottomline: install lazarus on Windows and start porting your app. If that succeeds, start using a linux install (or VM) to familiarize yourself with Linux, and Lazarus under it. You'll need a linux install anyway to test.

Only then start thinking about crosscompiling to speed up the process.

勿忘初心 2024-10-19 05:35:30

CodeTyphon 是一个强大的Lazarus/FPC一键轻松安装包,用于跨平台原生开发。它已经支持4个CPU/操作系统主机(Win32、Win64、Linux32、Linux64)和16个CPU/操作系统目标(arm-Wince、arm-Linux、arm-Embedded) 、arm-gba、arm-nds、i386-Win32、i386-Linux、i386-FreeBSD、i386-Haiku、x86_64-Win64、x86_64-Linux、x86_64-FreeBSD、powerpc-Linux、powerpc64-Linux、sparc-Linux、sparc -索拉里斯)。 Lazarus/FreePascal 支持更多功能,但其他功能尚未集成到 CodeTyphon 中。我有没有提到它是免费的?一个代码即可统治所有这些;-)

重点是您不必浪费时间来设置跨平台环境,因为有人已经为您完成了艰苦的工作。

CodeTyphon is a powerful Lazarus/FPC one click easy installation package for cross platform native development. It already supports 4 CPU/OS hosts (Win32, Win64, Linux32, Linux64), and 16 CPU/OS targets (arm-Wince, arm-Linux, arm-Embedded, arm-gba, arm-nds, i386-Win32, i386-Linux, i386-FreeBSD, i386-Haiku, x86_64-Win64, x86_64-Linux, x86_64-FreeBSD, powerpc-Linux, powerpc64-Linux, sparc-Linux, sparc-Solaris). More are supported in Lazarus/FreePascal, but others are not yet integrated in CodeTyphon. Did I mention that it is free? One code to rule them all ;-)

The point is that you don't have to waste days for setting up your cross platform environment, since someone has already done the hard work for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文