Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline GUI Tool #2441

Merged
merged 40 commits into from
Apr 29, 2014
Merged

Pipeline GUI Tool #2441

merged 40 commits into from
Apr 29, 2014

Conversation

tomspilman
Copy link
Member

This is the first commit of the Pipeline GUI tool for nice visual editing of the new MonoGame content pipeline command files. The tool looks like this:

pipeline

It currently has the following basic features which makes it usable immediately:

  • Loading, saving, and creating new pipeline project files.
  • Adding and removing existing content to the project.
  • Change importers and processors as well as its properties.
  • Build, rebuild, and clean content.
  • No dependence on Microsoft XNA or Visual Studio.

It was built using C# and WinForms specifically for Windows support. We have a simplified MVC design intended to allow someone to eventually implement a new IView for MacOS and Linux.

Our next steps here are to get feedback from users, iterate on the core features, and improve the functionality. A few things on our roadmap for the tool:

  • Editing custom processor assembly lists.
  • System for per-platform content/settings.
  • Support for linked content files.
  • Better property editors.
  • Undo/redo stack.
  • Actual help docs.
  • Recent file lists.
  • Proper unloading of processor assemblies.
  • Adding tool to MG installer and registering file extensions.
  • Triggering .mgcb building directly from Visual Studio build.
  • Import existing .contentproj files.

Thanks to @jamesford42 for making all the treeview and property grid work correctly.

tomspilman and others added 30 commits March 2, 2014 01:03
Removed IModel, controller talks directly to PipelineProject.
…andable for the processor to show sub elements.
-changed target framework from .net40 to .net45
-changed target platform from AnyCpu to AnyCpu Prefer 32-bit
Note that we actually want MGCB to be x86 but it still has some dependences on native 3rd party assemblies which are x86.

Pipeline Solution:
Added MGCB project.

Pipeline project:
-added reference to MGCB project
Pipeline needs this in the output directory in order to perform builds
-changed target platform in debug configuration from AnyCpu to AnyCpu Prefer 32-bit
Note this matches the release configuration plus allows edit and continue.

ContentItem.Processor.cs:
No functional changes, removing unused code and whitespace changes only.
Added property member type support for command line parser.
…ed assemblies.

All processor properties are now visible even if they were not explicitly given a value in the file.
Now showing correct properties for the current processor when the processor changes.
Now only showing processors which can accept input of the type output by the current importer.
When the importer changes such that the current processor is invalid we set the default processor for the new importer.
Implemented project serialization.
…properties: References, OutputDir, IntermediateDir, Profile, Config, Platform.
@tomspilman
Copy link
Member Author

visually emulate the property grid with TextBoxes only. Just disabling the first column.

It is a little more complex... but sort of. The value side of the property grid can be more than just text, could be text + button, a combobox, a check box, etc. Also you have expanding sections which can be rolled up to hide some nested grid items.

If we get something working well it might be worth contributing it back to XWT. If they had a complete set of controls we could just use it across all platforms.

@tomspilman
Copy link
Member Author

Is Xamarin Studio using XWT? Is their property grid implementation available somewhere?

@KonajuGames
Copy link
Contributor

Xamarin Studio uses GTK#, and their property grid is buried in the
MonoDevelop source somewhere.​ I'm not a fan of GTK as it tries to cater
for all platforms but then ends up being non-standard on all.

I had been thinking of dynamically generating a scrollable panel with a
label on the left and the relevant control on the right to suit the
property type, along with supporting the nested properties.

@thiagojedi
Copy link
Contributor

Is Xamarin Studio using XWT?

Xamarin uses XWT only for the Android Interface Designer.

I'm not a fan of GTK as it tries to cater
for all platforms but then ends up being non-standard on all.

XWT was created exactly with that in mind (http://foodformonkeys.blogspot.com.br/2012/11/xwt.html )

I had been thinking of dynamically generating a scrollable panel with a
label on the left and the relevant control on the right to suit the
property type, along with supporting the nested properties.

Another approach would be inject the Property Grid directly from the backends...

For Linux we'll still need to unbury the component from the MonoDevelop source or implement it using other widgets...
But as XWT uses WPF for backend in Windows, we can make it work without much effort and we'll still be able to reuse the rest of the code...

@KonajuGames
Copy link
Contributor

Another approach would be inject the Property Grid directly from the
backends...

WinForms is the only one I know of that has a native property grid, but XWT
uses WPF on Windows. There are many third-party WPF property grids
available. This one (
http://www.codeproject.com/Articles/87715/Native-WPF-PropertyGrid) is
probably the easiest to integrate into XWT. Cocoa has no native property
grid and no decent third-party solutions, so the Mac version would have to
use the GTK# version extracted from MonoDevelop as well.

@thiagojedi
Copy link
Contributor

So... the plan is:

  • Port all the GUI that's Property Grid independent
    • Menu bar
    • Tree view
    • Dialogs
    • Output
  • Implement the IView interface
  • Choose a way to implement the Property Grid (MD component, Thirdparty WPF, etc) and implement it

Is that correct?

@KonajuGames
Copy link
Contributor

That looks like the plan. I had started on the first two. It's not
publicly available yet, but I can do that tonight.​

@thiagojedi
Copy link
Contributor

Please do, so I can help you.

@tomspilman
Copy link
Member Author

FYI @KonajuGames @thiagoabreu.

Looks like Xamarin is moving away from XWT themselves...

https://twitter.com/migueldeicaza/statuses/490307630208778242

Maybe you guys should follow their lead on this and use XamMac directly?

@thiagojedi
Copy link
Contributor

The main problem isn't the toolkit itself as the only thing the GUI need is implement the IView interface and present output...

The main struggle is the PropertyGrid that only WinForms have by default. The MonoDevelop version draws the grids directly in Cairo. We're still investigating how to make it work...
Other than that, the issues we're having are (@KonajuGames correct me if I'm wrong) independent from the toolkit...

We already have most of the GUI coded using only XWT which is fully reusable for Windows, Linux and Mac. And I think this way it will be easy to maintain the code on the long goal...
And even with Miguel stating that the MonoDevelop are winding from Xwt, I'm seeing a lot of effords from the community on the Xwt repo...

But that's only my opinion. If you think going directly to Gtk/XamMac/WPF is better, I'm ok with that too...

@tomspilman
Copy link
Member Author

XWT which is fully reusable for Windows, Linux and Mac. And I think
this way it will be easy to maintain the code on the long goal...

I'll be very happily surprised if the XWT version is better on Windows than the WinForms version.

I fully expect that the XWT version will be for non-Windows machines only. That would be fine as there would be little code to maintain there.

I'm seeing a lot of effords from the community on the Xwt repo

That for sure helps... I just wanted to let you guys know about what Miguel and Xamarin are planning.

@nkast
Copy link
Contributor

nkast commented Aug 3, 2014

The ATF project has a PropertyGrid - among other cool stuff. looks good.
https://github.com/SonyWWS/ATF/wiki/ATF-Custom-Controls#WPF_Controls

There's also one at the Extended WPF Toolkit.
https://wpftoolkit.codeplex.com/wikipage?title=PropertyGrid

In my editor I use DenisVuyka https://github.com/DenisVuyka/WPG/wiki/Layouts

@tapir
Copy link

tapir commented Sep 1, 2014

Is there any update on this that will enable Linux developers to compile content with ease?
Any branch with cross platform UI implemented?

@tomspilman
Copy link
Member Author

@thiagoabreu @KonajuGames - What is the status on the Mac version of the tool? Did things get moving or do we need someone to jump on this?

@KonajuGames
Copy link
Contributor

The Mac version can import a contentproj, load a mgcb, save the mgcb and
build the content. What is missing are the treeview and working property
grid.​ There is an initial implementation of a property grid, but it is
not currently hooked up or working properly.

The Linux version that @thiagoabreu was doing is at the same point I
believe, except it is also missing the multiline text output.

The Xwt UI toolkit appears to suffer the same problem that all
cross-platform UI toolkits have. It supports lowest common denominator and
even then is still missing some things. It may be best to use native UI on
Mac (Cocoa) and Linux (GTK) directly rather than going through a common
library that imposes restrictions on us.

@tomspilman
Copy link
Member Author

The Mac version can import a contentproj, load a mgcb, save the mgcb and build the content.

Would it be difficult to at least get that work merged in? Or do you think it isn't ready for that?

@KonajuGames
Copy link
Contributor

I can get that part merged in tonight.​

@thiagojedi
Copy link
Contributor

It may be best to use native UI on
Mac (Cocoa) and Linux (GTK) directly rather than going through a common
library that imposes restrictions on us.

Agreed. I'm working on a port with GTK#.

@jamesford42
Copy link

@tapir - Note that you do not have to build content on the platform you are targeting. Eg, you can run the PipelineTool on your PC and build content for your game targeting Linux.

@tapir
Copy link

tapir commented Sep 2, 2014

I'm aware. That's just very far away from ideal workflow when you're mainly
using linux for development.
On 2 Sep 2014 08:32, "James Ford" notifications@github.com wrote:

@tapir https://github.com/tapir - Note that you do not have to build
content on the platform you are targeting. Eg, you can run the PipelineTool
on your PC and build content for your game targeting Linux.


Reply to this email directly or view it on GitHub
#2441 (comment).

@KonajuGames
Copy link
Contributor

#2966 added as a WIP Pipeline GUI for Mac.

@jarnoburger
Copy link

Situation:
When you have pressed the Build button..
You see the 'build-log" in the textbox on the right..

Issue:
I am missing info about which keys i could use to get to my content.

Possible solution :

  • if i would build content in Content\Fonts\Candera.SpriteFont , that the build log would say : You now have a reachable at Fonts\Candera..
  • string.format("You know have a <{0}> reachable at {1}", resourceTypename, location);

@tomspilman
Copy link
Member Author

I am missing info about which keys i could use to get to my content.

That is a problem that documentation should solve.

the build log would say : You now have a reachable at Fonts\Candera..

We don't want to clutter up the build log with that.

@harry-cpp
Copy link
Member

I've been playing around with Xwt yesterday and today, and it's really good. Also it's naming scheme and the way everything works is similar to Gtk, so for someone like me it makes it very easy to use.

@tomspilman
Copy link
Member Author

Xwt yesterday and today, and it's really good. Also it's
naming scheme and the way everything works is similar to Gtk

Because it was originally designed by Xamarin to replace their usage of Gtk. However i've been told Xamarin are moving away from Xwt themselves... this is why we decided on Gtk.

@harry-cpp
Copy link
Member

Because it was originally designed by Xamarin to replace their usage of Gtk. However i've been told Xamarin are moving away from Xwt themselves... this is why we decided on Gtk.

Even tho Xamarin decided to abandon it, the project itself is still quite active.

Is the OS X Pipeline going to stick with Gtk, or are there some plans for Cocoa?

@tomspilman
Copy link
Member Author

Is the OS X Pipeline going to stick with Gtk

Absolutely... the last thing we want is a 3rd GUI toolkit to maintain if we can avoid it.

@KonajuGames
Copy link
Contributor

KonajuGames commented May 19, 2015 via email

@harry-cpp
Copy link
Member

We started the Mac and Linux Pipeline Tool with Xwt but found it lacking in
features and documentation

Agreed on documentation, but... caugh https://github.com/cra0zy/MonoGame/tree/xwtpipeline caugh.... people do tell me that I am stubborn.... try it out. It's only Windows and Linux version, I don't own a Mac, so can't really build for it.

The only thing I found missing feature wise are accels for MenuItems.

Also I won't setup any PRs with it, I just built it to prove that Xwt was a viable way of doing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet