rayxuln / spine-runtime-for-godot

This project is a module for godot that allows it to load/play Spine skeleton animation.
MIT License
93 stars 22 forks source link

Unable to export project to macos #18

Closed jonchun closed 4 years ago

jonchun commented 4 years ago

Steps to reproduce:

  1. Download https://github.com/rayxuln/Spine-Runtime-For-Godot-Example
  2. Export above project to MacOS using default settings
  3. Try to open exported .dmg and execute app inside.
  4. Project opens and then immediately exits

The above steps work fine on a non-spine project of mine, so it's definitely the custom spine stuff.

jonchun commented 4 years ago

i can't get it to return any errors or anything either so unsure of how to provide additional troubleshooting information.

scottkunkel commented 4 years ago

Can u attach a log? Usually created by running in command line: godot > log.txt

Thomas

On Jul 19, 2020, at 8:58 AM, Jonathan Chun notifications@github.com wrote:

 Steps to reproduce:

Download https://github.com/rayxuln/Spine-Runtime-For-Godot-Example Export above project to MacOS using default settings Try to open exported .dmg and execute app inside. Project opens and then immediately exits The above steps work fine on a non-spine project of mine, so it's definitely the custom spine stuff.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jonchun commented 4 years ago

I'm a little confused as to how I'm supposed to be generating a log. Are you talking about the godot editor's log itself? The Godot engine/editor itself exports fine and I see no errors.

Here's the output of ./godot.osx.tools.x86_64 > log.txt

arguments
0: ./godot.osx.tools.x86_64
Current path: /Users/jchun/git/godot/bin
Godot Engine v3.2.2.stable.custom_build.6a9fbafcb - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon Pro 555 OpenGL Engine

Registered camera FaceTime HD Camera with id 1 position 0 at index 0
Editing project: /Users/jchun/git/Spine-Run-Time-For-Godot-Example (::Users::jchun::git::Spine-Run-Time-For-Godot-Example)
arguments
0: /Users/jchun/git/godot/bin/godot.osx.tools.x86_64
1: --path
2: /Users/jchun/git/Spine-Run-Time-For-Godot-Example
3: --editor
Current path: /Users/jchun/git/godot/bin
Godot Engine v3.2.2.stable.custom_build.6a9fbafcb - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon Pro 555 OpenGL Engine

Registered camera FaceTime HD Camera with id 1 position 0 at index 0
Exporting to /Users/jchun/Library/Caches/Godot/Spine Run Time Test Project.app
Creating /Users/jchun/Library/Caches/Godot/Spine Run Time Test Project.app/Contents/MacOS
Creating /Users/jchun/Library/Caches/Godot/Spine Run Time Test Project.app/Contents/Frameworks
Creating /Users/jchun/Library/Caches/Godot/Spine Run Time Test Project.app/Contents/Resources
ADDING: Contents/Resources/icon.icns size: 489675
ADDING: Contents/Info.plist size: 1251
ADDING: Contents/PkgInfo size: 9
ADDING: Contents/MacOS/Spine Run Time Test Project size: 43059220
hdiutil returned: created: /Users/jchun/git/Spine-Run-Time-For-Godot-Example/export/Spine Run Time Test Project.dmg

However, when I try to execute the .app file image

it just doesn't open. No logs, no errors. I tried opening the .app file itself from the command line using the open command as documented here https://osxdaily.com/2007/02/01/how-to-launch-gui-applications-from-the-terminal/

and no logs or errors in the terminal are shown either

jonchun commented 4 years ago

Did a little bit more testing. Looks like it will launch/run fine after exporting even with a SpineSprite node added to a scene. The problem occurs the second I try to create a SpineAnimationStateDataResource

This will crash: image

This is fine: image

scottkunkel commented 4 years ago

Did you load the spine json? You need load your spine export first.

Sorry, don’t have access to a pc atm so I’m following from phone.

Thomas

On Jul 19, 2020, at 10:31 AM, Jonathan Chun notifications@github.com wrote:

 Did a little bit more testing. Looks like it will launch/run fine even with a SpineSprite node added to a scene. The problem occurs the second I try to create a SpineAnimationStateDataResource

This will crash:

This is fine:

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

jonchun commented 4 years ago

to clarify, it works when the spine json is NOT loaded. I'm simply proving that there's an issue with SpineSprite loading. If I have anything loaded in there, it crashes on start.

scottkunkel commented 4 years ago

Thank you. Unfortunately I don’t have access to a Mac. I’ll try this on windows to see if I can reproduce there.

Thomas

On Jul 19, 2020, at 11:24 AM, Jonathan Chun notifications@github.com wrote:

 to clarify, it works when the spine json is NOT loaded. I'm simply proving that there's an issue with SpineSprite loading. If I have anything loaded in there, it crashes on start.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

jonchun commented 4 years ago

great, thanks. I have 2 macbooks and have only tested it on one, so i'll see if I can test it on my other one later.

I did try exporting to HTML5 as well to see what happens and get the following: image

This makes me think perhaps my problem is that I'm exporting using a default template and I need to be exporting using a custom one? At least in the WASM export, i see that it thinks it's running "Godot Engine v3.2.2.stable.official" even though I definitely built it using the custom build with the spine module. image

I've never actually done this before so very possible I'm just exporting incorrectly and need some guidance on how to do this. Because the project is so new right now it's pretty lacking and might be a good chance for us to come up with something.

scottkunkel commented 4 years ago

Wait, you’re using the default template?

You have to build custom templates with the spine runtime to make spine work and use those. Otherwise the exported godot does not know what to do with the spinesprite.

It should say stable.custom_build or something like that.

Thomas

On Jul 19, 2020, at 12:10 PM, Jonathan Chun notifications@github.com wrote:

 great, thanks. I have 2 macbooks and have only tested it on one, so i'll see if I can test it on my other one later.

I did try exporting to HTML5 as well to see what happens and get the following:

This makes me think perhaps my problem is that I'm exporting using a default template and I need to be exporting using a custom one? At least in the WASM export, i see that it thinks it's running "Godot Engine v3.2.2.stable.official" even though I definitely built it using the custom build with the spine module.

I've never actually done this before so very possible I'm just exporting incorrectly and need some guidance on how to do this. Because the project is so new right now it's pretty lacking and might be a good chance for us to come up with something.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

jonchun commented 4 years ago

Thanks. That must be what I'm missing. I'll do some googling to figure out how to do that. Yes, I was using the default template and didn't realize there was a missing step.

scottkunkel commented 4 years ago

If you built the editor, you can also easily build the template for macOS. Just execute the same build command but add tools=no target=release_debug for debug template and tools=no target=release For prod template This way you can test quickly

HTML template is more involved and required installation of nodejs etc. More info on the godot compile documentation.

Thomas

On Jul 19, 2020, at 1:03 PM, Jonathan Chun notifications@github.com wrote:

 Thanks. That must be what I'm missing. I'll do some googling to figure out how to do that. Yes, I was using the default template and didn't realize there was a missing step.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

jonchun commented 4 years ago

Thanks -- I'm following this guide here: https://godotforums.org/discussion/20550/how-to-create-export-templates right now. I'll play around with the HTML stuff perhaps later, but just want to try getting a normal export out first.

I'll close this issue out early because everything is pointing towards just my inexperience with the exporting process here. I'll re-open if I still have issues.