Skip to content

Commit

Permalink
Merge branch 'develop' into native
Browse files Browse the repository at this point in the history
# Conflicts:
#	MonoGame.Framework.Content.Pipeline/Serialization/Compiler/ContentWriter.cs
#	MonoGame.Framework/GameWindow.cs
#	MonoGame.Framework/Platform/WindowsUniversal/UAPGameWindow.cs
#	Tests/Framework/MockWindow.cs
tomspilman committed Aug 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents e1652d4 + 37dc435 commit 3af0aae
Showing 182 changed files with 3,504 additions and 6,556 deletions.
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/01_bug_report.yml
Original file line number Diff line number Diff line change
@@ -31,8 +31,6 @@ body:
options:
- MonoGame Android Application (mgandroid)
- MonoGame Cross-Platform Desktop Application (mgdesktopgl)
- MonoGame Windows Universal CoreApp Application (mguwpcore)
- MonoGame Windows Universal XAML Application (mguwpxaml)
- MonoGame Windows Desktop Application (mgwindowsdx)
- MonoGame iOS Application (mgios)
- N/A
16 changes: 14 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -83,7 +83,19 @@ jobs:
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3

- name: Push GitHub Nugets
run: dotnet run --project build/Build.csproj -- --target=DeployNuGetsToGithub
- name: Push Nugets
run: dotnet run --project build/Build.csproj -- --target=Deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

- name: Make a Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: 'MonoGame ${{ github.ref_name }}'
tag: ${{ github.ref_name }}
allowUpdates: true
removeArtifacts: true
artifacts: "nugets/*.nupkg"
token: ${{ secrets.GITHUB_TOKEN }}
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
33 changes: 21 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,52 @@
# Contributing to MonoGame

We're happy that you have chosen to contribute to the MonoGame project.
We are happy that you have chosen to contribute to the MonoGame project.

You are joining a group of hundreds of volunteers that have helped build MonoGame since 2009. To organize these efforts, the MonoGame Team has written this simple guide to help you.
You are joining a group of hundreds of volunteers who have helped build MonoGame since 2009. To organize these efforts, the MonoGame Team has written this simple guide to help you.

Please read this document completely before contributing.


## How To Contribute

MonoGame has a `master` branch for stable releases and a `develop` branch for daily development. New features and fixes are always submitted to the `develop` branch.

If you are looking for ways to help, you should start by looking at the [Help Wanted tasks](https://github.com/mono/MonoGame/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22). Please let us know if you plan to work on an issue so that others are not duplicating your work.

> !! An Issue should proceed any PR to outline the change (Unless it is minor or a documentation update), whether it is an actual bug report, a proposal for correction, or additional functionality.
The MonoGame project follows standard [GitHub flow](https://guides.github.com/introduction/flow/index.html). You should learn and be familiar with how to [use Git](https://help.github.com/articles/set-up-git/), how to [create a fork of MonoGame](https://help.github.com/articles/fork-a-repo/), and how to [submit a Pull Request](https://help.github.com/articles/using-pull-requests/).

After you submit a PR, the [MonoGame build server](http://teamcity.monogame.net/?guest=1) will build your changes and verify that all tests pass. Project maintainers and contributors will review your changes and provide constructive feedback to improve your submission.

Once we are satisfied that your changes are good for MonoGame, we will merge your PR.


## Quick Guidelines

Here are a few simple rules and suggestions to remember when contributing to MonoGame.

* :bangbang: **NEVER** commit code that you didn't personally write.
* :bangbang: **NEVER** commit code that you did not personally write.
* :bangbang: **NEVER** use decompiler tools to steal code and submit it as your own work.
* :bangbang: **NEVER** decompile XNA assemblies and steal Microsoft's copyrighted code.
* **PLEASE** try to keep your PRs focused on a single topic and of a reasonable size or we may ask you to break it up.
* **PLEASE** be sure to write simple and descriptive commit messages.
* **DO NOT** surprise us with new APIs or big new features. Open an issue to discuss your ideas first.
* **DO NOT** reorder type members as it makes it difficult to compare code changes in a PR.
* **DO** try to follow our [coding style](CODESTYLE.md) for new code.
* **DO** give priority to the existing style of the file you're changing.
* **DO** give priority to the existing style of the file you are changing.
* **DO** try to add to our [unit tests](Tests) when adding new features or fixing bugs.
* **DO NOT** send PRs for code style changes or make code changes just for the sake of style.
* **PLEASE** keep a civil and respectful tone when discussing and reviewing contributions.
* **PLEASE** tell others about MonoGame and your contributions via social media.

## Extended guidelines

The current focus of the MonoGame Framework is to preserve the XNA API (at least for the 3.x and 4.x releases), and while we welcome contribution, the last thing we want is wasted effort that breaks or changes this standard. To this end, we want to clarify acceptable contributions:

* Changes that introduce new features should be preceded by a logged issue discussing the change.
* While changes to documentation that do not alter the functionality are welcome, changes that **only** update formatting/styling or modernize code will be rejected unless it improves the performance or we have previously agreed upon the change in an issue.
* Breaking changes should be pre-agreed through an issue log detailing specifically why it is critical. By Design, breaking changes should be scheduled for future major releases, or ideally for MonoGame 5.0 where the API is intentionally going to change.

There will always be exceptions to the rules above, but these must be pre-agreed and discussed with the wider community of MonoGame as we are all in this together.

## Decompiler Tools

@@ -51,7 +60,7 @@ There has been confusion on this point in the past, so we want to make this clea
* It **DOES NOT** matter how small the bit of code you have stolen is.
* It **DOES NOT** matter what your opinion of stealing code is.

If you did not write the code, you do not have ownership of the code and you shouldn't submit it to MonoGame.
If you did not write the code, you do not have ownership of the code and you should not submit it to MonoGame.

If we find a contribution to be in violation of copyright, it will be immediately removed. We will bar that contributor from the MonoGame project.

@@ -61,15 +70,16 @@ Due to limitations on private target platforms, MonoGame enforces the use of C#

It is however allowed to use the latest class library, but if contributions make use of classes that are not present in .NET 4.5, it will be required from the contribution to implement backward-compatible switches.

These limitations should be lifted at some point.
> These limitations will be lifted at some point in the near future.
## Licensing

The MonoGame project is under the [Microsoft Public License](https://opensource.org/licenses/MS-PL) except for a few portions of the code. See the [LICENSE.txt](LICENSE.txt) file for more details. Third-party libraries used by MonoGame are under their own licenses. Please refer to those libraries for details on the license they use.
The MonoGame project is under the [Microsoft Public License](https://opensource.org/licenses/MS-PL) except for a few portions of the code. See the [LICENSE.txt](LICENSE.txt) file for more details. Third-party libraries used by MonoGame are under their own licenses. Please refer to those libraries for details on the licenses they use.

We accept contributions in "good faith" that it isn't bound to a conflicting license. By submitting a PR you agree to distribute your work under the MonoGame license and copyright.
We accept contributions in "good faith" that it is not bound to a conflicting license. By submitting a PR you agree to distribute your work under the MonoGame license and copyright.

To this end, when submitting new files, include the following in the header if appropriate:

```csharp
// MonoGame - Copyright (C) MonoGame Foundation, Inc
// This file is subject to the terms and conditions defined in
@@ -78,8 +88,7 @@ To this end, when submitting new files, include the following in the header if a

## Need More Help?

If you need help, please ask questions on our [community forums](http://community.monogame.net/) or come [chat on Gitter](https://gitter.im/mono/MonoGame).

If you need help, please ask questions on our [GitHub Discussion board](https://github.com/MonoGame/MonoGame/discussions) or come [chat on Discord](https://discord.gg/monogame).

Thanks for reading this guide and helping make MonoGame great!

Original file line number Diff line number Diff line change
@@ -20,8 +20,6 @@ public override bool Supports(TargetPlatform platform)
platform == TargetPlatform.NativeClient ||
platform == TargetPlatform.RaspberryPi ||
platform == TargetPlatform.Windows ||
platform == TargetPlatform.WindowsPhone8 ||
platform == TargetPlatform.WindowsStoreApp ||
platform == TargetPlatform.iOS ||
platform == TargetPlatform.Web;
}
@@ -46,9 +44,7 @@ public override ConversionQuality ConvertStreamingAudio(TargetPlatform platform,
// Most platforms will use AAC ("mp4") by default
var targetFormat = ConversionFormat.Aac;

if ( platform == TargetPlatform.Windows ||
platform == TargetPlatform.WindowsPhone8 ||
platform == TargetPlatform.WindowsStoreApp)
if ( platform == TargetPlatform.Windows )
targetFormat = ConversionFormat.WindowsMedia;

else if (platform == TargetPlatform.DesktopGL)
Original file line number Diff line number Diff line change
@@ -20,8 +20,6 @@ public override bool Supports(TargetPlatform platform)
platform == TargetPlatform.NativeClient ||
platform == TargetPlatform.RaspberryPi ||
platform == TargetPlatform.Windows ||
platform == TargetPlatform.WindowsPhone8 ||
platform == TargetPlatform.WindowsStoreApp ||
platform == TargetPlatform.iOS ||
platform == TargetPlatform.Web;
}
@@ -61,8 +59,6 @@ private static TextureProcessorOutputFormat GetTextureFormatForPlatform(TextureP
throw new PlatformNotSupportedException("iOS platform only supports PVR texture compression");
}
else if (platform == TargetPlatform.Windows ||
platform == TargetPlatform.WindowsPhone8 ||
platform == TargetPlatform.WindowsStoreApp ||
platform == TargetPlatform.DesktopGL ||
platform == TargetPlatform.DesktopVK ||
platform == TargetPlatform.MacOSX ||
Original file line number Diff line number Diff line change
@@ -41,16 +41,14 @@
<Output TaskParameter="Output" ItemName="ContentReferences"/>
</CollectContentReferences>

<Error Text="The MonoGamePlatform property was not defined in the project! It must be set to Windows, WindowsGL, WindowsStoreApp, WindowsPhone8, MacOSX, iOS, Linux, DesktopGL, RaspberryPi, Android, NativeClient, PlayStation4, PSVita, XboxOne or PlayStationMobile."
<Error Text="The MonoGamePlatform property was not defined in the project! It must be set to Windows, WindowsGL, , MacOSX, iOS, Linux, DesktopGL, RaspberryPi, Android, NativeClient, PlayStation4, PSVita, XboxOne or PlayStationMobile."
Condition=" '$(MonoGamePlatform)' != 'Windows' And
'$(MonoGamePlatform)' != 'iOS' And
'$(MonoGamePlatform)' != 'Android' And
'$(MonoGamePlatform)' != 'Linux' And
'$(MonoGamePlatform)' != 'DesktopGL' And
'$(MonoGamePlatform)' != 'MacOSX' And
'$(MonoGamePlatform)' != 'WindowsStoreApp' And
'$(MonoGamePlatform)' != 'NativeClient' And
'$(MonoGamePlatform)' != 'WindowsPhone8' And
'$(MonoGamePlatform)' != 'RaspberryPi' And
'$(MonoGamePlatform)' != 'PlayStation4' And
'$(MonoGamePlatform)' != 'PlayStation5' And
Original file line number Diff line number Diff line change
@@ -231,6 +231,5 @@
<Import Project="..\PlayStation4\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\PlayStation4\MonoGame.Framework.Content.Pipeline.targets')" />
<Import Project="..\PlayStation5\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\PlayStation5\MonoGame.Framework.Content.Pipeline.targets')" />
<Import Project="..\PSVita\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\PSVita\MonoGame.Framework.Content.Pipeline.targets')" />
<Import Project="..\Stadia\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\Stadia\MonoGame.Framework.Content.Pipeline.targets')" />

</Project>
Original file line number Diff line number Diff line change
@@ -87,8 +87,6 @@ private string GetProfileForPlatform(TargetPlatform platform)
switch (platform)
{
case TargetPlatform.Windows:
case TargetPlatform.WindowsPhone8:
case TargetPlatform.WindowsStoreApp:
return "DirectX_11";
case TargetPlatform.iOS:
case TargetPlatform.Android:
Original file line number Diff line number Diff line change
@@ -103,7 +103,6 @@ protected internal virtual bool ShouldCompressContent(TargetPlatform targetPlatf
// case TargetPlatform.Windows:
// case TargetPlatform.Linux:
// case TargetPlatform.MacOSX:
// case TargetPlatform.WindowsStoreApp:
// return true;
// default:
// return false;
Original file line number Diff line number Diff line change
@@ -47,16 +47,13 @@ public sealed class ContentWriter : BinaryWriter
'a', // Android
'd', // DesktopGL
'X', // MacOSX
'W', // WindowsStoreApp
'n', // NativeClient
'M', // WindowsPhone8
'r', // RaspberryPi
'P', // PlayStation4
'5', // PlayStation5
'O', // XboxOne
'S', // Nintendo Switch
'G', // Google Stadia
'b', // WebAssembly and Bridge.NET
'b', // WebAssembly and Bridge.NET
'V', // DesktopVK (Vulkan)
};

Loading

0 comments on commit 3af0aae

Please sign in to comment.