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