Compile Godot 4 (C#) from Source
Vložit
- čas přidán 23. 08. 2024
- Compiling the C# version of Godot 4 from source
Godot (Mono) Compile Documentation Page:
docs.godotengi...
Godot Repository:
github.com/god...
GodotSharp compile instructions (mono page of repo):
github.com/god...
Python:
www.python.org...
Git:
git-scm.com/do...
.NET 6 SDK:
dotnet.microso...
Visual Studio Community:
visualstudio.m...
If using the default path to install Python, default locations (replace username & version respectively):
Python default location:
C:\Users\[USERNAME]\AppData\Local\Programs\Python\Python[VERSION_NUMBER]
Scripts (Scons) default location:
C:\Users\[USERNAME]\AppData\Local\Programs\Python\Python[VERSION_NUMBER]\Scripts
"Terra of the Bells":
ocremix.org/re...
Thank you so much man! This helped a TON. I had been stuck with the documentation for AGES. This fixed up all the issues. Keep up the great work!
Glad to hear it! The documentation is not nearly as bad now as it was then, but yeah, everything else I found on "compiling Godot," C# be like..."What sharp now?" :-P
You won't believe how much this helped. Thank you.
No problem :).
Thank you. I was confused about the mono glue steps.
You had a right to be 😁. No problem. Documentation has improved now so I don't think you have to go through as much, but it's good to have a firm grasp of the firm grasp 👌
When I am trying to build with scons and use the module_mono_enabled=yes, it tells me it can't find the mono\lib folder. I have .NET 6 installed, but it wants Mono installed. Any thoughts?
My guess is you're not running the command from the repository folder 🤔 To clarify, you do not need mono. It is simply referred thus in Godot's folders, etc... because they haven't bothered renaming all that, but it uses .NET now.
I changed my python location (after uninstalling and force reinstalling) and now I get this when I try to build the project I get
Using SCons-detected MSVC version 14.3, arch x86_64
Building for platform "windows", architecture "x86_64", target "editor".
FileNotFoundError: [WinError 2] The system cannot find the file specified:
File "C:\blabla\godot43MotionBlur\SConstruct", line 897:"
I followed the steps thoroughly. Trying on Win11 if it helps
So full disclosure, I've never touched Windows 11, but I can tell you that SConstruct file is what scons uses for, I think basically "settings" related to the compile. First thing I would do is run the command from the directory that you cloned the repo to (that's where that file should be), regardless of where you put Python itself.
Regarding Python, I don't think the location matters in this step. Scons is its own .exe. If it's giving you that error, I assume when you type "scons" it is actually running scons, and that error is spit out by scons because it's in your Windows path.
For Python itself, I just change the location because I hate having it all buried in the hidden AppData folder, but as long as it added that to the path, it shouldn't matter--and it also needs to add that Scripts folder (4:00), which is where scons gets put. However, I don't know what went on with your uninstalling/reinstalling, etc... If you have multiple versions of Python, and/or multiple/different versions added to the path.
Look, I Already have a game. I decompile pck file into whole folder, using Godot RE Tools, now I pack it back into pck but when I put original exe in in it says " Error: Couldn’t load project data at path “.”. Is the .pck file missing? If you’ve renamed the executable, the associated .pck file should also be renamed to match the executable’s name (without the extension)."
Do You happen to know how to bypass this OR how to edit pck with Your tools from your video and then have a successful launch with exe?
I'm afraid I have never attempted decompiling a Godot game. This video is about compiling--decompiling is completely different, and you're talking about a game as well, not the engine.
Having said that, I don't know what you're referring to regarding "my tools" in my video. This is nothing but figuring out how to compile the engine just as the Godot devs intend us to be able to. There are no special tools and nothing that I have made in here.
@@Holonet01 hmmm
11:20 normal cmd uses \ instead of /
.\bin works
./bin does not
EDIT: I agree the instructions are a tad confusing
Thanks for pointing that out :). Yeah, from what I can see the documentation for this has been significantly improved from when I made this video, thankfully. Navigating to it is still a tad bit weird (other compilation targets and options), but that's probably what I get for doing it while in beta.
it would be interesting to know how to build the engine using the "customize engine build configuration"
Yeah I have not tried that yet. I have a feeling even the process I went through in this video could be simpler now because Godot 4 was still in developmental stages, and the docs were really lagging. If I come across something I'll mention it or add another video. One thing that kinda bums me out is the .NET switch apparently means no (pre-built anyway) web export templates are available in Godot 4 C#, due to some support issues in .NET, which is a bit of a tangent, but related.