{"action":"created","issue":{"url":"https://api.github.com/repos/mono/MonoGame/issues/3515","labels_url":"https://api.github.com/repos/mono/MonoGame/issues/3515/labels{/name}","comments_url":"https://api.github.com/repos/mono/MonoGame/issues/3515/comments","events_url":"https://api.github.com/repos/mono/MonoGame/issues/3515/events","html_url":"https://github.com/mono/MonoGame/issues/3515","id":57261097,"number":3515,"title":"Improving The Platform Extension System","user":{"login":"tomspilman","id":103522,"avatar_url":"https://avatars.githubusercontent.com/u/103522?v=3","gravatar_id":"","url":"https://api.github.com/users/tomspilman","html_url":"https://github.com/tomspilman","followers_url":"https://api.github.com/users/tomspilman/followers","following_url":"https://api.github.com/users/tomspilman/following{/other_user}","gists_url":"https://api.github.com/users/tomspilman/gists{/gist_id}","starred_url":"https://api.github.com/users/tomspilman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomspilman/subscriptions","organizations_url":"https://api.github.com/users/tomspilman/orgs","repos_url":"https://api.github.com/users/tomspilman/repos","events_url":"https://api.github.com/users/tomspilman/events{/privacy}","received_events_url":"https://api.github.com/users/tomspilman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mono/MonoGame/labels/Design","name":"Design","color":"5319e7"},{"url":"https://api.github.com/repos/mono/MonoGame/labels/Feature%20Request","name":"Feature Request","color":"000000"},{"url":"https://api.github.com/repos/mono/MonoGame/labels/Protobuild","name":"Protobuild","color":"e73c00"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":45,"created_at":"2015-02-11T00:38:51Z","updated_at":"2015-11-25T00:59:09Z","closed_at":null,"body":"I'd like to start discussing how we can further improve the system by which different platforms are added in MonoGame.\r\n\r\nIMO the idealistic goal moving forward should be that we can add additional platforms (like PS4 for instance) without needing to make platform specific modifications to existing files in the public repo.  Ideally merging in a platform like XB1, PS4, or WiiU would be as simple as copying a folder of files into the root of the public repo and executing Protobuild.\r\n\r\nAbout a year ago we took two big steps...\r\n\r\n## Moved to using Protobuild for project generation\r\nThe Protobuild change now means zero project file maintenance, new non-platform specific code is quick to add, and no more project file conflicts.  \r\n\r\nThe problem with Protobuild is that all the platform specific info is centralized in one file.  This means that if we have a closed source platform like we do with PS4... we have to maintain a patched version of that definition file with additional `.ps4.cs` files and other platform specific details.\r\n\r\nIdeally there should be a way to optionally include additional platform files/settings from the main Protobuild .definition file.  @hach-que ??\r\n\r\n## Partial classes and \"Platform\" methods\r\nAlso a lot of MonoGame platform code is now done with partial classes and \"Platform\" methods.  This is great as most of the platform code is just adding in various `.platform.cs` and editing the protobuild config file to include them.\r\n\r\nWe still have big classes like `GraphicsDeviceManager` that are a `#if` spaghetti.  We should prioritize converting classes like that into platform partial classes.\r\n\r\nIn places where we smaller `#if` blocks that are enabling some feature for multiple platforms we should look at add a feature specific `#if`.  For example this case here:\r\n\r\nhttps://github.com/mono/MonoGame/blob/develop/MonoGame.Framework/Game.cs#L325\r\n\r\n... we probably need a `#if NO_EXIT` instead of naming specific platforms.  This allows the feature to be toggled on other platforms by changing the Protobuild config.\r\n\r\n## Extending The Pipeline\r\nA big area where we need to design a new abstraction is within the content pipeline.  There are cases where there are platform specific formats and processing that we want to be able to plug into the pipeline instead of being hard coded into the public repo.\r\n\r\nIn this case I started a separate issue for this (see https://github.com/mono/MonoGame/issues/2781) but it is something that needs consideration."},"comment":{"url":"https://api.github.com/repos/mono/MonoGame/issues/comments/159451991","html_url":"https://github.com/mono/MonoGame/issues/3515#issuecomment-159451991","issue_url":"https://api.github.com/repos/mono/MonoGame/issues/3515","id":159451991,"user":{"login":"hach-que","id":504826,"avatar_url":"https://avatars.githubusercontent.com/u/504826?v=3","gravatar_id":"","url":"https://api.github.com/users/hach-que","html_url":"https://github.com/hach-que","followers_url":"https://api.github.com/users/hach-que/followers","following_url":"https://api.github.com/users/hach-que/following{/other_user}","gists_url":"https://api.github.com/users/hach-que/gists{/gist_id}","starred_url":"https://api.github.com/users/hach-que/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hach-que/subscriptions","organizations_url":"https://api.github.com/users/hach-que/orgs","repos_url":"https://api.github.com/users/hach-que/repos","events_url":"https://api.github.com/users/hach-que/events{/privacy}","received_events_url":"https://api.github.com/users/hach-que/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T00:59:09Z","updated_at":"2015-11-25T00:59:09Z","body":"(also, how do you prove that someone has access to the SDK to give them\naccess to the MonoGame repository?)\n\nOn Wed, Nov 25, 2015, 11:54 June Rhodes <jrhodes@redpointgames.com.au>\nwrote:\n\n> As far as I understand it, most SDKs sign their applications with a\n> private key so they can be deployed to the development kit. Since this key\n> is extremely unlikely to change (the public key is embedded into the dev\n> kit firmware), my plan was to use that key to digitally sign some string\n> like \"PlayStation4\" as verification that the user is capable of digitally\n> signing for the device (and is thus authorized).\n>\n> On Wed, Nov 25, 2015, 10:44 KonajuGames <notifications@github.com> wrote:\n>\n>> Platform SDKs change a lot and frequently. I wouldn't trust any file in a\n>> platform SDK to be a good basis for a key.\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/mono/MonoGame/issues/3515#issuecomment-159440843>.\n>>\n>\n"}}