Guest User

Mkbundle script to start a MonoGame game

a guest
Apr 23rd, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.18 KB | None | 0 0
  1. #!/bin/bash
  2. # MonoKickstart Shell Script
  3. # Written by Ethan "flibitijibibo" Lee
  4.  
  5. # Move to script's directory
  6. (cd "`dirname "$0"`"
  7.  
  8. # Get the system architecture
  9. UNAME=`uname`
  10. ARCH=`uname -m`
  11.  
  12. # MonoKickstart (or mkbundle in this case) picks the right libfolder, so just execute the right binary.
  13. if [ "$UNAME" == "Darwin" ]; then
  14.     # ... Except on OSX.
  15.     export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./osx/
  16.  
  17.     # Note that you will need to update your
  18.     # launch configuration to the script location, NOT just the app location
  19.     # (i.e. Kick.app/Contents/MacOS/Kick, not just Kick.app).
  20.     # -flibit
  21.     if [ "$STEAM_DYLD_INSERT_LIBRARIES" != "" ] && [ "$DYLD_INSERT_LIBRARIES" == "" ]; then
  22.         export DYLD_INSERT_LIBRARIES="$STEAM_DYLD_INSERT_LIBRARIES"
  23.     fi
  24.     if [ "$ARCH" == "x86_64" ]; then
  25.         ./MyFile $@
  26.         # Like flibit said above, the above path will change when you package your
  27.         # .app for the Mac App Store, Steam, etc. Don't forget to change it later!
  28.     else
  29.         ./MyFile.bin.osx86 $@
  30.     fi
  31.  
  32. else
  33.     if [ "$ARCH" == "x86_64" ]; then
  34.         ./MyFile.bin.x86_64 $@
  35.     elif [ "$ARCH" == "aarch64" ]||[ "$ARCH" == "arm64" ]; then
  36.         ./MyFile.bin.arm64 $@
  37.     else
  38.         ./MyFile.bin.x86 $@
  39.     fi
  40. fi)&
Add Comment
Please, Sign In to add comment