ECMAScript
ECMAScript copied to clipboard
Cannot build for windows
Im getting the following error when compiling with scons platform=windows.
Running on windows 10.
I have this project located under modules. Im also only getting this while this module is in there.
scons: Reading SConscript files ...
Configuring for Windows: target=debug, bits=default
Found MSVC version 14.1, arch amd64, bits=64
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Johannes\\Documents\\GitHub\\godot\\doc\\classes\\PoolByteArray.xml':
File "C:\Users\Johannes\Documents\GitHub\godot\SConstruct", line 669:
SConscript("modules/SCsub")
File "c:\users\johannes\appdata\local\programs\python\python37\lib\site-packages\SCons\Script\SConscript.py", line 654:
return method(*args, **kw)
File "c:\users\johannes\appdata\local\programs\python\python37\lib\site-packages\SCons\Script\SConscript.py", line 591:
return _SConscript(self.fs, *files, **subst_kw)
File "c:\users\johannes\appdata\local\programs\python\python37\lib\site-packages\SCons\Script\SConscript.py", line 280:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\Johannes\Documents\GitHub\godot\modules\SCsub", line 44:
SConscript(name + "/SCsub") # Built-in.
File "c:\users\johannes\appdata\local\programs\python\python37\lib\site-packages\SCons\Script\SConscript.py", line 654:
return method(*args, **kw)
File "c:\users\johannes\appdata\local\programs\python\python37\lib\site-packages\SCons\Script\SConscript.py", line 591:
return _SConscript(self.fs, *files, **subst_kw)
File "c:\users\johannes\appdata\local\programs\python\python37\lib\site-packages\SCons\Script\SConscript.py", line 280:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\Johannes\Documents\GitHub\godot\modules\ECMAScript\SCsub", line 31:
generate_builtin_api.generate_api_json(os.path.join(GetLaunchDir(), "modules", os.path.basename(os.getcwd())))
File "C:\Users\Johannes\Documents\GitHub\godot\modules\ECMAScript\generate_builtin_api.py", line 420:
tree = ET.parse(open(os.path.join(DOCS_DIR, cls + '.xml'), 'r'))
I faced the same problem. This is not compatible with the master branch of godot because they renamed a lot of the classes (for example PoolByteArray to PackedByteArray). To fix it, you need to clone the 3.3 branch specifically:
git clone -b 3.3 https://github.com/godotengine/godot
Another problem is that this can't be compiled with MSVC, you need to use MSYS2.
Download MSYS2 from here: https://www.msys2.org/
Update it with the command pacman -Syuu
Install the gcc toolchain with pacman -S mingw-w64-x86_64-toolchain
Make sure to add this to your PATH environmental variable: C:\msys64\mingw64\bin
Finally after doing all of this, running scons use_mingw=yes platform=windows worked for me.
The javascript module does not work with MSVC.
This is documented here https://github.com/Geequlim/ECMAScript#developer-notes but it is very easy to miss.
According to https://github.com/Geequlim/ECMAScript/blob/master/.github/workflows/windows_builds.yml it should build on Windows.
Feel free to report back and we can debug.