godotjs / javascript

Javascript binding for godotengine
https://godotjs.github.io/
MIT License
980 stars 82 forks source link

Fix Godot 4.0 compile errors, update JavaScript integration, refactor code, and address minor issues #156

Closed fire closed 1 year ago

fire commented 1 year ago

To review the changes on top of gd4.

This is blocked on the build process with mvsc.

Geequlim commented 1 year ago

It's ok to keep master to compatiable with godot master branch. It should be better to rename current master branch to 3.x for someone who need that and mention it in readme. @fire Can you help make a new branch for 3.x and update the readme in this pr ?

fire commented 1 year ago

Since I'm not able to work on this immediately.

Here's the plan:

  1. Create a 3.x branch.
  2. Add phrasing to the README. Need some help on this.
fire commented 1 year ago

The current errors don't make sense:



scons: *** [thirdparty/glslang/glslang/MachineIndependent/attribute.windows.editor.x86_64.o] Error 1
In file included from thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h:53,
                 from thirdparty/glslang/glslang/MachineIndependent/attribute.cpp:41:
thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h:648:18: error: 'uint32_t' does not name a type
  648 |     static const uint32_t LevelFlagBitOffset = 56;
      |               ```
wiredmatt commented 1 year ago

Sounds related to this: https://github.com/godotengine/godot/pull/77949

I get the same error locally if I try to build it using MSYS2 MinGW. Not sure if downgrading GCC to < 13 would change anything, but I can't afford to mess with it locally because it took me ages to get it working properly.

You could also try with UCRT64 instead of mingw

fire commented 1 year ago

It builds when I copy the module into git godot engine https://github.com/V-Sekai/godot/tree/vsk-javascript.

Note that only linux and windows platforms are set to build.

fire commented 1 year ago

I have no idea how to fix this.

tekenik commented 1 year ago

Siema i dzięki

jaune commented 1 year ago

@fire anynews / progress?

fire commented 1 year ago

I am stuck compiling for Windows on MSVC. Suggestions welcome.

jaune commented 1 year ago

QuickJs is not really compatible with MSVC.

I made some changes to make it compile, but it crash.

I will investigate tomorrow, and post my changes if working.

jaune commented 1 year ago

@fire it compile and "run" => https://github.com/Geequlim/ECMAScript/pull/161

It's really durty, but it's a first step.

I will rebase, and use godot 4.1.1-sable.

jaune commented 1 year ago

@fire Can I delete https://github.com/Geequlim/ECMAScript/pull/161? I will have some time next week, I can try to make the CI pass for Windows.

What version for Godot this PR should work with?

fire commented 1 year ago

I am targeting master because of graph node changes.

fire commented 1 year ago

@jaune if you wish you can close it.

jaune commented 1 year ago

@fire

I am targeting master because of graph node changes.

CI uses the last commit on branch 4.0 and not master because of GODOT_BASE_BRANCH: '4.0' in workflows.

PR https://github.com/Geequlim/ECMAScript/pull/162 should fix the CI, I can not run the CI to make sure of it.