使用 Web 技术构建需要调用客户端进程的桌面应用程序时,我可以选择哪些选项?
我有一个本地桌面应用程序需要对 UI 进行大修,该应用程序中的数据主要由后端数据库驱动,而为此类系统提供用户友好的 UI 的最佳可用工具似乎是将其构建为 Web应用程序。
然而,该工具的主要功能是让用户从列表中进行选择,然后使用它在本地计算机上启动 perforce 同步。
这个应用程序需要在 Windows 和 OSX 上运行,所以我的第一个想法是使用像 wxWidgets 这样的跨平台 GUI 框架,并嵌入一个 Web 视图来实现除同步步骤之外的所有功能。然而,我发现的所有基于 wx 的 Web 视图似乎都非常有限。
那么,我的其他选择是什么?无论如何,是否可以从浏览器调用 p4 同步,或者具有嵌入式 Web 视图的本地应用程序是我唯一可行的选择?
I have a local desktop app that needs a UI overhaul, the data in this app is largely driven by a back end DB and the best tools available to make a user friendly UI for this kind of system seems to be to build it as a web app.
However, the primary function of this tool is to have the user make a choice from a list and then use that to kick off a perforce sync on their local machine.
This app needs to run on both Windows and OSX so, my first thought was to use a cross platform GUI framework like wxWidgets and embed a web view for all of the functionality apart from the sync step. However all the wx based web views I have found seem to be very limiting.
So, what are my other options? Is there anyway to invoke a p4 sync from a browser, or is a local app with an embedded web view my only viable choice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您也许可以使用 P4 Javascript API 和将您的应用程序构建为可通过 P4V 访问的工具。不确定其中的 P4V 部分是否会成为您的交易障碍。
我不确定 Javascript API 是否在 P4V 上下文之外可用。如果是,那么您应该能够使用它来构建您想要的任何类型的 Web 应用程序。
You might be able to use the P4 Javascript API and build your app as a tool accessible from P4V. Not sure if the P4V part of that would be a deal breaker for you.
I'm not sure if the Javascript API is available outside of the context of P4V. If it is, then you should be able to use that to build whatever kind of web app that you want.
我最终编写了一个调用 p4 同步操作的浏览器插件来解决这个问题。
我使用 firebreath 框架提供一个 JavaScript API,允许我在用户的本地计算机上调用 p4 同步。为此,我需要能够在本地计算机上存在 p4.ini 并知道它的位置,或者我需要将用户/通行证和客户端工作区传递给插件。
这工作得相当好,但它并不像我想要的那么干净,将同步过程的输出传输到浏览器似乎很慢,并且输出似乎滚动的时间比过程运行的时间长得多。
I ended up writing a browser plugin that invokes a p4 sync operation to solve this problem.
I used the firebreath framework to provide a javascript api that allows me to invoke a p4 sync on the users' local machine. To do this I needed to be able to have a p4.ini already present on the local machine and know it's location, or I needed to pass the user/pass and client workspace to the plugin.
This works fairly well, but it's not as clean as I would like, piping the output of the sync process to the browser seems to be slow, and the output seems to scroll for a lot longer than the process runs.