Skip to content

Commit 13757f5

Browse files
committed
Rename the project to ScratchCPP Render
1 parent 97febd6 commit 13757f5

35 files changed

+52
-48
lines changed

CMakeLists.txt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.14)
22

3-
project(scratchcpp-gui VERSION 1.0.0 LANGUAGES CXX)
3+
project(scratchcpp-render VERSION 1.0.0 LANGUAGES CXX)
44

55
set(CMAKE_INCLUDE_CURRENT_DIR ON)
66
set(CMAKE_AUTOUIC ON)
@@ -9,27 +9,25 @@ set(CMAKE_AUTORCC ON)
99
set(CMAKE_CXX_STANDARD 17)
1010
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1111

12-
option(SCRATCHCPPGUI_BUILD_UNIT_TESTS "Build unit tests" ON)
12+
option(SCRATCHCPPRENDER_BUILD_UNIT_TESTS "Build unit tests" ON)
1313

1414
include(build/FindQt.cmake)
1515

1616
qt_standard_project_setup(REQUIRES 6.6)
17-
add_subdirectory(ScratchCPPGui)
17+
add_subdirectory(src)
1818

19-
set(QML_IMPORT_PATH "${QML_IMPORT_PATH};${PROJECT_SOURCE_DIR}/src/qml" PARENT_SCOPE)
19+
target_compile_definitions(scratchcpp-render PRIVATE SCRATCHCPPRENDER_LIBRARY)
2020

21-
target_compile_definitions(libscratchcpp-gui PRIVATE SCRATCHCPPGUI_LIBRARY)
22-
23-
linkQt(libscratchcpp-gui)
21+
linkQt(scratchcpp-render)
2422

2523
include(build/SetUpLibscratchcpp.cmake)
26-
target_link_libraries(libscratchcpp-gui PRIVATE scratchcpp)
24+
target_link_libraries(scratchcpp-render PRIVATE scratchcpp)
2725

2826
add_subdirectory(thirdparty/libqnanopainter)
29-
target_include_directories(libscratchcpp-gui PRIVATE thirdparty/libqnanopainter)
30-
target_link_libraries(libscratchcpp-gui PRIVATE qnanopainter)
27+
target_include_directories(scratchcpp-render PRIVATE thirdparty/libqnanopainter)
28+
target_link_libraries(scratchcpp-render PRIVATE qnanopainter)
3129

32-
if (SCRATCHCPPGUI_BUILD_UNIT_TESTS)
30+
if (SCRATCHCPPRENDER_BUILD_UNIT_TESTS)
3331
enable_testing()
3432
add_subdirectory(test)
3533
endif()

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@
2020
<!-- PROJECT LOGO -->
2121
<br />
2222
<div align="center">
23-
<!-- TODO: Add logo: <a href="https://github.com/scratchcpp/scratchcpp-gui">
23+
<!-- TODO: Add logo: <a href="https://github.com/scratchcpp/scratchcpp-render">
2424
<img src="images/logo.png" alt="Logo" width="80" height="80">
2525
</a> -->
2626

27-
<h3 align="center">ScratchCPP GUI</h3>
27+
<h3 align="center">ScratchCPP Render</h3>
2828

2929
<p align="center">
3030
A Qt-based library which uses libscratchcpp and QNanoPainter to render running Scratch projects.
3131
<br />
32-
<!-- TODO: Add link to documentation: <a href="https://github.com/scratchcpp/scratchcpp-gui"><strong>Explore the docs »</strong></a>
32+
<!-- TODO: Add link to documentation: <a href="https://github.com/scratchcpp/scratchcpp-render"><strong>Explore the docs »</strong></a>
3333
<br /> -->
3434
<br />
35-
<a href="https://github.com/scratchcpp/scratchcpp-gui/issues">Report Bug</a>
35+
<a href="https://github.com/scratchcpp/scratchcpp-render/issues">Report Bug</a>
3636
·
37-
<a href="https://github.com/scratchcpp/scratchcpp-gui/issues">Request Feature</a>
37+
<a href="https://github.com/scratchcpp/scratchcpp-render/issues">Request Feature</a>
3838
</p>
3939
</div>
4040

@@ -62,7 +62,7 @@
6262
<!-- ABOUT THE PROJECT -->
6363
## About The Project
6464

65-
**scratchcpp-gui** is a library which provides a set of Qt Quick components that can be used to run Scratch projects.
65+
**scratchcpp-render** is a library which provides a set of Qt Quick components that can be used to run and render Scratch projects.
6666

6767
It uses **QNanoPainter** on top of Qt for hardware accelerated rendering
6868
and **libscratchcpp** to read, run and maintain the state of Scratch projects.
@@ -88,10 +88,10 @@ We're working on the documentation, it'll be available soon.
8888

8989
<!-- USAGE EXAMPLES -->
9090
## Usage
91-
The most common way to get started is to use the `ProjectPlayer` component.
91+
Get started by using the `ProjectPlayer` component.
9292
```qml
9393
import QtQuick
94-
import ScratchCPPGui
94+
import ScratchCPP.Render
9595
9696
Window {
9797
width: 480
@@ -140,7 +140,7 @@ Button {
140140
- [ ] Speech and thought bubbles
141141
- [ ] Question text box ("ask and wait" block)
142142

143-
See the [open issues](https://github.com/scratchcpp/scratchcpp-gui/issues) for a full list of proposed features (and known issues).
143+
See the [open issues](https://github.com/scratchcpp/scratchcpp-render/issues) for a full list of proposed features (and known issues).
144144

145145
<p align="right">(<a href="#readme-top">back to top</a>)</p>
146146

@@ -176,13 +176,13 @@ Distributed under the GNU Lesser General Public License. See [LICENSE](LICENSE)
176176

177177
<!-- MARKDOWN LINKS & IMAGES -->
178178
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
179-
[contributors-shield]: https://img.shields.io/github/contributors/scratchcpp/scratchcpp-gui.svg?style=for-the-badge
180-
[contributors-url]: https://github.com/scratchcpp/scratchcpp-gui/graphs/contributors
181-
[forks-shield]: https://img.shields.io/github/forks/scratchcpp/scratchcpp-gui.svg?style=for-the-badge
182-
[forks-url]: https://github.com/scratchcpp/scratchcpp-gui/network/members
183-
[stars-shield]: https://img.shields.io/github/stars/scratchcpp/scratchcpp-gui.svg?style=for-the-badge
184-
[stars-url]: https://github.com/scratchcpp/scratchcpp-gui/stargazers
185-
[issues-shield]: https://img.shields.io/github/issues/scratchcpp/scratchcpp-gui.svg?style=for-the-badge
186-
[issues-url]: https://github.com/scratchcpp/scratchcpp-gui/issues
187-
[license-shield]: https://img.shields.io/github/license/scratchcpp/scratchcpp-gui.svg?style=for-the-badge
188-
[license-url]: https://github.com/scratchcpp/scratchcpp-gui/blob/master/LICENSE
179+
[contributors-shield]: https://img.shields.io/github/contributors/scratchcpp/scratchcpp-render.svg?style=for-the-badge
180+
[contributors-url]: https://github.com/scratchcpp/scratchcpp-render/graphs/contributors
181+
[forks-shield]: https://img.shields.io/github/forks/scratchcpp/scratchcpp-render.svg?style=for-the-badge
182+
[forks-url]: https://github.com/scratchcpp/scratchcpp-render/network/members
183+
[stars-shield]: https://img.shields.io/github/stars/scratchcpp/scratchcpp-render.svg?style=for-the-badge
184+
[stars-url]: https://github.com/scratchcpp/scratchcpp-render/stargazers
185+
[issues-shield]: https://img.shields.io/github/issues/scratchcpp/scratchcpp-render.svg?style=for-the-badge
186+
[issues-url]: https://github.com/scratchcpp/scratchcpp-render/issues
187+
[license-shield]: https://img.shields.io/github/license/scratchcpp/scratchcpp-render.svg?style=for-the-badge
188+
[license-url]: https://github.com/scratchcpp/scratchcpp-render/blob/master/LICENSE

build/FindQt.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
find_package(Qt6 6.6 COMPONENTS Gui Qml Quick Svg REQUIRED)
22
set(QT_LIBS Qt6::Gui Qt6::Qml Qt6::Quick Qt6::Svg)
33

4-
if (SCRATCHCPPGUI_BUILD_UNIT_TESTS)
4+
if (SCRATCHCPPRENDER_BUILD_UNIT_TESTS)
55
find_package(Qt6 6.6 COMPONENTS Test REQUIRED)
66
endif()
77

build/SetUpLibscratchcpp.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(LIBSCRATCHCPP_BUILD_UNIT_TESTS OFF)
22
add_subdirectory(${PROJECT_SOURCE_DIR}/libscratchcpp libscratchcpp)
3-
target_include_directories(libscratchcpp-gui PUBLIC ${PROJECT_SOURCE_DIR}/libscratchcpp/include)
3+
target_include_directories(scratchcpp-render PUBLIC ${PROJECT_SOURCE_DIR}/libscratchcpp/include)
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
qt_add_library(libscratchcpp-gui STATIC)
1+
qt_add_library(scratchcpp-render STATIC)
22

3-
set_target_properties(libscratchcpp-gui PROPERTIES AUTOMOC ON)
3+
set_target_properties(scratchcpp-render PROPERTIES AUTOMOC ON)
44

5-
qt_add_qml_module(libscratchcpp-gui
6-
URI ScratchCPPGui
5+
qt_add_qml_module(scratchcpp-render
6+
URI ScratchCPP.Render
77
VERSION 1.0
8+
NO_PLUGIN
9+
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ScratchCPP/Render
810
QML_FILES
911
ProjectPlayer.qml
1012
SOURCES
@@ -29,3 +31,7 @@ qt_add_qml_module(libscratchcpp-gui
2931
keyeventhandler.cpp
3032
keyeventhandler.h
3133
)
34+
35+
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
36+
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
37+
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "" FORCE)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import QtQuick
44
import QtQuick.Layouts
55
import QtQuick.Controls
6-
import ScratchCPPGui
6+
import ScratchCPP.Render
77

88
ProjectScene {
99
property string fileName
File renamed without changes.

0 commit comments

Comments
 (0)