|
1 |
| -# Original README as follows: |
2 |
| - |
3 |
| -<p align="center"> |
4 |
| - <img src="logo.png" height="150" /> |
5 |
| -</p> |
6 |
| -<p align="center"> |
7 |
| - A Qt-based Live2d widget |
8 |
| -</p> |
9 |
| -<p align="center"> |
10 |
| - <a href="https://github.com/duanxianpi/QtLive2d/blob/main/LICENSE.md"> |
11 |
| - <img alt="GitHub" src="https://img.shields.io/github/license/duanxianpi/QtLive2d?label=License"> |
12 |
| - </a> |
13 |
| - <a href="https://github.com/duanxianpi/QtLive2d"> |
14 |
| - <img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/duanxianpi/QtLive2d"/> |
15 |
| - </a> |
16 |
| - <a href="https://github.com/duanxianpi/QtLive2d/releases"> |
17 |
| - <img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/duanxianpi/QtLive2d?include_prereleases&sort=semver"> |
18 |
| - </a> |
19 |
| - <a href="https://github.com/duanxianpi"> |
20 |
| - <img alt="GitHub user" src="https://img.shields.io/badge/author-duanxianpi-brightgreen"/> |
21 |
| - </a> |
22 |
| -</p> |
23 |
| - |
24 |
| -## Introduction |
25 |
| -QtLive2d is a Qt-based Live2d widget, it is modified from the [official Live2d Sample](https://github.com/Live2D/CubismNativeSamples). Unlike the official examples, QtLive2d uses QOpenGLWidget and QOpenGLFunctions provided by Qt instead of glfw and glew. This makes it easy to combine with any Qt Gui software. |
26 |
| - |
27 |
| -**Thanks [@6ziv](https://github.com/6ziv) for your blogs and projects. They have helped me a lot on this project** |
28 |
| -## Feature |
29 |
| -* Easy to use |
30 |
| -* Using OpenGL instead of WebGL |
31 |
| -* Less resource consumption |
32 |
| -* Support Live2d mouse events |
33 |
| -* Support transparent background |
34 |
| -* CrossPlatform (Qt is CrossPlatform, haven't test on other platform yet) |
35 |
| - |
36 |
| -## Sample |
37 |
| -We provide a sample application called Sample to show you how to use it. |
38 |
| -[](https://imgtu.com/i/HUSmi4) |
39 |
| - |
40 |
| -## Build |
41 |
| -### Dependency |
42 |
| -* Live2DCubismCore.lib |
43 |
| -* Framework.lib |
44 |
| -* OpenGL32 |
45 |
| -* User32 |
46 |
| -* Glu32 |
47 |
| - |
48 |
| -### Usage |
49 |
| -1. **Please use MSVC 2017 or 2019! and std C++ 17** |
50 |
| -1. To use QtLive2d in your program, you need to add Floder QtLive2d, Framework, thirdParty and Core into you project. |
51 |
| -2. Add includepath and dependpath in `pro` file |
52 |
| - ```pro |
53 |
| - INCLUDEPATH += $$PWD/Core/include |
54 |
| - INCLUDEPATH += $$PWD/Framework/src |
55 |
| - INCLUDEPATH += $$PWD/thirdParty/stb |
56 |
| - DEPENDPATH += $$PWD/../dll |
57 |
| - ``` |
58 |
| -3. Define flags in `pro` file |
59 |
| - ```pro |
60 |
| - DEFINES += WIN32 |
61 |
| - DEFINES += _WINDOWS |
62 |
| - DEFINES += CSM_TARGET_WIN_GL |
63 |
| - ``` |
64 |
| -5. Compiling Framework and add Framework.lib into `pro` file. |
65 |
| -6. Add other libs into `pro` file. |
66 |
| - ```pro |
67 |
| - CONFIG += debug_and_release |
68 |
| - CONFIG(debug, debug|release){ |
69 |
| - message(Debug build) |
70 |
| - LIBS += -L$$PWD/lib/ -lLive2DCubismCore_MDd |
71 |
| - LIBS += -L$$PWD/lib/ -lFrameworkd |
72 |
| - |
73 |
| - } |
74 |
| - |
75 |
| - CONFIG(release, debug|release){ |
76 |
| - message(Release build) |
77 |
| - LIBS += -L$$PWD/lib/ -lLive2DCubismCore_MD |
78 |
| - LIBS += -L$$PWD/lib/ -lFramework |
79 |
| - |
80 |
| - } |
81 |
| - LIBS += -lOpenGL32 |
82 |
| - LIBS += -lUser32 |
83 |
| - LIBS += -lGlu32 |
84 |
| - ``` |
85 |
| -8. QLive2dWidget is a subclass of QOpenGLWidget, which can be used directly or be promoted in the Qt Designer. |
86 |
| -9. To use QOpenGLWidget in Qt, you need add extra moudules. |
87 |
| - ```pro |
88 |
| - QT += core gui opengl openglwidgets |
89 |
| - greaterThan(QT_MAJOR_VERSION, 5): QT += widgets |
90 |
| - ``` |
91 |
| -11. Define you model path in `LAppDefine.cpp`. |
92 |
| -12. Enjoy it! |
93 |
| -
|
94 |
| -## What's Next? |
95 |
| -- [ ] Cross Platform |
96 |
| -
|
97 |
| -## License |
98 |
| -Copyright (C) 2022 duanxianpi |
99 |
| -
|
100 |
| -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
101 |
| -
|
102 |
| -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
103 |
| -
|
104 |
| -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
105 |
| -
|
106 |
| -
|
107 |
| -
|
108 |
| -# What am I doing: |
109 |
| -
|
110 |
| -I'm trying to making this project support Linux. Thanks to the original author's work ,it's basically available. I'm going to optimize my code, and create a Live2D desktop pet program with it. |
| 1 | +This repository ports QtLive2d to Linux, and updates the Live2dCubismFramework to support models with moc v4.<br/> |
| 2 | +Original readme: [README.orig.md](README.orig.md) |
0 commit comments