0
\$\begingroup\$

I'm not home so the only computer I have access to is a Macbook, and now I would like to see how I could pack up projects to export for various platforms. But when I build my project it only produce a windows executable. Since the project is DesktopGL I can execute it via the command

mono-sgen64 DesktopGL.exe

but this requires to include as redistributable the mono runtime. can't I publish the project in order to target Mac OS specific output and then get a fully packed .app executable like I can with the publish to folder thingy on windows?

I'll appreciate any help and really thank you for your attention.

Also if I could have access to linux executables I would be highly thankful.

Here is a recap of what I've found already:

the publish to folder is only available for Mac with a .asp.net or core console project
https://docs.microsoft.com/en-us/visualstudio/mac/publish-folder?view=vsmac-2019

We can use appify.sh script but I don't know how it would read the content files etc. and this won't be compatible with linux
I've allready used this script to create a packed php executable but I never included ressources https://mathiasbynens.be/notes/shell-script-mac-apps

as I mentioned earlier I can execute the game properly using the mono executable so if I go that way I could create a run.sh script but this won't be the thing I'm looking into
i figured it by looking where was located the actual executable of the game once I've run the project

I've also found this nugget package which seems to add publishing parameters but I don't know if I can trust it https://www.nuget.org/packages/InfinitespaceStudios.MonoGame.Packaging/0.1.4-alpha

\$\endgroup\$
6
  • \$\begingroup\$ also I've remembered I could use wineskin but I really don't trust this thing \$\endgroup\$ Aug 12, 2020 at 16:10
  • \$\begingroup\$ You don't need to include the runtime for a Windows build because Windows already has the .NET runtime built-in. Macs don't, so the user needs a Mono runtime or .NET Core to be able to run your managed code. \$\endgroup\$
    – DMGregory
    Aug 12, 2020 at 16:17
  • \$\begingroup\$ so in order to be able to execute the project I must include it? \$\endgroup\$ Aug 12, 2020 at 16:31
  • \$\begingroup\$ when I create a monogame.macosx project, the game is built correctly as a .app package, I think I'll do an other project based on that and copy the code to export to Mac. (I'll use a git with only the code) \$\endgroup\$ Aug 12, 2020 at 16:40
  • \$\begingroup\$ Sounds like you've answered your question. Be sure to post the steps of your solution as an Answer below. \$\endgroup\$
    – DMGregory
    Aug 12, 2020 at 16:41

1 Answer 1

1
\$\begingroup\$

in order to create a .app executable for Mac OS with a DesktopGL project from Visual Studio Mac 2019 , you can create a second project and make a git that shares the code for the two projects. Then you can just compile the MacOS project and get your packed project but this is clearly a workaround rather than a real solution to the question I've asked. Else the easiest solution is to include the linux and the Mac OS executables for mono like said earlier.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .