Skip to content

Commit

Permalink
Problem: multiple library for mac (fix #332)
Browse files Browse the repository at this point in the history
update lib, header

only one build for mac

changelog

change location

fix
  • Loading branch information
leejw51crypto committed Jul 26, 2023
1 parent a43fab1 commit bd813ea
Show file tree
Hide file tree
Showing 18 changed files with 40 additions and 28 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -59,7 +60,7 @@ 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.0 make
python change_version.py 5.0.0
Expand Down Expand Up @@ -94,8 +95,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
Expand Down Expand Up @@ -129,7 +131,7 @@ 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
python change_version.py 5.2.0
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CronosPlayUnreal.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
3 changes: 2 additions & 1 deletion Source/ThirdParty/PlayCppSdkLibrary/Include/rust/cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down
11 changes: 2 additions & 9 deletions Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit bd813ea

Please sign in to comment.