INIshell-ng

INIshell-ng Git Source Tree

Root/inishell.pro

1###############################################################################
2# Copyright 2019 WSL Institute for Snow and Avalanche Research SLF-DAVOS #
3###############################################################################
4# This file is part of INIshell.
5# INIshell is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9
10# INIshell is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14
15# You should have received a copy of the GNU General Public License
16# along with INIshell. If not, see <http://www.gnu.org/licenses/>.
17
18#The only qmake file for this project. Use 'qmake inishell.pro; make'.
19#2019-10
20
21#CONFIG += debug
22CONFIG -= debug
23#CONFIG -= app_bundle
24CONFIG += release
25
26message("Building from $$_PRO_FILE_ ...")
27
28QT += core gui widgets xml xmlpatterns
29
30CONFIG += c++11
31#CONFIG += static
32
33CONFIG(debug) { #in release, we try everything
34 message("Debug build, enabling check.")
35 lessThan(QT_MAJOR_VERSION, 5): error("Qt5 is required for this project.")
36 CONFIG += strict_c++ #disable compiler extensions
37 CONFIG += warn_on
38 QMAKE_CXXFLAGS += -Wall
39 DEFINES += QT_DEPRECATED_WARNINGS
40 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 #error for all APIs deprecated before Qt 6.0.0
41 DEFINES += DEBUG #to be able to check at runtime
42} else {
43 message("Release build.")
44 QMAKE_CXXFLAGS += -Wall -lto
45}
46
47VERSION = "2.0.5"
48VERSION_PE_HEADER = "2.0"
49DEFINES += APP_VERSION_STR=\\\"$$VERSION\\\"
50QMAKE_TARGET_COMPANY = "WSL Institute for Snow and Avalanche Research"
51QMAKE_TARGET_DESCRIPTION = "Graphical User Interface for various models. The GUI is dynamically generated from a semantic description contained in XML files."
52QMAKE_TARGET_COPYRIGHT = "GPLv3"
53
54RESOURCES = resources/inishell.qrc
55RC_ICONS = resources/icons/inishell_192.ico #for Windows
56ICON = resources/icons/inishell_192.icns #for Mac OS when not set in the program yet (launching)
57
58##package the applications' XML files into Mac's dmg file
59applicationsXML.files = $$PWD/inishell-apps
60applicationsXML.path = Contents/
61QMAKE_BUNDLE_DATA += applicationsXML
62
63##package meteoio_timeseries into Mac's dmg file
64#meteoio.files = $$PWD/../meteoio/bin/meteoio_timeseries $$PWD/../meteoio/lib/libmeteoio.dylib
65#meteoio.path = Contents/MacOS
66
67SOURCES += \
68 src/gui/AboutWindow.cc \
69 src/gui/ApplicationsView.cc \
70 src/gui/IniFolderView.cc \
71 src/gui/Logger.cc \
72 src/gui/MainPanel.cc \
73 src/gui/MainWindow.cc \
74 src/gui/PathView.cc \
75 src/gui/PreviewEdit.cc \
76 src/gui/PreviewWindow.cc \
77 src/gui/TerminalView.cc \
78 src/gui/WorkflowPanel.cc \
79 src/gui_elements/Atomic.cc \
80 src/gui_elements/Checkbox.cc \
81 src/gui_elements/Checklist.cc \
82 src/gui_elements/Choice.cc \
83 src/gui_elements/Datepicker.cc \
84 src/gui_elements/Dropdown.cc \
85 src/gui_elements/FilePath.cc \
86 src/gui_elements/GridPanel.cc \
87 src/gui_elements/Group.cc \
88 src/gui_elements/gui_elements.cc \
89 src/gui_elements/Helptext.cc \
90 src/gui_elements/HorizontalPanel.cc \
91 src/gui_elements/Label.cc \
92 src/gui_elements/Number.cc \
93 src/gui_elements/Replicator.cc \
94 src/gui_elements/Selector.cc \
95 src/gui_elements/Spacer.cc \
96 src/gui_elements/Textfield.cc \
97 src/main/colors.cc \
98 src/main/common.cc \
99 src/main/dimensions.cc \
100 src/main/Error.cc \
101 src/main/INIParser.cc \
102 src/main/expressions.cc \
103 src/main/inishell.cc \
104 src/main/main.cc \
105 src/main/os.cc \
106 src/main/settings.cc \
107 src/main/XMLReader.cc \
108 lib/tinyexpr.c
109
110HEADERS += \
111 src/gui/AboutWindow.h \
112 src/gui/ApplicationsView.h \
113 src/gui/IniFolderView.h \
114 src/gui/Logger.h \
115 src/gui/MainPanel.h \
116 src/gui/MainWindow.h \
117 src/gui/PathView.h \
118 src/gui/PreviewEdit.h \
119 src/gui/PreviewWindow.h \
120 src/gui/TerminalView.h \
121 src/gui/WorkflowPanel.h \
122 src/gui_elements/Atomic.h \
123 src/gui_elements/Checkbox.h \
124 src/gui_elements/Checklist.h \
125 src/gui_elements/Choice.h \
126 src/gui_elements/Datepicker.h \
127 src/gui_elements/Dropdown.h \
128 src/gui_elements/FilePath.h \
129 src/gui_elements/gui_elements.h \
130 src/gui_elements/GridPanel.h \
131 src/gui_elements/Group.h \
132 src/gui_elements/Helptext.h \
133 src/gui_elements/HorizontalPanel.h \
134 src/gui_elements/Label.h \
135 src/gui_elements/Number.h \
136 src/gui_elements/Replicator.h \
137 src/gui_elements/Selector.h \
138 src/gui_elements/Spacer.h \
139 src/gui_elements/Textfield.h \
140 src/main/XMLReader.h \
141 src/main/colors.h \
142 src/main/common.h \
143 src/main/constants.h \
144 src/main/dimensions.h \
145 src/main/Error.h \
146 src/main/INIParser.h \
147 src/main/expressions.h \
148 src/main/inishell.h \
149 src/main/os.h \
150 src/main/settings.h \
151 lib/tinyexpr.h
152
153#automatic creation of .qm language files from .ts language dictionaries:
154LANGUAGES = de
155for(language, LANGUAGES) {
156 TRANSLATIONS += "resources/languages/inishell_$${language}.ts"
157}
158TRANSLATIONS_FILES = ""
159qtPrepareTool(LRELEASE, lrelease) #get real lrelease tool
160for(file_ts, TRANSLATIONS) {
161 file_qm = $$file_ts #same path as .ts (not build) because it will be embedded as resource
162 file_qm ~= s,.ts$,.qm #regex replacement
163 cmd = $$LRELEASE -removeidentical $$file_ts -qm $$file_qm
164 system($$cmd) | message("Error: could not execute '$${cmd}'")
165 TRANSLATIONS_FILES += $$file_qm
166}
167#TRANSLATIONS = resources/languages/inishell_de.ts #manual way
168
169DESTDIR = ./build #put executable here
170MOC_DIR = ./tmp/obj #clutter build directory instead of source
171OBJECTS_DIR = $$MOC_DIR
172
173#deploy configuration
174isEmpty(TARGET_EXT) {
175 win32 {
176 TARGET_CUSTOM_EXT = .exe
177 }
178 macx {
179 TARGET_CUSTOM_EXT = .app
180 }
181} else {
182 TARGET_CUSTOM_EXT = $${TARGET_EXT}
183}
184DEPLOY_TARGET = $$shell_quote($$shell_path($${DESTDIR}/$${TARGET}$${TARGET_CUSTOM_EXT}))
185
186win32 {
187 DEPLOY_COMMAND = $$shell_quote($$shell_path($$[QT_INSTALL_BINS]\windeployqt --no-system-d3d-compiler --no-opengl-sw --no-angle --no-opengl))
188 # Use += instead of = if you use multiple QMAKE_POST_LINKs
189 # Force windeployqt to run in cmd, because powershell has different syntax
190 # for running executables.
191 QMAKE_POST_LINK = cmd /c $${DEPLOY_COMMAND} $${DEPLOY_TARGET}
192}
193macx {
194 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
195 DEPLOY_COMMAND = $$shell_quote($$shell_path($$[QT_INSTALL_BINS]\macdeployqt))
196 # Use += instead of = if you use multiple QMAKE_POST_LINKs
197 QMAKE_POST_LINK = $${DEPLOY_COMMAND} $${DEPLOY_TARGET} -dmg -always-overwrite -verbose=1
198}
199
200
201# # Uncomment the following line to help debug the deploy command when running qmake
202#warning($${DEPLOY_COMMAND} $${DEPLOY_TARGET})
203
204message("Configuration done.")

Archive Download this file