Advertisement
headkase

Building Godot from Source on Windows with MinGW

Mar 12th, 2014
1,100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. ================================================
  2. Building Godot from Source on Windows with MinGW
  3. ================================================
  4.  
  5. Required resources
  6. ==================
  7.  
  8. Minimalist GNU for Windows (MinGW)
  9. ----------------------------------
  10. http://sourceforge.net/projects/mingw-w64/files/
  11.  
  12. Python 2.7.x 32 bit for Windows (x86 version)
  13. ---------------------------------------------
  14. http://www.python.org/download/releases/2.7.6/
  15.  
  16. SCons Software Constructor
  17. --------------------------
  18. http://www.scons.org/
  19.  
  20. 7-zip 9.20
  21. ----------
  22. http://www.7-zip.org/
  23.  
  24. Godot Master GitHub
  25. -------------------
  26. https://github.com/okamstudio/godot/
  27.  
  28. Prepare Initial Environment
  29. ===========================
  30.  
  31. Install MinGW
  32. -------------
  33. Go to the MinGW site and choose either "Toolchains targeting Win32" or "Toolchains targeting Win64" with the choice being whether you want a 32 or 64 bit compiler. Then within either of those go into "Personal Builds" and then go into "mingw-builds" and then choose "4.8.2," "threads-win32" then either "sjlj" if in Win32 OR "seh" if Win64. Get the latest 7z archive and use 7-zip to unzip it somewhere on your hard drive like "C:\" (all the files are in a common folder so it won't spray your root of the drive). The following paths assume you have placed the unarchived files in "C:\"
  34.  
  35. * seh exceptions are faster and produce smaller executables than sjlj exceptions do but because of a patent only 64 bit builds can freely use seh. On 32 bit systems sjlj does not violate the patent. On Windows 32 bit avoid dwarf exceptions as they have issues interacting with various Windows components.
  36.  
  37. Install Python and SCons
  38. ------------------------
  39. Install Python 2.7.6 32 bit (x86) to its default location (C:\Python27\) and install SCons (the Godot build program)
  40.  
  41. Acquire latest Godot Master sources from GitHub
  42. -----------------------------------------------
  43. Download the zip of Godot from GitHub, unarchive that and then in a command prompt change to the root of that folder.
  44.  
  45. Build Godot
  46. ===========
  47.  
  48. Type this in your command prompt to properly set up the paths for building Godot:
  49.  
  50. PATH=C:\mingw64\bin;C:\Python27\Scripts;%PATH%
  51.  
  52. Replace "64" with "32" if using the 32 bit compiler.
  53.  
  54. Build Godot with SCons by executing the following command in your prompt:
  55.  
  56. scons bin/godot.exe target=release_debug
  57.  
  58. After building Godot do:
  59.  
  60. strip bin\godot.exe
  61.  
  62. to make the executable smaller.
  63.  
  64. * There are three targets for building: release, release_debug, and the default, debug. Debug produces very large executables (like 140MB) because all the debugging symbols are included, release produces a small executable but does not do some necessary checks that keep that from crashing with 2D projects, and release_debug produces a fairly small executable which does checking that avoid the application crashes of release.
  65.  
  66. Use your self-compiled Godot
  67. ============================
  68.  
  69. Move godot.exe in the bin folder in the source files anywhere you like. In the C:\mingwXX\bin folder you will need to copy a few .dll files to the same folder you put your godot.exe file. Just run godot.exe and note which missing .dll files it complains about. Copy them as needed until it doesn't complain any more at which time it will run without errors.
  70.  
  71. In the Godot source folders there is a demos folder, optionally save and scan that folder in Godot to use the demos.
  72.  
  73. If you leave the MinGW bin folder permanently in your path then your self-compiled godot.exe will not complain about missing .dll files, because they are in your path, until you put it on another computer without those .dll files. So, don't have the MinGW bin folder permanently in your path so your godot.exe file will complain and make you copy the right .dll files to its folder.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement