xref: /aoo4110/main/solenv/inc/verinfo.hrc (revision b1cdbd2c)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef _VERINFO_HRC
25#define _VERINFO_HRC
26
27// include ---------------------------------------------------------------
28
29#ifndef WIN32
30#include <ver.h>
31#else
32#include <winver.h>
33#endif
34
35// general preprocessor string management --------------------------------
36
37#ifndef PPSX
38#define PPSX(s) #s
39#endif
40#ifndef PPS
41#define PPS(s) PPSX(s)
42#endif
43
44#ifndef PPCX
45#define PPCX(s1, s2) s1##s2
46#endif
47#ifndef PPCAT
48#define PPCAT(s1, s2) PPCX(s1, s2)
49#endif
50
51// define order of date parts --------------------------------------------
52
53#if defined(LG_D)
54  #define VER_DMY
55#else
56  #define VER_YMD
57#endif
58
59// set VERVARIANT to 0 if not defined ------------------------------------
60
61#if !defined(VERVARIANT)
62  #define VERVARIANT 0
63#endif
64
65// define pre release state ----------------------------------------------
66
67#ifdef VER_CONCEPT
68  #define VER_PREL 1
69  #define VER_COUNT (0+VER_CONCEPT)
70  #define VER1 Concept (Level VER_CONCEPT)
71#endif
72
73#ifdef VER_ALPHA
74  #define VER_PREL 1
75  #define VER_COUNT (100+VER_ALPHA)
76  #define VER1 Alpha (Level VER_ALPHA)
77#endif
78
79#ifdef VER_BETA
80  #define VER_PREL 1
81  #define VER_COUNT (200+VER_BETA)
82  #define VER1 Beta (Level VER_BETA)
83#endif
84
85#ifdef VER_GAMMA
86  #define VER_PREL 1
87  #define VER_COUNT (300+VER_GAMMA)
88  #define VER1 Gamma (Level VER_GAMMA)
89#endif
90
91#ifdef VER_FINAL
92  #define VER_COUNT (500+VER_FINAL)
93  #if VER_FINAL==0
94    #undef VER1
95  #elif VER_FINAL==1
96    #define VER1 1
97  #elif VER_FINAL==2
98    #define VER1 2
99  #elif VER_FINAL==3
100    #define VER1 3
101  #elif VER_FINAL==4
102    #define VER1 4
103  #elif VER_FINAL==5
104    #define VER1 5
105  #elif VER_FINAL==6
106    #define VER1 6
107  #elif VER_FINAL==7
108    #define VER1 7
109  #elif VER_FINAL==8
110    #define VER1 8
111  #elif VER_FINAL==9
112    #define VER1 9
113  #elif VER_FINAL==10
114    #define VER1 a
115  #elif VER_FINAL==11
116    #define VER1 b
117  #elif VER_FINAL==12
118    #define VER1 c
119  #endif
120#endif
121
122#ifdef SUBVERSION
123#if SUBVERSION < 10
124  #define VER4 PPCAT(0, SUBVERSION)
125#else
126  #define VER4 SUBVERSION
127#endif
128#else
129  #define VER4 0.0
130#endif
131
132#ifndef VER1
133#if VERVARIANT > 0
134  #define VER_LEVEL VERSION.VER4.VERVARIANT
135#else
136  #define VER_LEVEL VERSION.VER4
137#endif
138#else
139  #define VERC1(a, b, c) a.b##c
140  #define VERC2(a, b, c) VERC1(a, b, c)
141  #define VER_LEVEL VERC2(VERSION, VER4, VER1)
142#endif
143
144#if !defined(VER_DMY) && VER_DAY < 10
145  #define VER5 PPCAT(0, VER_DAY)
146#else
147  #define VER5 VER_DAY
148#endif
149
150// define month strings --------------------------------------------------
151
152#if VER_MONTH==1
153  #define VER2 Jan
154#elif VER_MONTH==2
155  #define VER2 Feb
156#elif VER_MONTH==3
157  #ifdef LG_D
158    #define VER2 M\344r
159  #else
160    #define VER2 Mar
161  #endif
162#elif VER_MONTH==4
163  #define VER2 Apr
164#elif VER_MONTH==5
165  #ifdef LG_D
166    #define VER2 Mai
167  #else
168    #define VER2 May
169  #endif
170#elif VER_MONTH==6
171  #define VER2 Jun
172#elif VER_MONTH==7
173  #define VER2 Jul
174#elif VER_MONTH==8
175  #define VER2 Aug
176#elif VER_MONTH==9
177  #define VER2 Sep
178#elif VER_MONTH==10
179  #ifdef LG_D
180    #define VER2 Okt
181  #else
182    #define VER2 Oct
183  #endif
184#elif VER_MONTH==11
185  #define VER2 Nov
186#elif VER_MONTH==12
187  #ifdef LG_D
188    #define VER2 Dez
189  #else
190    #define VER2 Dec
191  #endif
192#endif
193
194#ifdef LG_D
195  #define VERC3(a, b, c) a.b.c
196#else
197  #define VERC3(a, b, c) c-b-a
198#endif
199#define VERC4(a, b, c) VERC3(a, b, c)
200#define VER_DATE VERC4(VER5, VER2, VER_YEAR)
201
202#if PPCAT(1, VER_FIRSTYEAR)==PPCAT(1, VER_YEAR)
203  #define VER_YEARRANGE VER_FIRSTYEAR
204#else
205  #define VER_YEARRANGE VER_FIRSTYEAR-VER_YEAR
206#endif
207
208#if VER_FIRSTYEAR > 100
209#define VERC5(a) Copyright \251 a by
210#define VERC6(a) VERC5(a)
211#else
212#define VERC5(a) Copyright \251 20##a by
213#define VERC6(a) VERC5(a)
214#endif
215
216#define S_CRIGHT PPS(VERC6(VER_YEARRANGE))
217
218#ifdef LG_D
219#define S_VERSION PPS(Version VER_LEVEL vom VER_DATE)
220#else
221#define S_VERSION PPS(Version VER_LEVEL of VER_DATE)
222#endif
223
224#endif	// _VERINFO_HRC
225
226