mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Fix the sqlcipher build option in the qmake project to actually enable the SQLCipher support. Add a new dialog called CipherDialog which is used to ask the user for the password and other encryption details instead of using standard Qt input dialogs.
140 lines
3.4 KiB
Prolog
140 lines
3.4 KiB
Prolog
TEMPLATE = app
|
|
|
|
QT += core gui network
|
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
|
|
|
TARGET = sqlitebrowser
|
|
|
|
CONFIG += debug_and_release
|
|
CONFIG += qt
|
|
CONFIG += warn_on
|
|
|
|
# create a unittest option
|
|
CONFIG(unittest) {
|
|
CONFIG += qtestlib
|
|
HEADERS += tests/testsqlobjects.h tests/TestImport.h
|
|
SOURCES += tests/testsqlobjects.cpp tests/TestImport.cpp tests/TestMain.cpp
|
|
} else {
|
|
SOURCES += main.cpp
|
|
}
|
|
|
|
HEADERS += \
|
|
sqlitedb.h \
|
|
MainWindow.h \
|
|
SQLiteSyntaxHighlighter.h \
|
|
CreateIndexDialog.h \
|
|
AboutDialog.h \
|
|
EditTableDialog.h \
|
|
PreferencesDialog.h \
|
|
EditDialog.h \
|
|
ExportCsvDialog.h \
|
|
ImportCsvDialog.h \
|
|
sqltextedit.h \
|
|
sqlitetypes.h \
|
|
csvparser.h \
|
|
ExtendedTableWidget.h \
|
|
grammar/Sqlite3Lexer.hpp \
|
|
grammar/Sqlite3Parser.hpp \
|
|
grammar/sqlite3TokenTypes.hpp \
|
|
sqlitetablemodel.h \
|
|
FilterTableHeader.h \
|
|
gen_version.h \
|
|
SqlExecutionArea.h \
|
|
VacuumDialog.h \
|
|
DbStructureModel.h \
|
|
Application.h \
|
|
sqlite.h \
|
|
CipherDialog.h
|
|
|
|
SOURCES += \
|
|
sqlitedb.cpp \
|
|
MainWindow.cpp \
|
|
SQLiteSyntaxHighlighter.cpp \
|
|
CreateIndexDialog.cpp \
|
|
EditTableDialog.cpp \
|
|
PreferencesDialog.cpp \
|
|
AboutDialog.cpp \
|
|
EditDialog.cpp \
|
|
ExportCsvDialog.cpp \
|
|
ImportCsvDialog.cpp \
|
|
sqltextedit.cpp \
|
|
sqlitetypes.cpp \
|
|
csvparser.cpp \
|
|
ExtendedTableWidget.cpp \
|
|
grammar/Sqlite3Lexer.cpp \
|
|
grammar/Sqlite3Parser.cpp \
|
|
sqlitetablemodel.cpp \
|
|
FilterTableHeader.cpp \
|
|
SqlExecutionArea.cpp \
|
|
VacuumDialog.cpp \
|
|
DbStructureModel.cpp \
|
|
Application.cpp \
|
|
CipherDialog.cpp
|
|
|
|
RESOURCES += icons/icons.qrc
|
|
|
|
FORMS += \
|
|
MainWindow.ui \
|
|
CreateIndexDialog.ui \
|
|
AboutDialog.ui \
|
|
EditTableDialog.ui \
|
|
PreferencesDialog.ui \
|
|
EditDialog.ui \
|
|
ExportCsvDialog.ui \
|
|
ImportCsvDialog.ui \
|
|
SqlExecutionArea.ui \
|
|
VacuumDialog.ui \
|
|
CipherDialog.ui
|
|
|
|
TRANSLATIONS += \
|
|
translations/sqlb_cn.ts \
|
|
translations/sqlb_de.ts \
|
|
translations/sqlb_fr.ts \
|
|
translations/sqlb_ru.ts
|
|
|
|
CONFIG(sqlcipher) {
|
|
QMAKE_CXXFLAGS += -DENABLE_SQLCIPHER
|
|
LIBS += -lsqlcipher
|
|
} else {
|
|
LIBS += -lsqlite3
|
|
}
|
|
|
|
LIBPATH_QHEXEDIT=$$PWD/../libs/qhexedit
|
|
LIBPATH_ANTLR=$$PWD/../libs/antlr-2.7.7
|
|
LIBPATH_QCUSTOMPLOT=$$PWD/../libs/qcustomplot-source
|
|
unix {
|
|
LIBS += -ldl
|
|
}
|
|
win32 {
|
|
RC_FILE = winapp.rc
|
|
INCLUDEPATH += $$PWD
|
|
CONFIG(debug,debug|release) {
|
|
LIBPATH_QHEXEDIT = $$LIBPATH_QHEXEDIT/debug
|
|
LIBPATH_ANTLR = $$LIBPATH_ANTLR/debug
|
|
LIBPATH_QCUSTOMPLOT = $$LIBPATH_QCUSTOMPLOT/debug
|
|
}
|
|
CONFIG(release,debug|release) {
|
|
LIBPATH_QHEXEDIT = $$LIBPATH_QHEXEDIT/release
|
|
LIBPATH_ANTLR = $$LIBPATH_ANTLR/release
|
|
LIBPATH_QCUSTOMPLOT = $$LIBPATH_QCUSTOMPLOT/release
|
|
}
|
|
}
|
|
mac {
|
|
RC_FILE = macapp.icns
|
|
INCLUDEPATH += -I/usr/local/include \
|
|
-I/usr/local/opt/sqlite/include
|
|
LIBS += -L/usr/local/lib \
|
|
-L/usr/local/opt/sqlite/lib \
|
|
-framework Carbon
|
|
QMAKE_INFO_PLIST = app.plist
|
|
QMAKE_CXXFLAGS += -DCHECKNEWVERSION
|
|
}
|
|
|
|
UI_DIR = .ui
|
|
INCLUDEPATH += $$PWD/../libs/antlr-2.7.7 $$PWD/../libs/qhexedit $$PWD/../libs/qcustomplot-source $$PWD/..
|
|
LIBS += -L$$LIBPATH_QHEXEDIT -L$$LIBPATH_ANTLR -L$$LIBPATH_QCUSTOMPLOT -lantlr -lqhexedit -lqcustomplot
|
|
DEPENDPATH += $$PWD/../libs/antlr-2.7.7 $$PWD/../libs/qhexedit $$PWD/../libs/qcustomplot-source
|
|
|
|
# Rules for creating/updating {ts|qm}-files
|
|
include(i18n.pri)
|