Skip to content

Commit 534d5e5

Browse files
committed
Update to Qt6
1 parent 5d2213f commit 534d5e5

31 files changed

+619
-718
lines changed

AboutTab.qml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
along with this program. If not, see <https://www.gnu.org/licenses/>.
1616
*/
1717

18-
import QtQuick 2.10
18+
import QtQuick
1919

2020
Item {
2121
id: aboutTab

DroidStar.pro

+72-94
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
QT += quick quickcontrols2 network multimedia
22

3-
equals(QT_MAJOR_VERSION, 5){
4-
android:QT += androidextras
5-
}
6-
73
unix:!ios:QT += serialport
8-
CONFIG += c++17
9-
LFLAGS +=
10-
!win32:LIBS += -ldl
114
win32:QT += serialport
5+
!win32:LIBS += -ldl
126
win32:LIBS += -lws2_32
137
win32:QMAKE_LFLAGS += -static
148
QMAKE_LFLAGS_WINDOWS += --enable-stdcall-fixup
@@ -31,10 +25,76 @@ VERSION_BUILD='$(shell cd $$PWD;git rev-parse --short HEAD)'
3125
DEFINES += VERSION_NUMBER=\"\\\"$${VERSION_BUILD}\\\"\"
3226
DEFINES += QT_DEPRECATED_WARNINGS
3327
#DEFINES += QT_DEBUG_PLUGINS=1
34-
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
3528
#DEFINES += VOCODER_PLUGIN
3629
#DEFINES += USE_FLITE
3730
#DEFINES += USE_EXTERNAL_CODEC2
31+
#DEFINES += USE_MD380_VOCODER
32+
33+
SOURCES += \
34+
CRCenc.cpp \
35+
Golay24128.cpp \
36+
M17Convolution.cpp \
37+
SHA256.cpp \
38+
YSFConvolution.cpp \
39+
YSFFICH.cpp \
40+
audioengine.cpp \
41+
cbptc19696.cpp \
42+
cgolay2087.cpp \
43+
chamming.cpp \
44+
crs129.cpp \
45+
dcs.cpp \
46+
dmr.cpp \
47+
droidstar.cpp \
48+
httpmanager.cpp \
49+
iax.cpp \
50+
imbe_vocoder/aux_sub.cc \
51+
imbe_vocoder/basicop2.cc \
52+
imbe_vocoder/ch_decode.cc \
53+
imbe_vocoder/ch_encode.cc \
54+
imbe_vocoder/dc_rmv.cc \
55+
imbe_vocoder/decode.cc \
56+
imbe_vocoder/dsp_sub.cc \
57+
imbe_vocoder/encode.cc \
58+
imbe_vocoder/imbe_vocoder.cc \
59+
imbe_vocoder/imbe_vocoder_impl.cc \
60+
imbe_vocoder/math_sub.cc \
61+
imbe_vocoder/pe_lpf.cc \
62+
imbe_vocoder/pitch_est.cc \
63+
imbe_vocoder/pitch_ref.cc \
64+
imbe_vocoder/qnt_sub.cc \
65+
imbe_vocoder/rand_gen.cc \
66+
imbe_vocoder/sa_decode.cc \
67+
imbe_vocoder/sa_encode.cc \
68+
imbe_vocoder/sa_enh.cc \
69+
imbe_vocoder/tbls.cc \
70+
imbe_vocoder/uv_synt.cc \
71+
imbe_vocoder/v_synt.cc \
72+
imbe_vocoder/v_uv_det.cc \
73+
m17.cpp \
74+
main.cpp \
75+
mode.cpp \
76+
nxdn.cpp \
77+
p25.cpp \
78+
ref.cpp \
79+
xrf.cpp \
80+
ysf.cpp
81+
android:SOURCES += androidserialport.cpp
82+
!ios:SOURCES += serialambe.cpp serialmodem.cpp
83+
84+
resources.files = main.qml AboutTab.qml HostsTab.qml LogTab.qml MainTab.qml SettingsTab.qml
85+
resources.prefix = /$${TARGET}
86+
RESOURCES += resources
87+
88+
# Additional import path used to resolve QML modules in Qt Creator's code model
89+
QML_IMPORT_PATH =
90+
91+
# Additional import path used to resolve QML modules just for Qt Quick Designer
92+
QML_DESIGNER_IMPORT_PATH =
93+
94+
# Default rules for deployment.
95+
qnx: target.path = /tmp/$${TARGET}/bin
96+
else: unix:!android: target.path = /opt/$${TARGET}/bin
97+
!isEmpty(target.path): INSTALLS += target
3898

3999
HEADERS += \
40100
CRCenc.h \
@@ -93,60 +153,7 @@ HEADERS += \
93153
vocoder_plugin.h \
94154
xrf.h \
95155
ysf.h
96-
android:HEADERS += androidserialport.h
97-
macx:HEADERS += micpermission.h
98-
!ios:HEADERS += serialambe.h serialmodem.h
99156

100-
SOURCES += \
101-
CRCenc.cpp \
102-
Golay24128.cpp \
103-
M17Convolution.cpp \
104-
SHA256.cpp \
105-
YSFConvolution.cpp \
106-
YSFFICH.cpp \
107-
audioengine.cpp \
108-
cbptc19696.cpp \
109-
cgolay2087.cpp \
110-
chamming.cpp \
111-
crs129.cpp \
112-
dcs.cpp \
113-
dmr.cpp \
114-
droidstar.cpp \
115-
httpmanager.cpp \
116-
iax.cpp \
117-
imbe_vocoder/aux_sub.cc \
118-
imbe_vocoder/basicop2.cc \
119-
imbe_vocoder/ch_decode.cc \
120-
imbe_vocoder/ch_encode.cc \
121-
imbe_vocoder/dc_rmv.cc \
122-
imbe_vocoder/decode.cc \
123-
imbe_vocoder/dsp_sub.cc \
124-
imbe_vocoder/encode.cc \
125-
imbe_vocoder/imbe_vocoder.cc \
126-
imbe_vocoder/imbe_vocoder_impl.cc \
127-
imbe_vocoder/math_sub.cc \
128-
imbe_vocoder/pe_lpf.cc \
129-
imbe_vocoder/pitch_est.cc \
130-
imbe_vocoder/pitch_ref.cc \
131-
imbe_vocoder/qnt_sub.cc \
132-
imbe_vocoder/rand_gen.cc \
133-
imbe_vocoder/sa_decode.cc \
134-
imbe_vocoder/sa_encode.cc \
135-
imbe_vocoder/sa_enh.cc \
136-
imbe_vocoder/tbls.cc \
137-
imbe_vocoder/uv_synt.cc \
138-
imbe_vocoder/v_synt.cc \
139-
imbe_vocoder/v_uv_det.cc \
140-
m17.cpp \
141-
main.cpp \
142-
mode.cpp \
143-
nxdn.cpp \
144-
p25.cpp \
145-
ref.cpp \
146-
xrf.cpp \
147-
ysf.cpp
148-
android:SOURCES += androidserialport.cpp
149-
!ios:SOURCES += serialambe.cpp serialmodem.cpp
150157
!contains(DEFINES, USE_EXTERNAL_CODEC2){
151158
HEADERS += \
152159
codec2/codec2_api.h \
@@ -189,44 +196,15 @@ SOURCES += \
189196
mbe/vocoder_plugin.cpp
190197
}
191198

192-
macx:OBJECTIVE_SOURCES += micpermission.mm
193-
ios:OBJECTIVE_SOURCES += micpermission.mm
194-
RESOURCES += qml.qrc
195-
196-
QML_IMPORT_PATH =
197-
QML_DESIGNER_IMPORT_PATH =
198-
199-
# Default rules for deployment.
200-
qnx: target.path = /tmp/$${TARGET}/bin
201-
else: unix:!android: target.path = /opt/$${TARGET}/bin
202-
!isEmpty(target.path): INSTALLS += target
203-
204-
DISTFILES += \
205-
android/AndroidManifest.xml \
206-
android/build.gradle \
207-
android/gradle/wrapper/gradle-wrapper.jar \
208-
android/gradle/wrapper/gradle-wrapper.properties \
209-
android/gradlew \
210-
android/gradlew.bat \
211-
android/res/values/libs.xml \
212-
images/log.png
199+
android:HEADERS += androidserialport.h
200+
macx:HEADERS += micpermission.h
201+
!ios:HEADERS += serialambe.h serialmodem.h
202+
android:ANDROID_VERSION_CODE = 79
213203

214204
contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
215-
LIBS += -L$$(HOME)/Android/local/lib
216205
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
217-
OTHER_FILES += android/src
218206
}
219207

220208
contains(ANDROID_TARGET_ARCH,arm64-v8a) {
221-
LIBS += -L$$(HOME)/Android/local/lib64
222209
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
223-
OTHER_FILES += android/src
224-
#ANDROID_ABIS = arm64-v8a
225-
}
226-
227-
#ANDROID_ABIS = armeabi-v7a arm64-v8a
228-
229-
contains(DEFINES, USE_FLITE){
230-
LIBS += -lflite_cmu_us_slt -lflite_cmu_us_kal16 -lflite_cmu_us_awb -lflite_cmu_us_rms -lflite_usenglish -lflite_cmulex -lflite -lasound
231210
}
232-
ios:HEADERS += micpermission.h

HostsTab.qml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
along with this program. If not, see <https://www.gnu.org/licenses/>.
1616
*/
1717

18-
import QtQuick 2.10
19-
import QtQuick.Controls 2.3
18+
import QtQuick
19+
import QtQuick.Controls
2020

2121
Item {
2222
id: hostsTab

LogTab.qml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
along with this program. If not, see <https://www.gnu.org/licenses/>.
1616
*/
1717

18-
import QtQuick 2.10
19-
import QtQuick.Controls 2.3
18+
import QtQuick
19+
import QtQuick.Controls
2020

2121
Item {
2222
id: logTab

MainTab.qml

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@
1515
along with this program. If not, see <https://www.gnu.org/licenses/>.
1616
*/
1717

18-
import QtQuick 2.10
19-
//import QtQuick.Window 2.15
20-
import QtQuick.Controls 2.3
21-
//import QtQuick.Dialogs 1.3
22-
//import org.dudetronics.droidstar 1.0
18+
import QtQuick
19+
import QtQuick.Controls
2320

2421
Item {
2522
id: mainTab

README.md

+18-13
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Latitude/Longitude/Location/Description: These are DMR config options, sent to
4343

4444
DMR+ IPSC2 hosts: The format for the DMR+ options string is the complete string including 'Options='. Create your options string and check 'Send DMR+ options on connect' before connecting. A description of the DMR+ options string can be found here: https://github.com/g4klx/MMDVMHost/blob/master/DMRplus_startup_options.md .
4545

46-
Talkgroup: For DMR, enter the talkgroup ID number. A very active TG for testing functionality on Brandmeister is 91 (Brandmeister Worldwide). You must TX with a talkgroup entered to link to that talkgroup, just like a real radio. Any ststics you have defined in BM selfcare will work the same way they do if you were using a hotspot/radio.
46+
Talkgroup: For DMR, enter the talkgroup ID number. A very active TG for testing functionality on Brandmeister is 91 (Brandmeister Worldwide). You must TX with a talkgroup entered to link to that talkgroup, just like a real radio. Any statics you have defined in BM selfcare will work the same way they do if you were using a hotspot/radio.
4747

4848
MYCALL/URCALL/RPTR1/RPTR2 are for Dstar modes REF/DCS/XRF. These fields need to be entered correctly before attempting to TX on any DSTAR reflector. All fields are populated with suggested values upon connect, but can still be modified for advanced users. RPT2 is always overwritten with the current reflector upon connected.
4949

@@ -63,33 +63,38 @@ Port: UDP port of node, usually 4569.
6363
Add DTMF commands like \*3node, \*1node, \*70, etc in the IAX DTMF box and hit send to send the DTMF string. Details on various commands can be found at the AllStar wiki and others.
6464

6565
# General building instructions
66-
This software is written primarily in C++ on Linux and requires Qt5 >= Qt5.15 or Qt6 >= Qt6.3, and natually the devel packages to build. Java, QML (Javascript based), and C# code is also used where necessary. The preferred way to obtain Qt is to use the Qt open source online installer from the Qt website. Run this installer as a user (not root) to keep the Qt installation separate from your system libs. Select the option as shown in this pic https://imgur.com/i0WuFCY which will install everything under ~/Qt.
66+
This software is written primarily in C++ on Linux and requires Qt6 >= Qt6.4, and naturally the devel packages to build. Java, QML (Javascript based), and C# code is also used where necessary. The preferred way to obtain Qt is to use the Qt open source online installer from the Qt website. Run this installer as a user (not root) to keep the Qt installation separate from your system libs. Select the option as shown in this pic https://imgur.com/i0WuFCY which will install everything under ~/Qt.
6767

68-
In an effort to encourage others to build from source on multiple platforms, there are no longer any external build dependencies. In order to build DroidStar with no internal AMBE vocider, uncomment the the following line in the DroidStar.pro file:
68+
In an effort to encourage others to build from source on multiple platforms, there are no longer any external build dependencies. In order to build DroidStar with no internal AMBE vocoder, uncomment the the following line in the DroidStar.pro file:
6969
```
7070
DEFINES+=VOCODER_PLUGIN
7171
```
7272
Building DroidStar with this line commented out will build with internal AMBE support. If you choose to do this, it is your responsibility to determine if you will violate any patents in your area.
7373

74-
## Note for building on Raspbian/RaspiOS
75-
The Qt online installer does not support RPi, but fortunately there is a great Qt 5.15.2 installer for RaspiOS:
76-
77-
https://github.com/koendv/qt5-opengl-raspberrypi
78-
79-
This installer puts everything in the same place as the Qt installer, so build instructions are the same for all:
74+
## Note for building on RaspiOS (Also applies to debian based Linux desktops)
75+
The following commands should install everything necessary to build and run DroidStar:
76+
```
77+
sudo apt install libqt6*
78+
sudo apt install qml6*
79+
sudo apt install qt6-*-dev
80+
```
81+
Then to build:
8082

8183
```
84+
git clone https://github.com/nostar/DroidStar.git
8285
cd DroidStar
8386
mkdir build
8487
cd build
85-
/usr/lib/qt5.15.2/bin/qmake ..
88+
qmake6 ../DroidStar.pro
8689
make
8790
```
88-
89-
And if pulseaudio is not currently installed:
91+
If building an an arm based platform like rpi, the md380 vocoder can be used. In order to build with this, uncomment the following line in DroidStar.pro:
9092
```
91-
sudo apt-get install pulseaudio
93+
#DEFINES += USE_MD380_VOCODER
9294
```
95+
This requires the md380_vocoder library to be installed: https://github.com/nostar/md380_vocoder
96+
You must make sure that you are not in violation of any patent laws in your area if you decide to use this.
97+
9398
My primary development platform is Fedora Linux. With a proper build environment, the build instructions apply to all other platforms/distributions, including Windows and macOS.
9499

95100
All of the gradle build files are provided to create an APK file ready to be installed on an Android device. A proper Android build system including the Android NDK is required and beyond the scope of this document.

SettingsTab.qml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
along with this program. If not, see <https://www.gnu.org/licenses/>.
1616
*/
1717

18-
import QtQuick 2.10
19-
import QtQuick.Controls 2.3
18+
import QtQuick
19+
import QtQuick.Controls
2020

2121
Item {
2222
id: settingsTab

0 commit comments

Comments
 (0)