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 li开发者_运维技巧miting.
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?
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.
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.
精彩评论