adapt linux.
This commit is contained in:
parent
2c06e4d1e0
commit
f74081a06a
@ -36,6 +36,11 @@ target_compile_definitions(Analyser
|
|||||||
PRIVATE _CRT_SECURE_NO_WARNINGS
|
PRIVATE _CRT_SECURE_NO_WARNINGS
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
set_target_properties(Analyser PROPERTIES
|
||||||
|
SUFFIX .AppImage
|
||||||
|
)
|
||||||
|
endif()
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
set_property(TARGET Analyser PROPERTY
|
set_property(TARGET Analyser PROPERTY
|
||||||
WIN32_EXECUTABLE true
|
WIN32_EXECUTABLE true
|
||||||
@ -56,13 +61,13 @@ target_link_libraries(Analyser
|
|||||||
PRIVATE Fluentplugin
|
PRIVATE Fluentplugin
|
||||||
PRIVATE Encrypt
|
PRIVATE Encrypt
|
||||||
PRIVATE Database
|
PRIVATE Database
|
||||||
PRIVATE Ws2_32
|
|
||||||
PRIVATE Peripheral
|
PRIVATE Peripheral
|
||||||
PRIVATE avcodec
|
PRIVATE avcodec
|
||||||
PRIVATE swscale
|
PRIVATE swscale
|
||||||
PRIVATE avutil
|
PRIVATE avutil
|
||||||
PRIVATE avdevice
|
PRIVATE avdevice
|
||||||
PRIVATE avformat
|
PRIVATE avformat
|
||||||
|
$<$<PLATFORM_ID:Windows>:Ws2_32>
|
||||||
PRIVATE Qt${QT_VERSION_MAJOR}::Quick
|
PRIVATE Qt${QT_VERSION_MAJOR}::Quick
|
||||||
PRIVATE Qt${QT_VERSION_MAJOR}::QuickTemplates2
|
PRIVATE Qt${QT_VERSION_MAJOR}::QuickTemplates2
|
||||||
PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort
|
PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
|
#else
|
||||||
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline uint8_t xor_checksum_byte(const uint8_t *data, uint32_t len) {
|
static inline uint8_t xor_checksum_byte(const uint8_t *data, uint32_t len) {
|
||||||
@ -19,6 +21,7 @@ ModuleCommunication::ModuleCommunication(QObject *parent) : QObject{parent} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ModuleCommunication::open(const QString &portName, int baudRate) {
|
bool ModuleCommunication::open(const QString &portName, int baudRate) {
|
||||||
|
if (portName.isEmpty()) return false;
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
m_serialPort = std::make_shared<QSerialPort>(portName);
|
m_serialPort = std::make_shared<QSerialPort>(portName);
|
||||||
m_serialPort->setBaudRate(baudRate);
|
m_serialPort->setBaudRate(baudRate);
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#include "BoostLog.h"
|
#include "BoostLog.h"
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "libavdevice/avdevice.h"
|
#include <libavdevice/avdevice.h>
|
||||||
#include "libavformat/avformat.h"
|
#include <libavformat/avformat.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoPlayer::VideoPlayer() {
|
VideoPlayer::VideoPlayer() {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "BoostLog.h"
|
#include "BoostLog.h"
|
||||||
#include "Configuration.h"
|
#include "Configuration.h"
|
||||||
#include "DeviceDiscovery.h"
|
|
||||||
#include <QQuickStyle>
|
#include <QQuickStyle>
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
@ -116,10 +116,8 @@ Window {
|
|||||||
info_bar.showSuccess(tip,2000,detailMessage)
|
info_bar.showSuccess(tip,2000,detailMessage)
|
||||||
} else if (level === App.Warnging) {
|
} else if (level === App.Warnging) {
|
||||||
info_bar.showWarning(tip,2000,detailMessage)
|
info_bar.showWarning(tip,2000,detailMessage)
|
||||||
} else if (level === 1) {
|
} else if (level === App.Error) {
|
||||||
statusTip.icon = "../resources/warning.svg"
|
info_bar.showError(tip,2000,detailMessage)
|
||||||
statusTip.color = "#FAFAD2"
|
|
||||||
statusTip.show(tip, 2000)
|
|
||||||
} else if (level === 2) {
|
} else if (level === 2) {
|
||||||
info_bar.showInfo(tip,2000,detailMessage)
|
info_bar.showInfo(tip,2000,detailMessage)
|
||||||
resultBrowser.append(tip+":"+detailMessage)
|
resultBrowser.append(tip+":"+detailMessage)
|
||||||
|
@ -15,9 +15,6 @@ target_include_directories(Peripheral
|
|||||||
target_link_libraries(Peripheral
|
target_link_libraries(Peripheral
|
||||||
PUBLIC Universal
|
PUBLIC Universal
|
||||||
PRIVATE Encrypt
|
PRIVATE Encrypt
|
||||||
PRIVATE Mfreadwrite
|
$<$<PLATFORM_ID:Windows>:Mfreadwrite Mf mfplat mfuuid>
|
||||||
PRIVATE Mf
|
|
||||||
PRIVATE mfplat
|
|
||||||
PRIVATE mfuuid
|
|
||||||
PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort
|
PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user