From 754d1f1d37e1f2e39c63621caff6958169d7a645 Mon Sep 17 00:00:00 2001 From: jonghwan Date: Tue, 25 Jul 2023 13:18:00 +0900 Subject: [PATCH] Problem: multiple library for mac (fix #332) update lib, header only one build for mac changelog change location fix remove 5_0 remove --- .github/workflows/release.yml | 44 +++---------------- CHANGELOG.md | 4 ++ CronosPlayUnreal.uplugin | 2 +- Makefile | 2 +- .../defi-wallet-core-cpp/src/contract.rs.cc | 3 +- .../defi-wallet-core-cpp/src/contract.rs.h | 3 +- .../Include/defi-wallet-core-cpp/src/core.cc | 3 +- .../defi-wallet-core-cpp/src/ethereum.rs.cc | 3 +- .../defi-wallet-core-cpp/src/ethereum.rs.h | 3 +- .../Include/defi-wallet-core-cpp/src/lib.rs.h | 3 +- .../defi-wallet-core-cpp/src/nft.rs.cc | 3 +- .../Include/defi-wallet-core-cpp/src/nft.rs.h | 3 +- .../defi-wallet-core-cpp/src/uint.rs.cc | 3 +- .../defi-wallet-core-cpp/src/uint.rs.h | 3 +- .../Include/extra-cpp-bindings/src/lib.rs.cc | 3 +- .../Include/extra-cpp-bindings/src/lib.rs.h | 3 +- .../PlayCppSdkLibrary/Include/rust/cxx.h | 3 +- .../PlayCppSdkLibrary.Build.cs | 11 +---- 18 files changed, 40 insertions(+), 62 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a61a5718..0e738483 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,8 +24,9 @@ jobs: - name: Prepare PlayCppSdk run: | - mv ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs + mv ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs TARGET=4.27 make + rm -Rf ./Source/ThirdParty/PlayCppSdkLibrary/Lib/Mac/arm64 python change_version.py 4.27.0 @@ -49,41 +50,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - Unreal_Release_5_0: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - submodules: recursive - - - name: Prepare PlayCppSdk - run: | - mv ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs - TARGET=5.0 make - python change_version.py 5.0.0 - - - - name: Package For Windows,Mac - run: | - FILENAME="CronosPlayForUnrealEngine5.0.zip" - zip -r ${FILENAME} Source Resources CronosPlayUnreal.uplugin - sha256sum ${FILENAME} > "checksums.txt" - echo "release_file=${FILENAME}" >> $GITHUB_ENV - echo "checksum_file=checksums.txt" >> $GITHUB_ENV - - - - name: Upload binaries and bindings to Release - uses: softprops/action-gh-release@v1 - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - with: - draft: true - files: | - ${{ env.release_file }} - ${{ env.checksum_file }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - Unreal_Release_5_1: runs-on: ubuntu-latest steps: @@ -94,8 +60,9 @@ jobs: - name: Prepare PlayCppSdk run: | - mv ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs + mv ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs TARGET=5.1 make + rm -Rf ./Source/ThirdParty/PlayCppSdkLibrary/Lib/Mac/arm64 python change_version.py 5.1.0 @@ -129,8 +96,9 @@ jobs: - name: Prepare PlayCppSdk run: | - rm ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy + rm ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy TARGET=5.2 make + rm -Rf ./Source/ThirdParty/PlayCppSdkLibrary/Lib/Mac/x86_64 python change_version.py 5.2.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 35943ea3..427126d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +## [v0.0.14-alpha] - 2023-7-26 +- only one build for mac +- fix Array bug in abi json + ## [v0.0.13-alpha] - 2023-6-15 - Support apple arm64 - Support Unreal Engine 5.2.0 diff --git a/CronosPlayUnreal.uplugin b/CronosPlayUnreal.uplugin index 0d24eb59..aec91319 100644 --- a/CronosPlayUnreal.uplugin +++ b/CronosPlayUnreal.uplugin @@ -2,7 +2,7 @@ "FileVersion": 3, "FriendlyName": "Cronos Play for Unreal Engine", "Version": 1, - "VersionName": "v0.0.13-alpha", + "VersionName": "v0.0.14-alpha", "EngineVersion": "5.2.0", "Description": "Cronos labs", "Category": "Programming", diff --git a/Makefile b/Makefile index 3703255d..d851f55a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ UNAME := $(shell uname) PWD = $(shell pwd) # Set the play cpp sdk version -PLAYCPPSDK=v0.0.21-alpha +PLAYCPPSDK=v0.0.22-alpha # Set the play-cpp-sdk cache path PLAYCPPSDK_CACHE_DIR=./install/$(PLAYCPPSDK) # Set the play-cpp-sdk target path diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/contract.rs.cc b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/contract.rs.cc index f96b90f7..f086ce03 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/contract.rs.cc +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/contract.rs.cc @@ -325,7 +325,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/contract.rs.h b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/contract.rs.h index 3614f8d3..f736a4f6 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/contract.rs.h +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/contract.rs.h @@ -325,7 +325,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/core.cc b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/core.cc index 9d68f99a..c871c6f3 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/core.cc +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/core.cc @@ -369,7 +369,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/ethereum.rs.cc b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/ethereum.rs.cc index f6156d30..403ca743 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/ethereum.rs.cc +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/ethereum.rs.cc @@ -369,7 +369,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/ethereum.rs.h b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/ethereum.rs.h index 750b9cd6..0895fd29 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/ethereum.rs.h +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/ethereum.rs.h @@ -369,7 +369,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/lib.rs.h b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/lib.rs.h index 907e64b8..b021bec9 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/lib.rs.h +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/lib.rs.h @@ -369,7 +369,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/nft.rs.cc b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/nft.rs.cc index 00267d3f..dbc69d19 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/nft.rs.cc +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/nft.rs.cc @@ -323,7 +323,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/nft.rs.h b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/nft.rs.h index 6a017022..bddc9b81 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/nft.rs.h +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/nft.rs.h @@ -323,7 +323,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/uint.rs.cc b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/uint.rs.cc index a580e2c8..5ae4917c 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/uint.rs.cc +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/uint.rs.cc @@ -323,7 +323,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/uint.rs.h b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/uint.rs.h index edca884e..e4d5f34b 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/uint.rs.h +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/defi-wallet-core-cpp/src/uint.rs.h @@ -323,7 +323,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/extra-cpp-bindings/src/lib.rs.cc b/Source/ThirdParty/PlayCppSdkLibrary/Include/extra-cpp-bindings/src/lib.rs.cc index 2a3ca59a..79ab1f35 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/extra-cpp-bindings/src/lib.rs.cc +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/extra-cpp-bindings/src/lib.rs.cc @@ -372,7 +372,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/extra-cpp-bindings/src/lib.rs.h b/Source/ThirdParty/PlayCppSdkLibrary/Include/extra-cpp-bindings/src/lib.rs.h index 4e5ff0c7..89451d96 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/extra-cpp-bindings/src/lib.rs.h +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/extra-cpp-bindings/src/lib.rs.h @@ -372,7 +372,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/Include/rust/cxx.h b/Source/ThirdParty/PlayCppSdkLibrary/Include/rust/cxx.h index 9da2c332..1af8a6ea 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/Include/rust/cxx.h +++ b/Source/ThirdParty/PlayCppSdkLibrary/Include/rust/cxx.h @@ -629,7 +629,8 @@ typename Slice::iterator::difference_type Slice::iterator::operator-(const iterator &other) const noexcept { auto diff = std::distance(static_cast(other.pos), static_cast(this->pos)); - return diff / this->stride; + return diff / static_cast::iterator::difference_type>( + this->stride); } template diff --git a/Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs b/Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs index e11c7862..763264db 100644 --- a/Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs +++ b/Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs @@ -40,15 +40,8 @@ public PlayCppSdkLibrary(ReadOnlyTargetRules Target) : base(Target) { PublicAdditionalLibraries.Add("ws2_32.lib"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { - if (Target.Architecture == UnrealArch.X64) - PublicAdditionalLibraries.Add(Path.Combine( - LibrariesPath, "Mac/x86_64", "libplay_cpp_sdk.a")); - else if (Target.Architecture == UnrealArch.Arm64) - PublicAdditionalLibraries.Add(Path.Combine( - LibrariesPath, "Mac/arm64", "libplay_cpp_sdk.a")); - else { - throw new System.Exception("Unsupported architecture"); - } + PublicAdditionalLibraries.Add( + Path.Combine(LibrariesPath, "Mac/arm64", "libplay_cpp_sdk.a")); } else if (Target.Platform == UnrealTargetPlatform.Linux) { PublicAdditionalLibraries.Add( Path.Combine(LibrariesPath, "Linux", "libplay_cpp_sdk.a"));