2021-01-04 22:07:27 +08:00
|
|
|
#-------------------------------------------------
|
|
|
|
#
|
|
|
|
# Project created by QtCreator 2020-07-11T11:37:33
|
|
|
|
#
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2022-08-21 20:55:03 +08:00
|
|
|
QT += core widgets
|
2021-06-10 02:21:10 +08:00
|
|
|
|
2022-02-13 01:14:20 +08:00
|
|
|
# uncomment to override the profile compiler
|
2021-06-10 02:21:10 +08:00
|
|
|
#QMAKE_CC = clang
|
|
|
|
#QMAKE_CXX = clang++
|
2021-01-04 22:07:27 +08:00
|
|
|
|
2022-08-21 20:55:03 +08:00
|
|
|
CHARSET = -finput-charset=UTF-8 -fexec-charset=UTF-8
|
|
|
|
QMAKE_CFLAGS = $$CHARSET -fwrapv -DSTRUCT_CONFIG_OVERRIDE=1
|
2023-05-25 04:10:10 +08:00
|
|
|
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++11
|
2022-08-21 20:55:03 +08:00
|
|
|
QMAKE_CXXFLAGS_RELEASE *= -O3
|
|
|
|
|
2021-01-04 22:07:27 +08:00
|
|
|
win32: {
|
2022-08-07 23:08:25 +08:00
|
|
|
CONFIG += static_gnu
|
2022-08-21 20:55:03 +08:00
|
|
|
|
2023-05-21 21:27:47 +08:00
|
|
|
# thank you nullprogram for dealing with the Windows UTF-16 nonsense
|
2022-08-21 20:55:03 +08:00
|
|
|
LIBWINSANE = $$PWD/src/libwinsane
|
|
|
|
libwinsane.target = libwinsane
|
|
|
|
libwinsane.output = $$LIBWINSANE/libwinsane.o
|
|
|
|
libwinsane.commands = $(MAKE) -C $$LIBWINSANE -f $$LIBWINSANE/Makefile
|
|
|
|
QMAKE_EXTRA_TARGETS += libwinsane
|
|
|
|
PRE_TARGETDEPS += libwinsane
|
|
|
|
LIBS += $$LIBWINSANE/libwinsane.o
|
2023-01-07 19:48:16 +08:00
|
|
|
} else {
|
|
|
|
DEFINES += "LUA_USE_POSIX=1"
|
2022-08-07 18:43:15 +08:00
|
|
|
}
|
2022-08-07 23:08:25 +08:00
|
|
|
static_gnu: {
|
2021-01-04 22:07:27 +08:00
|
|
|
LIBS += -static -static-libgcc -static-libstdc++
|
|
|
|
}
|
|
|
|
|
2023-06-26 03:53:05 +08:00
|
|
|
gcc {
|
|
|
|
greaterThan(QMAKE_GCC_MAJOR_VERSION, 9): QMAKE_CXXFLAGS += -Wno-deprecated-copy
|
|
|
|
}
|
|
|
|
|
2023-05-21 21:27:47 +08:00
|
|
|
CONFIG(debug, debug|release): {
|
2022-02-16 05:09:48 +08:00
|
|
|
CUTARGET = debug
|
2023-06-26 03:53:05 +08:00
|
|
|
!win32 {
|
|
|
|
QMAKE_CFLAGS += -fsanitize=undefined
|
|
|
|
LIBS += -lubsan -ldl
|
|
|
|
}
|
2023-05-21 21:27:47 +08:00
|
|
|
} else {
|
|
|
|
CUTARGET = release
|
2022-02-16 05:09:48 +08:00
|
|
|
}
|
2023-05-21 21:27:47 +08:00
|
|
|
|
|
|
|
# compile cubiomes
|
2022-08-21 20:55:03 +08:00
|
|
|
CUPATH = $$PWD/cubiomes
|
2023-06-26 03:53:05 +08:00
|
|
|
QMAKE_PRE_LINK += $(MAKE) -C $$CUPATH -f $$CUPATH/makefile CC=\"$$QMAKE_CC\" CFLAGS=\"$$QMAKE_CFLAGS\" $$CUTARGET
|
2022-08-21 20:55:03 +08:00
|
|
|
QMAKE_CLEAN += $$CUPATH/*.o $$CUPATH/libcubiomes.a
|
2022-08-21 23:54:40 +08:00
|
|
|
LIBS += -lm $$CUPATH/libcubiomes.a
|
2022-08-21 20:55:03 +08:00
|
|
|
|
2023-01-07 23:58:00 +08:00
|
|
|
LUAPATH = $$PWD/lua/src
|
2021-06-10 02:21:10 +08:00
|
|
|
|
2021-01-04 22:07:27 +08:00
|
|
|
TARGET = cubiomes-viewer
|
|
|
|
|
|
|
|
SOURCES += \
|
2023-01-07 19:48:16 +08:00
|
|
|
$$LUAPATH/lapi.c \
|
|
|
|
$$LUAPATH/lauxlib.c \
|
|
|
|
$$LUAPATH/lbaselib.c \
|
|
|
|
$$LUAPATH/lcode.c \
|
|
|
|
$$LUAPATH/lcorolib.c \
|
|
|
|
$$LUAPATH/lctype.c \
|
|
|
|
$$LUAPATH/ldblib.c \
|
|
|
|
$$LUAPATH/ldebug.c \
|
|
|
|
$$LUAPATH/ldo.c \
|
|
|
|
$$LUAPATH/ldump.c \
|
|
|
|
$$LUAPATH/lfunc.c \
|
|
|
|
$$LUAPATH/lgc.c \
|
|
|
|
$$LUAPATH/linit.c \
|
|
|
|
$$LUAPATH/liolib.c \
|
|
|
|
$$LUAPATH/llex.c \
|
|
|
|
$$LUAPATH/lmathlib.c \
|
|
|
|
$$LUAPATH/lmem.c \
|
|
|
|
$$LUAPATH/loadlib.c \
|
|
|
|
$$LUAPATH/lobject.c \
|
|
|
|
$$LUAPATH/lopcodes.c \
|
|
|
|
$$LUAPATH/loslib.c \
|
|
|
|
$$LUAPATH/lparser.c \
|
|
|
|
$$LUAPATH/lstate.c \
|
|
|
|
$$LUAPATH/lstring.c \
|
|
|
|
$$LUAPATH/lstrlib.c \
|
|
|
|
$$LUAPATH/ltable.c \
|
|
|
|
$$LUAPATH/ltablib.c \
|
|
|
|
$$LUAPATH/ltm.c \
|
|
|
|
$$LUAPATH/lundump.c \
|
|
|
|
$$LUAPATH/lutf8lib.c \
|
|
|
|
$$LUAPATH/lvm.c \
|
|
|
|
$$LUAPATH/lzio.c \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/aboutdialog.cpp \
|
2022-04-24 04:45:21 +08:00
|
|
|
src/biomecolordialog.cpp \
|
2021-06-04 17:49:13 +08:00
|
|
|
src/collapsible.cpp \
|
2022-04-21 19:45:27 +08:00
|
|
|
src/conditiondialog.cpp \
|
2023-05-21 21:27:47 +08:00
|
|
|
src/config.cpp \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/configdialog.cpp \
|
2021-07-18 21:35:22 +08:00
|
|
|
src/extgendialog.cpp \
|
2022-05-22 20:11:01 +08:00
|
|
|
src/exportdialog.cpp \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/formconditions.cpp \
|
|
|
|
src/formgen48.cpp \
|
|
|
|
src/formsearchcontrol.cpp \
|
|
|
|
src/gotodialog.cpp \
|
2023-06-26 03:53:05 +08:00
|
|
|
src/headless.cpp \
|
|
|
|
src/message.cpp \
|
2022-04-11 17:52:35 +08:00
|
|
|
src/presetdialog.cpp \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/protobasedialog.cpp \
|
2023-02-05 08:42:48 +08:00
|
|
|
src/layerdialog.cpp \
|
2022-08-07 18:43:15 +08:00
|
|
|
src/mapview.cpp \
|
2021-07-07 02:45:15 +08:00
|
|
|
src/rangedialog.cpp \
|
2022-02-28 03:57:14 +08:00
|
|
|
src/rangeslider.cpp \
|
2023-01-07 19:48:16 +08:00
|
|
|
src/scripts.cpp \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/search.cpp \
|
|
|
|
src/searchthread.cpp \
|
2022-09-26 05:47:23 +08:00
|
|
|
src/tabbiomes.cpp \
|
|
|
|
src/tabstructures.cpp \
|
2022-10-01 21:30:11 +08:00
|
|
|
src/tabtriggers.cpp \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/mainwindow.cpp \
|
2022-08-07 18:43:15 +08:00
|
|
|
src/main.cpp \
|
2022-09-05 04:48:32 +08:00
|
|
|
src/structuredialog.cpp \
|
|
|
|
src/world.cpp
|
2021-01-04 22:07:27 +08:00
|
|
|
|
|
|
|
HEADERS += \
|
2021-06-10 02:21:10 +08:00
|
|
|
$$CUPATH/finders.h \
|
|
|
|
$$CUPATH/generator.h \
|
|
|
|
$$CUPATH/layers.h \
|
2022-08-21 17:59:34 +08:00
|
|
|
$$CUPATH/quadbase.h \
|
2021-06-10 02:21:10 +08:00
|
|
|
$$CUPATH/util.h \
|
2023-01-07 19:48:16 +08:00
|
|
|
$$LUAPATH/lapi.h \
|
|
|
|
$$LUAPATH/lauxlib.h \
|
|
|
|
$$LUAPATH/lcode.h \
|
|
|
|
$$LUAPATH/lctype.h \
|
|
|
|
$$LUAPATH/ldebug.h \
|
|
|
|
$$LUAPATH/ldo.h \
|
|
|
|
$$LUAPATH/lfunc.h \
|
|
|
|
$$LUAPATH/lgc.h \
|
|
|
|
$$LUAPATH/ljumptab.h \
|
|
|
|
$$LUAPATH/llex.h \
|
|
|
|
$$LUAPATH/llimits.h \
|
|
|
|
$$LUAPATH/lmem.h \
|
|
|
|
$$LUAPATH/lobject.h \
|
|
|
|
$$LUAPATH/lopcodes.h \
|
|
|
|
$$LUAPATH/lopnames.h \
|
|
|
|
$$LUAPATH/lparser.h \
|
|
|
|
$$LUAPATH/lprefix.h \
|
|
|
|
$$LUAPATH/lstate.h \
|
|
|
|
$$LUAPATH/lstring.h \
|
|
|
|
$$LUAPATH/ltable.h \
|
|
|
|
$$LUAPATH/ltm.h \
|
|
|
|
$$LUAPATH/lua.h \
|
|
|
|
$$LUAPATH/lua.hpp \
|
|
|
|
$$LUAPATH/luaconf.h \
|
|
|
|
$$LUAPATH/lualib.h \
|
|
|
|
$$LUAPATH/lundump.h \
|
|
|
|
$$LUAPATH/lvm.h \
|
|
|
|
$$LUAPATH/lzio.h \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/aboutdialog.h \
|
2022-04-24 04:45:21 +08:00
|
|
|
src/biomecolordialog.h \
|
2021-06-04 17:49:13 +08:00
|
|
|
src/collapsible.h \
|
2022-04-21 19:45:27 +08:00
|
|
|
src/conditiondialog.h \
|
2023-05-21 21:27:47 +08:00
|
|
|
src/config.h \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/configdialog.h \
|
2021-07-18 21:35:22 +08:00
|
|
|
src/extgendialog.h \
|
2022-05-22 20:11:01 +08:00
|
|
|
src/exportdialog.h \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/formconditions.h \
|
|
|
|
src/formgen48.h \
|
|
|
|
src/formsearchcontrol.h \
|
|
|
|
src/gotodialog.h \
|
2023-06-26 03:53:05 +08:00
|
|
|
src/headless.h \
|
|
|
|
src/message.h \
|
2022-04-11 17:52:35 +08:00
|
|
|
src/presetdialog.h \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/protobasedialog.h \
|
2023-02-05 08:42:48 +08:00
|
|
|
src/layerdialog.h \
|
2022-08-07 18:43:15 +08:00
|
|
|
src/mapview.h \
|
|
|
|
src/cutil.h \
|
2021-07-07 02:45:15 +08:00
|
|
|
src/rangedialog.h \
|
2022-02-28 03:57:14 +08:00
|
|
|
src/rangeslider.h \
|
2023-01-07 19:48:16 +08:00
|
|
|
src/scripts.h \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/search.h \
|
|
|
|
src/searchthread.h \
|
|
|
|
src/seedtables.h \
|
2022-09-26 05:47:23 +08:00
|
|
|
src/tabbiomes.h \
|
|
|
|
src/tabstructures.h \
|
2022-10-01 21:30:11 +08:00
|
|
|
src/tabtriggers.h \
|
2022-08-07 18:43:15 +08:00
|
|
|
src/mainwindow.h \
|
2022-09-05 04:48:32 +08:00
|
|
|
src/structuredialog.h \
|
|
|
|
src/world.h
|
2021-01-04 22:07:27 +08:00
|
|
|
|
|
|
|
FORMS += \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/aboutdialog.ui \
|
2022-04-24 04:45:21 +08:00
|
|
|
src/biomecolordialog.ui \
|
2022-04-21 19:45:27 +08:00
|
|
|
src/conditiondialog.ui \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/configdialog.ui \
|
2021-07-18 21:35:22 +08:00
|
|
|
src/extgendialog.ui \
|
2022-05-22 20:11:01 +08:00
|
|
|
src/exportdialog.ui \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/formconditions.ui \
|
|
|
|
src/formgen48.ui \
|
|
|
|
src/formsearchcontrol.ui \
|
|
|
|
src/gotodialog.ui \
|
2022-04-11 17:52:35 +08:00
|
|
|
src/presetdialog.ui \
|
2021-06-03 23:04:28 +08:00
|
|
|
src/protobasedialog.ui \
|
2023-02-05 08:42:48 +08:00
|
|
|
src/layerdialog.ui \
|
2022-08-07 18:43:15 +08:00
|
|
|
src/mainwindow.ui \
|
2022-07-30 02:29:39 +08:00
|
|
|
src/rangedialog.ui \
|
2022-09-26 05:47:23 +08:00
|
|
|
src/tabbiomes.ui \
|
|
|
|
src/tabstructures.ui \
|
2022-10-01 21:30:11 +08:00
|
|
|
src/tabtriggers.ui \
|
|
|
|
src/structuredialog.ui
|
2021-01-04 22:07:27 +08:00
|
|
|
|
2022-05-22 20:11:01 +08:00
|
|
|
|
2021-01-04 22:07:27 +08:00
|
|
|
RESOURCES += \
|
2022-02-20 06:03:23 +08:00
|
|
|
rc/icons.qrc \
|
|
|
|
rc/style.qrc \
|
2022-05-22 20:11:01 +08:00
|
|
|
rc/examples.qrc \
|
|
|
|
rc/lang.qrc
|
|
|
|
|
|
|
|
|
2023-05-24 04:38:44 +08:00
|
|
|
# ----- translations (pluralization) -----
|
|
|
|
|
|
|
|
TRANSLATIONS += \
|
2023-06-24 17:19:24 +08:00
|
|
|
rc/lang/en_US.ts \
|
|
|
|
rc/lang/de_DE.ts \
|
|
|
|
rc/lang/zh_CN.ts
|
2022-05-22 20:11:01 +08:00
|
|
|
|
2022-07-30 02:29:39 +08:00
|
|
|
translations: {
|
2022-05-22 20:11:01 +08:00
|
|
|
# automatically run lupdate for pluralization default translation
|
2022-08-21 20:55:03 +08:00
|
|
|
THIS_FILE = cubiomes-viewer.pro
|
2022-05-22 20:11:01 +08:00
|
|
|
lupdate.input = THIS_FILE
|
|
|
|
lupdate.output = output.dummy.1 # removed by clean
|
|
|
|
lupdate.commands = $$[QT_INSTALL_BINS]/lupdate -pluralonly -noobsolete ${QMAKE_FILE_IN}
|
|
|
|
lupdate.CONFIG += no_link target_predeps
|
|
|
|
|
|
|
|
lrelease.input = TRANSLATIONS
|
|
|
|
lrelease.output = output.dummy.2 # removed by clean
|
|
|
|
lrelease.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN} \
|
|
|
|
-qm ${QMAKE_FILE_PATH}/${QMAKE_FILE_IN_BASE}.qm
|
|
|
|
lrelease.CONFIG += no_link target_predeps
|
|
|
|
|
|
|
|
QMAKE_EXTRA_COMPILERS += lupdate lrelease
|
|
|
|
#CONFIG += lrelease embed_translations # does this do anything?
|
|
|
|
}
|
2022-02-20 06:03:23 +08:00
|
|
|
|
|
|
|
|
2022-04-14 03:24:54 +08:00
|
|
|
# enable network features with: qmake CONFIG+=with_network
|
|
|
|
with_network: {
|
2022-03-03 04:24:26 +08:00
|
|
|
QT += network
|
|
|
|
DEFINES += "WITH_UPDATER=1"
|
|
|
|
SOURCES += src/updater.cpp
|
|
|
|
HEADERS += src/updater.h
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|