构建跨平台的应用程序 - 推荐 [英] Building Cross Platform app - recommendation

查看:179
本文介绍了构建跨平台的应用程序 - 推荐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要建立一个非常简单的应用程序,但它需要工作在PC和Mac上。

I need to build a fairly simple app but it needs to work on both PC and Mac.

这也需要可再发行的光盘或USB驱动器作为一个独立的桌面应用程序。

It also needs to be redistributable on a disc or usb drive as a standalone desktop app.

起初我还以为这(它囊括了所有API的要求),但难的是使其分配,因为应用程序需要AIR运行时可以安装运行AIR将是完美的。

Initially I thought AIR would be perfect for this (it ticks all the API requirements), but the difficulty is making it distributable, as the app would require the AIR runtime to be installed to run.

我碰到的播放器作为一个选项,因为它似乎能够打包AIR运行时与应用程序,并做了(沉默?)安装。
然而,这似乎打破的T和C从Adobe(的概述这里),所以我不知道是否合法。

I came across Shu Player as an option as it seems to be able to package the AIR runtime with the app and do a (silent?) install.
However this seems to break the T&C from Adobe (as outlined here) so I'm not sure about the legality.

另一种选择可能是锌,但我没有测试过,所以我不知道它如何将适合该法案。

Another option could be Zinc but I haven't tested it so I'm not sure how well it'll fit the bill.

你有什么建议或建议我看看?

What would you recommend or suggest I check out?

pciated任何建议多AP $ P $

Any suggestion much appreciated

修改: 有单声道使用一些更多的讨论(虽然没有真正的结论): <一href="http://stackoverflow.com/questions/116468/winforms-for-mono-on-mac-linux-and-pc-redux">Here和<一href="http://stackoverflow.com/questions/72580/making-a-c-winform-application-cross-platform-should-i-use-air-mono-or-somet">Here

EDIT: There's a few more discussions on mono usage (though no real conclusion): Here and Here

EDIT2 也可以或许符合这个要求,将检查出来。

EDIT2: Titanium could also fit the bill maybe, will check it out.

这是任何人任何更多的评论?

Any more comments from anyone?

EDIT3(一年上):它实际上已经快一年了,因为我张贴的问题,但似乎有些人还是会遇到它飘飞,甚至导致一个答案,即使是一年后。

EDIT3 (one year on): It's actually been almost a year since I posted that question but it seems some people still come across it every now and then, and even contribute an answer, even a year later.

想我会更新这个问题有点。我并没有得到解决,试图在最后,时间约束的Tcl / Tk选项和兼容不同操作系统版本的不确定性使我放弃了作为一个选项。

Thought I'd update the question a bit. I did not get around to try the tcl/tk option at the end, time constraint and the uncertainty of the compatibility to different os versions led me to discard that as an option.

我也尝试钛合金了一点,但尽管第一次IM pressions还行,他们真的正在推动移动平台比什么,恕我直言,在桌面上实现遭受一点从缺乏重视。还有一些问题与某些操作系统的一些视觉工作室运行时(不记得的细节虽然现在)一些报告。所以放弃太多。

I did try Titanium for a bit but though the first impressions were ok, they really are pushing the mobile platform more than anything, and imho, the desktop implementation suffers a bit from that lack of attention. There are also some report of problems with some visual studio runtime on some OSs (can't remember the details now though).. So discarded that too.

我结束了 XULRunner的去。这两个主要的诉求是:

I ended up going with XULRunner. The two major appeals were:

  • 火狐似乎摸出大多数操作系统版本的方块,所以我把它作为善意,一个XULRunner的应用程序可能会与大多数系统兼容。救了我大量的测试,它横空出世,它的没有的在所有平台上运行得很好,没有发生过不能够启动应用程序的一个报告
  • 在它的JavaScript的宝宝!语言的学习曲线是最小的。主要是要找出是什么额外的XPCOM接口,以及如何对它们进行查询。
  • Firefox seems to work out of the box on most OS version, so I took it as good faith that a XULRunner app would likely be compatible with most system. Saved me a lot of testing and it turned out that it did run really well on all platforms, there hasn't been a single report of not being able to start the app
  • It's Javascript baby! Language learning curve was minimal. The main thing to work out is what the additional xpcom interfaces are and how to query them.

在不利的一面:

  • 我想排除错误是一个有时艰巨的任务,对了Venkman调试器是有点笨重,结束了使用控制台比什么都重要。
  • 在SQLite的接口是一个桌面应用程序的巨大财富,但我经常在努力寻找相关的错误的相关信息时,一些没有工作 - 也许我是做错了
  • 在花了一些时间来制定出如何将应用程序打包为PC和Mac的一个独立的应用程序。最后的办法是有一个空壳Mac应用程序和外壳PC的应用程序和一些编译的脚本,将复制的炮弹,并添加自定义源$ C ​​$ C到它在正确的位置。
  • 对于一些最后一个潜在的问题,因为XULRunner的应用程序的性质,源$ C ​​$ C将部署与应用程序,你可以使用模糊但如果你想这件事情要记住,如果你想保护您的知识产权

一切的一切,对于一个跨平台的应用程序很好的平台。我强烈推荐它。

All in all, great platform for a cross-platform app. I'd highly recommend it.

推荐答案

的Tcl / Tk具有最佳的包装解决方案在那里之一。您可以轻松地换一个跨平台的应用程序(在一个完全正常运行的虚拟文件系统实现)与特定于平台的二进制文件,以获得单个文件的可执行几乎任何现代桌面系统。谷歌搜索的条款starkit,starpack和tclkit。这样的二进制文件包是微小相比,许多可执行这些天。

Tcl/Tk has one of the best packaging solutions out there. You can easily wrap a cross-platform application (implemented in a fully working virtual filesystem) with a platform-specific binary to get a single file executable for just about any modern desktop system. Search google for the terms starkit, starpack and tclkit. Such wrapped binaries are tiny in comparison to many executables these days.

许多嘲笑塔卡作为老或不成熟,但它是最古老,最稳定的工具包之一在那里。它采用原生窗口部件,当这样的小部件存在。

Many deride Tk as being "old" or "immature" but it's one of the oldest, most stable toolkits out there. It uses native widgets when such widgets exist.

的Tcl / Tk的一个显著的缺点,但是,它缺乏任何形式的打印支持。如果你的应用程序需要打印,你必须是一个有点创意。有特定于平台的解决方案,并产生后记文档的能力,和图书馆创建PDF,但它需要一点点额外的努力。

One significant drawback of Tcl/Tk, however, is that it lacks any sort of printing support. If your application needs to print you'll have to be a bit creative. There are platform-specific solutions, and the ability to generate postscript documents, and libraries to create pdfs, but it takes a little extra effort.

这篇关于构建跨平台的应用程序 - 推荐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆