适用于 Android 的 Delphi 的 VCL
我看到了 lenniedevillierslenniedevilliers 的一个项目“Delphi for Android”,它给了我很大的启发。我但是该项目中只有几个 VCL(tbutton、tEdit 和 Tlabel)。谁能给我一个有关项目的菜单栏和进度栏的提示
I have seen a project "Delphi for Android" by lenniedevilliers which inspired me very much. I but there is only a few VCLs in that project (tbutton , tEdit and Tlabel). can anyone give me a hint about including menu bar and progress bar for the project
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请记住,Delphi for Android(简称 DelphiDroid)使用“交叉编译器”,它读取 VCL 表单的 DFM 文件,并将其转换为必要的 Java 代码。因此,扩展对 VCL 对象(当前状态)的理解需要重建交叉编译器本身。
Lennie 和我都在探索两种不同的途径,让整个事情变得更加“原生”,即您将能够定义在 Android 平台(甚至可能是 iOS)上使用的自定义组件。
Lennie 的新方法是使用 PhoneGap 框架,而我的方法(针对 Delphi 的下一版本)采用 FreePascal 编译器和基于 OpenGL 的 GUI 平台,从而实现使用本机 Pascal 代码开发 Android 应用程序的完全可扩展性。
我的解决方案(如果工作正常)将完全集成 IDE,因此不需要任何外部工具或命令行...您只需指定它是 Android 应用程序,并且构建指令将使用适当的 FPC 编译器和库如你所愿。
所有这些都是说,无论如何,目前你所要求的事情无法完成(遗憾的是),但请放心,伦尼和我都在努力(从两个不同的角度)。这些角度中至少有一个可以工作,希望两者都可以(以同样支持新旧 Delphi 版本)。
Keep in mind that Delphi for Android (DelphiDroid, for short) uses a "cross-compiler" which reads the DFM file of your VCL form, and converts it to the necessary Java code. As such, extending its understanding of VCL objects (in its current state) requires a rebuild of the cross-compiler itself.
Lennie and I are both exploring two different avenues to make the whole thing more "native", in the sense that you will be able to define custom components for use on the Android platform (possibly even iOS).
Lennie's new approach is to use the PhoneGap framework, whilst my approach (targeting the next release of Delphi) employs the FreePascal compilers and an OpenGL-based GUI platform, enabling full extensibility to develop Android applications using native Pascal code.
My solution (if it works properly) would be fully IDE-integrated, so would not require any external tools or command line... you would simply specify that it's an Android application, and a Build instruction would use the appropriate FPC compiler and libraries as you'd want.
All of this is to say that, at present anyway, what you're asking cannot be done (sadly), but rest assured that both Lennie and I are working on it (from two different angles). At least one of those angles will work, hopefully both (to support old and new Delphi versions alike).
该项目是开源的,因此您可以自由地获取代码并做出贡献。另一方面,您可以将 Delphi Prism 与 MonoTouch/MonoDroid 一起使用,或者等待 Project Cooper 发布也完全支持 Android 的版本。
目前还没有关于新编译器的预计发布时间,但它是用 Delphi 本身编写的。
The project is open source so your free to go grab the code and contribute. In the other hand you can use Delphi Prism with MonoTouch/MonoDroid or wait for Project Cooper to b release that also fully support Android.
There is no ETA at the moment about the new compiler but it is written in Delphi itself.