Skip to content

Commit

Permalink
Ver4.0.9001 (#2188)
Browse files Browse the repository at this point in the history
* Projects ver4.0.9001

* Packages ver4.0.9001

* Templates ver4.0.9001

* Changelog ver4.0.9001

* Migrate ver4.0.9001
  • Loading branch information
nkast authored Jan 14, 2025
1 parent 69523a0 commit 3ba5585
Show file tree
Hide file tree
Showing 64 changed files with 640 additions and 396 deletions.
6 changes: 3 additions & 3 deletions BuildNuget.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ dotnet pack src\Xna.Framework.Content.Pipeline.Audio\Xna.Framework.Content.Pipel
dotnet pack src\Xna.Framework.Content.Pipeline.Graphics\Xna.Framework.Content.Pipeline.Graphics.csproj --output NuGetPackages\Output\ /t:Build /p:Configuration=Release
dotnet pack src\Xna.Framework.Content.Pipeline.Media\Xna.Framework.Content.Pipeline.Media.csproj --output NuGetPackages\Output\ /t:Build /p:Configuration=Release

"C:\Program Files (x86)\NuGet3\nuget.exe" pack NuGetPackages/Content.Pipeline.Builder.nuspec -OutputDirectory NuGetPackages\Output\ -BasePath . -Version 3.14.9001 -Properties Configuration=Release
"C:\Program Files (x86)\NuGet3\nuget.exe" pack NuGetPackages/Content.Pipeline.Builder.Windows.nuspec -OutputDirectory NuGetPackages\Output\ -BasePath . -Version 3.14.9001 -Properties Configuration=Release
"C:\Program Files (x86)\NuGet3\nuget.exe" pack NuGetPackages/Content.Pipeline.Builder.nuspec -OutputDirectory NuGetPackages\Output\ -BasePath . -Version 4.0.9001 -Properties Configuration=Release
"C:\Program Files (x86)\NuGet3\nuget.exe" pack NuGetPackages/Content.Pipeline.Builder.Windows.nuspec -OutputDirectory NuGetPackages\Output\ -BasePath . -Version 4.0.9001 -Properties Configuration=Release

"C:\Program Files (x86)\NuGet3\nuget.exe" pack NuGetPackages/MonoGame.Framework.WindowsUniversal.nuspec -OutputDirectory NuGetPackages\Output\ -BasePath . -Version 3.14.9001.0 -Properties Configuration=Release
"C:\Program Files (x86)\NuGet3\nuget.exe" pack NuGetPackages/MonoGame.Framework.WindowsUniversal.nuspec -OutputDirectory NuGetPackages\Output\ -BasePath . -Version 4.0.9001 -Properties Configuration=Release

dotnet pack Platforms\Kni.Platform.Android.GL.csproj --output NuGetPackages\Output\ /t:Build /p:Configuration=Release
dotnet pack Platforms\Kni.Platform.Oculus.GL.csproj --output NuGetPackages\Output\ /t:Build /p:Configuration=Release
Expand Down
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
# Changelog

## 4.0.9001 Release - January 14, 2025

### Fixed
- fixed SensorBase.Dispose() #1925
- fixed sensor Dispose/finalize #1929
- fix TestContentManager usage #1955
- fix PipelineEditor OpenFile #1964
- fix SDL IndexBuffer ShouldSetAndGetStructData #1974
- fix SDL VertexBuffer ShouldSetAndGetStructData #1974, #2000
- rebuild Assets when compression method changed #1980
- fix DesktopGL native runtimes #1992
- fix IFrame event capture #1993
- fix DesktopGL MediaPlayer.Position #2006
- fix PipelineEditor OnReferencesModified #2026
- fix BoundingFrustrum Intersects & Contains #2052, #2073, #2074
- fix CheckGLError(...) #2055
- [SDL2] pin buffer to avoid access to invalid memory #2058
- [OpenGL] fix Discard rendertargets #2062
- [OpenGL] fix multisample surface types #2063
- fix Complex out parameters #2125
- fix GL TextureFilter.Linear #2165
- fix GetInfoLog() #2166
- fix DrawRangeElementsBaseVertex #2187, #2181

### Performance
- optimize DX VertexBuffer Get/Set Data #1967
- optimize SDL IndexBuffer GetData #1974
- optimize SDL VertexBuffer GetData #1974, #2000
- perf ConvertFloat32ToInt16() #2008, #2009, #2028
- perf DesktopGL Texture GetData(...) #2011
- perf use Environment.CurrentManagedThreadId #2013
- perf use generic ContentTypeReaderT, avoid boxing for value types #2029
- optimize GamePadDPad #2114

### Changed
- remove MaxSensorCount limit #1928
- rename Sensors namespace #1942
Microsoft.Devices.Sensors -> Microsoft.Xna.Framework.Devices.Sensors
- The library MonoGame.Framework is split into Xna.Framework.Devices, and Xna.Framework.Storage #1947, #1988.
- ContentLoadException message include assetName #1963
- throw 'Operation not called on main thread' for VertexShader/PixelShader #2014
- throw 'Operation not called on main thread' for GetBackBufferData(...) #2020
- [PipelineEditor] resize dialogs #2066, #2067
- Rename Platform assembly #2136, #2146, #2147
- rename Platform packages #2137, #2150, #2156

### Added
- Vibrator class #1941, #2089
- implement UAP Accelerometer #1948
- XNB compression extension #1961, #2039
- Brotli XNB compression #1962, #1966, #2033, #2040, #2041
- /packageReference option in .mgcb to consume importers & processors from nuget #2027, #2068, #2069, #2070, #2075
- added Plane.Intersects(Ray) #2044, #2046
- added XR library, and unify LibOVR.
- implement XR for BlazorGL platform #2090
- [WebGL] implement half-float surface formats #2042
- [WebGL] implement multisampling in rendertargets #2088
- System.Numerics explicit conversion #2110
- Matrix.CreateRotationZ(Complex) #2120
- Pose3 and Pose2 structs #2121
- windowsDX11 net4.8 #2142, #2152
- tools net4.8 #2151
- Oculus native backend #2174
- [Blazor] implement MediaPlayer.PlayPosition and VideoPlayer.PlayPosition #2184

### Removed
- drop net6.0 from WindowsDX & BlazorGL #2086
- xamarin .nuspec #2154
- Xamarin iOS project #2155

## 3.14.9001 Release - September 23, 2024

Expand Down
55 changes: 33 additions & 22 deletions Documentation/articles/migrate_381.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,46 @@ Edit your .csproj file of the main project and replace:

to:

```xml
<PackageReference Include="nkast.Xna.Framework" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Content" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Audio" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Media" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Input" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Game" Version="3.14.9001" />
<PackageReference Include="MonoGame.Framework.{Platform}.9000" Version="3.14.9001" />
```

where {Platform} is Windows, DesktopGL, Android, etc.
```xml
<PackageReference Include="nkast.Xna.Framework" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Content" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Devices" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Audio" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Media" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Input" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Game" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Storage" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.XR" Version="4.0.9001" />
<PackageReference Include="nkast.Kni.Platform.{Platform}" Version="4.0.9001" />
```

where {Platform} maps as follows.
- Android - > Android.GL
- DesktopGL - > SDL2.GL
- iOS -> iOS.GL
- WindowsUniversal -> UAP.DX11
- WindowsDX - > WinForms.DX11

For libraries, edit your .csproj file and replace:

```xml
```xml
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" PrivateAssets="All" />
```

to:

```xml
<PackageReference Include="nkast.Xna.Framework" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Content" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Audio" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Media" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Input" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Game" Version="3.14.9001" />
```xml
<PackageReference Include="nkast.Xna.Framework" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Content" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Devices" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Audio" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Media" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Input" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Game" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Storage" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.XR" Version="4.0.9001" />
```

### Migrating Framework (Android)
Expand Down Expand Up @@ -78,7 +89,7 @@ Then replace:
With:

```xml
<PackageReference Include="nkast.Xna.Framework.Content.Pipeline.Builder" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Content.Pipeline.Builder" Version="4.0.9001" />
```

Then rename 'MonoGameContentReference':
Expand Down
164 changes: 164 additions & 0 deletions Documentation/articles/migrate_3_14.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Migrating from 3.14 to 4.0


## Migrating Framework

Edit your .csproj file and replace:

```xml
<PackageReference Include="nkast.Xna.Framework" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Content" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Audio" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Media" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Input" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Game" Version="3.14.9001" />
<PackageReference Include="MonoGame.Framework.{Platform}.9000" Version="3.14.9001" />
```

to:

```xml
<PackageReference Include="nkast.Xna.Framework" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Content" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Devices" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Audio" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Media" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Input" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Game" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Storage" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.XR" Version="4.0.9001" />
<PackageReference Include="nkast.Kni.Platform.{Platform}" Version="4.0.9001" />
```

where {Platform} maps as follows.
- Android - > Android.GL
- BlazorGL - > Blazor.GL
- Cardboard - > Cardboard.GL
- DesktopGL - > SDL2.GL
- iOS -> iOS.GL
- WindowsUniversal -> UAP.DX11
- WindowsDX - > WinForms.DX11

For libraries, edit your .csproj file and replace:

```xml
<PackageReference Include="nkast.Xna.Framework" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Content" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Audio" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Media" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Input" Version="3.14.9001" />
<PackageReference Include="nkast.Xna.Framework.Game" Version="3.14.9001" />
```

to:

```xml
<PackageReference Include="nkast.Xna.Framework" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Content" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Devices" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Audio" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Media" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Input" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Game" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.Storage" Version="4.0.9001" />
<PackageReference Include="nkast.Xna.Framework.XR" Version="4.0.9001" />
```

## Migrating Content Builder

Edit your .csproj file and replace:

```xml
<ItemGroup>
<PackageReference Include="nkast.Xna.Framework.Content.Pipeline.Builder" Version="3.14.9001" />
</ItemGroup>
```

to:

```xml
<ItemGroup>
<PackageReference Include="nkast.Xna.Framework.Content.Pipeline.Builder" Version="4.0.9001" />
</ItemGroup>
```

if your importers require Windows libraries (WinForms,WPF), use the 'nkast.Xna.Framework.Content.Pipeline.Builder.Windows' package.


### Migrating BlazorGL projects

Edit index.html file and replace:

```
<script src="_content/nkast.Wasm.Dom/js/JSObject.8.0.2.js"></script>
<script src="_content/nkast.Wasm.Dom/js/Window.8.0.2.js"></script>
<script src="_content/nkast.Wasm.Dom/js/Document.8.0.2.js"></script>
<script src="_content/nkast.Wasm.Dom/js/Media.8.0.2.js"></script>
<script src="_content/nkast.Wasm.XHR/js/XHR.8.0.2.js"></script>
<script src="_content/nkast.Wasm.Canvas/js/Canvas.8.0.2.js"></script>
<script src="_content/nkast.Wasm.Canvas/js/CanvasGLContext.8.0.2.js"></script>
<script src="_content/nkast.Wasm.Audio/js/Audio.8.0.2.js"></script>
```

with:

```
<script src="_content/nkast.Wasm.Dom/js/JSObject.8.0.5.js"></script>
<script src="_content/nkast.Wasm.Dom/js/Window.8.0.5.js"></script>
<script src="_content/nkast.Wasm.Dom/js/Document.8.0.5.js"></script>
<script src="_content/nkast.Wasm.Dom/js/Navigator.8.0.5.js"></script>
<script src="_content/nkast.Wasm.Dom/js/Gamepad.8.0.5.js"></script>
<script src="_content/nkast.Wasm.Dom/js/Media.8.0.5.js"></script>
<script src="_content/nkast.Wasm.XHR/js/XHR.8.0.5.js"></script>
<script src="_content/nkast.Wasm.Canvas/js/Canvas.8.0.5.js"></script>
<script src="_content/nkast.Wasm.Canvas/js/CanvasGLContext.8.0.5.js"></script>
<script src="_content/nkast.Wasm.Audio/js/Audio.8.0.5.js"></script>
<script src="_content/nkast.Wasm.XR/js/XR.8.0.5.js"></script>
```

after this line:

```
import { BrotliDecode } from './js/decode.min.js';
```

add

```
import { BrotliDecode } from './js/decode.min.js';
window.BrotliDecode = BrotliDecode;
```


### Migrating OculusVR projects

Edit your .csproj file and replace:

```xml
<PackageReference Include="nkast.Xna.Framework.Oculus.OvrDX11" Version="3.14.9001" />
```

with:

```xml
<PackageReference Include="nkast.Kni.Platform.WinForms.DX11.OculusOVR" Version="4.0.9001" />
```

In Program.cs, before creating the the Game instance,

```
using (var game = new $ext_safeprojectname$Game())
game.Run();
```

add:
```
Microsoft.Xna.Platform.XR.XRFactory.RegisterXRFactory(new Microsoft.Xna.Platform.XR.LibOVR.ConcreteXRFactory());
using (var game = new $ext_safeprojectname$Game())
game.Run();
```

4 changes: 2 additions & 2 deletions Installers/default.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<property name="os" value="${operating-system::get-platform(environment::get-operating-system())}" />

<!-- The build version number we can get from the environment variable -->
<property name="buildNumber" value="3.14.9001.0"/>
<property name="buildNumber" value="4.0.9001.0"/>
<if test="${environment::variable-exists('BUILD_NUMBER')}">
<property name="buildNumber" value="${environment::get-variable('BUILD_NUMBER')}"/>
</if>
Expand All @@ -27,7 +27,7 @@
<if test="${file::exists('C:\Program Files (x86)\NSIS\makensis.exe')}">
<echo append="false" file="Windows/header.nsh">
!define FrameworkPath "${project::get-base-directory()}"
!define VERSION "3.14"
!define VERSION "4.0"
!define INSTALLERVERSION "${buildNumber}"
</echo>
<exec program="makensis" workingdir="Windows" basedir="C:\Program Files (x86)\NSIS">
Expand Down
20 changes: 10 additions & 10 deletions NuGetPackages/MonoGame.Framework.WindowsUniversal.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@

<dependencies>
<group targetFramework=".NETCore0.0">
<dependency id="nkast.Xna.Framework" version="3.14.9001" />
<dependency id="nkast.Xna.Framework.Content" version="3.14.9001" />
<dependency id="nkast.Xna.Framework.Graphics" version="3.14.9001" />
<dependency id="nkast.Xna.Framework.Audio" version="3.14.9001" />
<dependency id="nkast.Xna.Framework.Media" version="3.14.9001" />
<dependency id="nkast.Xna.Framework.Input" version="3.14.9001.1" />
<dependency id="nkast.Xna.Framework.Game" version="3.14.9001" />
<dependency id="nkast.Xna.Framework.Devices" version="3.14.9001" />
<dependency id="nkast.Xna.Framework.Storage" version="3.14.9001" />
<dependency id="nkast.Xna.Framework.XR" version="3.14.9001" />
<dependency id="nkast.Xna.Framework" version="4.0.9001" />
<dependency id="nkast.Xna.Framework.Content" version="4.0.9001" />
<dependency id="nkast.Xna.Framework.Graphics" version="4.0.9001" />
<dependency id="nkast.Xna.Framework.Audio" version="4.0.9001" />
<dependency id="nkast.Xna.Framework.Media" version="4.0.9001" />
<dependency id="nkast.Xna.Framework.Input" version="4.0.9001.1" />
<dependency id="nkast.Xna.Framework.Game" version="4.0.9001" />
<dependency id="nkast.Xna.Framework.Devices" version="4.0.9001" />
<dependency id="nkast.Xna.Framework.Storage" version="4.0.9001" />
<dependency id="nkast.Xna.Framework.XR" version="4.0.9001" />
<dependency id="SharpDX" version="4.0.1" />
<dependency id="SharpDX.Direct2D1" version="4.0.1" />
<dependency id="SharpDX.Direct3D11" version="4.0.1" />
Expand Down
Loading

0 comments on commit 3ba5585

Please sign in to comment.