From 859aefe2ce648829194116374708e30901294985 Mon Sep 17 00:00:00 2001 From: badlogic Date: Wed, 25 Jan 2023 10:54:35 +0100 Subject: [PATCH 01/15] [godot] Fix Windows template build. --- .github/workflows/spine-godot.yml | 4 ++-- spine-godot/build/build-templates-v4.sh | 8 ++++---- spine-godot/build/build-v4.sh | 12 +----------- spine-godot/build/livepp-v4.patch | 2 +- spine-godot/build/livepp.patch | 2 +- spine-godot/build/paths.md | 9 +++++++++ spine-godot/spine_godot/SpineAnimationTrack.cpp | 3 +-- spine-godot/spine_godot/SpineSlotNode.cpp | 2 ++ 8 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 spine-godot/build/paths.md diff --git a/.github/workflows/spine-godot.yml b/.github/workflows/spine-godot.yml index 2ee44e09f..7ca290323 100644 --- a/.github/workflows/spine-godot.yml +++ b/.github/workflows/spine-godot.yml @@ -13,8 +13,8 @@ env: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_EC2_METADATA_DISABLED: true EM_VERSION: 3.1.10 - GODOT_TAG: 3.5-stable - GODOT_VERSION: 3.5.stable + GODOT_TAG: 3.5.1-stable + GODOT_VERSION: 3.5.1.stable jobs: diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh index 57bc7cfac..9c36c7fd4 100644 --- a/spine-godot/build/build-templates-v4.sh +++ b/spine-godot/build/build-templates-v4.sh @@ -38,10 +38,10 @@ pushd ../godot if [ "$platform" = "windows" ]; then # --- Windows --- #generates windows_64_debug.exe and windows_64_release.exe - scons platform=windows tools=no target=release custom_modules="../spine_godot" --jobs=$cpus - scons platform=windows tools=no target=release_debug custom_modules="../spine_godot" --jobs=$cpus - cp bin/godot.windows.opt.64.exe bin/windows_64_release.exe - cp bin/godot.windows.opt.debug.64.exe bin/windows_64_debug.exe + scons platform=windows tools=no target=template_release custom_modules="../spine_godot" --jobs=$cpus + scons platform=windows tools=no target=template_debug custom_modules="../spine_godot" --jobs=$cpus + cp bin/godot.windows.template_release.x86_64.exe bin/windows_64_release.exe + cp bin/godot.windows.template_debug.x86_64.exe bin/windows_64_debug.exe elif [ "$platform" = "macos" ]; then # --- macOS --- diff --git a/spine-godot/build/build-v4.sh b/spine-godot/build/build-v4.sh index 652f37375..ea7fc50f7 100644 --- a/spine-godot/build/build-v4.sh +++ b/spine-godot/build/build-v4.sh @@ -4,16 +4,6 @@ set -e dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" pushd $dir > /dev/null -if [ ! "$#" -eq 1 ]; then - echo "Usage: ./build-v4.sh " - echo - echo "e.g.:" - echo " ./build.sh editor" - echo " ./build.sh template_debug" - echo - exit 1 -fi - if [ ! -d ../godot ]; then echo "No Godot clone found. Run ./setup.sh first." exit 1 @@ -58,7 +48,7 @@ if [ `uname` == 'Darwin' ] && [ $dev = "false" ]; then popd else if [ "$OSTYPE" = "msys" ]; then - target="$target vsproj=yes livepp=$LIVEPP" + target="vsproj=yes livepp=$LIVEPP" fi if [ "$dev" = "true" ]; then target="$target dev_build=true" diff --git a/spine-godot/build/livepp-v4.patch b/spine-godot/build/livepp-v4.patch index b5cabc509..bd651d320 100644 --- a/spine-godot/build/livepp-v4.patch +++ b/spine-godot/build/livepp-v4.patch @@ -45,7 +45,7 @@ index 1b55574..8bc0fb1 100644 + env.AppendUnique(CPPPATH=[env.get("livepp")]) + env.AppendUnique(LINKFLAGS=["/FUNCTIONPADMIN"]) + else: -+ printf("Specified Live++ path does not exist") ++ print("Specified Live++ path does not exist") + else: + print("Live++ can only be used with targets 'editor'") + else: diff --git a/spine-godot/build/livepp.patch b/spine-godot/build/livepp.patch index 6826e7ea8..42b0f7d97 100644 --- a/spine-godot/build/livepp.patch +++ b/spine-godot/build/livepp.patch @@ -45,7 +45,7 @@ index e6829ae..3a7e38d 100644 + env.AppendUnique(CPPPATH=[env.get("livepp")]) + env.AppendUnique(LINKFLAGS=["/FUNCTIONPADMIN"]) + else: -+ printf("Specified Live++ path does not exist") ++ print("Specified Live++ path does not exist") + else: + print("Live++ can only be used with targets 'debug' and 'release_debug'") + else: diff --git a/spine-godot/build/paths.md b/spine-godot/build/paths.md new file mode 100644 index 000000000..0ec7b3914 --- /dev/null +++ b/spine-godot/build/paths.md @@ -0,0 +1,9 @@ +# Godot binary paths +## 4.0+ +* Windows + * Editor + * Debug: godot/bin/godot.windows.editor.dev.x86_64.exe + * Release: godot/bin/godot.windows.editor.x86_64.exe + * Template + * Debug: godot.windows.template_debug.x86_64.exe + * Release: godot.windows.template_release.x86_64.exe \ No newline at end of file diff --git a/spine-godot/spine_godot/SpineAnimationTrack.cpp b/spine-godot/spine_godot/SpineAnimationTrack.cpp index ec188768f..9867e7522 100644 --- a/spine-godot/spine_godot/SpineAnimationTrack.cpp +++ b/spine-godot/spine_godot/SpineAnimationTrack.cpp @@ -4,14 +4,13 @@ #else #include "core/engine.h" #endif -#include "godot/editor/editor_node.h" #include "scene/animation/animation_player.h" #include "scene/resources/animation.h" #ifdef TOOLS_ENABLED +#include "godot/editor/editor_node.h" #include "editor/plugins/animation_player_editor_plugin.h" #include "editor/plugins/animation_tree_editor_plugin.h" - #endif void SpineAnimationTrack::_bind_methods() { diff --git a/spine-godot/spine_godot/SpineSlotNode.cpp b/spine-godot/spine_godot/SpineSlotNode.cpp index c4fb0d072..593bb1f0b 100644 --- a/spine-godot/spine_godot/SpineSlotNode.cpp +++ b/spine-godot/spine_godot/SpineSlotNode.cpp @@ -29,7 +29,9 @@ #include "SpineSlotNode.h" +#ifdef TOOLS_ENABLED #include "editor/editor_node.h" +#endif #include "scene/main/viewport.h" void SpineSlotNode::_bind_methods() { From 7bc4cbfaeefb1726191d5c38b527ad8978483c1a Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 25 Jan 2023 11:16:31 +0100 Subject: [PATCH 02/15] [godot] Make v4 build scripts executable. --- spine-godot/build/build-templates-v4.sh | 0 spine-godot/build/build-v4.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 spine-godot/build/build-templates-v4.sh mode change 100644 => 100755 spine-godot/build/build-v4.sh diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh old mode 100644 new mode 100755 diff --git a/spine-godot/build/build-v4.sh b/spine-godot/build/build-v4.sh old mode 100644 new mode 100755 From 7f39dfc41d3217142f94ad70363fd393945094b1 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 25 Jan 2023 12:34:16 +0100 Subject: [PATCH 03/15] [godot] Fix macOS editor and templates build for Godot 4.0 --- .github/workflows/spine-godot-v4.yml | 365 ++++++++++++++++++++++++ .github/workflows/spine-godot.yml | 2 +- spine-godot/build/build-templates-v4.sh | 58 ++-- spine-godot/build/build-v4.sh | 20 +- 4 files changed, 402 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/spine-godot-v4.yml diff --git a/.github/workflows/spine-godot-v4.yml b/.github/workflows/spine-godot-v4.yml new file mode 100644 index 000000000..4ba3725e4 --- /dev/null +++ b/.github/workflows/spine-godot-v4.yml @@ -0,0 +1,365 @@ +name: Build and Publish Godot editor and templates + +on: + push: + paths: + - ".github/workflows/spine-godot.yml" + - 'spine-godot/**' + - 'spine-cpp/**' + workflow_dispatch: + +env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_EC2_METADATA_DISABLED: true + EM_VERSION: 3.1.18 + GODOT_TAG: master + GODOT_VERSION: 4.0.beta + +jobs: + + godot-editor-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + shell: bash + run: | + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-v4.sh + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: godot-editor-windows.zip + path: spine-godot/godot/bin/godot.windows.editor.x86_64.exe + + godot-editor-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + shell: bash + run: | + sudo apt-get update + sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-v4.sh + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: godot-editor-linux.zip + path: spine-godot/godot/bin/godot.linux.editor.x86_64 + + godot-editor-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + shell: bash + run: | + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-v4.sh + pushd spine-godot/godot/bin + zip -r godot-editor-macos.zip Godot.app + popd + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: godot-editor-macos.zip + path: spine-godot/godot/bin/godot-editor-macos.zip + + godot-template-ios: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + run: | + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-templates-v4.sh ios + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: godot-template-ios.zip + path: spine-godot/godot/bin/iphone.zip + + godot-template-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + run: | + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-templates-v4.sh macos + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: godot-template-macos.zip + path: spine-godot/godot/bin/macos.zip + + godot-template-linux: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + run: | + sudo apt-get update + sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-templates.sh linux + + - name: Upload artifacts debug + uses: actions/upload-artifact@v2 + with: + name: godot-template-linux-debug.zip + path: spine-godot/godot/bin/linux_x11_64_debug + + - name: Upload artifacts release + uses: actions/upload-artifact@v2 + with: + name: godot-template-linux-release.zip + path: spine-godot/godot/bin/linux_x11_64_release + + godot-template-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + shell: bash + run: | + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-templates.sh windows + + - name: Upload artifacts debug + uses: actions/upload-artifact@v2 + with: + name: godot-template-windows-debug.zip + path: spine-godot/godot/bin/windows_64_debug.exe + + - name: Upload artifacts release + uses: actions/upload-artifact@v2 + with: + name: godot-template-windows-release.zip + path: spine-godot/godot/bin/windows_64_release.exe + + godot-template-android: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # Azure repositories are not reliable, we need to prevent azure giving us packages. + - name: Make apt sources.list use the default Ubuntu repositories + run: | + sudo rm -f /etc/apt/sources.list.d/* + sudo cp -f spine-godot/build/sources.lst /etc/apt/sources.list + sudo apt-get update + + - name: Set up Java 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + shell: bash + run: | + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-templates.sh android + + - name: Upload artifacts debug + uses: actions/upload-artifact@v2 + with: + name: godot-template-android-debug.zip + path: spine-godot/godot/bin/android_debug.apk + + - name: Upload artifacts release + uses: actions/upload-artifact@v2 + with: + name: godot-template-android-release.zip + path: spine-godot/godot/bin/android_release.apk + + - name: Upload artifacts source + uses: actions/upload-artifact@v2 + with: + name: godot-template-android-source.zip + path: spine-godot/godot/bin/android_source.zip + + godot-template-web: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Emscripten latest + uses: mymindstorm/setup-emsdk@v10 + with: + version: ${{env.EM_VERSION}} + + - name: Verify Emscripten setup + run: | + emcc -v + + - name: Setup python and scons + uses: ./.github/actions/setup-godot-deps + + - name: Build Godot artifact + run: | + ./spine-godot/build/setup.sh $GODOT_TAG false + ./spine-godot/build/build-templates.sh web + + - name: Upload artifacts debug + uses: actions/upload-artifact@v2 + with: + name: godot-template-web-debug.zip + path: spine-godot/godot/bin/webassembly_debug.zip + + - name: Upload artifacts release + uses: actions/upload-artifact@v2 + with: + name: godot-template-web-release.zip + path: spine-godot/godot/bin/webassembly_release.zip + + upload-to-s3: + needs: [godot-editor-windows, godot-editor-linux, godot-editor-macos, godot-template-ios, godot-template-macos, godot-template-windows, godot-template-linux, godot-template-android, godot-template-web] + runs-on: ubuntu-latest + steps: + - name: Download godot-editor-windows artifact + uses: actions/download-artifact@v2 + with: + name: godot-editor-windows.zip + + - name: Download godot-editor-linux artifact + uses: actions/download-artifact@v2 + with: + name: godot-editor-linux.zip + + - name: Download godot-editor-macos artifact + uses: actions/download-artifact@v2 + with: + name: godot-editor-macos.zip + + - name: Download godot-template-ios artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-ios.zip + + - name: Download godot-template-macos artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-macos.zip + + - name: Download godot-template-windows-release artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-windows-release.zip + + - name: Download godot-template-windows-debug artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-windows-debug.zip + + - name: Download godot-template-linux-release artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-linux-release.zip + + - name: Download godot-template-linux-debug artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-linux-debug.zip + + - name: Download godot-template-android-release artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-android-release.zip + + - name: Download godot-template-android-debug artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-android-debug.zip + + - name: Download godot-template-android-source artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-android-source.zip + + - name: Download godot-template-web-release artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-web-release.zip + + - name: Download godot-template-web-debug artifact + uses: actions/download-artifact@v2 + with: + name: godot-template-web-debug.zip + + - name: Upload artifacts to S3 + shell: bash + if: env.AWS_ACCESS_KEY_ID != null + run: | + BRANCH=${GITHUB_REF#refs/heads/} + echo "branch: $BRANCH" + mv godot.windows.opt.tools.64.exe godot-$BRANCH-$GODOT_TAG.exe + mv godot.x11.opt.tools.64 godot-$BRANCH-$GODOT_TAG + zip godot-editor-windows.zip godot-$BRANCH-$GODOT_TAG.exe + zip godot-editor-linux.zip godot-$BRANCH-$GODOT_TAG + aws s3 cp godot-editor-windows.zip s3://spine-godot/$BRANCH/$GODOT_TAG/ + aws s3 cp godot-editor-linux.zip s3://spine-godot/$BRANCH/$GODOT_TAG/ + aws s3 cp godot-editor-macos.zip s3://spine-godot/$BRANCH/$GODOT_TAG/ + echo "$GODOT_VERSION" > version.txt + ls -lah + zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip iphone.zip macos.zip windows_64_debug.exe windows_64_release.exe linux_x11_64_debug linux_x11_64_release webassembly_debug.zip webassembly_release.zip android_release.apk android_debug.apk android_source.zip version.txt + aws s3 cp spine-godot-templates-$BRANCH-$GODOT_TAG.zip s3://spine-godot/$BRANCH/$GODOT_TAG/spine-godot-templates-$BRANCH-$GODOT_TAG.tpz + + diff --git a/.github/workflows/spine-godot.yml b/.github/workflows/spine-godot.yml index 7ca290323..2f17c61ef 100644 --- a/.github/workflows/spine-godot.yml +++ b/.github/workflows/spine-godot.yml @@ -12,7 +12,7 @@ env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_EC2_METADATA_DISABLED: true - EM_VERSION: 3.1.10 + EM_VERSION: 3.1.14 GODOT_TAG: 3.5.1-stable GODOT_VERSION: 3.5.1.stable diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh index 9c36c7fd4..233340fad 100755 --- a/spine-godot/build/build-templates-v4.sh +++ b/spine-godot/build/build-templates-v4.sh @@ -45,35 +45,35 @@ if [ "$platform" = "windows" ]; then elif [ "$platform" = "macos" ]; then # --- macOS --- - # generates osx.zip + # generates macos.zip - scons platform=osx tools=no target=release arch=x86_64 custom_modules="../spine_godot" --jobs=$cpus - scons platform=osx tools=no target=release_debug arch=x86_64 custom_modules="../spine_godot" --jobs=$cpus - scons platform=osx tools=no target=release arch=arm64 custom_modules="../spine_godot" --jobs=$cpus - scons platform=osx tools=no target=release_debug arch=arm64 custom_modules="../spine_godot" --jobs=$cpus - lipo -create bin/godot.osx.opt.x86_64 bin/godot.osx.opt.arm64 -output bin/godot.osx.opt.universal - lipo -create bin/godot.osx.opt.debug.x86_64 bin/godot.osx.opt.debug.arm64 -output bin/godot.osx.opt.debug.universal - strip -S -x bin/godot.osx.opt.universal + scons platform=macos tools=no target=template_release arch=x86_64 custom_modules="../spine_godot" --jobs=$cpus + scons platform=macos tools=no target=template_debug arch=x86_64 custom_modules="../spine_godot" --jobs=$cpus + scons platform=macos tools=no target=template_release arch=arm64 custom_modules="../spine_godot" --jobs=$cpus + scons platform=macos tools=no target=template_debug arch=arm64 custom_modules="../spine_godot" --jobs=$cpus + lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.universal + lipo -create bin/godot.macos.template_debug.x86_64 bin/godot.macos.template_debug.arm64 -output bin/godot.macos.debug.universal + strip -S -x bin/godot.macos.universal pushd bin - cp -r ../misc/dist/osx_template.app . - mkdir -p osx_template.app/Contents/MacOS - cp godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64 - cp godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64 - chmod +x osx_template.app/Contents/MacOS/godot_osx* - rm -rf osx.zip - zip -q -9 -r osx.zip osx_template.app + cp -r ../misc/dist/macos_template.app . + mkdir -p macos_template.app/Contents/MacOS + cp godot.macos.universal macos_template.app/Contents/MacOS/godot_macos_release.64 + cp godot.macos.debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.64 + chmod +x macos_template.app/Contents/MacOS/godot_macos* + rm -rf macos.zip + zip -q -9 -r macos.zip macos_template.app popd elif [ "$platform" = "ios" ]; then # --- iOS -- # generates iphone.zip - scons p=iphone tools=no target=release arch=arm64 custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=release_debug arch=arm64 custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=release arch=arm64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=release arch=x86_64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=release_debug arch=arm64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=release_debug arch=x86_64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus + scons p=iphone tools=no target=template_release arch=arm64 custom_modules="../spine_godot" --jobs=$cpus + scons p=iphone tools=no target=template_debug arch=arm64 custom_modules="../spine_godot" --jobs=$cpus + scons p=iphone tools=no target=template_release arch=arm64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus + scons p=iphone tools=no target=template_release arch=x86_64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus + scons p=iphone tools=no target=template_debug arch=arm64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus + scons p=iphone tools=no target=template_debug arch=x86_64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus lipo -create bin/libgodot.iphone.opt.arm64.simulator.a bin/libgodot.iphone.opt.x86_64.simulator.a -output bin/libgodot.iphone.opt.simulator.a lipo -create bin/libgodot.iphone.opt.debug.arm64.simulator.a bin/libgodot.iphone.opt.debug.x86_64.simulator.a -output bin/libgodot.iphone.opt.debug.simulator.a strip -S -x bin/libgodot.iphone.opt.arm64.a @@ -93,17 +93,17 @@ elif [ "$platform" = "ios" ]; then elif [ "$platform" = "web" ]; then # --- WEB --- # generates webassembly_debug.zip, webassembly_release.zip - scons platform=javascript tools=no target=release custom_modules="../spine_godot" --jobs=$cpus - scons platform=javascript tools=no target=release_debug custom_modules="../spine_godot" --jobs=$cpus + scons platform=javascript tools=no target=template_release custom_modules="../spine_godot" --jobs=$cpus + scons platform=javascript tools=no target=template_debug custom_modules="../spine_godot" --jobs=$cpus mv bin/godot.javascript.opt.zip bin/webassembly_release.zip mv bin/godot.javascript.opt.debug.zip bin/webassembly_debug.zip elif [ "$platform" = "android" ]; then # --- ANROID --- # generates android_release.apk, android_debug.apk, android_source.zip - scons platform=android target=release android_arch=armv7 custom_modules="../spine_godot" --jobs=$cpus - scons platform=android target=release_debug android_arch=armv7 custom_modules="../spine_godot" --jobs=$cpus - scons platform=android target=release android_arch=arm64v8 custom_modules="../spine_godot" --jobs=$cpus - scons platform=android target=release_debug android_arch=arm64v8 custom_modules="../spine_godot" --jobs=$cpus + scons platform=android target=template_release android_arch=armv7 custom_modules="../spine_godot" --jobs=$cpus + scons platform=android target=template_debug android_arch=armv7 custom_modules="../spine_godot" --jobs=$cpus + scons platform=android target=template_release android_arch=arm64v8 custom_modules="../spine_godot" --jobs=$cpus + scons platform=android target=template_debug android_arch=arm64v8 custom_modules="../spine_godot" --jobs=$cpus pushd platform/android/java chmod a+x gradlew @@ -112,8 +112,8 @@ elif [ "$platform" = "android" ]; then elif [ "$platform" = "linux" ]; then # --- Linix --- # generates linux_x11_64_release, linux_x11_64_debug - scons platform=x11 tools=no target=release bits=64 custom_modules="../spine_godot" --jobs=$cpus - scons platform=x11 tools=no target=release_debug bits=64 custom_modules="../spine_godot" --jobs=$cpus + scons platform=linuxbsd tools=no target=template_release bits=64 custom_modules="../spine_godot" --jobs=$cpus + scons platform=linuxbsd tools=no target=template_debug bits=64 custom_modules="../spine_godot" --jobs=$cpus strip bin/godot.x11.opt.64 strip bin/godot.x11.opt.debug.64 chmod a+x bin/godot.x11.opt.64 diff --git a/spine-godot/build/build-v4.sh b/spine-godot/build/build-v4.sh index ea7fc50f7..b2f3c703e 100755 --- a/spine-godot/build/build-v4.sh +++ b/spine-godot/build/build-v4.sh @@ -9,7 +9,7 @@ if [ ! -d ../godot ]; then exit 1 fi -target="target=${1%/}" +target="" dev="false" if [ -f "../godot/custom.py" ]; then dev="true" @@ -32,19 +32,13 @@ if [ `uname` == 'Darwin' ] && [ $dev = "false" ]; then scons $target arch=arm64 compiledb=yes custom_modules="../spine_godot" --jobs=$cpus pushd bin - cp -r ../misc/dist/osx_tools.app . - mv osx_tools.app Godot.app + cp -r ../misc/dist/macos_tools.app . + mv macos_tools.app Godot.app mkdir -p Godot.app/Contents/MacOS - if [ "$target" = "debug" ]; then - lipo -create godot.osx.tools.x86_64 godot.osx.tools.arm64 -output godot.osx.tools.universal - strip -S -x godot.osx.tools.universal - cp godot.osx.tools.universal Godot.app/Contents/MacOS/Godot - else - lipo -create godot.osx.opt.tools.x86_64 godot.osx.opt.tools.arm64 -output godot.osx.opt.tools.universal - strip -S -x godot.osx.opt.tools.universal - cp godot.osx.opt.tools.universal Godot.app/Contents/MacOS/Godot - fi - chmod +x Godot.app/Contents/MacOS/Godot + lipo -create godot.macos.editor.arm64 godot.macos.editor.x86_64 -output Godot + strip -S -x Godot + cp Godot Godot.app/Contents/MacOS/Godot + chmod +x Godot.app/Contents/MacOS/Godot popd else if [ "$OSTYPE" = "msys" ]; then From d3d5a41bf69c07d8918299ddce96bfe97fe52400 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 25 Jan 2023 13:01:28 +0100 Subject: [PATCH 04/15] [godot] Fix iOS templates build for Godot 4.0 --- .github/workflows/spine-godot-v4.yml | 4 +-- spine-godot/build/build-templates-v4.sh | 34 ++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/spine-godot-v4.yml b/.github/workflows/spine-godot-v4.yml index 4ba3725e4..c85dd288d 100644 --- a/.github/workflows/spine-godot-v4.yml +++ b/.github/workflows/spine-godot-v4.yml @@ -108,7 +108,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: godot-template-ios.zip - path: spine-godot/godot/bin/iphone.zip + path: spine-godot/godot/bin/ios.zip godot-template-macos: runs-on: macos-latest @@ -359,7 +359,7 @@ jobs: aws s3 cp godot-editor-macos.zip s3://spine-godot/$BRANCH/$GODOT_TAG/ echo "$GODOT_VERSION" > version.txt ls -lah - zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip iphone.zip macos.zip windows_64_debug.exe windows_64_release.exe linux_x11_64_debug linux_x11_64_release webassembly_debug.zip webassembly_release.zip android_release.apk android_debug.apk android_source.zip version.txt + zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip ios.zip macos.zip windows_64_debug.exe windows_64_release.exe linux_x11_64_debug linux_x11_64_release webassembly_debug.zip webassembly_release.zip android_release.apk android_debug.apk android_source.zip version.txt aws s3 cp spine-godot-templates-$BRANCH-$GODOT_TAG.zip s3://spine-godot/$BRANCH/$GODOT_TAG/spine-godot-templates-$BRANCH-$GODOT_TAG.tpz diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh index 233340fad..1118d70bb 100755 --- a/spine-godot/build/build-templates-v4.sh +++ b/spine-godot/build/build-templates-v4.sh @@ -66,28 +66,28 @@ elif [ "$platform" = "macos" ]; then popd elif [ "$platform" = "ios" ]; then # --- iOS -- - # generates iphone.zip + # generates ios.zip - scons p=iphone tools=no target=template_release arch=arm64 custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=template_debug arch=arm64 custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=template_release arch=arm64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=template_release arch=x86_64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=template_debug arch=arm64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus - scons p=iphone tools=no target=template_debug arch=x86_64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus - lipo -create bin/libgodot.iphone.opt.arm64.simulator.a bin/libgodot.iphone.opt.x86_64.simulator.a -output bin/libgodot.iphone.opt.simulator.a - lipo -create bin/libgodot.iphone.opt.debug.arm64.simulator.a bin/libgodot.iphone.opt.debug.x86_64.simulator.a -output bin/libgodot.iphone.opt.debug.simulator.a - strip -S -x bin/libgodot.iphone.opt.arm64.a - strip -S -x bin/libgodot.iphone.opt.simulator.a + scons p=ios tools=no target=template_release arch=arm64 custom_modules="../spine_godot" --jobs=$cpus + scons p=ios tools=no target=template_debug arch=arm64 custom_modules="../spine_godot" --jobs=$cpus + scons p=ios tools=no target=template_release arch=arm64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus + scons p=ios tools=no target=template_release arch=x86_64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus + scons p=ios tools=no target=template_debug arch=arm64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus + scons p=ios tools=no target=template_debug arch=x86_64 ios_simulator=yes custom_modules="../spine_godot" --jobs=$cpus + lipo -create bin/libgodot.ios.template_release.arm64.simulator.a bin/libgodot.ios.template_release.x86_64.simulator.a -output bin/libgodot.ios.template_release.simulator.a + lipo -create bin/libgodot.ios.template_debug.arm64.simulator.a bin/libgodot.ios.template_debug.x86_64.simulator.a -output bin/libgodot.ios.template_debug.simulator.a + strip -S -x bin/libgodot.ios.template_release.arm64.a + strip -S -x bin/libgodot.ios.template_release.simulator.a pushd bin cp -r ../misc/dist/ios_xcode . - cp libgodot.iphone.opt.arm64.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a - cp libgodot.iphone.opt.simulator.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a - cp libgodot.iphone.opt.debug.arm64.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/libgodot.a - cp libgodot.iphone.opt.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a - rm -rf iphone.zip + cp libgodot.ios.template_release.arm64.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a + cp libgodot.ios.template_release.simulator.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a + cp libgodot.ios.template_debug.arm64.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a + cp libgodot.ios.template_debug.simulator.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a + rm -rf ios.zip pushd ios_xcode - zip -q -9 -r ../iphone.zip * + zip -q -9 -r ../ios.zip * popd popd elif [ "$platform" = "web" ]; then From 9da2be9f6fd234087b4ce7fc1142ba3747e8273b Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 25 Jan 2023 13:17:30 +0100 Subject: [PATCH 05/15] [godot] Fix web templates build for Godot 4.0 --- .github/workflows/spine-godot-v4.yml | 10 +++++----- spine-godot/build/build-templates-v4.sh | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/spine-godot-v4.yml b/.github/workflows/spine-godot-v4.yml index c85dd288d..71786aee1 100644 --- a/.github/workflows/spine-godot-v4.yml +++ b/.github/workflows/spine-godot-v4.yml @@ -262,13 +262,13 @@ jobs: uses: actions/upload-artifact@v2 with: name: godot-template-web-debug.zip - path: spine-godot/godot/bin/webassembly_debug.zip + path: spine-godot/godot/bin/web_debug.zip - name: Upload artifacts release uses: actions/upload-artifact@v2 with: name: godot-template-web-release.zip - path: spine-godot/godot/bin/webassembly_release.zip + path: spine-godot/godot/bin/web_release.zip upload-to-s3: needs: [godot-editor-windows, godot-editor-linux, godot-editor-macos, godot-template-ios, godot-template-macos, godot-template-windows, godot-template-linux, godot-template-android, godot-template-web] @@ -350,8 +350,8 @@ jobs: run: | BRANCH=${GITHUB_REF#refs/heads/} echo "branch: $BRANCH" - mv godot.windows.opt.tools.64.exe godot-$BRANCH-$GODOT_TAG.exe - mv godot.x11.opt.tools.64 godot-$BRANCH-$GODOT_TAG + mv godot.windows.editor.x86_64.exe godot-$BRANCH-$GODOT_TAG.exe + mv godot.linux.editor.x86_64 godot-$BRANCH-$GODOT_TAG zip godot-editor-windows.zip godot-$BRANCH-$GODOT_TAG.exe zip godot-editor-linux.zip godot-$BRANCH-$GODOT_TAG aws s3 cp godot-editor-windows.zip s3://spine-godot/$BRANCH/$GODOT_TAG/ @@ -359,7 +359,7 @@ jobs: aws s3 cp godot-editor-macos.zip s3://spine-godot/$BRANCH/$GODOT_TAG/ echo "$GODOT_VERSION" > version.txt ls -lah - zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip ios.zip macos.zip windows_64_debug.exe windows_64_release.exe linux_x11_64_debug linux_x11_64_release webassembly_debug.zip webassembly_release.zip android_release.apk android_debug.apk android_source.zip version.txt + zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip ios.zip macos.zip windows_64_debug.exe windows_64_release.exe linux_x11_64_debug linux_x11_64_release web_debug.zip web_release.zip android_release.apk android_debug.apk android_source.zip version.txt aws s3 cp spine-godot-templates-$BRANCH-$GODOT_TAG.zip s3://spine-godot/$BRANCH/$GODOT_TAG/spine-godot-templates-$BRANCH-$GODOT_TAG.tpz diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh index 1118d70bb..adae77e93 100755 --- a/spine-godot/build/build-templates-v4.sh +++ b/spine-godot/build/build-templates-v4.sh @@ -93,10 +93,10 @@ elif [ "$platform" = "ios" ]; then elif [ "$platform" = "web" ]; then # --- WEB --- # generates webassembly_debug.zip, webassembly_release.zip - scons platform=javascript tools=no target=template_release custom_modules="../spine_godot" --jobs=$cpus - scons platform=javascript tools=no target=template_debug custom_modules="../spine_godot" --jobs=$cpus - mv bin/godot.javascript.opt.zip bin/webassembly_release.zip - mv bin/godot.javascript.opt.debug.zip bin/webassembly_debug.zip + scons platform=web tools=no target=template_release custom_modules="../spine_godot" --jobs=$cpus + scons platform=web tools=no target=template_debug custom_modules="../spine_godot" --jobs=$cpus + mv bin/godot.web.template_release.wasm32.zip bin/web_release.zip + mv bin/godot.web.template_debug.wasm32.zip bin/web_debug.zip elif [ "$platform" = "android" ]; then # --- ANROID --- # generates android_release.apk, android_debug.apk, android_source.zip From 9e5c945d17192def0ff64f756266ecd63c4e1fe8 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 25 Jan 2023 13:20:30 +0100 Subject: [PATCH 06/15] [godot] Fix GH workflow for Godot 4.0 --- .github/workflows/spine-godot-v4.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/spine-godot-v4.yml b/.github/workflows/spine-godot-v4.yml index 71786aee1..39fac5596 100644 --- a/.github/workflows/spine-godot-v4.yml +++ b/.github/workflows/spine-godot-v4.yml @@ -1,4 +1,4 @@ -name: Build and Publish Godot editor and templates +name: Build and Publish Godot 4.0 editor and templates on: push: @@ -146,7 +146,7 @@ jobs: sudo apt-get update sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev ./spine-godot/build/setup.sh $GODOT_TAG false - ./spine-godot/build/build-templates.sh linux + ./spine-godot/build/build-templates-v4.sh linux - name: Upload artifacts debug uses: actions/upload-artifact@v2 @@ -174,7 +174,7 @@ jobs: shell: bash run: | ./spine-godot/build/setup.sh $GODOT_TAG false - ./spine-godot/build/build-templates.sh windows + ./spine-godot/build/build-templates-v4.sh windows - name: Upload artifacts debug uses: actions/upload-artifact@v2 @@ -214,7 +214,7 @@ jobs: shell: bash run: | ./spine-godot/build/setup.sh $GODOT_TAG false - ./spine-godot/build/build-templates.sh android + ./spine-godot/build/build-templates-v4.sh android - name: Upload artifacts debug uses: actions/upload-artifact@v2 @@ -256,7 +256,7 @@ jobs: - name: Build Godot artifact run: | ./spine-godot/build/setup.sh $GODOT_TAG false - ./spine-godot/build/build-templates.sh web + ./spine-godot/build/build-templates-v4.sh web - name: Upload artifacts debug uses: actions/upload-artifact@v2 From ffa028626aafcc98d63e0ac8d3ac1f45891b9a28 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 25 Jan 2023 13:39:56 +0100 Subject: [PATCH 07/15] [godot] Fix Linux editor and template build for Godot 4.0 --- .github/workflows/spine-godot-v4.yml | 4 ++-- spine-godot/build/build-templates-v4.sh | 16 ++++++++-------- spine-godot/build/build-v4.sh | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/spine-godot-v4.yml b/.github/workflows/spine-godot-v4.yml index 39fac5596..a02c1d7bd 100644 --- a/.github/workflows/spine-godot-v4.yml +++ b/.github/workflows/spine-godot-v4.yml @@ -62,7 +62,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: godot-editor-linux.zip - path: spine-godot/godot/bin/godot.linux.editor.x86_64 + path: spine-godot/godot/bin/godot.linuxbsd.editor.x86_64 godot-editor-macos: runs-on: macos-latest @@ -351,7 +351,7 @@ jobs: BRANCH=${GITHUB_REF#refs/heads/} echo "branch: $BRANCH" mv godot.windows.editor.x86_64.exe godot-$BRANCH-$GODOT_TAG.exe - mv godot.linux.editor.x86_64 godot-$BRANCH-$GODOT_TAG + mv godot.linuxbsd.editor.x86_64 godot-$BRANCH-$GODOT_TAG zip godot-editor-windows.zip godot-$BRANCH-$GODOT_TAG.exe zip godot-editor-linux.zip godot-$BRANCH-$GODOT_TAG aws s3 cp godot-editor-windows.zip s3://spine-godot/$BRANCH/$GODOT_TAG/ diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh index adae77e93..950fe21c5 100755 --- a/spine-godot/build/build-templates-v4.sh +++ b/spine-godot/build/build-templates-v4.sh @@ -110,16 +110,16 @@ elif [ "$platform" = "android" ]; then ./gradlew generateGodotTemplates popd elif [ "$platform" = "linux" ]; then - # --- Linix --- + # --- Linux --- # generates linux_x11_64_release, linux_x11_64_debug scons platform=linuxbsd tools=no target=template_release bits=64 custom_modules="../spine_godot" --jobs=$cpus - scons platform=linuxbsd tools=no target=template_debug bits=64 custom_modules="../spine_godot" --jobs=$cpus - strip bin/godot.x11.opt.64 - strip bin/godot.x11.opt.debug.64 - chmod a+x bin/godot.x11.opt.64 - chmod a+x bin/godot.x11.opt.debug.64 - cp bin/godot.x11.opt.64 bin/linux_x11_64_release - cp bin/godot.x11.opt.debug.64 bin/linux_x11_64_debug + scons platform=linuxbsd tools=no target=template_debug bits=64 custom_modules="../spine_godot" --jobs=$cpus + strip bin/godot.linuxbsd.template_release.64 + strip bin/godot.linuxbsd.template_debug.64 + chmod a+x bin/godot.linuxbsd.template_release.64 + chmod a+x bin/godot.linuxbsd.template_debug.64 + cp bin/godot.linuxbsd.template_release.64 bin/linux_x11_64_release + cp bin/godot.linuxbsd.template_debug.64 bin/linux_x11_64_debug else echo "Unknown platform: $platform" exit 1 diff --git a/spine-godot/build/build-v4.sh b/spine-godot/build/build-v4.sh index b2f3c703e..6d91ec831 100755 --- a/spine-godot/build/build-v4.sh +++ b/spine-godot/build/build-v4.sh @@ -49,9 +49,9 @@ else fi scons $target compiledb=yes custom_modules="../spine_godot" --jobs=$cpus cp compile_commands.json ../build - if [ -f "bin/godot.x11.opt.tools.64" ]; then - strip bin/godot.x11.opt.tools.64 - chmod a+x bin/godot.x11.opt.tools.64 + if [ -f "bin/godot.linuxbsd.editor.x86_64" ]; then + strip bin/godot.linuxbsd.editor.x86_64 + chmod a+x bin/godot.linuxbsd.editor.x86_64 fi fi popd From df585301b9b59aee34ef3ccb227b1472802ad8e3 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 25 Jan 2023 13:42:05 +0100 Subject: [PATCH 08/15] [godot] Install MoltenVK SDK on macOS GH Action runners for Godot 4.0 --- .github/workflows/spine-godot-v4.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spine-godot-v4.yml b/.github/workflows/spine-godot-v4.yml index a02c1d7bd..e46c56225 100644 --- a/.github/workflows/spine-godot-v4.yml +++ b/.github/workflows/spine-godot-v4.yml @@ -77,6 +77,7 @@ jobs: - name: Build Godot artifact shell: bash run: | + ./spine-godot/build/install-macos-vulkan-sdk.sh ./spine-godot/build/setup.sh $GODOT_TAG false ./spine-godot/build/build-v4.sh pushd spine-godot/godot/bin @@ -100,7 +101,8 @@ jobs: uses: ./.github/actions/setup-godot-deps - name: Build Godot artifact - run: | + run: | + ./spine-godot/build/install-macos-vulkan-sdk.sh ./spine-godot/build/setup.sh $GODOT_TAG false ./spine-godot/build/build-templates-v4.sh ios @@ -122,6 +124,7 @@ jobs: - name: Build Godot artifact run: | + ./spine-godot/build/install-macos-vulkan-sdk.sh ./spine-godot/build/setup.sh $GODOT_TAG false ./spine-godot/build/build-templates-v4.sh macos From 4b16381cfa02948a21c9aa3ceb1af11769802fa6 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 25 Jan 2023 15:28:39 +0100 Subject: [PATCH 09/15] [godot] Fix Linux template build for Godot 4.0. --- spine-godot/build/build-templates-v4.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh index 950fe21c5..afcdfa041 100755 --- a/spine-godot/build/build-templates-v4.sh +++ b/spine-godot/build/build-templates-v4.sh @@ -114,12 +114,12 @@ elif [ "$platform" = "linux" ]; then # generates linux_x11_64_release, linux_x11_64_debug scons platform=linuxbsd tools=no target=template_release bits=64 custom_modules="../spine_godot" --jobs=$cpus scons platform=linuxbsd tools=no target=template_debug bits=64 custom_modules="../spine_godot" --jobs=$cpus - strip bin/godot.linuxbsd.template_release.64 - strip bin/godot.linuxbsd.template_debug.64 - chmod a+x bin/godot.linuxbsd.template_release.64 - chmod a+x bin/godot.linuxbsd.template_debug.64 - cp bin/godot.linuxbsd.template_release.64 bin/linux_x11_64_release - cp bin/godot.linuxbsd.template_debug.64 bin/linux_x11_64_debug + strip bin/godot.linuxbsd.template_release.x86_64 + strip bin/godot.linuxbsd.template_debug.x86_64 + chmod a+x bin/godot.linuxbsd.template_release.x86_64 + chmod a+x bin/godot.linuxbsd.template_debug.x86_64 + cp bin/godot.linuxbsd.template_release.x86_64 bin/linux_x11_64_release + cp bin/godot.linuxbsd.template_debug.x86_64 bin/linux_x11_64_debug else echo "Unknown platform: $platform" exit 1 From f6ed158e292c16041cfef2148cae5b0e6c8bbd9a Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 26 Jan 2023 09:55:45 +0100 Subject: [PATCH 10/15] [godot] Fix v4 macOS template binary names. --- spine-godot/build/build-templates-v4.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh index afcdfa041..93d07a152 100755 --- a/spine-godot/build/build-templates-v4.sh +++ b/spine-godot/build/build-templates-v4.sh @@ -58,8 +58,8 @@ elif [ "$platform" = "macos" ]; then pushd bin cp -r ../misc/dist/macos_template.app . mkdir -p macos_template.app/Contents/MacOS - cp godot.macos.universal macos_template.app/Contents/MacOS/godot_macos_release.64 - cp godot.macos.debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.64 + cp godot.macos.universal macos_template.app/Contents/MacOS/godot_macos_release.universal + cp godot.macos.debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.universal chmod +x macos_template.app/Contents/MacOS/godot_macos* rm -rf macos.zip zip -q -9 -r macos.zip macos_template.app From b836f6591976cf4541b32ace4effa8d1468a1fa5 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 26 Jan 2023 10:16:12 +0100 Subject: [PATCH 11/15] [godot] Fix Windows template executable names. --- spine-godot/build/build-templates-v4.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-godot/build/build-templates-v4.sh b/spine-godot/build/build-templates-v4.sh index 93d07a152..bb71f3c7c 100755 --- a/spine-godot/build/build-templates-v4.sh +++ b/spine-godot/build/build-templates-v4.sh @@ -40,8 +40,8 @@ if [ "$platform" = "windows" ]; then #generates windows_64_debug.exe and windows_64_release.exe scons platform=windows tools=no target=template_release custom_modules="../spine_godot" --jobs=$cpus scons platform=windows tools=no target=template_debug custom_modules="../spine_godot" --jobs=$cpus - cp bin/godot.windows.template_release.x86_64.exe bin/windows_64_release.exe - cp bin/godot.windows.template_debug.x86_64.exe bin/windows_64_debug.exe + cp bin/godot.windows.template_release.x86_64.exe bin/windows_release_x86_64.exe + cp bin/godot.windows.template_debug.x86_64.exe bin/windows_debug_x86_64.exe elif [ "$platform" = "macos" ]; then # --- macOS --- From 44590e16c3e5654caeaf35f9bae305359938ea7f Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 26 Jan 2023 10:51:40 +0100 Subject: [PATCH 12/15] [godot] Update README.md with 4.0 build urls and build instructions. --- spine-godot/README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/spine-godot/README.md b/spine-godot/README.md index 2ce420e41..464b33f87 100644 --- a/spine-godot/README.md +++ b/spine-godot/README.md @@ -28,12 +28,21 @@ spine-godot works with the latest stable Godot 3.5 release. It requires compilat ### Pre-built Godot editor and export template binaries -We provide prebuilt Godot editor and export template binaries for Godot 3.5-stable: +We provide prebuilt Godot editor and export template binaries for Godot 3.5.1-stable: -* [Godot Editor Windows](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/3.5-stable/godot-editor-windows.zip) -* [Godot Editor Linux](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/3.5-stable/godot-editor-linux.zip) -* [Godot Editor macOS](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/3.5-stable/godot-editor-macos.zip) -* [Godot export templates for Windows, Linux, macOS, Web, Android, iOS](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/3.5-stable/spine-godot-templates-4.1-3.5-stable.tpz) +* [Godot Editor Windows](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/3.5.1-stable/godot-editor-windows.zip) +* [Godot Editor Linux](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/3.5.1-stable/godot-editor-linux.zip) +* [Godot Editor macOS](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/3.5.1-stable/godot-editor-macos.zip) +* [Godot export templates for Windows, Linux, macOS, Web, Android, iOS](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/3.5.1-stable/spine-godot-templates-4.1-3.5-stable.tpz) + +We also provide prebuilt Godot editor and export template binaries for the Godot master branch: + +* [Godot 4.0 Editor Windows](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/master/godot-editor-windows.zip) +* [Godot 4.0 Editor Linux](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/master/godot-editor-linux.zip) +* [Godot 4.0 Editor macOS](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/master/godot-editor-macos.zip) +* [Godot 4.0 Export templates for Windows, Linux, macOS, Web, Android, iOS](https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/master/spine-godot-templates-4.1-master.tpz) + +Note that Godot 4.0 is unstable. Use Godot 3.5.1 for production for now. ### Building the Godot editor and export templates locally @@ -70,13 +79,13 @@ The first argument to `built-templates.sh` is the platform to compile the templa The resulting Godot export template binary can then be found in `spine-godot/godot/bin`. ### Building the Godot editor and export templates via GitHub Actions -This repository contains a GitHub workflow in `.github/workflows/spine-godot.yml` that allows building all Godot editor and export template binaries through GitHub actions. This may be simpler than compiling these artifacts locally. To use the GitHub workflow: +This repository contains a GitHub workflow in `.github/workflows/spine-godot.yml` and `.github/workflows/spine-godot-v4.yml` that allows building all Godot editor and export template binaries through GitHub actions for Godot 3.5.x and Godot 4.0. This may be simpler than compiling these artifacts locally. To use the GitHub workflow: 1. Clone this repository 2. Enable GitHub workflows on the cloned repository -3. Manually trigger the `spine-godot` workflow. +3. Manually trigger the `spine-godot` or `spine-godot-v4` workflow. -The resulting binaries will be attached as artifacts to a sucessful workflow run. +The resulting binaries will be attached as artifacts to a successful workflow run. ## Example Sample projects for both Godot 3.5.x and Godot 4.x are provided in the `example/` and `example-v4/` folders respectively. They illustrate all spine-godot functionality and can be opened and exported with the pre-built or custom build Godot editor and export template binaries. From 5d542723969638aca06c2009891543b5fd35b921 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 26 Jan 2023 13:40:28 +0100 Subject: [PATCH 13/15] [ts] Fix tags in README.md --- spine-ts/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spine-ts/README.md b/spine-ts/README.md index 213d659cd..207951a1f 100644 --- a/spine-ts/README.md +++ b/spine-ts/README.md @@ -44,20 +44,20 @@ You can include a module in your project via a ` // spine-ts Canvas - // spine-ts WebGL - // spine-ts Player, which requires a spine-player.css as well - // spine-ts ThreeJS - ``` We also provide `js.map` source maps. They will be automatically fetched from unpkg when debugging code of a spine-module in Chrome, Firefox, or Safari, mapping the JavaScript code back to its original TypeScript sources. From a87776e8bd61fe68e56d9a3623d6d0f1599b955e Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 26 Jan 2023 13:49:28 +0100 Subject: [PATCH 14/15] [ts] Fix artifact upload. --- spine-ts/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spine-ts/build.sh b/spine-ts/build.sh index c041dccd9..c25718a6c 100755 --- a/spine-ts/build.sh +++ b/spine-ts/build.sh @@ -20,8 +20,7 @@ then spine-webgl/dist/iife/* \ spine-player/dist/iife/* \ spine-threejs/dist/iife/* \ - spine-player/css/spine-player.css \ - spine-player/example/external/* + spine-player/css/spine-player.css curl -f -F "file=@spine-ts.zip" "$TS_UPDATE_URL$BRANCH" else echo "Not deploying artifacts. TS_UPDATE_URL and/or BRANCH not set." From 0042015e7cf99d985b5dc933f810d1808524ecf1 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 26 Jan 2023 15:40:04 +0100 Subject: [PATCH 15/15] [spine-cpp] Closes #2225, incorrect integer division when reading AlphaTimeline frames. --- .../spine-cpp/src/spine/SkeletonBinary.cpp | 2 +- spine-godot/.vscode/launch.json | 44 ++++++++++++++----- spine-godot/.vscode/tasks.json | 8 ++-- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp index 8613b8a18..85a6f79cc 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp @@ -1010,7 +1010,7 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S timeline->setFrame(frame, time, a); if (frame == frameLast) break; float time2 = readFloat(input); - float a2 = readByte(input) / 255; + float a2 = readByte(input) / 255.0; switch (readSByte(input)) { case CURVE_STEPPED: timeline->setStepped(frame); diff --git a/spine-godot/.vscode/launch.json b/spine-godot/.vscode/launch.json index bcbe0d713..20f2e0b0d 100644 --- a/spine-godot/.vscode/launch.json +++ b/spine-godot/.vscode/launch.json @@ -15,7 +15,19 @@ "examples/01-helloworld/helloworld.tscn" ], "cwd": "${workspaceFolder}", - "preLaunchTask": "build-v4" + "preLaunchTask": "build-v4", + "linux": { + "type": "lldb", + "request": "launch", + "name": "debug scene v3", + "program": "${workspaceFolder}/godot/bin/godot.linux.editor.dev.x86_64", + }, + "osx": { + "type": "lldb", + "request": "launch", + "name": "debug scene v3", + "program": "${workspaceFolder}/godot/bin/godot.macos.editor.dev.arm64", + }, }, { "type": "cppvsdbg", @@ -28,14 +40,26 @@ "example-v4", ], "cwd": "${workspaceFolder}", - "preLaunchTask": "build-v4" + "preLaunchTask": "build-v4", + "linux": { + "type": "lldb", + "request": "launch", + "name": "debug scene v3", + "program": "${workspaceFolder}/godot/bin/godot.linux.editor.dev.x86_64", + }, + "osx": { + "type": "lldb", + "request": "launch", + "name": "debug scene v3", + "program": "${workspaceFolder}/godot/bin/godot.macos.editor.dev.arm64", + }, }, { "type": "cppvsdbg", "request": "launch", "name": "debug scene v3", "cwd": "${workspaceFolder}", - "program": "godot/bin/godot.windows.tools.64.exe", + "program": "${workspaceFolder}/godot/bin/godot.windows.tools.64.exe", "args": [ "--path", "example", @@ -46,20 +70,20 @@ "type": "cppdbg", "request": "launch", "name": "debug scene v3", - "program": "godot/bin/godot.windows.tools.64.exe", + "program": "${workspaceFolder}/godot/bin/godot.linux.tools.64", }, "osx": { - "type": "cppdbg", + "type": "lldb", "request": "launch", "name": "debug scene v3", - "program": "godot/bin/godot.tools.64.exe", + "program": "${workspaceFolder}/godot/bin/godot.osx.tools.64", }, }, { "type": "cppvsdbg", "request": "launch", "name": "debug editor v3", - "program": "godot/bin/godot.windows.tools.64.exe", + "program": "${workspaceFolder}/godot/bin/godot.windows.tools.64.exe", "args": [ "-e", "--path", @@ -71,13 +95,13 @@ "type": "cppdbg", "request": "launch", "name": "debug editor v3", - "program": "godot/bin/godot.windows.tools.64.exe", + "program": "${workspaceFolder}/godot/bin/godot.linux.tools.64", }, "osx": { - "type": "cppdbg", + "type": "lldb", "request": "launch", "name": "debug editor v3", - "program": "godot/bin/godot.tools.64.exe", + "program": "${workspaceFolder}/godot/bin/godot.osx.tools.64", }, }, ] diff --git a/spine-godot/.vscode/tasks.json b/spine-godot/.vscode/tasks.json index 3305fafb3..9a6b8b0b4 100644 --- a/spine-godot/.vscode/tasks.json +++ b/spine-godot/.vscode/tasks.json @@ -14,7 +14,7 @@ "16", "target=editor", "dev_build=yes", - "custom_modules=\"${workspaceFolder}/spine_godot" + "custom_modules=\"${workspaceFolder}/spine_godot\"" ], "problemMatcher": "$msCompile", "windows": { @@ -23,7 +23,7 @@ "16", "target=editor", "dev_build=yes", - "custom_modules=\"${workspaceFolder}/spine_godot", + "custom_modules=\"${workspaceFolder}/spine_godot\"", "livepp=${env:LIVEPP}" ] }, @@ -40,14 +40,14 @@ "-j", "16", "target=debug", - "custom_modules=\"${workspaceFolder}/spine_godot" + "custom_modules=\"${workspaceFolder}/spine_godot\"" ], "windows": { "args": [ "-j", "16", "target=debug", - "custom_modules=\"${workspaceFolder}/spine_godot", + "custom_modules=\"${workspaceFolder}/spine_godot\"", "livepp=${env:LIVEPP}" ] },