You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recommend that you distribute your game as an [application bundle](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html). Application bundles are directories with the following file structure:
36
25
37
26
```text
@@ -45,6 +34,38 @@ YourGame.app (this is your root folder)
45
34
- Info.plist (the metadata of your app, see bellow for contents)
The `Info.plist` file is a standard macOS file containing metadata about your game. Here is an example file with required and recommended values set:
49
70
50
71
```xml
@@ -93,6 +114,24 @@ The `Info.plist` file is a standard macOS file containing metadata about your ga
93
114
For more information about Info.plist files, see the [documentation](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html).
94
115
95
116
After completing these steps, your .app folder should appear as an executable application on macOS.
117
+
However it does need an icon. So we need to create an `.icns` file. We can use online tools to do this or you can use the following
Note this code is expecting an `Icon.png` file to be in the same directory. This file should be `1024` x `1024` pixels.
96
135
97
136
For archiving, we recommend using the .tar.gz format to preserve the execution permissions (you will likely run into permission issues if you use .zip at any point).
98
137
@@ -125,9 +164,17 @@ However you do need to currently add some additional settings to your .csproj.
125
164
```
126
165
127
166
The `TrimmerRootAssembly` stops the trimmer removing code from these assemblies. This will on the whole allow the game to run without
128
-
any issues. However if you are using any Third Party assemblies, you might need to add them to this list.
167
+
any issues. However if you are using any Third Party or additional assemblies, you might need to add them to this list.
129
168
For MacOS it is recommended that you publish using AOT as it simplifies the app bundle.
130
169
170
+
See [Trim self-contained deployments and executables](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained) for more information.
171
+
172
+
There are some known area's yoo need to watchout for.
173
+
174
+
1. Using `XmlSerializer` in your game will probably cause issues. Since it uses reflection it will be difficult for the Trimmer to figure out what needs to be kept.
175
+
It is recommended that instead of using the `Deserialize` method, you write your own custom deserializer using `XDocument` or `XmlReader`.
176
+
Alternatively you can use the Content Pipeline and create a custom `Processor` and `Reader` to convert the Xml into a binary format that can be loaded via the usual `Content.Load<T>` method.
177
+
131
178
### ReadyToRun (R2R)
132
179
133
180
[ReadyToRun](https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#readytorun-images) is advertised as improving application startup time, but slightly increasing binary size. We recommend not using it for games, because it produces micro stutters when your game is running.
0 commit comments