Advertisement
kulhajs

MonoGame in Linux from scratch to new project tutorial.

Jun 1st, 2012
1,661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. MonoGame in Linux from scratch to new project tutorial.
  2.  
  3. Hi guys,
  4. since i didn't find anything complete I decided to make this tutorial,
  5. hope everything is going to be understandable and you'll success as I did.
  6. This tutorial has been tested on latest Linux Mint which is Maya,
  7. also should work on Ubuntu or all .deb, so let's begin.
  8.  
  9. #### DOWNLOAD AND INSTALL ####
  10.  
  11. 1. Download and install latest version of MonoDevelop
  12. "sudo apt-get install monodevelop"
  13. 2. Make sure you've lates version of git
  14. "sudo apt-get install git"
  15. 3. Download and install Cola Git GUI
  16. "sudo apt-get install git-cola"
  17. 4. Download and install mesa-common-dev
  18. "sudo apt-get install mesa-common-dev"
  19. 5. Get OpenTK.dll (http://www.opentk.com/)
  20.  
  21. #### CLONING MONOGAME ####
  22.  
  23. 1. Open Cola Git GUI (should find it in Menu -> Programming)
  24. 2. Select "Clone"
  25. 3. Enter this URL: https://github.com/mono/MonoGame.git
  26. 4. Select a destination folder (folder where MonoGame will be extracted;
  27. it takes some time after selecting folder, be patient)
  28. 5. Press "Pull"
  29. 6. Select "origin/develop"
  30. 7. Press "Pull"
  31.  
  32. #### Building ####
  33.  
  34. Open MonoGame.Framework.Linux.sln in MonoDevelop, make sure you've OpenTK.dll in References.
  35. 1. Right click on References -> Edit References
  36. 2. Select Tab .NET Assembly
  37. 3. Locate OpenTK.dll (should be in "OpenTK/Binaries/OpenTK/Release/OpenTK.dll")
  38. 4. Build Solution
  39. MonoGame.Framework.dll and Lidgren.Network.dll will appear in "MonoGame/MonoGame.Framework/bin/Release"
  40. You're going to use these dlls in References of your projects.
  41.  
  42. #### Installing Project Template ####
  43.  
  44. You have to move "MonoGame/ProjectTemplates/MonoDevelop.MonoGame.2.5" folder to "usr/lib/monodevelop/AddIns" so let me show you how to do this.
  45. Make sure your MonoDevelop is NOT running.
  46.  
  47. 1. Open terminal and login as super user
  48. "sudo su"
  49. 2. Move MonoDevelop.MonoGame.2.5 into AddIns folder
  50. "mv /home/$USER/your_folder/MonoGame/ProjectTemplates/MonoDevelop.MonoGame.2.5 /usr/lib/monodevelop/AddIns"
  51. (change "your_folder" name for thatone where your MonoGame is cloned)
  52. 3. Log off as super user
  53. "Exit"
  54.  
  55. #### New MonoGame Linux project ####
  56.  
  57. 1. Start MonoDevelop
  58. 2. Select Create New Solution
  59. 3. In C# category you should be able to select MonoGame Linux project.
  60. 4. Name your project and create it, in your solution explorer should appear everything you need
  61. including Program.cs, Game1.cs, Content folder and other...
  62. 5. Make sure all references are added correctly, otherwise add them manualy
  63.  
  64. Everything should work and has been tested, credit for first half of this tutorial goes to GitHub
  65. https://github.com/mono/MonoGame/wiki/Tutorials%3AInstalling-Prerequisites-on-Linux
  66. http://www.monogame.codeplex.com
  67.  
  68. Have fun making games in Linux using MonoGame!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement