-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathApplication.pro
163 lines (143 loc) · 5.54 KB
/
Application.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
# Copyright (c) 2018 Electronic Theatre Controls, Inc., http://www.etcconnect.com
#
# 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:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# 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.
# PRO file for the core application
TEMPLATE = app
TARGET = EtcDmxTool
QT += core gui qml serialport
# Extract version from Git tag/description
GIT_COMMAND = git --git-dir $$shell_quote($$PWD/.git) --work-tree $$shell_quote($$PWD)
GIT_TAG = $$system($$GIT_COMMAND describe --always --tags)
DEFINES += VERSION=\\\"$$GIT_TAG\\\"
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
DEFINES += QT_DLL
win32 {
QMAKE_CXXFLAGS += /Zi
QMAKE_LFLAGS += /INCREMENTAL:NO /Debug
}
# Source
INCLUDEPATH *= $$PWD/src
HEADERS += src/e110_startcodes.h \
src/e110_mfctrIDs.h \
src/codeeditor.h \
src/rdm/estardm.h \
src/rdm/rdmcontroller.h \
src/rdm/rdmEtcConsts.h \
src/rdm/rdmpidstrings.h \
src/dissectors/dissectorplugin.h \
src/mainwindow.h \
src/packettable.h \
src/packetbuffer.h \
src/capturedevice.h \
src/fancysliderstyle.h \
src/pcap/pcapng.h \
src/pcap/pcapngLinkTypes.h \
src/scripting.h \
src/serialdialog.h \
src/util.h \
src/hexlineedit.h \
src/selectdevicedialog.h \
src/dissectors.h \
src/customdataroles.h \
src/levelindicator.h \
src/logmodel.h \
src/gridwidget.h \
src/updatedialog.h \
src/commandlineparse.h \
src/stdout.h \
src/file.h
SOURCES += src/main.cpp \
src/codeeditor.cpp \
src/rdm/rdmcontroller.cpp \
src/rdm/rdmpidstrings.cpp \
src/mainwindow.cpp \
src/packetbuffer.cpp \
src/packettable.cpp \
src/capturedevice.cpp \
src/fancysliderstyle.cpp \
src/pcap/pcapng.cpp \
src/scripting.cpp \
src/serialdialog.cpp \
src/util.cpp \
src/selectdevicedialog.cpp \
src/hexlineedit.cpp \
src/dissectors.cpp \
src/levelindicator.cpp \
src/logmodel.cpp \
src/gridwidget.cpp \
src/updatedialog.cpp \
src/commandlineparse.cpp \
src/stdout.cpp \
src/file.cpp
FORMS += ui/mainwindow.ui \
ui/selectdevicedialog.ui \
ui/serialdialog.ui
RESOURCES += res/resources.qrc
win32:RC_ICONS += res/icon.ico
CONFIG(debug, debug|release) {
DESTDIR = $${OUT_PWD}/debug
}
CONFIG(release, debug|release) {
DESTDIR = $${OUT_PWD}/release
}
TARGET_CUSTOM_EXT = .exe
DEPLOY_DIR = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/install/deploy))
DEPLOY_TARGET = $$shell_quote($$system_path($${DESTDIR}/$${TARGET}$${TARGET_CUSTOM_EXT}))
# Hardware includes
include($$PWD/Whip.pri)
include($$PWD/Gadget.pri)
# Configure Release deployment
CONFIG(release, debug|release) {
# Windows deployment
win32 {
DISSECTOR_DLL_SRC = $$shell_quote($$system_path($${DESTDIR}/dissectorplugin*.dll))
DISSECTOR_DLL_DST = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/install/deploy/dissectorplugin*.dll))
PRE_DEPLOY_COMMAND = $$sprintf($${QMAKE_MKDIR_CMD}, $$shell_path($${DEPLOY_DIR})) $$escape_expand(\\n\\t)
PRE_DEPLOY_COMMAND += $$QMAKE_DEL_FILE $${DEPLOY_DIR}\*.* /S /Q $$escape_expand(\\n\\t)
PRE_DEPLOY_COMMAND += $$QMAKE_COPY $${FTD2xx_DLL_SRC} $${FTD2xx_DLL_DST} $$escape_expand(\\n\\t)
PRE_DEPLOY_COMMAND += $$QMAKE_COPY $${GADGET_DLL_SRC} $${GADGET_DLL_DST} $$escape_expand(\\n\\t)
PRE_DEPLOY_COMMAND += $$QMAKE_COPY $${DISSECTOR_DLL_SRC} $${DISSECTOR_DLL_DST} $$escape_expand(\\n\\t)
PRE_DEPLOY_COMMAND += $$QMAKE_COPY $${DEPLOY_TARGET} $${DEPLOY_DIR} $$escape_expand(\\n\\t)
DEPLOY_COMMAND = $$shell_quote($$system_path($$[QT_INSTALL_BINS]/windeployqt))
DEPLOY_OPT = --dir $${DEPLOY_DIR}
# Find NSIS
MAKENSIS_BIN = $$system(where makensis.exe 2> nul)
isEmpty(MAKENSIS_BIN) {
warning("Could not find makensis in PATH, will not create installer")
} else {
contains(QT_ARCH, i386) {
DEPLOY_INSTALLER = $$shell_quote($$system_path($$MAKENSIS_BIN)) /DPRODUCT_VERSION="$${GIT_TAG}" $$shell_quote($$system_path($${_PRO_FILE_PWD_}/install/install.nsi))
}
# TODO: Installer for 64bit edition
}
}
# Execute deployment if extant
isEmpty(DEPLOY_COMMAND) {
message("Deployment not configured for target platform $${QMAKESPEC}")
} else {
QMAKE_POST_LINK += $${PRE_DEPLOY_COMMAND} $$escape_expand(\\n\\t)
QMAKE_POST_LINK += $${DEPLOY_COMMAND} $${DEPLOY_TARGET} $${DEPLOY_OPT} $$escape_expand(\\n\\t)
QMAKE_POST_LINK += $${DEPLOY_CLEANUP} $$escape_expand(\\n\\t)
isEmpty(DEPLOY_INSTALLER) {
message("Installer not configured for target platform $${QMAKESPEC}")
} else {
QMAKE_POST_LINK += $${DEPLOY_INSTALLER} $$escape_expand(\\n\\t)
}
}
}