File: wfview.pro

package info (click to toggle)
wfview 2.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,256 kB
  • sloc: cpp: 43,386; ansic: 3,196; sh: 32; xml: 29; makefile: 11
file content (412 lines) | stat: -rw-r--r-- 13,928 bytes parent folder | download
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
#-------------------------------------------------
#
# Project created by QtCreator 2018-05-26T16:57:32
#
#-------------------------------------------------

QT       += core gui serialport network multimedia xml

#QT += sql
#DEFINES += USESQL

#Uncomment The following line to enable USB controllers (Shuttle/RC-28 etc.)
DEFINES += USB_CONTROLLER

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport websockets

contains(DEFINES,USB_CONTROLLER){
    lessThan(QT_MAJOR_VERSION, 6): QT += gamepad
}

TARGET = wfview
TEMPLATE = app

DEFINES += WFVIEW_VERSION=\\\"2.11\\\"

DEFINES += BUILD_WFVIEW

CONFIG += c++17

CONFIG(debug, release|debug) {
    # For Debug builds only:
    linux:QMAKE_CXXFLAGS += -faligned-new
    win32:DESTDIR = wfview-debug
} else {
    # For Release builds only:
    linux:QMAKE_CXXFLAGS += -O2 -g
    linux:QMAKE_CXXFLAGS += -fvisibility=hidden
    linux:QMAKE_CXXFLAGS += -fvisibility-inlines-hidden
    linux:QMAKE_CXXFLAGS += -faligned-new
    linux:QMAKE_LFLAGS += -O2 -g
    win32:DESTDIR = wfview-release
    DEFINES += NDEBUG
}

TRANSLATIONS += translations/wfview_en.ts \
                translations/wfview_en_GB.ts \
                translations/wfview_it.ts \
                translations/wfview_tr.ts \
                translations/wfview_de.ts \
                translations/wfview_ja.ts \
                translations/wfview_zh_TW.ts \
                translations/wfview_cs_CZ.ts \
                translations/wfview_pl.ts \
                translations/wfview_nl_NL.ts \
                translations/wfview_zh_CN.ts


# RTAudio defines
win32:DEFINES += __WINDOWS_WASAPI__
#win32:DEFINES += __WINDOWS_DS__ # Requires DirectSound libraries
#linux:DEFINES += __LINUX_ALSA__
#linux:DEFINES += __LINUX_OSS__
linux:DEFINES += __LINUX_PULSE__
macx:DEFINES += __MACOSX_CORE__
!linux:SOURCES += ../rtaudio/RTAudio.cpp
!linux:HEADERS += ../rtaudio/RTAUdio.h
!linux:INCLUDEPATH += ../rtaudio

linux:LIBS += -lpulse -lpulse-simple -lrtaudio -lpthread -ludev

win32:INCLUDEPATH += ../portaudio/include
!win32:LIBS += -lportaudio

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QCUSTOMPLOT_USE_LIBRARY

# These defines are used for the resampler
equals(QT_ARCH, i386): win32:DEFINES += USE_SSE
equals(QT_ARCH, i386): win32:DEFINES += USE_SSE2
equals(QT_ARCH, x86_64): DEFINES += USE_SSE
equals(QT_ARCH, x86_64): DEFINES += USE_SSE2
equals(QT_ARCH, arm): DEFINES += USE_NEON
DEFINES += OUTSIDE_SPEEX
DEFINES += RANDOM_PREFIX=wf

# These defines are used for the Eigen library
DEFINES += EIGEN_MPL2_ONLY
DEFINES += EIGEN_DONT_VECTORIZE #Clear vector flags
equals(QT_ARCH, i386): win32:DEFINES += EIGEN_VECTORIZE_SSE3
equals(QT_ARCH, x86_64): DEFINES += EIGEN_VECTORIZE_SSE3


isEmpty(PREFIX) {
  PREFIX = /usr/local
}

DEFINES += PREFIX=\\\"$$PREFIX\\\"

macx:INCLUDEPATH += /usr/local/include
macx:LIBS += -L/usr/local/lib

win32:RC_ICONS = "resources/icons/Windows/wfview 512x512.ico"

macx{
    ICON = resources/wfview.icns
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15
    QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
    MY_ENTITLEMENTS.name = CODE_SIGN_ENTITLEMENTS
    MY_ENTITLEMENTS.value = resources/wfview.entitlements
    QMAKE_MAC_XCODE_SETTINGS += MY_ENTITLEMENTS
    QMAKE_INFO_PLIST = resources/Info.plist
    rigFiles.files = rigs
    rigFiles.path = Contents/MacOS
    QMAKE_BUNDLE_DATA += rigFiles
}

QMAKE_TARGET_BUNDLE_PREFIX = org.wfview

!win32:DEFINES += HOST=\\\"`hostname`\\\" UNAME=\\\"`whoami`\\\"
!win32:DEFINES += GITSHORT="\\\"$(shell git -C \"$$PWD\" rev-parse --short HEAD)\\\""

win32:DEFINES += GITSHORT=\\\"$$system(git -C $$PWD rev-parse --short HEAD)\\\"
win32:DEFINES += HOST=\\\"$$system(hostname)\\\"
win32:DEFINES += UNAME=\\\"$$system(echo %USERNAME%)\\\"


RESOURCES += qdarkstyle/style.qrc \
    resources/resources.qrc \
    translations/translation.qrc


unix:target.path = $$PREFIX/bin
INSTALLS += target

# Why doesn't this seem to do anything?
unix:DISTFILES += resources/icons/bitmap/wfview.png \
    resources/install.sh
unix:DISTFILES += resources/wfview.desktop
unix:DISTFILES += resources/org.wfview.wfview.metainfo.xml

unix:applications.files = resources/wfview.desktop
unix:applications.path = $$PREFIX/share/applications
INSTALLS += applications

unix:icons.files = resources/icons/bitmap/wfview.png
unix:icons.path = $$PREFIX/share/icons/hicolor/256x256/apps
INSTALLS += icons

unix:metainfo.files = resources/org.wfview.wfview.metainfo.xml
unix:metainfo.path = $$PREFIX/share/metainfo
INSTALLS += metainfo

unix:stylesheets.files = qdarkstyle
unix:stylesheets.path = $$PREFIX/share/wfview
INSTALLS += stylesheets

unix:rigs.files = rigs/*
unix:rigs.path = $$PREFIX/share/wfview/rigs
INSTALLS += rigs

macx:LIBS += -framework CoreAudio -framework CoreFoundation -lpthread -lopus

# Do not do this, it will hang on start:
# CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT

CONFIG(debug, release|debug) {

  macos:LIBS += -L ../qcustomplot/qcustomplot-sharedlib/build -lqcustomplotd

  lessThan(QT_MAJOR_VERSION, 6) {
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlotd.so/ {print \"-lQCustomPlotd\"}'")
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotd2.so/ {print \"-lqcustomplotd2\"}'")
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotd.so/ {print \"-lqcustomplotd\"}'")

  } else {
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlotdQt6.so/ {print \"-lQCustomPlotdQt6\"}'")
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotd2qt6.so/ {print \"-lqcustomplotd2qt6\"}'")
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotdqt6.so/ {print \"-lqcustomplotdqt6\"}'")
  }

  win32 {
    contains(QMAKE_TARGET.arch, x86_64) {
      LIBS += -L../opus/win32/VS2015/x64/DebugDLL/
      LIBS += -L../qcustomplot/x64 -lqcustomplotd2
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\qcustomplot\x64\qcustomplotd2.dll wfview-debug $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\portaudio\msvc\x64\Debug\portaudio_x64.dll wfview-debug $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\hidapi\windows\X64\Debug\hidapi.dll wfview-debug $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\opus\win32\VS2015\x64\DebugDLL\opus-0.dll wfview-debug $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c xcopy /s/y ..\wfview\rigs\*.* wfview-debug\rigs\*.* $$escape_expand(\\n\\t))
      LIBS += -L../portaudio/msvc/X64/Debug/ -lportaudio_x64
      contains(DEFINES,USB_CONTROLLER){
            LIBS += -L../hidapi/windows/x64/debug -lhidapi
      }
    } else {
      LIBS += -L../opus/win32/VS2015/win32/DebugDLL/
      LIBS += -L../qcustomplot/win32 -lqcustomplotd2
      LIBS += -L../portaudio/msvc/Win32/Debug/ -lportaudio_x86
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\qcustomplot\win32\qcustomplotd2.dll wfview-debug $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\portaudio\msvc\win32\Debug\portaudio_x86.dll wfview-debug $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\hidapi\windows\Debug\hidapi.dll wfview-debug $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\opus\win32\VS2015\win32\DebugDLL\opus-0.dll wfview-debug $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c xcopy /s/y ..\wfview\rigs\*.* wfview-debug\rigs\*.* $$escape_expand(\\n\\t))
     contains(DEFINES,USB_CONTROLLER){
            LIBS += -L../hidapi/windows/debug -lhidapi
      }
    }
  }
} else {

  macos:LIBS += -L ../qcustomplot/qcustomplot-sharedlib/build -lqcustomplot

  lessThan(QT_MAJOR_VERSION, 6) {
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlot.so/ {print \"-lQCustomPlot\"}'")
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplot2.so/ {print \"-lqcustomplot2\"}'")
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplot.so/ {print \"-lqcustomplot\"}'")
  } else {
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlotQt6.so/ {print \"-lQCustomPlotQt6\"}'")
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplot2qt6.so/ {print \"-lqcustomplot2qt6\"}'")
    linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotqt6.so/ {print \"-lqcustomplotqt6\"}'")
  }
  win32 {
    contains(QMAKE_TARGET.arch, x86_64) {
      LIBS += -L../opus/win32/VS2015/x64/ReleaseDLL/
      LIBS += -L../qcustomplot/x64 -lqcustomplot2
      LIBS += -L../portaudio/msvc/X64/Release/ -lportaudio_x64
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\qcustomplot\x64\qcustomplot2.dll wfview-release $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\portaudio\msvc\x64\Release\portaudio_x64.dll wfview-release $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\hidapi\windows\X64\Release\hidapi.dll wfview-release $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\opus\win32\VS2015\x64\ReleaseDLL\opus-0.dll wfview-release $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c xcopy /s/y ..\wfview\rigs\*.* wfview-release\rigs\*.* $$escape_expand(\\n\\t))
      contains(DEFINES,USB_CONTROLLER){
            LIBS += -L../hidapi/windows/x64/release -lhidapi
      }
    } else {
      LIBS += -L../opus/win32/VS2015/win32/ReleaseDLL/
      LIBS += -L../qcustomplot/win32 -lqcustomplot2
      LIBS += -L../portaudio/msvc/Win32/Release/ -lportaudio_x86
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\qcustomplot\win32\qcustomplot2.dll wfview-release $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\portaudio\msvc\win32\Release\portaudio_x86.dll wfview-release $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\hidapi\windows\Release\hidapi.dll wfview-release $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\opus\win32\VS2015\win32\ReleaseDLL\opus-0.dll wfview-release $$escape_expand(\\n\\t))
      QMAKE_POST_LINK +=$$quote(cmd /c xcopy /s/y ..\wfview\rigs\*.* wfview-release\rigs\*.* $$escape_expand(\\n\\t))
      contains(DEFINES,USB_CONTROLLER){
            win32:LIBS += -L../hidapi/windows/release -lhidapi
      }
    }
  }
}

contains(DEFINES,USB_CONTROLLER){
    linux:LIBS += -L./ -lhidapi-libusb
    macx:LIBS += -lhidapi
    win32:INCLUDEPATH += ../hidapi/hidapi
}

!win32:LIBS += -L./ -lopus
win32:LIBS += -lopus -lole32 -luser32

#macx:SOURCES += ../qcustomplot/qcustomplot.cpp 
#macx:HEADERS += ../qcustomplot/qcustomplot.h

win32:INCLUDEPATH += ../qcustomplot
!linux:INCLUDEPATH += ../opus/include
!linux:INCLUDEPATH += ../eigen
!linux:INCLUDEPATH += ../r8brain-free-src

INCLUDEPATH += resampler

SOURCES += main.cpp\
    adpcm/adpcm-dns.c \
    adpcm/adpcm-lib.c \
    bandbuttons.cpp \
    cachingqueue.cpp \
    cwsender.cpp \
    firsttimesetup.cpp \
    freqctrl.cpp \
    frequencyinputwidget.cpp \
    cwsidetone.cpp \
    debugwindow.cpp \
    icomcommander.cpp \
    kenwoodcommander.cpp \
    loggingwindow.cpp \
    receiverwidget.cpp \
    rtpaudio.cpp \
    scrolltest.cpp \
    settingswidget.cpp \
    memories.cpp \
    rigcreator.cpp \
    tablewidget.cpp \
    tciaudiohandler.cpp \
    tciserver.cpp \
    wfmain.cpp \
    commhandler.cpp \
    rigcommander.cpp \
    freqmemory.cpp \
    rigidentities.cpp \
    udpbase.cpp \
    udphandler.cpp \
    udpcivdata.cpp \
    udpaudio.cpp \
    logcategories.cpp \
    pahandler.cpp \
    rthandler.cpp \
    audiohandler.cpp \
    audioconverter.cpp \
    calibrationwindow.cpp \
    satellitesetup.cpp \
    udpserver.cpp \
    meter.cpp \
    qledlabel.cpp \
    pttyhandler.cpp \
    resampler/resample.c \
    repeatersetup.cpp \
    rigctld.cpp \
    usbcontroller.cpp \
    controllersetup.cpp \
 #   transceiveradjustments.cpp \
    selectradio.cpp \
    tcpserver.cpp \
    cluster.cpp \
    database.cpp \
    aboutbox.cpp \
    audiodevices.cpp

HEADERS  += wfmain.h \
    adpcm/adpcm-lib.h \
    bandbuttons.h \
    cachingqueue.h \
    colorprefs.h \
    commhandler.h \
    cwsender.h \
    firsttimesetup.h \
    freqctrl.h \
    frequencyinputwidget.h \
    cwsidetone.h \
    debugwindow.h \
    icomcommander.h \
    kenwoodcommander.h \
    loggingwindow.h \
    memories.h \
    prefs.h \
    printhex.h \
    receiverwidget.h \
    rigcommander.h \
    freqmemory.h \
    rigcreator.h \
    rigidentities.h \
    rtpaudio.h \
    scrolltest.h \
    settingswidget.h \
    sidebandchooser.h \
    tablewidget.h \
    tciaudiohandler.h \
    tciserver.h \
    udpbase.h \
    udphandler.h \
    udpcivdata.h \
    udpaudio.h \
    logcategories.h \
    pahandler.h \
    rthandler.h \
    audiohandler.h \
    audioconverter.h \
    calibrationwindow.h \
    satellitesetup.h \
    udpserver.h \
    packettypes.h \
    meter.h \
    qledlabel.h \
    pttyhandler.h \
    resampler/speex_resampler.h \
    resampler/arch.h \
    resampler/resample_sse.h \
    repeatersetup.h \
    repeaterattributes.h \
    rigctld.h \
    ulaw.h \
    usbcontroller.h \
    controllersetup.h \
 #   transceiveradjustments.h \
    audiotaper.h \
    selectradio.h \
    tcpserver.h \
    cluster.h \
    database.h \
    aboutbox.h \
    wfviewtypes.h \
    audiodevices.h


FORMS    += wfmain.ui \
    bandbuttons.ui \
    calibrationwindow.ui \
    cwsender.ui \
    firsttimesetup.ui \
    frequencyinputwidget.ui \
    debugwindow.ui \
    loggingwindow.ui \
    memories.ui \
    rigcreator.ui \
    satellitesetup.ui \
    selectradio.ui \
    repeatersetup.ui \
    settingswidget.ui \
 #   transceiveradjustments.ui \
    controllersetup.ui \
    aboutbox.ui