Skip to content
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

Windows crash fix. Mac build fix. Also question about "Gotchas" #46

Open
Vadimledyaev opened this issue Nov 4, 2021 · 7 comments
Open

Comments

@Vadimledyaev
Copy link

Vadimledyaev commented Nov 4, 2021

Hi, thanks for your awesome work!

Can't compile for Windows without adding ";" at the end of lines 71 and 85 of SpineAnimationState.cpp of Spine 3.8:
ERR_PRINT(String("Can not find animation: ") + anim_name)**;** return NULL;

https://github.com/rayxuln/spine-runtime-for-godot/blob/spine4.0/SpineAnimationState.cpp

I tested Spine 3.8.x build for Mac.
In order to make it possible to build on Mac, a Spine lib fix required: convert t_size into String in SpineSprite.cpp gave a conversion error, lines 800 and 988.
Here is a quick rough fix, you can probably make it better.
` for (size_t i=0; i<current_animations.size(); ++i) {

    char str1[128];

    char str2[128];

    String prefix = vformat("ca/%d/", snprintf(str1, sizeof str1, "%zu", i));

    p_list->push_back(PropertyInfo(Variant::NIL, vformat("ID %d", snprintf(str2, sizeof str2, "%zu", i)), PROPERTY_HINT_NONE, prefix, PROPERTY_USAGE_GROUP));`

....
`
for (size_t i=0; i<current_animations.size(); ++i) {

    char str1[128];

    char str2[128];

    String prefix = vformat("ca/%d/", snprintf(str1, sizeof str1, "%zu", i));

    p_list->push_back(PropertyInfo(Variant::NIL, vformat("ID %d", snprintf(str2, sizeof str2, "%zu", i)), PROPERTY_HINT_NONE, prefix, PROPERTY_USAGE_GROUP));`

I am not C++ expert so can you please describe what -Od flag and -O2 flag means?
Do I have to run linker on Linux and Mac OS only? No Windows unlinking required?
Thanks!

@scottkunkel
Copy link
Contributor

scottkunkel commented Nov 4, 2021 via email

@Vadimledyaev
Copy link
Author

I could not find much info about these flags and I'm not really sure how to use them.

I have added them to the SConstruct environment as shown on the picture then built.
Some warnings appear while building.
The build changed size but I could not see much change in performance comparing to the default flags.
scons2
scons

Am I doing something wrong?

I will really appreciate if you clarify how to twice the performance. Thanks.

@scottkunkel
Copy link
Contributor

scottkunkel commented Nov 4, 2021 via email

@Vadimledyaev
Copy link
Author

You mean launching the editor with command line arguments like that:
image
?
I can't see any difference either.

@scottkunkel
Copy link
Contributor

scottkunkel commented Nov 4, 2021 via email

@Vadimledyaev
Copy link
Author

This?
image

@Vadimledyaev
Copy link
Author

Hi, can you please describe how exactly you set the flags?

rayxuln added a commit that referenced this issue Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants