diff --git a/.github/workflows/extension.yml b/.github/workflows/extension.yml
index dfcc496..326269f 100644
--- a/.github/workflows/extension.yml
+++ b/.github/workflows/extension.yml
@@ -13,6 +13,7 @@ env:
LC_ALL: en_US.UTF-8
PYTHONIOENCODING: utf8
GODOT_VERSION_4: ${{ inputs.godot_tag }}
+ KEYCHAIN_PATH: app-signing.keychain-db
concurrency:
group: ci-scons-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}
@@ -35,7 +36,7 @@ jobs:
platform: windows
- name: ð macOS (universal)
- os: macos-15
+ os: macos-latest
platform: macos
- name: ð€ Android (arm64)
@@ -43,7 +44,7 @@ jobs:
platform: android
- name: ð iOS (arm64)
- os: macos-15
+ os: macos-latest
platform: ios
- name: ð Web (wasm32)
@@ -73,6 +74,29 @@ jobs:
platform: ${{ matrix.platform }}
os: ${{ matrix.os }}
+ - name: Retrieve the secret and decode it to a file
+ if: matrix.platform == 'macos' || matrix.platform == 'ios'
+ env:
+ DEV_CERT_APPLICATION: ${{ secrets.DEV_CERT_APPLICATION }}
+ DEV_CERT_PASS: ${{ secrets.DEV_CERT_PASS }}
+ KC_PASS: ${{ secrets.KC_PASS }}
+ run: |
+ # create variables
+ CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
+
+ # import certificate and provisioning profile from secrets
+ echo -n "$DEV_CERT_APPLICATION" | base64 --decode > $CERTIFICATE_PATH
+
+ # create temporary keychain
+ security create-keychain -p "$KC_PASS" ${{ env.KEYCHAIN_PATH }}
+ security set-keychain-settings -lut 21600 ${{ env.KEYCHAIN_PATH }}
+ security unlock-keychain -p "$KC_PASS" ${{ env.KEYCHAIN_PATH }}
+
+ # import certificate to keychain
+ security import $CERTIFICATE_PATH -P "$DEV_CERT_PASS" -f pkcs12 -k ${{ env.KEYCHAIN_PATH }} -T /usr/bin/codesign
+ security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KC_PASS" ${{ env.KEYCHAIN_PATH }}
+ security list-keychain -d user -s ${{ env.KEYCHAIN_PATH }}
+
- name: build Linux
if: matrix.platform == 'linux'
run: |
@@ -80,14 +104,28 @@ jobs:
- name: build macOS
if: matrix.platform == 'macos'
+ env:
+ DEV_ID_APPLICATION: ${{ secrets.DEV_ID_APPLICATION }}
run: |
./scripts/release-gdextension-macos.sh
+ for f in ./bin/macos/*.framework
+ do
+ codesign --force --verify --verbose --keychain ${{ env.KEYCHAIN_PATH }} --sign "${DEV_ID_APPLICATION}" $f --deep --options runtime --timestamp
+ done
+
- name: build iOS
if: matrix.platform == 'ios'
+ env:
+ DEV_ID_APPLICATION: ${{ secrets.DEV_ID_APPLICATION }}
run: |
./scripts/release-gdextension-ios.sh
+ for f in ./bin/ios/*.framework
+ do
+ codesign --force --verify --verbose --keychain ${{ env.KEYCHAIN_PATH }} --sign "${DEV_ID_APPLICATION}" $f --deep --options runtime --timestamp
+ done
+
- name: build Android
if: matrix.platform == 'android'
run: |
@@ -113,7 +151,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
- name: extension-${{ matrix.platform }}-${{ steps.commit.outputs.short }}
+ name: extension-${{ env.GODOT_VERSION_4 }}-${{ matrix.platform }}-${{ steps.commit.outputs.short }}
path: bin/
if-no-files-found: error
@@ -140,17 +178,17 @@ jobs:
mkdir -p bin
cp ../misc/ssplayer_godot_extension.gdextension bin/
- mv extension-android-${{ steps.commit.outputs.short }}/android bin/
- mv extension-ios-${{ steps.commit.outputs.short }}/ios bin/
- mv extension-macos-${{ steps.commit.outputs.short }}/macos bin/
- mv extension-web-${{ steps.commit.outputs.short }}/web bin/
- mv extension-windows-${{ steps.commit.outputs.short }}/windows bin/
- # mv extension-linux-${{ steps.commit.outputs.short }}/linux bin/
+ mv extension-${{ env.GODOT_VERSION_4 }}-android-${{ steps.commit.outputs.short }}/android bin/
+ mv extension-${{ env.GODOT_VERSION_4 }}-ios-${{ steps.commit.outputs.short }}/ios bin/
+ mv extension-${{ env.GODOT_VERSION_4 }}-macos-${{ steps.commit.outputs.short }}/macos bin/
+ mv extension-${{ env.GODOT_VERSION_4 }}-web-${{ steps.commit.outputs.short }}/web bin/
+ mv extension-${{ env.GODOT_VERSION_4 }}-windows-${{ steps.commit.outputs.short }}/windows bin/
+ # mv extension-${{ env.GODOT_VERSION_4 }}-linux-${{ steps.commit.outputs.short }}/linux bin/
- zip -r ../ssplayer-godot-extension-${{ steps.commit.outputs.short }}.zip ssplayer_godot_extension.gdextension bin/
+ zip -r ../ssplayer-godot-extension-${{ env.GODOT_VERSION_4 }}-${{ steps.commit.outputs.short }}.zip bin/
- name: Upload final release package
uses: actions/upload-artifact@v4
with:
- name: ssplayer-godot-extension-${{ steps.commit.outputs.short }}
- path: ssplayer-godot-extension-${{ steps.commit.outputs.short }}.zip
+ name: ssplayer-godot-extension-${{ env.GODOT_VERSION_4 }}-${{ steps.commit.outputs.short }}
+ path: ssplayer-godot-extension-${{ env.GODOT_VERSION_4 }}-${{ steps.commit.outputs.short }}.zip
diff --git a/BUILD.md b/BUILD.md
index d0c553c..26610df 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -1,6 +1,6 @@
# ãœãŒã¹ååŸ
-æ¬ãªããžããªãã¯ããŒã³ããŠãã ããã
+æ¬ãªããžããªãã¯ããŒã³ããŠã `SSPlayerForGodot` ãã£ã¬ã¯ããªå
ã«å
¥ã£ãŠãã ããã
```bash
git clone --recursive https://github.com/SpriteStudio/SSPlayerForGodot.git
@@ -20,10 +20,10 @@ git clone https://github.com/godotengine/godot-cpp.git
```
# ãã©ã³ãéžæ
+## Godot
SSPlayerForGodot ãã£ã¬ã¯ããªã® `godot` ãã£ã¬ã¯ããªå
ã§ãã«ããã Godot Engine ã®ãã©ã³ããéžæããŠãã ããã
-## Godot
-### 4.4
+### 4
```bash
pushd godot
@@ -50,10 +50,11 @@ popd
```
# ãã«ãç°å¢ã®ã»ããã¢ãã
-## Windows
以éã§ãã«ãç°å¢ã®æ§ç¯æé ã«ã€ããŠèª¬æããŠãããŸãã
+## Windows
+
[Godotå
¬åŒã®ã³ã³ãã€ã«æé ](https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_windows.html)
å¿
èŠãªããŒã«
@@ -101,12 +102,21 @@ brew install molten-vk
brew install emscripten
```
+(Optional) target ã Android ã®ãã«ããããé㯠Android NDK ãã€ã³ã¹ããŒã«ããŠãã ããã
+
+
+## Linux
+T.B.D
+
# ãã«ã
## Windows
### 4
[build.ps1](./scripts/build.ps1) ã§ãã«ãå¯èœã§ãã
+
+ææç©ã¯ `godot\bin` ã«æ ŒçŽãããŸãã
+
**PowerShell**
```powershell
@@ -124,6 +134,7 @@ PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build.ps1
### 3.x
[build-v3.ps1](./scripts/build-v3.ps1) ã§ãã«ãå¯èœã§ãã
+ææç©ã¯ `godot\bin` ã«æ ŒçŽãããŸãã
**PowerShell**
@@ -144,6 +155,7 @@ PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-v3.ps1
### 4
[build.sh](./scripts/build.sh) ã§ãã«ãå¯èœã§ãã
+ææç©ã¯ `godot/bin` ã«æ ŒçŽãããŸãã
```sh
./scripts/build.sh
@@ -175,6 +187,7 @@ PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-v3.ps1
### 3.x
[build-v3.sh](./scripts/build-v3.sh) ã§ãã«ãå¯èœã§ãã
+ææç©ã¯ `godot/bin` ã«æ ŒçŽãããŸãã
```sh
./scripts/build-v3.sh
@@ -207,6 +220,8 @@ PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-v3.ps1
# GDExtension
## Windows
[build-extension.ps1](./scripts/build-extension.ps1) ã§ãã«ãå¯èœã§ãã
+ææç©ã¯ `bin` ãã£ã¬ã¯ããªã«æ ŒçŽãããŸãã
+
**PowerShell**
@@ -227,6 +242,7 @@ PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-extension.ps1
macOS ã Linux ã§å®è¡ããŠãã ããã
[build-extension.sh](./scripts/build-extension.sh) ã§ãã«ãå¯èœã§ãã
+ææç©ã¯ `bin` ãã£ã¬ã¯ããªã«æ ŒçŽãããŸãã
```sh
./scripts/build-extension.sh
@@ -236,10 +252,40 @@ macOS ã Linux ã§å®è¡ããŠãã ããã
# ãªãªãŒã¹ãã«ã
## 4
-...
+åãã©ãããã©ãŒã ã® godot ã® `editor`, `template_debug`, `template_release` ããŸãšããŠãã«ãã¹ã¯ãªããã¯äžèšã®éãã§ãã
+
+windows
+```
+.\scripts\release-windows.ps1
+```
+
+macOS
+```sh
+./scripts/release-macos.sh
+```
+
+Linux
+```sh
+./scripts/release-linux.sh
+```
+
+iOS
+```sh
+./scripts/release-ios.sh
+```
+
+Android
+```sh
+./scripts/release-android.sh
+```
+
+Web
+```sh
+./scripts/release-web.sh
+```
## GDExtension
-åãã©ãããã©ãŒã ã® gdextension ã® editor, template_debug, template_release ããŸãšããŠãã«ãã¹ã¯ãªããã¯äžèšã®éãã§ãã
+åãã©ãããã©ãŒã ã® gdextension ã® `editor`, `template_debug`, `template_release` ããŸãšããŠãã«ãã¹ã¯ãªããã¯äžèšã®éãã§ãã
windows
```
diff --git a/README.md b/README.md
index d6c88d9..a7ebb27 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,6 @@
å®è¡æããã©ãŒãã³ã¹ãåªå
ãããã C++ ã¢ãžã¥ãŒã«ã®åœ¢æ
ã«ãªã£ãŠããŸãã
SpriteStudioPlayer for Godot ãå©çšããå ŽåãSpriteStudioPlayer ã®[ã«ã¹ã¿ã ã¢ãžã¥ãŒã«](https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/custom_modules_in_cpp.html) ãçµã¿èŸŒãã Godot Engine ã® Editor ãæå
ã§ãã«ããããã SpriteStudioPlayer ã® [GDExtension](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/what_is_gdextension.html) ããããžã§ã¯ããžå
¥ããå¿
èŠããããŸãã
-
## 察å¿ãã [OPTPiX SpriteStudio](https://www.webtech.co.jp/spritestudio/index.html) ã®ããŒãžã§ã³
Ver.6 ãš Ver.7 ã«å¯Ÿå¿ããŠããŸãã
@@ -23,190 +22,8 @@ Ver.6 ãš Ver.7 ã«å¯Ÿå¿ããŠããŸãã
[BUILD.md](BUILD.md) ãåç
§ããŠãã ããã
# äœ¿ãæ¹
-## SpriteStudioããŒã¿ã®ã€ã³ããŒã
-
-SpriteStudioããŒã¿ã®ã€ã³ããŒãæé ã«ã€ããŠèª¬æããŸãã
-çŸåšã® SpriteStudio for Godot ãã©ã°ã€ã³ã§ã¯ sspj ãã¡ã€ã«ãçŽæ¥æå®ãã圢æ
ã«ãªã£ãŠããŸãã
-ãå©çšã®ãããžã§ã¯ãäžã®ãã©ã«ãã« sspjãssaeãssce ãšç»åãã¡ã€ã«ãªã©ã®äžåŒãé
眮ããŸãã
-
-## SpriteStudioããŒãã®äœæãš sspj ãã¡ã€ã«ã®æå®
-
-1. ãNode ãæ°èŠäœæããããGdNodeSsPlayerããéžæãããäœæããã¿ã³ãæŒããŸãã
-2. ã€ã³ã¹ãã¯ã¿ãŒã®ãRes Playerããããæ°èŠ GdResourceSsPlayerããéžæããŸãã
-3. GdResourceSsPlayer ã®ãRes Projectããããèªã¿èŸŒã¿ããéžæããŸãã
-4. ããã¡ã€ã«ãéãããã€ã¢ãã°ããã*.sspjããã¡ã€ã«ãéžæããŠéããŸãã
-
-## ã¢ãã¡ãŒã·ã§ã³ã®æå®
-
-1. ãAnimation Settingsããå±éãAnime Packãããåçãããã*.ssaeããã¡ã€ã«ãéžæããŸãã
-2. ç¶ããŠãAnimationãããåçãããã¢ãã¡ãŒã·ã§ã³ãéžæããŸãã
-3. Frame ããã©ãã°ããããPlay ãã©ã°ããªã³ã«ããããšã§ãã¬ãã¥ãŒã§ããŸãã
-
-### ã€ã³ã¹ãã¯ã¿ãŒã®åããããã£ã®æå³
-
-
-
-```
-GdNodeSsPlayer - SsPlayer ãæ±ãããŒã
-âââ Res Player - SsPlayer ã䜿çšãããªãœãŒã¹
-â âââ Res Project - sspj ãã¡ã€ã«
-â âââ CellMap Settings - ã»ã«ãããã®èšå®
-â âââ ssce File 01 - ã»ã«ããã
-â âââ ssce File 02 - ã»ã«ããã
-â
-âââ Animation Settings - ã¢ãã¡ãŒã·ã§ã³ã®èšå®
- âââ Anime Pack - ã¢ãã¡ããã¯
- âââ Animation - ã¢ãã¡ãŒã·ã§ã³
- âââ Frame - çŸåšã®ãã¬ãŒã
- âââ Loop - ã«ãŒãåçãã©ã°
- âââ Playing - åçãã©ã°
- âââ Texture Interpolate - ãã¯ã¹ãã£è£éãã©ã°
-```
-
-### ãã¯ã¹ãã£è£éãã©ã°ã«ã€ããŠ
-
-SSPlayer for Godot ã®å®è£
(v1.2.0æç¹)ã§ã¯ãäžåºŠã¢ãã¡ãŒã·ã§ã³ããã¯ã¹ãã£ã«ã¬ã³ããªã³ã°ããåŸãGodot ã®ã¬ã³ãã©ãŒã«ãã£ãŠã¹ã¯ãªãŒã³ãããã¡ã«æç»ãããŸãã
-ãã®ãã¯ã¹ãã£ã«ã¬ã³ããªã³ã°ããéã«ãã€ãªãã¢è£éããããå Žåã¯ãã©ã°ããªã³ã«èšå®ããŸãã
-ãã®ç¶æ
ã§ã¯å転ããŠæãã«ãªã£ãããŒãã®ãšããžã«ã¢ã³ããšã€ãªã¢ã¹ãããããŸããããã®åäœã奜ãŸãããªãå Žåã¯ãªãã«ããŠãã ããã
-ãã®ãã©ã°ããªãã«èšå®ããCanvasItem ã® Texture ã® FilterMode ã Nearest ã«ããŠãããšã¹ã¯ãªãŒã³ãããã¡ã«æç»ããéã«ãè£éããããããã¯ã»ã«ã®ãšããžãæç¢ºã«ãªããŸãã
-äŸãã°ãã¯ã»ã«ã¢ãŒãç³»ã®ã²ãŒã ã§å©çšããå Žåã¯ããã®èšå®ã詊ããŠã¿ãŠäžããã
-
-#### ã¬ã³ããªã³ã°ãããã¯ã¹ãã£ã®ãµã€ãº
-ã¬ã³ããªã³ã°ãããã¯ã¹ãã£ã®ãµã€ãºã¯SpriteStudioäžã§ã¢ãã¡ãŒã·ã§ã³ã«èšå®ãããåºæºæ ãã®ãµã€ãºãæ¡çšãããŸãã(v1.2.0æç¹)
-
-## ã¯ã©ã¹
-
-GDScript ããã³ã³ãããŒã«ã§ããã¯ã©ã¹ã®åœ¹å²ãšäž»èŠãªã¡ãœããã«ã€ããŠèª¬æããŸãã
-åã¯ã©ã¹ãæã£ãŠããå
šãŠã®ã¡ãœãããããããã£ãã·ã°ãã«ã«ã€ããŠã¯ Godot ã® Script ç»é¢ã§ç¢ºèªããŠã¿ãŠãã ããã
-
-### ãªãœãŒã¹ç®¡çã¯ã©ã¹
-
-SpriteStudio ã®åçš® .ss** ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ã管çããã¯ã©ã¹ããããŸãã
-
-#### [GdResourceSsProject](./gd_spritestudio/gd_resource_ssproject.h) ã¯ã©ã¹
-
-ïŒã€ã® sspj ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
-sspj ã«ç»é²ããã ssae, ssce, ssee åã
ã®ãªãœãŒã¹ã®ååŸãšèšå®ãè¡ããŸãã
-
-#### [GdResourceSsCellMap](./gd_spritestudio/gd_resource_sscellmap.h) ã¯ã©ã¹
-
-ïŒã€ã® ssce ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
-çŸåšãã¯ã¹ãã£ã®ååŸãšèšå®ãè¡ãã¡ã³ããŒã®ã¿å¯Ÿå¿ããŠããŸãã
-
-#### [GdResourceSsAnimePack](./gd_spritestudio/gd_resource_ssanimepack.h) ã¯ã©ã¹
-
-ïŒã€ã® ssae ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
-å
å
ããŠããã¢ãã¡ãŒã·ã§ã³ã®æ°ããšã¢ãã¡ãŒã·ã§ã³åã®ååŸãè¡ããŸãã
-
-#### [GdResourceSsPlayer](./gd_spritestudio/gd_resource_ssplayer.h) ã¯ã©ã¹
-
-çŸåš GdResourceSsProject ãªãœãŒã¹ãèšå®ãååŸããã¢ã¯ã»ãµã®ã¿ã§ãã
-
-### åçã®ããã®ã¯ã©ã¹
-
-GdNodeSsPlayer ã«åè¿°ã®ãªãœãŒã¹ãæå®ããããšã§åçãè¡ããŸãã
-以äžã¯ãã¡ã€ã«ã®èªã¿èŸŒã¿ããåçéå§ãŸã§ã®ã·ã³ãã«ãªãµã³ãã«ã³ãŒãã§ãã
-
-```python
-# GdNodeSsPlayerããŒããæããŸãã
-## Godot 4
-@onread var ssnode = $target
-## Godot 3.x
-# onready var ssnode = $target
-func _ready():
- # sspj ãã¡ã€ã«ãèªã¿èŸŒã¿ãŸãã
- ssnode.res_player.res_project = ResourceLoader.load("Sample.sspj")
-
- # ssaeãã¡ã€ã«ãšã¢ãã¡ãŒã·ã§ã³ãæå®ããŸãã
- ssnode.set_anime_pack("Sample.ssae")
- ssnode.set_animation("anime_1")
-
- # ã¢ãã¡ãŒã·ã§ã³çµäºæã³ãŒã«ããã¯ã®èšå®
- ## Godot 4
- ssnode.connect("animation_finished", Callable(self, "_on_animation_finished"))
- ## Godot 3.x
- # ssnode.connect("animation_finished", self, "_on_animation_finished")
-
- # ã«ãŒããæå®ããŠåçãéå§ããŸãã
- ssnode.set_loop(true)
- ssnode.play()
-
-# ã¢ãã¡çµäºæã®ã³ãŒã«ããã¯é¢æ°ã§ã
-func _on_animation_finished(name):
- print("SIGNAL _on_animation_finished from " + name)
-```
-
-ä»ã«ãã«ã¬ã³ããã¬ãŒã ã®æå®ãäžæåæ¢ãéå§ãçµäºãã¬ãŒã ãFPSã®ååŸãªã©äžè¬çãªã¡ãœããããããŸãã
-äžèŠ§ã¯ Godot ã® Script ç»é¢ã§ç¢ºèªããŠã¿ãŠãã ããã
-
-#### ã·ã°ãã«
-
-GdNodeSsPlayer ãçºè¡ããã·ã°ãã«ã«ã€ããŠèª¬æããŸãã
-
-#### on_animation_changed(name: String)
-
-ã¢ãã¡ãŒã·ã§ã³å€æŽæã«çºè¡ãããŸãã
-nameïŒå€æŽããã¢ãã¡ãŒã·ã§ã³å
-
-#### on_animation_finished(name: String)
-
-åçäžã®ã¢ãã¡ãŒã·ã§ã³ãçµäºãã¬ãŒã ã«å°éããæã«çºè¡ãããŸãã
-ã«ãŒãåçãªã³ã§ãæ¯åšçºè¡ãããŸãã
-nameïŒå€æŽããã¢ãã¡ãŒã·ã§ã³å
-
-#### on_animepack_changed(name: String)
-
-ã¢ãã¡ããã¯å€æŽæã«çºè¡ãããŸãã
-nameïŒå€æŽããã¢ãã¡ããã¯å
-
-#### on_frame_changed(frame: int)
-
-ãã¬ãŒã äœçœ®å€æŽæã«çºè¡ãããŸãã
-frameïŒå€æŽãããã¬ãŒã äœçœ®
-
-#### on_signal(command: String, value: Dictionary)
-
-SpriteStudioã®ã·ã°ãã«ã¢ããªãã¥ãŒãã®ããŒãã¬ãŒã å°éæã«çºè¡ãããŸãã
-commandïŒã³ãã³ãå
-valueïŒãã©ã¡ãŒã¿åãšå€ã®ã³ã¬ã¯ã·ã§ã³
-
-#### on_user_data(flag: int, intValue: int, rectValue: Rect2, pointValue: Vector2, stringValue: String)
-
-ãŠãŒã¶ãŒããŒã¿ã®ããŒãã¬ãŒã å°éæã«çºè¡ãããŸãã
-
-- flagïŒåŸç¶ã®åŒæ°ãæå¹ãã©ããã®è«çå€
- - 1ïŒæŽæ°ãæå¹
- - 2ïŒç¯å²ãæå¹
- - 4ïŒäœçœ®ãæå¹
- - 8ïŒæååãæå¹
-- intValueïŒæŽæ°
-- rectValueïŒç¯å²
-- pointValueïŒäœçœ®
-- stringValueïŒæåå
-
-## å¶éäºé
-
-### åäœããªããã®
-
-- ãã¹ã¯æ©èœ
-- æç»ã¢ãŒãïŒããã¯ã¹ä»¥å€ãããã¯ã¹çžåœã«ãªããŸãã
-- SpriteStudio Ver.7.1 ã§è¿œå ãããæ°æ©èœ(ããã¹ãã»ãµãŠã³ãã»9ã¹ã©ã€ã¹ã»ã·ã§ã€ã)
-
-### 衚瀺ãç°ãªããã®
-
-- ããŒãã«ã©ãŒ
- - [x] v1.1.1 ã§ä¿®æ£æžïŒããã¯ã¹ã®é ç¹åäœã®æã«Xç¶(äžè§åœ¢ã®èŸºéšå)ã®èŒåºŠãé«ããªã£ãŠããŸãã
- - [x] v1.1 ã§ä¿®æ£æžïŒä¹ç®ã§ãã¯ã¹ãã£ã«ã©ãŒã®å²åããšãã£ã¿ãã倧ãããªããŸãã
-
-### ãã®ä»ã®å¶é
-
-- ã€ã³ã¹ã¿ã³ã¹ã®ç¬ç«åäœãOnã®ããŒãã®åçã«ã€ããŠ
- - ã·ãŒã³äžã§ Frame ããããã£ã 0 以å€ã®ç¶æ
ã§ Play ããããã£ã On ã«ããŠåçéå§ããå Žåãç¬ç«åäœãOnã«èšå®ãããã€ã³ã¹ã¿ã³ã¹ããŒããåçãããå Žåãã€ã³ã¹ã¿ã³ã¹ããŒãã®åçãã¬ãŒã ããããããšããããŸãã
- - ãã®å ŽåãäžæŠ Frame ããããã£ã®å€ã 0 以å€ã«å€æŽåŸã0 ã«æ»ããŠããåçéå§ããããšã§äžèŽãããããŸãã
-- ã·ã§ãŒããŒ
- - SpriteStudioå
¬åŒã®äžéšã®ã¿å¯Ÿå¿ããŠããŸãã
- - ã«ã¹ã¿ã ã·ã§ãŒããŒã¯ç¬èªã«è¿œå ã»å¯Ÿå¿ããå¿
èŠããããŸãã
+[USAGE.md](USAGE.md) ãåç
§ããŠãã ããã
# ãµã³ãã«
@@ -248,7 +65,6 @@ gdextension ã®åäœç¢ºèªçšãããžã§ã¯ãã§ãã
確èªã§ãããµã³ãã«ã¯ [feature_test](./examples/feature_test) ãšåããã®ã«ãªããŸãã
-
# ãåãåãã
ã質åããèŠæãäžå
·åã®ãå ±å㯠[Issues](../../issues) ã«æçš¿ããŠãã ããã
diff --git a/SConstruct b/SConstruct
index 15da5e9..a5e2b1e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import sys
+import subprocess
def normalize_path(val, env):
return val if os.path.isabs(val) else os.path.join(env.Dir("#").abspath, val)
@@ -10,6 +11,7 @@ def validate_parent_dir(key, val, env):
if not os.path.isdir(normalize_path(os.path.dirname(val), env)):
raise UserError("'%s' is not a directory: %s" % (key, os.path.dirname(val)))
+
libname = "SSGodot"
projectdir = os.path.join("examples", "feature_test_gdextension")
@@ -34,13 +36,11 @@ opts.Add(
validator=validate_parent_dir,
)
)
-
opts.Update(localEnv)
Help(opts.GenerateHelpText(localEnv))
env = localEnv.Clone()
-
env["compiledb"] = False
env.Tool("compilation_db")
@@ -76,6 +76,10 @@ env.Append(
"gd_spritestudio/SpriteStudio6-SDK/Common/Helper",
]
)
+# Set iOS minimum deployment target
+if env["platform"] == "ios":
+ env.Append(CCFLAGS=["-miphoneos-version-min=12.0"])
+ env.Append(LINKFLAGS=["-miphoneos-version-min=12.0"])
sources = Glob("gd_spritestudio/*.cpp")
sources.extend(Glob("gd_spritestudio/SpriteStudio6-SDK/Common/Loader/tinyxml2/*.cpp"))
@@ -93,12 +97,13 @@ if env["target"] in ["editor", "template_debug"]:
except AttributeError:
print("Not including class reference as we're targeting a pre-4.3 baseline.")
-file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"])
+file = "lib{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"])
filepath = ""
if env["platform"] == "macos" or env["platform"] == "ios":
- filepath = "{}.framework/".format(env["platform"])
- file = "{}.{}.{}".format(libname, env["platform"], env["target"])
+ filepath = "lib{}.{}.{}.framework/".format(libname, env["platform"], env["target"])
+ file = "lib{}.{}.{}".format(libname, env["platform"], env["target"])
+ env.Append(LINKFLAGS=["-Wl,-install_name,@rpath/{}{}".format(filepath, file)])
libraryfile = "bin/{}/{}{}".format(env["platform"], filepath, file)
library = env.SharedLibrary(
@@ -106,9 +111,40 @@ library = env.SharedLibrary(
source=sources,
)
-copy = env.InstallAs("{}/bin/{}/{}lib{}".format(projectdir, env["platform"], filepath, file), library)
-
+if env["platform"] == "macos" or env["platform"] == "ios":
+ plist_subst = {
+ "${BUNDLE_LIBRARY}": file,
+ "${BUNDLE_NAME}": "ssplayer-godot",
+ "${BUNDLE_IDENTIFIER}": "jp.co.cri-mw.spritestudio.ssplayer-godot.{}".format(env["target"]),
+ "${BUNDLE_VERSION}": subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode('utf-8').strip().split('-')[0] + '.0',
+ "${MIN_MACOS_VERSION}": "10.12",
+ "${MIN_IOS_VERSION}": "12.0"
+ }
+
+ if env["platform"] == "macos":
+ plist_file = "bin/macos/{}Resources/Info.plist".format(filepath)
+ plist = env.Substfile(
+ target=plist_file,
+ source="misc/Info.macos.plist",
+ SUBST_DICT=plist_subst
+ )
+ elif env["platform"] == "ios":
+ plist_file = "bin/ios/{}Info.plist".format(filepath)
+ plist = env.Substfile(
+ target=plist_file,
+ source="misc/Info.ios.plist",
+ SUBST_DICT=plist_subst
+ )
+
+ env.Depends(library, plist)
+
+copy = env.InstallAs("{}/{}".format(projectdir, libraryfile), library)
default_args = [library, copy]
+
+if env["platform"] == "macos" or env["platform"] == "ios":
+ copy_plist = env.InstallAs("{}/{}".format(projectdir, plist_file), plist_file)
+ default_args.append(copy_plist)
+
if localEnv.get("compiledb", False):
default_args += [compilation_db]
-Default(*default_args)
+Default(*default_args)
\ No newline at end of file
diff --git a/USAGE.md b/USAGE.md
new file mode 100644
index 0000000..86bb77c
--- /dev/null
+++ b/USAGE.md
@@ -0,0 +1,193 @@
+# ãšãã£ã¿ã®éžæ
+äžèšã©ã¡ããã®æ¹æ³ã§å©çšããŠãã ããã
+
+- SpriteStudioPlayer ã®ã«ã¹ã¿ã ã¢ãžã¥ãŒã«ãçµã¿èŸŒãã Godot Engine ãçšæããã
+ - [BUILD.md](BUILD.md) ãåç
§ããŠãã ãã
+- SpriteStudioPlayer ã® GDExtension ã Godot ãããžã§ã¯ãã® `bin` ãã£ã¬ã¯ããªãžæ ŒçŽããã
+ - [ãªãªãŒã¹](https://github.com/SpriteStudio/SSPlayerForGodot/releases)ãåç
§ããŠãã ãããèªåã§ãã«ãããå Žå㯠[BUILD.md](BUILD.md) ãåç
§ããŠãã ãã
+
+
+# SpriteStudioããŒã¿ã®ã€ã³ããŒã
+
+SpriteStudioããŒã¿ã®ã€ã³ããŒãæé ã«ã€ããŠèª¬æããŸãã
+çŸåšã® SpriteStudio for Godot ãã©ã°ã€ã³ã§ã¯ sspj ãã¡ã€ã«ãçŽæ¥æå®ãã圢æ
ã«ãªã£ãŠããŸãã
+ãå©çšã®ãããžã§ã¯ãäžã®ãã©ã«ãã« sspjãssaeãssce ãšç»åãã¡ã€ã«ãªã©ã®äžåŒãé
眮ããŸãã
+
+# SpriteStudioããŒãã®äœæãš sspj ãã¡ã€ã«ã®æå®
+
+1. ãNode ãæ°èŠäœæããããGdNodeSsPlayerããéžæãããäœæããã¿ã³ãæŒããŸãã
+2. ã€ã³ã¹ãã¯ã¿ãŒã®ãRes Playerããããæ°èŠ GdResourceSsPlayerããéžæããŸãã
+3. GdResourceSsPlayer ã®ãRes Projectããããèªã¿èŸŒã¿ããéžæããŸãã
+4. ããã¡ã€ã«ãéãããã€ã¢ãã°ããã*.sspjããã¡ã€ã«ãéžæããŠéããŸãã
+
+# ã¢ãã¡ãŒã·ã§ã³ã®æå®
+
+1. ãAnimation Settingsããå±éãAnime Packãããåçãããã*.ssaeããã¡ã€ã«ãéžæããŸãã
+2. ç¶ããŠãAnimationãããåçãããã¢ãã¡ãŒã·ã§ã³ãéžæããŸãã
+3. Frame ããã©ãã°ããããPlay ãã©ã°ããªã³ã«ããããšã§ãã¬ãã¥ãŒã§ããŸãã
+
+## ã€ã³ã¹ãã¯ã¿ãŒã®åããããã£ã®æå³
+
+
+
+```
+GdNodeSsPlayer - SsPlayer ãæ±ãããŒã
+âââ Res Player - SsPlayer ã䜿çšãããªãœãŒã¹
+â âââ Res Project - sspj ãã¡ã€ã«
+â âââ CellMap Settings - ã»ã«ãããã®èšå®
+â âââ ssce File 01 - ã»ã«ããã
+â âââ ssce File 02 - ã»ã«ããã
+â
+âââ Animation Settings - ã¢ãã¡ãŒã·ã§ã³ã®èšå®
+ âââ Anime Pack - ã¢ãã¡ããã¯
+ âââ Animation - ã¢ãã¡ãŒã·ã§ã³
+ âââ Frame - çŸåšã®ãã¬ãŒã
+ âââ Loop - ã«ãŒãåçãã©ã°
+ âââ Playing - åçãã©ã°
+ âââ Texture Interpolate - ãã¯ã¹ãã£è£éãã©ã°
+```
+
+## ãã¯ã¹ãã£è£éãã©ã°ã«ã€ããŠ
+
+SSPlayer for Godot ã®å®è£
(v1.2.0æç¹)ã§ã¯ãäžåºŠã¢ãã¡ãŒã·ã§ã³ããã¯ã¹ãã£ã«ã¬ã³ããªã³ã°ããåŸãGodot ã®ã¬ã³ãã©ãŒã«ãã£ãŠã¹ã¯ãªãŒã³ãããã¡ã«æç»ãããŸãã
+ãã®ãã¯ã¹ãã£ã«ã¬ã³ããªã³ã°ããéã«ãã€ãªãã¢è£éããããå Žåã¯ãã©ã°ããªã³ã«èšå®ããŸãã
+ãã®ç¶æ
ã§ã¯å転ããŠæãã«ãªã£ãããŒãã®ãšããžã«ã¢ã³ããšã€ãªã¢ã¹ãããããŸããããã®åäœã奜ãŸãããªãå Žåã¯ãªãã«ããŠãã ããã
+ãã®ãã©ã°ããªãã«èšå®ããCanvasItem ã® Texture ã® FilterMode ã Nearest ã«ããŠãããšã¹ã¯ãªãŒã³ãããã¡ã«æç»ããéã«ãè£éããããããã¯ã»ã«ã®ãšããžãæç¢ºã«ãªããŸãã
+äŸãã°ãã¯ã»ã«ã¢ãŒãç³»ã®ã²ãŒã ã§å©çšããå Žåã¯ããã®èšå®ã詊ããŠã¿ãŠäžããã
+
+### ã¬ã³ããªã³ã°ãããã¯ã¹ãã£ã®ãµã€ãº
+ã¬ã³ããªã³ã°ãããã¯ã¹ãã£ã®ãµã€ãºã¯SpriteStudioäžã§ã¢ãã¡ãŒã·ã§ã³ã«èšå®ãããåºæºæ ãã®ãµã€ãºãæ¡çšãããŸãã(v1.2.0æç¹)
+
+# ã¯ã©ã¹
+
+GDScript ããã³ã³ãããŒã«ã§ããã¯ã©ã¹ã®åœ¹å²ãšäž»èŠãªã¡ãœããã«ã€ããŠèª¬æããŸãã
+åã¯ã©ã¹ãæã£ãŠããå
šãŠã®ã¡ãœãããããããã£ãã·ã°ãã«ã«ã€ããŠã¯ Godot ã® Script ç»é¢ã§ç¢ºèªããŠã¿ãŠãã ããã
+
+## ãªãœãŒã¹ç®¡çã¯ã©ã¹
+
+SpriteStudio ã®åçš® .ss** ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ã管çããã¯ã©ã¹ããããŸãã
+
+### [GdResourceSsProject](./gd_spritestudio/gd_resource_ssproject.h) ã¯ã©ã¹
+
+ïŒã€ã® sspj ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
+sspj ã«ç»é²ããã ssae, ssce, ssee åã
ã®ãªãœãŒã¹ã®ååŸãšèšå®ãè¡ããŸãã
+
+### [GdResourceSsCellMap](./gd_spritestudio/gd_resource_sscellmap.h) ã¯ã©ã¹
+
+ïŒã€ã® ssce ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
+çŸåšãã¯ã¹ãã£ã®ååŸãšèšå®ãè¡ãã¡ã³ããŒã®ã¿å¯Ÿå¿ããŠããŸãã
+
+### [GdResourceSsAnimePack](./gd_spritestudio/gd_resource_ssanimepack.h) ã¯ã©ã¹
+
+ïŒã€ã® ssae ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
+å
å
ããŠããã¢ãã¡ãŒã·ã§ã³ã®æ°ããšã¢ãã¡ãŒã·ã§ã³åã®ååŸãè¡ããŸãã
+
+### [GdResourceSsPlayer](./gd_spritestudio/gd_resource_ssplayer.h) ã¯ã©ã¹
+
+çŸåš GdResourceSsProject ãªãœãŒã¹ãèšå®ãååŸããã¢ã¯ã»ãµã®ã¿ã§ãã
+
+## åçã®ããã®ã¯ã©ã¹
+
+GdNodeSsPlayer ã«åè¿°ã®ãªãœãŒã¹ãæå®ããããšã§åçãè¡ããŸãã
+以äžã¯ãã¡ã€ã«ã®èªã¿èŸŒã¿ããåçéå§ãŸã§ã®ã·ã³ãã«ãªãµã³ãã«ã³ãŒãã§ãã
+
+```python
+# GdNodeSsPlayerããŒããæããŸãã
+## Godot 4
+@onread var ssnode = $target
+## Godot 3.x
+# onready var ssnode = $target
+
+func _ready():
+ # sspj ãã¡ã€ã«ãèªã¿èŸŒã¿ãŸãã
+ ssnode.res_player.res_project = ResourceLoader.load("Sample.sspj")
+
+ # ssaeãã¡ã€ã«ãšã¢ãã¡ãŒã·ã§ã³ãæå®ããŸãã
+ ssnode.set_anime_pack("Sample.ssae")
+ ssnode.set_animation("anime_1")
+
+ # ã¢ãã¡ãŒã·ã§ã³çµäºæã³ãŒã«ããã¯ã®èšå®
+ ## Godot 4
+ ssnode.connect("animation_finished", Callable(self, "_on_animation_finished"))
+ ## Godot 3.x
+ # ssnode.connect("animation_finished", self, "_on_animation_finished")
+
+ # ã«ãŒããæå®ããŠåçãéå§ããŸãã
+ ssnode.set_loop(true)
+ ssnode.play()
+
+# ã¢ãã¡çµäºæã®ã³ãŒã«ããã¯é¢æ°ã§ã
+func _on_animation_finished(name):
+ print("SIGNAL _on_animation_finished from " + name)
+```
+
+ä»ã«ãã«ã¬ã³ããã¬ãŒã ã®æå®ãäžæåæ¢ãéå§ãçµäºãã¬ãŒã ãFPSã®ååŸãªã©äžè¬çãªã¡ãœããããããŸãã
+äžèŠ§ã¯ Godot ã® Script ç»é¢ã§ç¢ºèªããŠã¿ãŠãã ããã
+
+### ã·ã°ãã«
+
+GdNodeSsPlayer ãçºè¡ããã·ã°ãã«ã«ã€ããŠèª¬æããŸãã
+
+### on_animation_changed(name: String)
+
+ã¢ãã¡ãŒã·ã§ã³å€æŽæã«çºè¡ãããŸãã
+nameïŒå€æŽããã¢ãã¡ãŒã·ã§ã³å
+
+### on_animation_finished(name: String)
+
+åçäžã®ã¢ãã¡ãŒã·ã§ã³ãçµäºãã¬ãŒã ã«å°éããæã«çºè¡ãããŸãã
+ã«ãŒãåçãªã³ã§ãæ¯åšçºè¡ãããŸãã
+nameïŒå€æŽããã¢ãã¡ãŒã·ã§ã³å
+
+### on_animepack_changed(name: String)
+
+ã¢ãã¡ããã¯å€æŽæã«çºè¡ãããŸãã
+nameïŒå€æŽããã¢ãã¡ããã¯å
+
+### on_frame_changed(frame: int)
+
+ãã¬ãŒã äœçœ®å€æŽæã«çºè¡ãããŸãã
+frameïŒå€æŽãããã¬ãŒã äœçœ®
+
+### on_signal(command: String, value: Dictionary)
+
+SpriteStudioã®ã·ã°ãã«ã¢ããªãã¥ãŒãã®ããŒãã¬ãŒã å°éæã«çºè¡ãããŸãã
+commandïŒã³ãã³ãå
+valueïŒãã©ã¡ãŒã¿åãšå€ã®ã³ã¬ã¯ã·ã§ã³
+
+### on_user_data(flag: int, intValue: int, rectValue: Rect2, pointValue: Vector2, stringValue: String)
+
+ãŠãŒã¶ãŒããŒã¿ã®ããŒãã¬ãŒã å°éæã«çºè¡ãããŸãã
+
+- flagïŒåŸç¶ã®åŒæ°ãæå¹ãã©ããã®è«çå€
+ - 1ïŒæŽæ°ãæå¹
+ - 2ïŒç¯å²ãæå¹
+ - 4ïŒäœçœ®ãæå¹
+ - 8ïŒæååãæå¹
+- intValueïŒæŽæ°
+- rectValueïŒç¯å²
+- pointValueïŒäœçœ®
+- stringValueïŒæåå
+
+# å¶éäºé
+
+## åäœããªããã®
+
+- ãã¹ã¯æ©èœ
+- æç»ã¢ãŒãïŒããã¯ã¹ä»¥å€ãããã¯ã¹çžåœã«ãªããŸãã
+- SpriteStudio Ver.7.1 ã§è¿œå ãããæ°æ©èœ(ããã¹ãã»ãµãŠã³ãã»9ã¹ã©ã€ã¹ã»ã·ã§ã€ã)
+
+## 衚瀺ãç°ãªããã®
+
+- ããŒãã«ã©ãŒ
+ - [x] v1.1.1 ã§ä¿®æ£æžïŒããã¯ã¹ã®é ç¹åäœã®æã«Xç¶(äžè§åœ¢ã®èŸºéšå)ã®èŒåºŠãé«ããªã£ãŠããŸãã
+ - [x] v1.1 ã§ä¿®æ£æžïŒä¹ç®ã§ãã¯ã¹ãã£ã«ã©ãŒã®å²åããšãã£ã¿ãã倧ãããªããŸãã
+
+## ãã®ä»ã®å¶é
+
+- ã€ã³ã¹ã¿ã³ã¹ã®ç¬ç«åäœãOnã®ããŒãã®åçã«ã€ããŠ
+ - ã·ãŒã³äžã§ Frame ããããã£ã 0 以å€ã®ç¶æ
ã§ Play ããããã£ã On ã«ããŠåçéå§ããå Žåãç¬ç«åäœãOnã«èšå®ãããã€ã³ã¹ã¿ã³ã¹ããŒããåçãããå Žåãã€ã³ã¹ã¿ã³ã¹ããŒãã®åçãã¬ãŒã ããããããšããããŸãã
+ - ãã®å ŽåãäžæŠ Frame ããããã£ã®å€ã 0 以å€ã«å€æŽåŸã0 ã«æ»ããŠããåçéå§ããããšã§äžèŽãããããŸãã
+- ã·ã§ãŒããŒ
+ - SpriteStudioå
¬åŒã®äžéšã®ã¿å¯Ÿå¿ããŠããŸãã
+ - ã«ã¹ã¿ã ã·ã§ãŒããŒã¯ç¬èªã«è¿œå ã»å¯Ÿå¿ããå¿
èŠããããŸãã
diff --git a/misc/Info.ios.plist b/misc/Info.ios.plist
new file mode 100644
index 0000000..84d3d2b
--- /dev/null
+++ b/misc/Info.ios.plist
@@ -0,0 +1,24 @@
+
+
+
+
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ FMWK
+ CFBundleExecutable
+ ${BUNDLE_LIBRARY}
+ CFBundleName
+ ${BUNDLE_NAME}
+ CFBundleIdentifier
+ ${BUNDLE_IDENTIFIER}
+ CFBundleVersion
+ ${BUNDLE_VERSION}
+ CFBundleShortVersionString
+ ${BUNDLE_VERSION}
+ MinimumOSVersion
+ ${MIN_IOS_VERSION}
+ DTPlatformName
+ iphoneos
+
+
diff --git a/misc/Info.macos.plist b/misc/Info.macos.plist
new file mode 100644
index 0000000..6be9410
--- /dev/null
+++ b/misc/Info.macos.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ FMWK
+ CFBundleExecutable
+ ${BUNDLE_LIBRARY}
+ CFBundleName
+ ${BUNDLE_NAME}
+ CFBundleIdentifier
+ ${BUNDLE_IDENTIFIER}
+ CFBundleVersion
+ ${BUNDLE_VERSION}
+ CFBundleShortVersionString
+ ${BUNDLE_VERSION}
+ LSMinimumSystemVersion
+ ${MIN_MACOS_VERSION}
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+
+
diff --git a/misc/ssplayer_godot_extension.gdextension b/misc/ssplayer_godot_extension.gdextension
index 84a34f9..35a08ad 100644
--- a/misc/ssplayer_godot_extension.gdextension
+++ b/misc/ssplayer_godot_extension.gdextension
@@ -1,40 +1,32 @@
[configuration]
entry_symbol = "spritestudio_godot_library_init"
-compatibility_minimum = "4.3"
+compatibility_minimum = "4.4"
[libraries]
-macos.editor = "res://bin/macos/macos.framework/libSSGodot.macos.editor"
-macos.debug = "res://bin/macos/macos.framework/libSSGodot.macos.template_debug"
-macos.release = "res://bin/macos/macos.framework/libSSGodot.macos.template_release"
+macos.editor = "macos/libSSGodot.macos.editor.framework"
+macos.debug = "macos/libSSGodot.macos.template_debug.framework"
+macos.release = "macos/libSSGodot.macos.template_release.framework"
-ios.debug = "res://bin/ios/ios.framework/libSSGodot.ios.template_debug.xcframework"
-ios.release = "res://bin/ios/ios.framework/libSSGodot.ios.template_release.xcframework"
+ios.debug = "ios/libSSGodot.ios.template_debug.framework"
+ios.release = "ios/libSSGodot.ios.template_debug.framework"
-windows.editor.x86_64 = "res://bin/windows/libSSGodot.windows.editor.x86_64.dll"
-windows.debug.x86_64 = "res://bin/windows/libSSGodot.windows.template_debug.x86_64.dll"
-windows.release.x86_64 = "res://bin/windows/libSSGodot.windows.template_release.x86_64.dll"
+windows.editor.x86_64 = "windows/libSSGodot.windows.editor.x86_64.dll"
+windows.debug.x86_64 = "windows/libSSGodot.windows.template_debug.x86_64.dll"
+windows.release.x86_64 = "windows/libSSGodot.windows.template_release.x86_64.dll"
-linux.editor.x86_64 = "res://bin/linux/libSSGodot.linux.editor.x86_64.so"
-linux.debug.x86_64 = "res://bin/linux/libSSGodot.linux.template_debug.x86_64.so"
-linux.release.x86_64 = "res://bin/linux/libSSGodot.linux.template_release.x86_64.so"
+android.debug.x86_64 = "android/libSSGodot.android.template_debug.x86_64.so"
+android.release.x86_64 = "android/libSSGodot.android.template_release.x86_64.so"
-linux.editor.arm64 = "res://bin/linux/libSSGodot.linux.editor.arm64.so"
-linux.debug.arm64 = "res://bin/linux/libSSGodot.linux.template_debug.arm64.so"
-linux.release.arm64 = "res://bin/linux/libSSGodot.linux.template_release.arm64.so"
+android.debug.arm32 = "android/libSSGodot.android.template_debug.arm32.so"
+android.release.arm32 = "android/libSSGodot.android.template_release.arm32.so"
-linux.editor.rv64 = "res://bin/linux/libSSGodot.linux.editor.rv64.so"
-linux.debug.rv64 = "res://bin/linux/libSSGodot.linux.template_debug.rv64.so"
-linux.release.rv64 = "res://bin/linux/libSSGodot.linux.template_release.rv64.so"
+android.debug.arm64 = "android/libSSGodot.android.template_debug.arm64.so"
+android.release.arm64 = "android/libSSGodot.android.template_release.arm64.so"
-android.debug.x86_64 = "res://bin/android/libSSGodot.android.template_debug.x86_64.so"
-android.release.x86_64 = "res://bin/android/libSSGodot.android.template_release.x86_64.so"
+web.debug.threads.wasm32 = "web/libSSGodot.web.template_debug.wasm32.wasm"
+web.release.threads.wasm32 = "web/libSSGodot.web.template_release.wasm32.wasm"
-android.debug.arm64 = "res://bin/android/libSSGodot.android.template_debug.arm64.so"
-android.release.arm64 = "res://bin/android/libSSGodot.android.template_release.arm64.so"
-
-web.debug.threads.wasm32 = "res://bin/web/libSSGodot.web.template_debug.wasm32.wasm"
-web.release.threads.wasm32 = "res://bin/web/libSSGodot.web.template_release.wasm32.wasm"
-web.debug.wasm32 = "res://bin/web/libSSGodot.web.template_debug.wasm32.nothreads.wasm"
-web.release.wasm32 = "res://bin/web/libSSGodot.web.template_release.wasm32.nothreads.wasm"
\ No newline at end of file
+web.debug.wasm32 = "web/libSSGodot.web.template_debug.wasm32.nothreads.wasm"
+web.release.wasm32 = "web/libSSGodot.web.template_release.wasm32.nothreads.wasm"
diff --git a/scripts/build-extension.sh b/scripts/build-extension.sh
index 2b4c65e..ddea287 100755
--- a/scripts/build-extension.sh
+++ b/scripts/build-extension.sh
@@ -109,12 +109,7 @@ echo "scons command options: $scons_command_opts"
pushd ${ROOTDIR} > /dev/null
-if [[ "$opts[platform]" = "macos" ]] || [[ "$opts[platform]" = "ios" ]]; then
- BINDIR=./bin/${opts[platform]}/${opts[platform]}.framework
-else
- BINDIR=./bin/${opts[platform]}
-fi
-
+BINDIR=./bin/${opts[platform]}
/bin/mkdir -p ${BINDIR}
alias scons_macro="scons ${scons_command_opts}"
if [[ ${opts[arch]} == "universal" ]]; then
@@ -134,8 +129,9 @@ for arch in $ARCHES; do
# strip ${BINDIR}/libSSGodot.macos.${opts[target]}
# fi
if [[ ${opts[platform]} == "ios" ]] && [[ ${opts[ios_simulator]} == "yes" ]]; then
- echo mv
- mv ${BINDIR}/libSSGodot.${opts[platform]}.${opts[target]} ${BINDIR}/libSSGodot.${opts[platform]}.${opts[target]}.simulator
+ pushd ${BINDIR} > /dev/null
+ mv libSSGodot.${opts[platform]}.${opts[target]}.framework libSSGodot.${opts[platform]}.${opts[target]}.simulator.framework
+ popd > /dev/null
fi
done
diff --git a/scripts/release-gdextension-android.sh b/scripts/release-gdextension-android.sh
index ec3d136..8f934fe 100755
--- a/scripts/release-gdextension-android.sh
+++ b/scripts/release-gdextension-android.sh
@@ -7,7 +7,8 @@ ROOTDIR=${BASEDIR}/..
ROOTDIR=$(cd $ROOTDIR && pwd -P)
pushd ${ROOTDIR} > /dev/null
-
+BINDIR=$(pwd)/bin/android
+/bin/rm -rf ${BINDIR}
targets=("template_release" "template_debug")
for target in ${targets[@]}; do
scripts/build-extension.sh platform=android arch=arm32 strip=yes target=${target}
diff --git a/scripts/release-gdextension-ios.sh b/scripts/release-gdextension-ios.sh
index 6157139..82a110c 100755
--- a/scripts/release-gdextension-ios.sh
+++ b/scripts/release-gdextension-ios.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env zsh
set -e
+set -x
BASEDIR=$(dirname $0)
BASEDIR=$(cd $BASEDIR && pwd -P)
@@ -8,23 +9,26 @@ ROOTDIR=$(cd $ROOTDIR && pwd -P)
pushd ${ROOTDIR} > /dev/null
BINDIR=$(pwd)/bin/ios
+/bin/rm -rf ${BINDIR}
targets=("template_release" "template_debug")
for target in ${targets[@]}; do
- scripts/build-extension.sh platform=ios arch=universal strip=yes target=${target} ios_simulator=yes
+# scripts/build-extension.sh platform=ios arch=universal strip=yes target=${target} ios_simulator=yes
scripts/build-extension.sh platform=ios arch=universal strip=yes target=${target} ios_simulator=no
done
-# create xcframeworks
pushd ${BINDIR}
-for target in ${targets[@]}; do
- rm -rf tmp
- mkdir -p tmp/ios tmp/ios-simulator
- mv $BINDIR/ios.framework/libSSGodot.ios.${target} tmp/ios/libSSGodot.ios.${target}.dylib
- mv $BINDIR/ios.framework/libSSGodot.ios.${target}.simulator tmp/ios-simulator/libSSGodot.ios.${target}.dylib
- xcodebuild -create-xcframework -library tmp/ios/libSSGodot.ios.${target}.dylib -library tmp/ios-simulator/libSSGodot.ios.${target}.dylib -output libSSGodot.ios.${target}.xcframework
-done
-rm -rf tmp
-rm -rf ios.framework
+
+## create xcframeworks
+#for target in ${targets[@]}; do
+# rm -rf tmp
+# mkdir -p tmp/ios tmp/ios-simulator
+# mv $BINDIR/libSSGodot.ios.${target}.framework tmp/ios/libSSGodot.ios.${target}.framework
+# mv $BINDIR/libSSGodot.ios.${target}.simulator.framework tmp/ios-simulator/libSSGodot.ios.${target}.framework
+# xcodebuild -create-xcframework -framework tmp/ios/libSSGodot.ios.${target}.framework -framework tmp/ios-simulator/libSSGodot.ios.${target}.framework -output libSSGodot.ios.${target}.xcframework
+#done
+#/bin/rm -rf tmp
+
+/bin/rm -rf ios.framework
popd > /dev/null # ${BINDIR}
popd > /dev/null # ${ROOTDIR}
diff --git a/scripts/release-gdextension-macos.sh b/scripts/release-gdextension-macos.sh
index 4201df3..456dac1 100755
--- a/scripts/release-gdextension-macos.sh
+++ b/scripts/release-gdextension-macos.sh
@@ -7,10 +7,12 @@ ROOTDIR=${BASEDIR}/..
ROOTDIR=$(cd $ROOTDIR && pwd -P)
pushd ${ROOTDIR} > /dev/null
-
+BINDIR=$(pwd)/bin/macos
+/bin/rm -rf ${BINDIR}
targets=("editor" "template_release" "template_debug")
for target in ${targets[@]}; do
scripts/build-extension.sh platform=macos arch=universal strip=yes target=${target}
done
+/bin/rm -rf bin/macos/macos.framework
popd > /dev/null # ${ROOTDIR}
diff --git a/scripts/release-gdextension-web.sh b/scripts/release-gdextension-web.sh
index 692f805..ae5aacb 100755
--- a/scripts/release-gdextension-web.sh
+++ b/scripts/release-gdextension-web.sh
@@ -7,11 +7,12 @@ ROOTDIR=${BASEDIR}/..
ROOTDIR=$(cd $ROOTDIR && pwd -P)
pushd ${ROOTDIR} > /dev/null
-
+BINDIR=$(pwd)/bin/web
+/bin/rm -rf ${BINDIR}
targets=("template_release" "template_debug")
for target in ${targets[@]}; do
scripts/build-extension.sh platform=web arch=wasm32 strip=yes target=${target}
- # scripts/build-extension.sh platform=web arch=wasm32 strip=yes target=${target} threads=no
+ scripts/build-extension.sh platform=web arch=wasm32 strip=yes target=${target} threads=no
done
popd > /dev/null # ${ROOTDIR}