This repository has been archived by the owner on May 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
/
orion.pro
214 lines (168 loc) · 5.18 KB
/
orion.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#-------------------------------------------------
#
# Orion: Twitch Client written in C++/QML
#
#-------------------------------------------------
QT += gui qml network widgets quickcontrols2
QMAKE_CXXFLAGS += -Wall -O2
CONFIG += c++14
#CONFIG += console
TARGET = orion
isEmpty(PREFIX){
PREFIX = /usr
}
VERSION = 1.6.7
DEFINES += APP_VERSION=\\\"v$$VERSION\\\"
DEFINES += APP_NAME=\\\"Orion\\\"
SOURCES += src/main.cpp\
src/model/channelmanager.cpp \
src/model/channel.cpp \
src/util/fileutils.cpp \
src/network/networkmanager.cpp \
src/model/game.cpp \
src/util/jsonparser.cpp \
src/model/channellistmodel.cpp \
src/model/gamelistmodel.cpp \
src/model/vod.cpp \
src/model/vodlistmodel.cpp \
src/model/vodmanager.cpp \
src/model/ircchat.cpp \
src/model/imageprovider.cpp \
src/model/badgeimageprovider.cpp \
src/model/badgecontainer.cpp \
src/model/viewersmodel.cpp \
src/model/settingsmanager.cpp \
src/network/httpserver.cpp \
src/power/power.cpp
HEADERS += src/model/channel.h \
src/model/channelmanager.h \
src/util/fileutils.h \
src/network/networkmanager.h \
src/model/game.h \
src/util/jsonparser.h \
src/model/channellistmodel.h \
src/model/gamelistmodel.h \
src/util/m3u8parser.h \
src/model/vod.h \
src/model/vodlistmodel.h \
src/model/vodmanager.h \
src/network/urls.h \
src/model/ircchat.h \
src/model/imageprovider.h \
src/network/httpserver.h \
src/model/badgeimageprovider.h \
src/model/badgecontainer.h \
src/model/viewersmodel.h \
src/model/settingsmanager.h \
src/model/singletonprovider.h \
src/power/power.h
!android: {
HEADERS += src/notification/notificationmanager.h
SOURCES += src/notification/notificationmanager.cpp
}
android: {
QT += androidextras
QT -= widgets
CONFIG += multimedia
DISTFILES += android/AndroidManifest.xml \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradlew \
android/res/values/libs.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat \
android/src/com/orion/MainActivity.java
ANDROID_EXTRA_LIBS = \
$$PWD/libs/libcrypto.so \
$$PWD/libs/libssl.so
}
#Backend for player, uses mpv as default
!qtav: !multimedia {
CONFIG *= mpv
}
mpv {
message(Selecting mpv as backend)
#DEFINES += DEBUG_LIBMPV
DEFINES += MPV_PLAYER
SOURCES += src/player/mpvobject.cpp
HEADERS += src/player/mpvobject.h
LIBS += -lmpv
}
qtav {
message(Selecting qtav as backend)
DEFINES += QTAV_PLAYER
QT += av
}
multimedia {
message(Selecting qt multimedia as backend)
DEFINES += MULTIMEDIA_PLAYER
QT += multimedia
macx: {
LIBS += -framework AVFoundation
INCLUDEPATH += /System/Library/Frameworks/AVFoundation.framework/Versions/Current/Headers
}
}
DISTFILES += src/qml/icon/orion.svg
linux:!android: {
QT += dbus
HEADERS += src/notification/notificationsender.h
SOURCES += src/notification/notificationsender.cpp
target.path = $$PREFIX/bin
INSTALLS += target
_appdata.files = distfiles/Orion.appdata.xml
_appdata.path = $$PREFIX/share/metainfo
_desktop.files = distfiles/Orion.desktop
_desktop.path = $$PREFIX/share/applications
_icon.files = distfiles/orion.svg
_icon.path = $$PREFIX/share/icons/hicolor/scalable/apps
INSTALLS += _appdata _desktop _icon
}
RESOURCES += \
src/qml/qml.qrc
# Copies the given files to the destination directory
defineTest(copyToDestdir) {
files = $$1
for(FILE, files) {
DDIR = $$DESTDIR
# Replace slashes in paths with backslashes for Windows
win32:FILE ~= s,/,\\,g
win32:DDIR ~= s,/,\\,g
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
}
export(QMAKE_POST_LINK)
}
win32: {
RC_ICONS = distfiles/orion.ico
EXTRA_BINFILES = $$PWD/libs/ssleay32.dll \
$$PWD/libs/libeay32.dll
mpv: EXTRA_BINFILES += $$PWD/libs/mpv-1.dll
EXTRA_BINFILES_WIN = $${EXTRA_BINFILES}
EXTRA_BINFILES_WIN ~= s,/,\\,g
DESTDIR_WIN = $$OUT_PWD/$(OBJECTS_DIR)
DESTDIR_WIN ~= s,/,\\,g
for(FILE,EXTRA_BINFILES_WIN){
QMAKE_POST_LINK +=$$quote(cmd /c copy /y \"$${FILE}\" \"$${DESTDIR_WIN}\"$$escape_expand(\n\t))
}
CONFIG += enableVersionCheck
}
macx: {
QMAKE_INFO_PLIST = distfiles/Info.plist
ICON = $$PWD/distfiles/orion.icns
LIBS += -framework Foundation -framework CoreServices
LIBS += -framework AppKit
HEADERS += src/notification/notificationsender.h
#inc as obj-c
OBJECTIVE_SOURCES +=
INCLUDEPATH += /System/Library/Frameworks/Foundation.framework/Versions/C/Headers
INCLUDEPATH += /System/Library/Frameworks/AppKit.framework/Versions/C/Headers
INCLUDEPATH += /usr/local/include
OBJECTIVE_SOURCES += \
src/notification/notificationsender.mm
CONFIG += enableVersionCheck
}
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
# Set CONFIG+=enableVersionCheck if you want Orion to check version on startup.
# By default enabled on mac/win
enableVersionCheck {
DEFINES += VERSION_CHECK_ENABLED
}