-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to raylib 4.6-dev #8
Conversation
It's a bit hard to test, but I used the JSON in 4.6 branch here, instead of downlaoding/merging with API. I did this: let aliases = []
let enums = []
let callbacks = []
let functions = []
for (const a of [
'raygui',
'raymath',
'reasings',
'rlgl',
'rmem',
'rres',
'raylib',
]) {
const api = JSON.parse(await readFile(`tools/api/${a}.json`))
defines = [...defines, ...api.defines]
structs = [...structs, ...api.structs]
aliases = [...structs, ...api.structs]
enums = [...enums, ...api.enums]
callbacks = [...callbacks, ...api.callbacks]
functions = [...functions, ...api.functions]
} and I still end up with missing struct fields. It might be related to like how a few of these libs have a "don't use with raylib" adapter layer where it will define the same structs, if you define something. I think I still need to maybe merge them in a more clever way (get the order right and check for dupes.) |
This seems to work a bit better: const data = {
defines: [],
structs: [],
aliases: [],
enums: [],
callbacks: [],
functions: []
}
for (const a of [
'raylib',
'raygui',
'raymath',
'reasings',
'rlgl',
'rmem',
'rres'
]) {
const api = JSON.parse(await readFile(`tools/api/${a}.json`))
for (const field of Object.keys(data)) {
for (const d of api[field]) {
if (!data[field].find(o => o.name === d.name)) {
data[field].push(d)
}
}
}
}
let { defines, structs, aliases, enums, callbacks, functions } = data I am going to try to do the full wasm-build of everything with this, and see if it improves. |
Sounds like conflicts across different versions of the APIs. I know there were some changes between raygui that targeted 4.5 vs 4.6 |
Yeh, trying to use current raylib master with this JSON, I get other things missing, like the first one I hit:
which is in:
Not totally sure of a good way to merge all these. |
maybe I should stick to a known combo of tags? like lock-in specific versions of all that are known to work together:
Since I need the C APIs to match, maybe I could just do what you do here in Makefile, and use that instead? Also, It seems reasonable to lock this lib into "released versions" and I can just make sure to check out those tags on each repo for C building. It does seem a bit crazy of me to build off master. :) I ended up building the wasm for these myself, because the released prebuilt wasm (on raylib github) doesn't have JPEG support. |
If I lock in raylib@4.50 and raygui@3.6 for C build, and use the current |
Looking around the raygui repo, I see that 3.5 removed |
we should drop this pr in favor of #9 |
@konsumer Does this do it?
Fixes #6