Skip to content

Latest commit

 

History

History
90 lines (64 loc) · 2.29 KB

install-mac.md

File metadata and controls

90 lines (64 loc) · 2.29 KB

Install on macOS

Tested on Mac with Intel processor and macOS Ventura.

The offical documentation.

Outside of Windows you need Wine's help for Effects(HLSL), at least for now.

Install Homebrew

Set up MonoGame

brew install dotnet@6
echo 'export PATH="/opt/homebrew/opt/dotnet@6/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# To check the version installed.
dotnet --info
dotnet new --install MonoGame.Templates.CSharp
dotnet new -l

# Create a basic project to test if MonoGame is working.
dotnet new mgdesktopgl -o MyGame
cd MyGame
dotnet restore
dotnet build
dotnet run

Set up Wine for effect compilation

For now it does not work on ARM chips (M1 and M2).

brew install p7zip wget wine-stable xquartz
wine64 --version

You will need to open Wine manually first. Otherwise, you will get an error that Apple couldn't verify it.

wget -qO- https://raw.githubusercontent.com/MonoGame/MonoGame/develop/Tools/MonoGame.Effect.Compiler/mgfxc_wine_setup.sh | bash

Set up the IDE

You can use Visual Studio Code or Rider. The official documentation only explains it for Visual Studio but it is up to you which one you are more comfortable with.

Visual Studio Code

brew install --cask visual-studio-code

# Visual Studio Code extensions
code --install-extension ms-dotnettools.csharp
code --install-extension timgjones.hlsltools

JetBrains Rider

brew install --cask rider

Visual Studio

Go to the official page to download and install Visual Studio 2022 for Mac.

Set up tgc-monogame-samples

brew install git git-lfs
git lfs install
git clone https://github.com/tgc-utn/tgc-monogame-samples.git
cd tgc-monogame-samples
# MonoGame Effects Compiler (MGFXC)
dotnet tool install -g dotnet-mgfxc
dotnet restore
dotnet build
dotnet run --project TGC.MonoGame.Samples

Known issues

  • Assimp.AssimpException: Error loading unmanaged library from path: libassimp.dylib - WIP
  • System.DllNotFoundException: Unable to load shared library 'freetype6' or one of its dependencies. - WIP