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:
@@ -37,25 +41,10 @@ YourGame.app (this is your root folder)
37
41
- Content (this is where all your content and XNB's should go)
38
42
- YourGame.icns (this is your app icon, in ICNS format)
39
43
- MacOS
40
-
- amd64 (this is where your game executable for amd64 belongs, place files from the osx-x64/publish directory here)
41
-
- arm64 (this is where your game executable for arm64 belongs, place files from the osx-arm64/publish directory here)
42
-
- YourGame (the entry point script of your app, see bellow for contents)
44
+
- YourGame (the main executable for your game)
43
45
- Info.plist (the metadata of your app, see bellow for contents)
44
46
```
45
47
46
-
The contents of the entry point script:
47
-
48
-
```sh
49
-
#!/bin/bash
50
-
51
-
cd"$(dirname $BASH_SOURCE)/../Resources"
52
-
if [[ $(uname -p)=='arm' ]];then
53
-
./../MacOS/arm64/YourGame
54
-
else
55
-
./../MacOS/amd64/YourGame
56
-
fi
57
-
```
58
-
59
48
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:
60
49
61
50
```xml
@@ -111,7 +100,7 @@ For archiving, we recommend using the .tar.gz format to preserve the execution p
You can then archive the content of the publish folder and distribute the archive as-is.
117
106
@@ -123,6 +112,22 @@ We recommend using the .tar.gz archiving format to preserve the execution permis
123
112
124
113
.NET proposes several parameters when publishing apps that may sound helpful, but have many issues when it comes to games (because they were never meant for games in the first place, but for small lightweight applications).
125
114
115
+
### PublishAot
116
+
117
+
This option optimises your game code "Ahead of Time". It allows you to ship your game without the need to JIT (Just In Time compile).
118
+
However you do need to currently add some additional settings to your .csproj.
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.
129
+
For MacOS it is recommended that you publish using AOT as it simplifies the app bundle.
130
+
126
131
### ReadyToRun (R2R)
127
132
128
133
[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