-
Notifications
You must be signed in to change notification settings - Fork 35
/
QuickCore.inc
192 lines (168 loc) · 5.06 KB
/
QuickCore.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{
This file is part of QuickCore: https://github.com/exilon/QuickCore
QuickCore. Copyright (C) 2024 Kike Pérez
Exilon - https://www.exilon.es
***************************************************************************
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
***************************************************************************
}
{$ifdef FPC}
{$MODE DELPHI}
{$INLINE ON}
{$define HASINLINE}
{$ifdef LINUX}
{$define FPCLINUX}
{$endif}
{$ifdef ANDROID}
{$define LINUX}
{$endif}
{$ifdef VER2_7}
{$define ISFPC27}
{$endif}
{$ifdef VER3_0}
{$define ISFPC27}
{$define ISFPC30}
{$endif}
{$ifdef VER3_1}
{$define ISFPC27}
{$define ISFPC30}
{$endif}
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
{$define FPC_ENUMHASINNER}
{$endif}
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
{$define ISDELPHI2006ANDUP}
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
{$else FPC}
{$ifdef CONDITIONALEXPRESSIONS} //Delphi 6 or newer
{$define HASINTERFACERTTI} //interface RTTI (not FPC)
{$ifndef LINUX}
{$ifdef VER140}
{$define DELPHI6_UP} //Delphi 6 or newer
{$else}
{$define DELPHI7_UP} //Delphi 7 or newer
{$endif}
{$endif LINUX}
{$if CompilerVersion >= 17}
{$define DELPHI2005_UP} //Delphi 2005 or newer
{$ifend}
{$if CompilerVersion >= 18}
{$define DELPHI2006_UP} //Delphi 2006 or newer
{$define HASINLINE}
{$ifend}
{$if CompilerVersion > 18}
{$define DELPHI2007_UP} //Delphi 2007 or newer
{$ifend}
{$if CompilerVersion = 20}
{$define DELPHI2009_UP} //Delphi 2009
{$ifend}
{$if CompilerVersion >= 21.0} //Delphi 2010
{$define DELPHI2010_UP}
{$define FPC_OR_UNICODE}
{$ifend}
{$if CompilerVersion >= 22.0} //Delphi XE
{$define DELPHIXE_UP}
{$ifend}
{$if CompilerVersion >= 23.0} //Delphi XE2
{$define DELPHIXE2_UP}
{$ifend}
{$if CompilerVersion >= 24.0} //Delphi XE3
{$define DELPHIXE3_UP}
{$ifend}
{$if CompilerVersion >= 25.0} //Delphi XE4
{$define DELPHIXE4_UP}
{$ifend}
{$if CompilerVersion >= 26.0} //Delphi XE5
{$define DELPHIXE5_UP}
{$ifend}
{$if CompilerVersion >= 27.0} //Delphi XE6
{$define DELPHIXE6_UP}
{$ifend}
{$if CompilerVersion >= 28.0} //Delphi XE7
{$define DELPHIXE7_UP}
{$ifend}
{$if CompilerVersion >= 29.0} //Delphi XE8
{$define DELPHIXE8_UP}
{$ifend}
{$if CompilerVersion >= 30.0} //Delphi XE10 Seattle
{$define DELPHIRX10_UP}
{$define DELPHISEATTLE_UP}
{$ifend}
{$if CompilerVersion >= 31.0} //Delphi RX10.1 Berlin
{$define DELPHIRX101_UP}
{$define DELPHIBERLIN_UP}
{$ifend}
{$if CompilerVersion >= 32.0} //Delphi RX10.2 Tokyo
{$define DELPHIRX102_UP}
{$define DELPHITOKYO_UP}
{$ifdef LINUX}
{$define DELPHILINUX}
{$ifend}
{$ifend}
{$if CompilerVersion >= 33.0} //Delphi RX10.3 Rio
{$define DELPHIRX103_UP}
{$define DELPHIRIO_UP}
{$ifend}
{$if CompilerVersion >= 34.0} //Delphi RX10.4 Sydney
{$define DELPHIRX104_UP}
{$define DELPHISYDNEY_UP}
{$ifend}
{$if CompilerVersion >= 35.0} //Delphi RX11 Alexandria
{$define DELPHIRX11_UP}
{$define DELPHIALEXANDRIA_UP}
{$if defined(ANDROID) OR defined(IOS)}
{$define NEXTGEN} //compatibility with older delphis
{$endif}
{$ifend}
{$if CompilerVersion >= 36.0} //Delphi RX12 Athens
{$define DELPHIRX12_UP}
{$define DELPHIATHENS_UP}
{$if defined(ANDROID) OR defined(IOS)}
{$define NEXTGEN} //compatibility with older delphis
{$endif}
{$ifend}
{$else}
//Delphi 5 or older
{$define DELPHI6OROLDER}
{$define DELPHI5OROLDER}
{$define DELPHI5ORFPC}
{$define MSWINDOWS}
{$endif}
{$endif FPC}
{$ifdef VER150}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$ENDIF}
{$ifdef CONDITIONALEXPRESSIONS} //Delphi 6 or newer
{.$WARN SYMBOL_PLATFORM OFF}
{.$WARN UNIT_PLATFORM OFF}
{$endif}
{.$define SHOW_ENVIRONMENTPATH_ERRORS}
//format params as TValue
{$DEFINE VALUE_FORMATPARAMS}
{$DEFINE FIREDAC_SHOW_WAITCURSOR}
//Debug library
{$IFDEF DEBUG}
{.$DEFINE DEBUG_LIB}
{.$DEFINE DEBUG_HANDLEDEXCEPTIONS}
{.$DEFINE DEBUG_ROUTING}
{.$DEFINE DEBUG_HTTPCONTEXT}
{.$DEFINE DEBUG_AUTENTICATION}
{.$DEFINE DEBUG_MAPPER}
{.$DEFINE DEBUG_ENTITY}
{.$DEFINE DEBUG_DI}
{.$DEFINE DEBUG_CONTROLLER}
{.$DEFINE DEBUG_MSQ}
{.$DEFINE DEBUG_LOGGING}
{.$DEFINE DEBUG_HEALTHCHECKS}
{$ENDIF}