2020-04-27 15:53:51 +00:00
|
|
|
VERSION = 4.21.0.0
|
2016-11-18 15:46:39 +00:00
|
|
|
QMAKE_TARGET_COMPANY = "The pgAdmin Development Team"
|
|
|
|
QMAKE_TARGET_PRODUCT = "pgAdmin 4"
|
|
|
|
QMAKE_TARGET_DESCRIPTION = "pgAdmin 4 Desktop Runtime"
|
2020-01-02 14:43:50 +00:00
|
|
|
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2013 - 2020, The pgAdmin Development Team"
|
2016-11-18 15:46:39 +00:00
|
|
|
|
2013-06-16 13:17:46 +00:00
|
|
|
# Configure QT modules for the appropriate version of QT
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
|
|
|
message(Building for QT5+...)
|
2018-02-05 15:32:14 +00:00
|
|
|
QT += network widgets
|
2013-06-16 13:17:46 +00:00
|
|
|
} else {
|
|
|
|
message(Building for QT4...)
|
2018-02-05 15:32:14 +00:00
|
|
|
QT += network
|
2018-12-06 11:08:17 +00:00
|
|
|
DEFINES += Q_NULLPTR=NULL
|
2017-04-10 14:15:15 +00:00
|
|
|
}
|
|
|
|
win32 {
|
|
|
|
RC_ICONS += pgAdmin4.ico
|
2013-06-16 13:17:46 +00:00
|
|
|
}
|
|
|
|
|
2016-06-20 11:54:41 +00:00
|
|
|
# Environment settings for the build
|
|
|
|
QMAKE_CFLAGS += $$(PGADMIN_CFLAGS)
|
|
|
|
QMAKE_CXXFLAGS += $$(PGADMIN_CXXFLAGS)
|
|
|
|
QMAKE_LFLAGS += $$(PGADMIN_LDFLAGS)
|
|
|
|
|
2016-02-02 13:16:01 +00:00
|
|
|
win32 {
|
|
|
|
message(Building for Windows...)
|
|
|
|
|
|
|
|
# Read the PYTHON_HOME and PYTHON_VERSION system environment variables.
|
|
|
|
PY_HOME = $$(PYTHON_HOME)
|
|
|
|
PY_VERSION = $$(PYTHON_VERSION)
|
|
|
|
|
2020-04-30 07:34:09 +00:00
|
|
|
lessThan(PY_VERSION, 34) {
|
|
|
|
error(Python 3.4 or later is required.)
|
|
|
|
}
|
|
|
|
|
2016-02-02 13:16:01 +00:00
|
|
|
isEmpty(PY_HOME) {
|
|
|
|
error(Please define the PYTHON_HOME variable in the system environment.)
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
isEmpty(PY_VERSION) {
|
|
|
|
error(Please define the PYTHON_VERSION variable in the system environment.)
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
INCLUDEPATH = $$PY_HOME\include
|
|
|
|
LIBS += -L"$$PY_HOME\libs" -lpython$$PY_VERSION
|
|
|
|
}
|
2016-01-18 14:33:28 +00:00
|
|
|
}
|
2013-06-16 13:17:46 +00:00
|
|
|
}
|
2016-02-02 13:16:01 +00:00
|
|
|
else {
|
|
|
|
message(Building for Linux/Mac...)
|
2016-01-18 14:33:28 +00:00
|
|
|
|
2016-02-02 13:16:01 +00:00
|
|
|
# Find and configure Python
|
2016-06-20 10:19:57 +00:00
|
|
|
# Environment setting
|
|
|
|
PYTHON_CONFIG = $$(PYTHON_CONFIG)
|
|
|
|
|
2016-06-17 10:31:15 +00:00
|
|
|
# Maybe Python 3?
|
2016-06-17 08:40:06 +00:00
|
|
|
isEmpty(PYTHON_CONFIG) {
|
2016-06-17 10:31:15 +00:00
|
|
|
PYTHON_CONFIG = $$system(which python3-config)
|
2016-06-17 08:40:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Argh!
|
|
|
|
isEmpty(PYTHON_CONFIG) {
|
2020-04-30 07:34:09 +00:00
|
|
|
error(The python3-config executable could not be found. Ensure Python is installed and in the system path.)
|
2016-02-02 13:16:01 +00:00
|
|
|
}
|
|
|
|
|
2016-06-17 08:40:06 +00:00
|
|
|
message(Using $$PYTHON_CONFIG)
|
|
|
|
|
2020-04-29 15:19:54 +00:00
|
|
|
PYTHON_EMBED = $$system($$PYTHON_CONFIG --help 2>&1 | grep -o \'\\-\\-embed\')
|
2020-04-29 14:49:16 +00:00
|
|
|
|
2016-02-02 13:16:01 +00:00
|
|
|
QMAKE_CXXFLAGS += $$system($$PYTHON_CONFIG --includes)
|
|
|
|
QMAKE_LFLAGS += $$system($$PYTHON_CONFIG --ldflags)
|
2020-04-29 15:19:54 +00:00
|
|
|
LIBS += $$system($$PYTHON_CONFIG --libs $$PYTHON_EMBED)
|
2016-06-17 08:40:06 +00:00
|
|
|
|
|
|
|
contains( LIBS, -lpython2.* ) {
|
2020-04-30 07:34:09 +00:00
|
|
|
error(Building with Python 2 is not supported.)
|
2016-06-17 08:40:06 +00:00
|
|
|
} else {
|
2020-04-30 07:34:09 +00:00
|
|
|
message(Building with Python 3.)
|
2016-06-17 08:40:06 +00:00
|
|
|
}
|
2016-02-02 13:16:01 +00:00
|
|
|
}
|
2013-06-16 13:17:46 +00:00
|
|
|
|
|
|
|
# Source code
|
2018-07-17 11:10:35 +00:00
|
|
|
HEADERS = Server.h \
|
2016-01-18 14:33:28 +00:00
|
|
|
pgAdmin4.h \
|
2018-02-05 15:32:14 +00:00
|
|
|
ConfigWindow.h \
|
|
|
|
TrayIcon.h \
|
2018-07-17 11:10:35 +00:00
|
|
|
LogWindow.h \
|
|
|
|
MenuActions.h \
|
2018-09-14 13:41:52 +00:00
|
|
|
FloatingWindow.h \
|
|
|
|
Logger.h
|
2013-06-16 13:17:46 +00:00
|
|
|
SOURCES = pgAdmin4.cpp \
|
2016-01-18 14:33:28 +00:00
|
|
|
Server.cpp \
|
2018-02-05 15:32:14 +00:00
|
|
|
ConfigWindow.cpp \
|
|
|
|
TrayIcon.cpp \
|
2018-07-17 11:10:35 +00:00
|
|
|
LogWindow.cpp \
|
|
|
|
MenuActions.cpp \
|
2018-09-14 13:41:52 +00:00
|
|
|
FloatingWindow.cpp \
|
|
|
|
Logger.cpp
|
2020-04-13 07:52:00 +00:00
|
|
|
|
2018-02-05 15:32:14 +00:00
|
|
|
FORMS = ConfigWindow.ui \
|
2018-07-17 11:10:35 +00:00
|
|
|
LogWindow.ui \
|
|
|
|
FloatingWindow.ui
|
2013-06-16 13:17:46 +00:00
|
|
|
ICON = pgAdmin4.icns
|
|
|
|
QMAKE_INFO_PLIST = Info.plist
|
|
|
|
|
2020-04-13 07:52:00 +00:00
|
|
|
RESOURCES += pgadmin4.qrc \
|
|
|
|
breeze.qrc
|
|
|
|
|
|
|
|
macx {
|
|
|
|
HEADERS += macos.h
|
|
|
|
OBJECTIVE_SOURCES = macos.mm
|
|
|
|
}
|
2016-01-25 17:21:00 +00:00
|
|
|
|