Skip to content

Commit c91cc44

Browse files
committed
Update README
1 parent 8a17b67 commit c91cc44

File tree

6 files changed

+109
-111
lines changed

6 files changed

+109
-111
lines changed

.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,2 @@
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-
[![HUSmi4.md.png](https://s4.ax1x.com/2022/02/11/HUSmi4.md.png)](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)

README.orig.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<p align="center">
2+
<img src="logo.png" height="150" />
3+
</p>
4+
<p align="center">
5+
A Qt-based Live2d widget
6+
</p>
7+
<p align="center">
8+
<a href="https://github.com/duanxianpi/QtLive2d/blob/main/LICENSE.md">
9+
<img alt="GitHub" src="https://img.shields.io/github/license/duanxianpi/QtLive2d?label=License">
10+
</a>
11+
<a href="https://github.com/duanxianpi/QtLive2d">
12+
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/duanxianpi/QtLive2d"/>
13+
</a>
14+
<a href="https://github.com/duanxianpi/QtLive2d/releases">
15+
<img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/duanxianpi/QtLive2d?include_prereleases&sort=semver">
16+
</a>
17+
<a href="https://github.com/duanxianpi">
18+
<img alt="GitHub user" src="https://img.shields.io/badge/author-duanxianpi-brightgreen"/>
19+
</a>
20+
</p>
21+
22+
## Introduction
23+
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.
24+
25+
**Thanks [@6ziv](https://github.com/6ziv) for your blogs and projects. They have helped me a lot on this project**
26+
## Feature
27+
* Easy to use
28+
* Using OpenGL instead of WebGL
29+
* Less resource consumption
30+
* Support Live2d mouse events
31+
* Support transparent background
32+
* CrossPlatform (Qt is CrossPlatform, haven't test on other platform yet)
33+
34+
## Sample
35+
We provide a sample application called Sample to show you how to use it.
36+
[![HUSmi4.md.png](https://s4.ax1x.com/2022/02/11/HUSmi4.md.png)](https://imgtu.com/i/HUSmi4)
37+
38+
## Build
39+
### Dependency
40+
* Live2DCubismCore.lib
41+
* Framework.lib
42+
* OpenGL32
43+
* User32
44+
* Glu32
45+
46+
### Usage
47+
1. **Please use MSVC 2017 or 2019! and std C++ 17**
48+
1. To use QtLive2d in your program, you need to add Floder QtLive2d, Framework, thirdParty and Core into you project.
49+
2. Add includepath and dependpath in `pro` file
50+
```pro
51+
INCLUDEPATH += $$PWD/Core/include
52+
INCLUDEPATH += $$PWD/Framework/src
53+
INCLUDEPATH += $$PWD/thirdParty/stb
54+
DEPENDPATH += $$PWD/../dll
55+
```
56+
3. Define flags in `pro` file
57+
```pro
58+
DEFINES += WIN32
59+
DEFINES += _WINDOWS
60+
DEFINES += CSM_TARGET_WIN_GL
61+
```
62+
5. Compiling Framework and add Framework.lib into `pro` file.
63+
6. Add other libs into `pro` file.
64+
```pro
65+
CONFIG += debug_and_release
66+
CONFIG(debug, debug|release){
67+
message(Debug build)
68+
LIBS += -L$$PWD/lib/ -lLive2DCubismCore_MDd
69+
LIBS += -L$$PWD/lib/ -lFrameworkd
70+
71+
}
72+
73+
CONFIG(release, debug|release){
74+
message(Release build)
75+
LIBS += -L$$PWD/lib/ -lLive2DCubismCore_MD
76+
LIBS += -L$$PWD/lib/ -lFramework
77+
78+
}
79+
LIBS += -lOpenGL32
80+
LIBS += -lUser32
81+
LIBS += -lGlu32
82+
```
83+
8. QLive2dWidget is a subclass of QOpenGLWidget, which can be used directly or be promoted in the Qt Designer.
84+
9. To use QOpenGLWidget in Qt, you need add extra moudules.
85+
```pro
86+
QT += core gui opengl openglwidgets
87+
greaterThan(QT_MAJOR_VERSION, 5): QT += widgets
88+
```
89+
11. Define you model path in `LAppDefine.cpp`.
90+
12. Enjoy it!
91+
92+
## What's Next?
93+
- [ ] Cross Platform
94+
95+
## License
96+
Copyright (C) 2022 duanxianpi
97+
98+
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:
99+
100+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
101+
102+
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.
103+

copy_library.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
cp Core/lib/linux/x86_64/libLive2DCubismCore.a lib
3+
cp CubismNativeFramework/build/libFramework.a lib

lib/libFramework.a

144 KB
Binary file not shown.

lib/libLive2DCubismCore.a

38.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)