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

Archive Download this file