Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 3rdParty/rive/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ extract_zip("${RIVE_CPP_DOWNLOAD_DIR}/rive-cpp.zip" "${RIVE_CPP_SOURCE_DIR}" "${
file(GLOB RIVE_CPP_SOURCE_DIR_SUBDIRS LIST_DIRECTORIES true "${RIVE_CPP_SOURCE_DIR}/*")
list(GET RIVE_CPP_SOURCE_DIR_SUBDIRS 0 RIVE_CPP_SOURCE_DIR)

set(HARFBUZZ_DOWNLOAD_URL "https://codeload.github.com/harfbuzz/harfbuzz/zip/858570b1d9912a1b746ab39fbe62a646c4f7a5b1")
set(HARFBUZZ_DOWNLOAD_URL "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/8.2.2.zip")
set(HARFBUZZ_DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/harfbuzz-src-download")
set(HARFBUZZ_SOURCE_DIR "${RIVE_CPP_SOURCE_DIR}/harfbuzz/")
set(HARFBUZZ_CPP_TARGET_DIR "zip")

file(DOWNLOAD ${HARFBUZZ_DOWNLOAD_URL} "${HARFBUZZ_DOWNLOAD_DIR}/harfbuzz.zip" SHOW_PROGRESS)
extract_zip("${HARFBUZZ_DOWNLOAD_DIR}/harfbuzz.zip" "${HARFBUZZ_SOURCE_DIR}" "${HARFBUZZ_CPP_TARGET_DIR}")

set(SHEENBIDI_DOWNLOAD_URL "https://codeload.github.com/Tehreer/SheenBidi/zip/refs/tags/v2.6")
set(SHEENBIDI_DOWNLOAD_URL "https://github.com/Tehreer/SheenBidi/archive/refs/tags/v2.6.zip")
set(SHEENBIDI_DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/sheenbidi-src-download")
set(SHEENBIDI_SOURCE_DIR "${RIVE_CPP_SOURCE_DIR}/sheenbidi")
set(SHEENBIDI_CPP_TARGET_DIR "zip")
Expand Down
115 changes: 115 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# **Build Configuration**

---

## **Windows**

### **Building**

You can create your own batch files like `build.bat` file in the root of the project with these codes:

```bat
@REM SPDX-FileCopyrightText: 2023 Jeremias Bosch <jeremias.bosch@basyskom.com>
@REM SPDX-FileCopyrightText: 2023 Jonas Kalinka <jonas.kalinka@basyskom.com>
@REM SPDX-FileCopyrightText: 2023 basysKom GmbH
@REM SPDX-FileCopyrightText: 2023 Reza Aarabi <madoodia@gmail.com>

@REM SPDX-License-Identifier: LGPL-3.0-or-later
@REM --------------------------------------------------------------------------

@REM Getting the Root Directory When this file will be run
set ROOT=%~dp0


@REM VCVARS_LOCATION: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build
@REM If you have installed other versions of Visual Studio Build Tools like 2019 you can set its path to this Environment Variable
echo %VCVARS_LOCATION%

@REM Setting vcvars_ver flag is important
@REM Visual Studio 2019 Compiler
@REM call "%VCVARS_LOCATION%/vcvarsall.bat" x64 -vcvars_ver=14.29.30133

@REM Visual Studio 2022 Compiler
call "%VCVARS_LOCATION%/vcvarsall.bat" x64 -vcvars_ver=14.36.32532



cd %ROOT%

if not exist "build" (
mkdir "build"
)


@REM REM Qt5_DIR
@REM set Qt5_DIR=%SDKS_LOCATION%/Qt5/lib/cmake
@REM set PATH=%PATH%;%SDKS_LOCATION%/Qt5/bin

REM Qt6_DIR
set Qt6_DIR=%SDKS_LOCATION%/Qt6/lib/cmake
set PATH=%PATH%;%SDKS_LOCATION%/Qt6/bin

cd "%ROOT%/build"

@REM cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH=%Qt6_DIR% -DCMAKE_CXX_FLAGS="/bigobj" "%ROOT%"
cmake -G "NMake Makefiles" -DCMAKE_PREFIX_PATH=%Qt6_DIR% -DCMAKE_CXX_FLAGS="/bigobj" "%ROOT%"
@REM cmake --build . --config Debug
cmake --build . --config Release

```

### **Running**

You can create your own batch files like `run.bat` file in the root of the project with these codes:

```bat
@REM SPDX-FileCopyrightText: 2023 Jeremias Bosch <jeremias.bosch@basyskom.com>
@REM SPDX-FileCopyrightText: 2023 Jonas Kalinka <jonas.kalinka@basyskom.com>
@REM SPDX-FileCopyrightText: 2023 basysKom GmbH
@REM SPDX-FileCopyrightText: 2023 Reza Aarabi <madoodia@gmail.com>

@REM SPDX-License-Identifier: LGPL-3.0-or-later
@REM --------------------------------------------------------------------------

@REM Getting the Root Directory When this file will be run
set ROOT=%~dp0

@REM set PATH=%PATH%;%SDKS_LOCATION%/Qt5/bin
set PATH=%PATH%;%SDKS_LOCATION%/Qt6/bin

set QML2_IMPORT_PATH=%ROOT%\build\binary

CALL %ROOT%\build\binary\examples\RiveQtQuickPlugin\RiveQtQuickSimpleViewer.exe

```

### **Deployment**

If you want to make a package of the tool and ship it, you can create your own `deploy.bat` file in the root of the project with these codes:

```bat
@REM SPDX-FileCopyrightText: 2023 Jeremias Bosch <jeremias.bosch@basyskom.com>
@REM SPDX-FileCopyrightText: 2023 Jonas Kalinka <jonas.kalinka@basyskom.com>
@REM SPDX-FileCopyrightText: 2023 basysKom GmbH
@REM SPDX-FileCopyrightText: 2023 Reza Aarabi <madoodia@gmail.com>

@REM SPDX-License-Identifier: LGPL-3.0-or-later
@REM --------------------------------------------------------------------------

@REM Getting the Root Directory When this file will be run
set ROOT=%~dp0

cd %ROOT%
if not exist "deploy" (
mkdir "deploy"
)


copy %ROOT%\build\binary\examples\RiveQtQuickPlugin\RiveQtQuickSimpleViewer.exe "%ROOT%\deploy"

CALL %SDKS_LOCATION%\Qt6\bin\windeployqt.exe %ROOT%\deploy\RiveQtQuickSimpleViewer.exe --no-translations

```
And copy `RiveQtQuickPlugin.dll` to deploy directory from `build\binary\RiveQtQuickPlugin\RiveQtQuickPlugin.dll`

Please read the [README.md](https://github.com/madoodia/RiveQtQuickPlugin/blob/main/README.md) file.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ if(NOT WIN32)
add_compile_options(-gdwarf-4)
endif()


# setting /MD for the project
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")

# Add rive-cpp dependency if required
if(${RQQRP_DOWNLOAD_BUILD_DEPENDENCIES})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/rive/cmake)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ cmake -DCMAKE_PREFIX_PATH=~/.Qt/6.5.1/gcc_64 -S .. -B .
make
```

For more info, take a look at [BUILDING.md](https://github.com/madoodia/RiveQtQuickPlugin/blob/main/BUILDING.md).


## Usage

Here's a short example of how to use the RiveQtQuickItem in your QML code:
Expand Down