Skip to content

Commit

Permalink
Runtime ios switch to rive-runtime from rive-cpp
Browse files Browse the repository at this point in the history
This is part 1 of the update to switch downstream rive-android to use submodule rive-runtime instead of rive-cpp

After this is merged, another PR in the downstream repo must be made to change the .gitmodules and also move submodules/rive-cpp to submodule/rive-runtime

Diffs=
345e07ecf Runtime ios switch to rive-runtime from rive-cpp (#8024)

Co-authored-by: rivessamr <[email protected]>
  • Loading branch information
rivessamr and rivessamr committed Sep 4, 2024
1 parent db6798b commit e655573
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/submodule_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Run cpp version check
- name: Run runtime version check
uses: rive-app/github-actions-submodule-check@v8
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SUBMODULE_GIT_URL: https://github.com/rive-app/rive-cpp.git
SUBMODULE_MAIN_BRANCH: main
SUBMODULE_GIT_URL: https://github.com/rive-app/rive-runtime.git
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f25ee97a05aaa30a58b13451c8020c4e1c095bed
345e07ecfcf88d351220cefb0296aa31a98e2616
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Check out this repository, making sure to include the submodules. It is importan

`git clone --recurse-submodules [email protected]:rive-app/rive-ios.git`

The package relies on [Skia](https://skia.org/), as well as [rive-cpp](https://github.com/rive-app/rive-cpp) in order to be built. To shorten the build cycle, we rely on compiled libraries for skia, rive & rive-skia-renderer.
The `./scripts/build.sh all` script will download or build appropriate libraries, be sure to run configure when making changes to our rive-cpp submodule.
The package relies on [Skia](https://skia.org/), as well as [rive-runtime](https://github.com/rive-app/rive-runtime) in order to be built. To shorten the build cycle, we rely on compiled libraries for skia, rive & rive-skia-renderer.
The `./scripts/build.sh all` script will download or build appropriate libraries, be sure to run configure when making changes to our rive-runtime submodule.

Rive is constantly making use of the latest clang features, so please ensure your Xcode and Xcode Command Line Tools are up to date with the latest versions.

Expand All @@ -32,10 +32,10 @@ Note: on a Mac with brew, you can simply run 'brew install awscli'

Note: the 'dependencies' directory is just a cache of what the configure.sh script downloads. It can be removed if you suspect it is out of date, and then just rerun the script (./scripts/configure.sh)

### Changing rive-cpp/skia
### Changing rive-runtime/skia

Changes within the rive-ios should just be reflected when you make builds.
If you make changes within the `rive-cpp` submodule you will need to compile the prebuilt libraries, this can take a reasonably long time, but as long as you are working on rive-cpp with no uncommitted changes, it will fall back to using the cache, so you will only need to build once.
If you make changes within the `rive-runtime` submodule you will need to compile the prebuilt libraries, this can take a reasonably long time, but as long as you are working on rive-runtime with no uncommitted changes, it will fall back to using the cache, so you will only need to build once.

### Testing changes

Expand Down
2 changes: 1 addition & 1 deletion Source/RiveModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Combine
riveFile = RiveFile(httpUrl: webURL, loadCdn:loadCdn, with: delegate)!
}

// rive-cpp defaults the volume to 1.0f
// rive-runtime defaults the volume to 1.0f
// This value is used if there is no artboard,
// and will be used to set the volume once a model is configured (with an artboard)
private var _volume: Float = 1
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.rive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -ex
path=$(readlink -f "${BASH_SOURCE:-$0}")
DEV_SCRIPT_DIR=$(dirname $path)

if [ -d "$DEV_SCRIPT_DIR/../submodules/rive-cpp" ]; then
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../submodules/rive-cpp"
if [ -d "$DEV_SCRIPT_DIR/../submodules/rive-runtime" ]; then
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../submodules/rive-runtime"
else
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../../runtime"
fi
Expand Down
6 changes: 3 additions & 3 deletions scripts/build.skia.macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export SKIA_DIR_NAME="skia"
# we can have multiple at the same time...
export ARCHIVE_CONTENTS_NAME="archive_contents_macos_$ARCH_NAME"

if [ -d "$DEV_SCRIPT_DIR/../submodules/rive-cpp" ];
if [ -d "$DEV_SCRIPT_DIR/../submodules/rive-runtime" ];
then
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../submodules/rive-cpp"
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../submodules/rive-runtime"
else
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../../runtime"
fi

# Build skia
pushd "$RIVE_RUNTIME_DIR"/skia/dependencies
./make_skia_macos.sh $ARCH_NAME
popd
popd
6 changes: 3 additions & 3 deletions scripts/build.skia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ export SKIA_DIR_NAME="skia"
# we can have multiple at the same time...
export ARCHIVE_CONTENTS_NAME="archive_contents_ios_$ARCH_NAME"

if [ -d "$DEV_SCRIPT_DIR/../submodules/rive-cpp" ];
if [ -d "$DEV_SCRIPT_DIR/../submodules/rive-runtime" ];
then
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../submodules/rive-cpp"
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../submodules/rive-runtime"
else
export RIVE_RUNTIME_DIR="$DEV_SCRIPT_DIR/../../runtime"
fi

# Build skia
pushd "$RIVE_RUNTIME_DIR"/skia/dependencies
./make_skia_ios.sh $ARCH_NAME
popd
popd

0 comments on commit e655573

Please sign in to comment.