Extract libostfilegui out of libostfile
libostfile now has no GUI dependencies
This commit is contained in:
parent
f3dccb9484
commit
23ee0e6f00
@ -8,26 +8,32 @@ INCLUDEPATH += "../rpc/" "../common/"
|
|||||||
win32 {
|
win32 {
|
||||||
QMAKE_LFLAGS += -static
|
QMAKE_LFLAGS += -static
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
LIBS += -L"../common/debug" -lostfile -lostprotogui -lostproto
|
LIBS += -L"../common/debug" -lostfilegui -lostfile
|
||||||
|
LIBS += -L"../common/debug" -lostprotogui -lostproto
|
||||||
LIBS += -L"../rpc/debug" -lpbrpc
|
LIBS += -L"../rpc/debug" -lpbrpc
|
||||||
POST_TARGETDEPS += \
|
POST_TARGETDEPS += \
|
||||||
|
"../common/debug/libostfilegui.a" \
|
||||||
"../common/debug/libostfile.a" \
|
"../common/debug/libostfile.a" \
|
||||||
"../common/debug/libostprotogui.a" \
|
"../common/debug/libostprotogui.a" \
|
||||||
"../common/debug/libostproto.a" \
|
"../common/debug/libostproto.a" \
|
||||||
"../rpc/debug/libpbrpc.a"
|
"../rpc/debug/libpbrpc.a"
|
||||||
} else {
|
} else {
|
||||||
LIBS += -L"../common/release" -lostfile -lostprotogui -lostproto
|
LIBS += -L"../common/release" -lostfilegui -lostfile
|
||||||
|
LIBS += -L"../common/release" -lostprotogui -lostproto
|
||||||
LIBS += -L"../rpc/release" -lpbrpc
|
LIBS += -L"../rpc/release" -lpbrpc
|
||||||
POST_TARGETDEPS += \
|
POST_TARGETDEPS += \
|
||||||
|
"../common/release/libostfilegui.a" \
|
||||||
"../common/release/libostfile.a" \
|
"../common/release/libostfile.a" \
|
||||||
"../common/release/libostprotogui.a" \
|
"../common/release/libostprotogui.a" \
|
||||||
"../common/release/libostproto.a" \
|
"../common/release/libostproto.a" \
|
||||||
"../rpc/release/libpbrpc.a"
|
"../rpc/release/libpbrpc.a"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LIBS += -L"../common" -lostfile -lostprotogui -lostproto
|
LIBS += -L"../common" -lostfile -lostfilegui
|
||||||
|
LIBS += -L"../common" -lostprotogui -lostproto
|
||||||
LIBS += -L"../rpc" -lpbrpc
|
LIBS += -L"../rpc" -lpbrpc
|
||||||
POST_TARGETDEPS += \
|
POST_TARGETDEPS += \
|
||||||
|
"../common/libostfilegui.a" \
|
||||||
"../common/libostfile.a" \
|
"../common/libostfile.a" \
|
||||||
"../common/libostprotogui.a" \
|
"../common/libostprotogui.a" \
|
||||||
"../common/libostproto.a" \
|
"../common/libostproto.a" \
|
||||||
|
@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include "crc32c.h"
|
#include "crc32c.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QCoreApplication>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
@ -437,17 +437,19 @@ _exit:
|
|||||||
|
|
||||||
void NativeFileFormat::initFileMetaData(OstProto::FileMetaData &metaData)
|
void NativeFileFormat::initFileMetaData(OstProto::FileMetaData &metaData)
|
||||||
{
|
{
|
||||||
|
QCoreApplication *app = QCoreApplication::instance();
|
||||||
|
|
||||||
// Fill in the "native" file format version
|
// Fill in the "native" file format version
|
||||||
metaData.set_format_version_major(kFileFormatVersionMajor);
|
metaData.set_format_version_major(kFileFormatVersionMajor);
|
||||||
metaData.set_format_version_minor(kFileFormatVersionMinor);
|
metaData.set_format_version_minor(kFileFormatVersionMinor);
|
||||||
metaData.set_format_version_revision(kFileFormatVersionRevision);
|
metaData.set_format_version_revision(kFileFormatVersionRevision);
|
||||||
|
|
||||||
metaData.set_generator_name(
|
metaData.set_generator_name(
|
||||||
qApp->applicationName().toUtf8().constData());
|
app->applicationName().toUtf8().constData());
|
||||||
metaData.set_generator_version(
|
metaData.set_generator_version(
|
||||||
qApp->property("version").toString().toUtf8().constData());
|
app->property("version").toString().toUtf8().constData());
|
||||||
metaData.set_generator_revision(
|
metaData.set_generator_revision(
|
||||||
qApp->property("revision").toString().toUtf8().constData());
|
app->property("revision").toString().toUtf8().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
int NativeFileFormat::fileMetaSize(const quint8* file, int size)
|
int NativeFileFormat::fileMetaSize(const quint8* file, int size)
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += qt staticlib
|
CONFIG += qt staticlib
|
||||||
QT += widgets network xml script
|
QT += network xml script
|
||||||
LIBS += \
|
LIBS += \
|
||||||
-lprotobuf
|
-lprotobuf
|
||||||
|
|
||||||
FORMS = \
|
|
||||||
pcapfileimport.ui \
|
|
||||||
|
|
||||||
PROTOS = \
|
PROTOS = \
|
||||||
fileformat.proto
|
fileformat.proto
|
||||||
|
|
||||||
@ -24,10 +21,6 @@ HEADERS = \
|
|||||||
sessionfileformat.h \
|
sessionfileformat.h \
|
||||||
streamfileformat.h
|
streamfileformat.h
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
fileformatoptions.h \
|
|
||||||
pcapoptionsdialog.h
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
ostprotolib.cpp \
|
ostprotolib.cpp \
|
||||||
nativefileformat.cpp \
|
nativefileformat.cpp \
|
||||||
@ -42,10 +35,6 @@ SOURCES += \
|
|||||||
sessionfileformat.cpp \
|
sessionfileformat.cpp \
|
||||||
streamfileformat.cpp \
|
streamfileformat.cpp \
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
fileformatoptions.cpp \
|
|
||||||
pcapoptionsdialog.cpp
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
vlanpdml.cpp \
|
vlanpdml.cpp \
|
||||||
svlanpdml.cpp \
|
svlanpdml.cpp \
|
||||||
|
15
common/ostfilegui.pro
Normal file
15
common/ostfilegui.pro
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
TEMPLATE = lib
|
||||||
|
CONFIG += qt staticlib
|
||||||
|
QT += widgets
|
||||||
|
|
||||||
|
FORMS = \
|
||||||
|
pcapfileimport.ui
|
||||||
|
|
||||||
|
HEADERS = \
|
||||||
|
fileformatoptions.h \
|
||||||
|
pcapoptionsdialog.h
|
||||||
|
|
||||||
|
SOURCES = \
|
||||||
|
fileformatoptions.cpp \
|
||||||
|
pcapoptionsdialog.cpp
|
||||||
|
|
@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include "pcapfileformat.h"
|
#include "pcapfileformat.h"
|
||||||
|
|
||||||
#include "pcapoptionsdialog.h"
|
|
||||||
|
|
||||||
#include "pdmlreader.h"
|
#include "pdmlreader.h"
|
||||||
#include "ostprotolib.h"
|
#include "ostprotolib.h"
|
||||||
#include "streambase.h"
|
#include "streambase.h"
|
||||||
|
7
ost.pro
7
ost.pro
@ -1,9 +1,9 @@
|
|||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
SUBDIRS = client server ostfile ostproto ostprotogui rpc extra
|
SUBDIRS = client server ostfile ostfilegui ostproto ostprotogui rpc extra
|
||||||
|
|
||||||
client.target = client
|
client.target = client
|
||||||
client.file = client/ostinato.pro
|
client.file = client/ostinato.pro
|
||||||
client.depends = ostfile ostproto ostprotogui rpc extra
|
client.depends = ostfile ostfilegui ostproto ostprotogui rpc extra
|
||||||
|
|
||||||
server.target = server
|
server.target = server
|
||||||
server.file = server/drone.pro
|
server.file = server/drone.pro
|
||||||
@ -12,6 +12,9 @@ server.depends = ostproto rpc
|
|||||||
ostfile.file = common/ostfile.pro
|
ostfile.file = common/ostfile.pro
|
||||||
ostfile.depends = ostproto
|
ostfile.depends = ostproto
|
||||||
|
|
||||||
|
ostfilegui.file = common/ostfilegui.pro
|
||||||
|
ostfilegui.depends = ostfile
|
||||||
|
|
||||||
ostproto.file = common/ostproto.pro
|
ostproto.file = common/ostproto.pro
|
||||||
|
|
||||||
ostprotogui.file = common/ostprotogui.pro
|
ostprotogui.file = common/ostprotogui.pro
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
CONFIG += qt console
|
CONFIG += qt console
|
||||||
QT += xml network script widgets
|
QT += xml network script
|
||||||
INCLUDEPATH += "../rpc/" "../common/" "../client"
|
INCLUDEPATH += "../rpc/" "../common/" "../client"
|
||||||
win32 {
|
win32 {
|
||||||
LIBS += -lwpcap -lpacket
|
LIBS += -lwpcap -lpacket
|
||||||
|
Loading…
Reference in New Issue
Block a user