1 | # !kmk_ash
|
---|
2 | # $Id: gen-slickedit-workspace.sh 60587 2016-04-20 09:48:47Z vboxsync $
|
---|
3 | ## @file
|
---|
4 | # Script for generating a SlickEdit workspace.
|
---|
5 | #
|
---|
6 |
|
---|
7 | #
|
---|
8 | # Copyright (C) 2009-2015 Oracle Corporation
|
---|
9 | #
|
---|
10 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | # available from http://www.virtualbox.org. This file is free software;
|
---|
12 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | # General Public License (GPL) as published by the Free Software
|
---|
14 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | #
|
---|
18 |
|
---|
19 | #
|
---|
20 | # Some constants.
|
---|
21 | #
|
---|
22 | MY_CAT="kmk_cat"
|
---|
23 | MY_CP="kmk_cp"
|
---|
24 | MY_MKDIR="kmk_mkdir"
|
---|
25 | MY_MV="kmk_mv"
|
---|
26 | MY_SED="kmk_sed"
|
---|
27 | MY_RM="kmk_rm"
|
---|
28 | MY_SLEEP="kmk_sleep"
|
---|
29 | MY_EXPR="kmk_expr"
|
---|
30 | MY_SVN="svn"
|
---|
31 |
|
---|
32 | #MY_SORT="kmk_cat"
|
---|
33 | MY_SORT="sort"
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Globals.
|
---|
37 | #
|
---|
38 | MY_PROJECT_FILES=""
|
---|
39 | MY_OUT_DIRS="\
|
---|
40 | out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE} \
|
---|
41 | out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE} \
|
---|
42 | out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/debug \
|
---|
43 | out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/debug \
|
---|
44 | out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/release \
|
---|
45 | out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/release \
|
---|
46 | out/linux.amd64/debug \
|
---|
47 | out/linux.x86/debug \
|
---|
48 | out/win.amd64/debug \
|
---|
49 | out/win.x86/debug \
|
---|
50 | out/darwin.amd64/debug \
|
---|
51 | out/darwin.x86/debug \
|
---|
52 | out/haiku.amd64/debug \
|
---|
53 | out/haiku.x86/debug \
|
---|
54 | out/solaris.amd64/debug \
|
---|
55 | out/solaris.x86/debug";
|
---|
56 |
|
---|
57 |
|
---|
58 | #
|
---|
59 | # Parameters w/ defaults.
|
---|
60 | #
|
---|
61 | MY_ROOT_DIR=".."
|
---|
62 | MY_OUT_DIR="SlickEdit"
|
---|
63 | MY_PRJ_PRF="VBox-"
|
---|
64 | MY_WS_NAME="VirtualBox.vpw"
|
---|
65 | MY_DBG=""
|
---|
66 | MY_WINDOWS_HOST=""
|
---|
67 | MY_OPT_MINIMAL=""
|
---|
68 | MY_OPT_USE_WILDCARDS="yes"
|
---|
69 |
|
---|
70 | #MY_KBUILD_PATH="${KBUILD_PATH}"
|
---|
71 | #test -z "${MY_KBUILD_PATH}" && MY_KBUILD_PATH="${PATH_KBUILD}"
|
---|
72 | #MY_KBUILD=""
|
---|
73 |
|
---|
74 |
|
---|
75 | ##
|
---|
76 | # Gets the absolute path to an existing directory.
|
---|
77 | #
|
---|
78 | # @param $1 The path.
|
---|
79 | my_abs_dir()
|
---|
80 | {
|
---|
81 | if test -n "${PWD}"; then
|
---|
82 | MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && echo ${PWD}`
|
---|
83 | else
|
---|
84 | # old cygwin shell has no PWD and need adjusting.
|
---|
85 | MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && pwd | ${MY_SED} -e 's,^/cygdrive/\(.\)/,\1:/,'`
|
---|
86 | fi
|
---|
87 | if test -z "${MY_ABS_DIR}"; then
|
---|
88 | MY_ABS_DIR="${1}"
|
---|
89 | fi
|
---|
90 | }
|
---|
91 |
|
---|
92 | ##
|
---|
93 | # Gets the file name part of a path.
|
---|
94 | #
|
---|
95 | # @param $1 The path.
|
---|
96 | my_get_name()
|
---|
97 | {
|
---|
98 | SAVED_IFS=$IFS
|
---|
99 | IFS=":/ "
|
---|
100 | set $1
|
---|
101 | while test $# -gt 1 -a -n "${2}";
|
---|
102 | do
|
---|
103 | shift;
|
---|
104 | done
|
---|
105 |
|
---|
106 | IFS=$SAVED_IFS
|
---|
107 | #echo "$1"
|
---|
108 | export MY_GET_NAME=$1
|
---|
109 | }
|
---|
110 |
|
---|
111 | ##
|
---|
112 | # Generate file entry for the specified file if it was found to be of interest.
|
---|
113 | #
|
---|
114 | # @param $1 The output file name base.
|
---|
115 | # @param $2 The file name.
|
---|
116 | # @param $3 Optional folder override.
|
---|
117 | my_file()
|
---|
118 | {
|
---|
119 | # sort and filter by file type.
|
---|
120 | case "$2" in
|
---|
121 | # drop these.
|
---|
122 | *.kup|*~|*.pyc|*.exe|*.sys|*.dll|*.o|*.obj|*.lib|*.a|*.ko)
|
---|
123 | return 0
|
---|
124 | ;;
|
---|
125 |
|
---|
126 | # by prefix or directory component.
|
---|
127 | tst*|*/testcase/*)
|
---|
128 | MY_FOLDER="$1-Testcases.lst"
|
---|
129 | ;;
|
---|
130 |
|
---|
131 | # by extension.
|
---|
132 | *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h|*.java)
|
---|
133 | MY_FOLDER="$1-Sources.lst"
|
---|
134 | ;;
|
---|
135 |
|
---|
136 | *.h|*.hpp|*.mm)
|
---|
137 | MY_FOLDER="$1-Headers.lst"
|
---|
138 | ;;
|
---|
139 |
|
---|
140 | *.asm|*.s|*.S|*.inc|*.mac)
|
---|
141 | MY_FOLDER="$1-Assembly.lst"
|
---|
142 | ;;
|
---|
143 |
|
---|
144 | *)
|
---|
145 | MY_FOLDER="$1-Others.lst"
|
---|
146 | ;;
|
---|
147 | esac
|
---|
148 | if test -n "$3";
|
---|
149 | then
|
---|
150 | MY_FOLDER="$1-$3.lst"
|
---|
151 | fi
|
---|
152 |
|
---|
153 | ## @todo only files which are in subversion.
|
---|
154 | # if ${MY_SVN} info "${2}" > /dev/null 2>&1; then
|
---|
155 | my_get_name "${2}"
|
---|
156 | echo ' <!-- sortkey: '"${MY_GET_NAME}"' --> <F N="'"${2}"'"/>' >> "${MY_FOLDER}"
|
---|
157 | # fi
|
---|
158 | }
|
---|
159 |
|
---|
160 | ##
|
---|
161 | # Generate file entry for the specified file if it was found to be of interest.
|
---|
162 | #
|
---|
163 | # @param $1 The output file name base.
|
---|
164 | # @param $2 The wildcard spec.
|
---|
165 | # @param $3 Optional folder override.
|
---|
166 | my_wildcard()
|
---|
167 | {
|
---|
168 | if test -n "$3"; then
|
---|
169 | MY_FOLDER="$1-$3.lst"
|
---|
170 | else
|
---|
171 | MY_FOLDER="$1-All.lst"
|
---|
172 | fi
|
---|
173 | EXCLUDES="*.log;*.kup;*~;*.pyc;*.exe;*.sys;*.dll;*.o;*.obj;*.lib;*.a;*.ko;*.class;*.cvsignore;*.done;*.project;*.actionScriptProperties;*.scm-settings;*.svnpatch.rej;*.svn-base;.svn/*"
|
---|
174 | echo ' <F N="'"${2}"'/*" Recurse="1" Excludes="'"${EXCLUDES}"'"/>' >> "${MY_FOLDER}"
|
---|
175 | }
|
---|
176 |
|
---|
177 | ##
|
---|
178 | # Generate file entries for the specified sub-directory tree.
|
---|
179 | #
|
---|
180 | # @param $1 The output filename.
|
---|
181 | # @param $2 The sub-directory.
|
---|
182 | # @param $3 Optional folder override.
|
---|
183 | my_sub_tree()
|
---|
184 | {
|
---|
185 | if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi
|
---|
186 |
|
---|
187 | # Skip .svn directories.
|
---|
188 | case "$2" in
|
---|
189 | */.svn|*/.svn)
|
---|
190 | return 0
|
---|
191 | ;;
|
---|
192 | esac
|
---|
193 |
|
---|
194 | # Process the files in the directory.
|
---|
195 | for f in $2/*;
|
---|
196 | do
|
---|
197 | if test -d "${f}";
|
---|
198 | then
|
---|
199 | my_sub_tree "${1}" "${f}" "${3}"
|
---|
200 | else
|
---|
201 | my_file "${1}" "${f}" "${3}"
|
---|
202 | fi
|
---|
203 | done
|
---|
204 | return 0;
|
---|
205 | }
|
---|
206 |
|
---|
207 |
|
---|
208 | ##
|
---|
209 | # Generate folders for the specified directories and files.
|
---|
210 | #
|
---|
211 | # @param $1 The output (base) file name.
|
---|
212 | # @param $2+ The files and directories to traverse.
|
---|
213 | my_generate_folder()
|
---|
214 | {
|
---|
215 | MY_FILE="$1"
|
---|
216 | shift
|
---|
217 |
|
---|
218 | # Zap existing file collections.
|
---|
219 | > "${MY_FILE}-All.lst"
|
---|
220 | > "${MY_FILE}-Sources.lst"
|
---|
221 | > "${MY_FILE}-Headers.lst"
|
---|
222 | > "${MY_FILE}-Assembly.lst"
|
---|
223 | > "${MY_FILE}-Testcases.lst"
|
---|
224 | > "${MY_FILE}-Others.lst"
|
---|
225 |
|
---|
226 | # Traverse the directories and files.
|
---|
227 | while test $# -ge 1 -a -n "${1}";
|
---|
228 | do
|
---|
229 | for f in ${MY_ROOT_DIR}/$1;
|
---|
230 | do
|
---|
231 | if test -d "${f}";
|
---|
232 | then
|
---|
233 | if test -z "${MY_OPT_USE_WILDCARDS}";
|
---|
234 | then
|
---|
235 | my_sub_tree "${MY_FILE}" "${f}"
|
---|
236 | else
|
---|
237 | case "${f}" in
|
---|
238 | ${MY_ROOT_DIR}/include*)
|
---|
239 | #my_sub_tree "${MY_FILE}" "${f}" "Headers"
|
---|
240 | my_wildcard "${MY_FILE}" "${f}" "Headers"
|
---|
241 | ;;
|
---|
242 | *) my_wildcard "${MY_FILE}" "${f}"
|
---|
243 | ;;
|
---|
244 | esac
|
---|
245 | fi
|
---|
246 | else
|
---|
247 | my_file "${MY_FILE}" "${f}"
|
---|
248 | fi
|
---|
249 | done
|
---|
250 | shift
|
---|
251 | done
|
---|
252 |
|
---|
253 | # Generate the folders.
|
---|
254 | if test -s "${MY_FILE}-All.lst";
|
---|
255 | then
|
---|
256 | ${MY_SORT} "${MY_FILE}-All.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
257 | fi
|
---|
258 | if test -s "${MY_FILE}-Sources.lst";
|
---|
259 | then
|
---|
260 | echo ' <Folder Name="Sources" Filters="*.c;*.cpp;*.cpp.h;*.c.h;*.m;*.mm;*.pl;*.py;*.as">' >> "${MY_FILE}"
|
---|
261 | ${MY_SORT} "${MY_FILE}-Sources.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
262 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
263 | fi
|
---|
264 | if test -s "${MY_FILE}-Headers.lst";
|
---|
265 | then
|
---|
266 | if test -z "${MY_OPT_USE_WILDCARDS}";
|
---|
267 | then
|
---|
268 | echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}"
|
---|
269 | else
|
---|
270 | echo ' <Folder Name="Headers" Filters="">' >> "${MY_FILE}"
|
---|
271 | fi
|
---|
272 | ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
273 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
274 | fi
|
---|
275 | if test -s "${MY_FILE}-Assembly.lst";
|
---|
276 | then
|
---|
277 | echo ' <Folder Name="Assembly" Filters="*.asm;*.s;*.S;*.inc;*.mac">' >> "${MY_FILE}"
|
---|
278 | ${MY_SORT} "${MY_FILE}-Assembly.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
279 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
280 | fi
|
---|
281 | if test -s "${MY_FILE}-Testcases.lst";
|
---|
282 | then
|
---|
283 | echo ' <Folder Name="Testcases" Filters="tst*;">' >> "${MY_FILE}"
|
---|
284 | ${MY_SORT} "${MY_FILE}-Testcases.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
285 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
286 | fi
|
---|
287 | if test -s "${MY_FILE}-Others.lst";
|
---|
288 | then
|
---|
289 | echo ' <Folder Name="Others" Filters="">' >> "${MY_FILE}"
|
---|
290 | ${MY_SORT} "${MY_FILE}-Others.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}"
|
---|
291 | echo ' </Folder>' >> "${MY_FILE}"
|
---|
292 | fi
|
---|
293 |
|
---|
294 | # Cleanup
|
---|
295 | ${MY_RM} "${MY_FILE}-All.lst" "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" \
|
---|
296 | "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst"
|
---|
297 | }
|
---|
298 |
|
---|
299 |
|
---|
300 | ##
|
---|
301 | # Function generating a project.
|
---|
302 | #
|
---|
303 | # @param $1 The project file name.
|
---|
304 | # @param $2 The project working directory.
|
---|
305 | # @param $3 Dummy separator.
|
---|
306 | # @param $4+ Include directories.
|
---|
307 | # @param $N --end-includes
|
---|
308 | # @param $N+1 Directory sub-trees and files to include in the project.
|
---|
309 | #
|
---|
310 | my_generate_project()
|
---|
311 | {
|
---|
312 | MY_FILE="${MY_PRJ_PRF}${1}.vpj";
|
---|
313 | echo "Generating ${MY_FILE}..."
|
---|
314 | MY_WRK_DIR="${2}"
|
---|
315 | shift
|
---|
316 | shift
|
---|
317 | shift
|
---|
318 |
|
---|
319 | # Add it to the project list for workspace construction later on.
|
---|
320 | MY_PROJECT_FILES="${MY_PROJECT_FILES} ${MY_FILE}"
|
---|
321 |
|
---|
322 |
|
---|
323 | #
|
---|
324 | # Generate the head bits.
|
---|
325 | #
|
---|
326 | echo '<!DOCTYPE Project SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpj.dtd">' > "${MY_FILE}"
|
---|
327 | echo '<Project' >> "${MY_FILE}"
|
---|
328 | echo ' Version="10.0"' >> "${MY_FILE}"
|
---|
329 | echo ' VendorName="SlickEdit"' >> "${MY_FILE}"
|
---|
330 | echo ' VCSProject="Subversion:"' >> "${MY_FILE}"
|
---|
331 | # echo ' Customized="1"' >> "${MY_FILE}"
|
---|
332 | # echo ' WorkingDir="."' >> "${MY_FILE}"
|
---|
333 | my_abs_dir "${MY_WRK_DIR}" >> "${MY_FILE}"
|
---|
334 | echo ' WorkingDir="'"${MY_ABS_DIR}"'"' >> "${MY_FILE}"
|
---|
335 | echo ' >' >> "${MY_FILE}"
|
---|
336 | echo ' <Config Name="Release" OutputFile="" CompilerConfigName="Latest Version">' >> "${MY_FILE}"
|
---|
337 | echo ' <Menu>' >> "${MY_FILE}"
|
---|
338 | echo ' <Target Name="Compile" MenuCaption="&Compile" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
|
---|
339 | echo ' SaveOption="SaveCurrent" RunFromDir="%p" ClearProcessBuffer="1">' >> "${MY_FILE}"
|
---|
340 | echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %p %n.o"/>' >> "${MY_FILE}"
|
---|
341 | echo ' </Target>' >> "${MY_FILE}"
|
---|
342 | echo ' <Target Name="Build" MenuCaption="&Build"CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
|
---|
343 | echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
|
---|
344 | echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %rw"/>' >> "${MY_FILE}"
|
---|
345 | echo ' </Target>' >> "${MY_FILE}"
|
---|
346 | echo ' <Target Name="Rebuild" MenuCaption="&Rebuild" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}"
|
---|
347 | echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}"
|
---|
348 | echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %rw rebuild"/>' >> "${MY_FILE}"
|
---|
349 | echo ' </Target>' >> "${MY_FILE}"
|
---|
350 | echo ' <Target Name="Debug" MenuCaption="&Debug" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}"
|
---|
351 | echo ' <Exec/>' >> "${MY_FILE}"
|
---|
352 | echo ' </Target>' >> "${MY_FILE}"
|
---|
353 | echo ' <Target Name="Execute" MenuCaption="E&xecute" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}"
|
---|
354 | echo ' <Exec/>' >> "${MY_FILE}"
|
---|
355 | echo ' </Target>' >> "${MY_FILE}"
|
---|
356 | echo ' </Menu>' >> "${MY_FILE}"
|
---|
357 |
|
---|
358 | #
|
---|
359 | # Include directories.
|
---|
360 | #
|
---|
361 | echo ' <Includes>' >> "${MY_FILE}"
|
---|
362 | while test $# -ge 1 -a "${1}" != "--end-includes";
|
---|
363 | do
|
---|
364 | for f in $1;
|
---|
365 | do
|
---|
366 | my_abs_dir ${f}
|
---|
367 | echo ' <Include Dir="'"${MY_ABS_DIR}/"'"/>' >> "${MY_FILE}"
|
---|
368 | done
|
---|
369 | shift
|
---|
370 | done
|
---|
371 | shift
|
---|
372 | echo ' </Includes>' >> "${MY_FILE}"
|
---|
373 | echo ' </Config>' >> "${MY_FILE}"
|
---|
374 |
|
---|
375 |
|
---|
376 | #
|
---|
377 | # Process directories+files and create folders.
|
---|
378 | #
|
---|
379 | echo ' <Files>' >> "${MY_FILE}"
|
---|
380 | my_generate_folder "${MY_FILE}" $*
|
---|
381 | echo ' </Files>' >> "${MY_FILE}"
|
---|
382 |
|
---|
383 | #
|
---|
384 | # The tail.
|
---|
385 | #
|
---|
386 | echo '</Project>' >> "${MY_FILE}"
|
---|
387 |
|
---|
388 | return 0
|
---|
389 | }
|
---|
390 |
|
---|
391 |
|
---|
392 | ##
|
---|
393 | # Generate the workspace
|
---|
394 | #
|
---|
395 | my_generate_workspace()
|
---|
396 | {
|
---|
397 | MY_FILE="${MY_WS_NAME}"
|
---|
398 | echo "Generating ${MY_FILE}..."
|
---|
399 | echo '<!DOCTYPE Workspace SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpw.dtd">' > "${MY_FILE}"
|
---|
400 | echo '<Workspace Version="10.0" VendorName="SlickEdit">' >> "${MY_FILE}"
|
---|
401 | echo ' <Projects>' >> "${MY_FILE}"
|
---|
402 | for i in ${MY_PROJECT_FILES};
|
---|
403 | do
|
---|
404 | echo ' <Project File="'"${i}"'" />' >> "${MY_FILE}"
|
---|
405 | done
|
---|
406 | echo ' </Projects>' >> "${MY_FILE}"
|
---|
407 | echo '</Workspace>' >> "${MY_FILE}"
|
---|
408 | return 0;
|
---|
409 | }
|
---|
410 |
|
---|
411 |
|
---|
412 | ##
|
---|
413 | # Generate stuff
|
---|
414 | #
|
---|
415 | my_generate_usercpp_h()
|
---|
416 | {
|
---|
417 | #
|
---|
418 | # Probe the slickedit user config, picking the most recent version.
|
---|
419 | #
|
---|
420 | if test -z "${MY_SLICK_CONFIG}"; then
|
---|
421 | if test -d "${HOME}/Library/Application Support/Slickedit"; then
|
---|
422 | MY_SLICKDIR_="${HOME}/Library/Application Support/Slickedit"
|
---|
423 | MY_USERCPP_H="unxcpp.h"
|
---|
424 | MY_VSLICK_DB="vslick.stu"
|
---|
425 | elif test -d "${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"; then
|
---|
426 | MY_SLICKDIR_="${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"
|
---|
427 | MY_USERCPP_H="usercpp.h"
|
---|
428 | MY_VSLICK_DB="vslick.sta"
|
---|
429 | else
|
---|
430 | MY_SLICKDIR_="${HOME}/.slickedit"
|
---|
431 | MY_USERCPP_H="unxcpp.h"
|
---|
432 | MY_VSLICK_DB="vslick.stu"
|
---|
433 | fi
|
---|
434 | else
|
---|
435 | MY_SLICKDIR_="${MY_SLICK_CONFIG}"
|
---|
436 | if test -n "${MY_WINDOWS_HOST}"; then
|
---|
437 | MY_USERCPP_H="usercpp.h"
|
---|
438 | MY_VSLICK_DB="vslick.sta"
|
---|
439 | else
|
---|
440 | MY_USERCPP_H="unxcpp.h"
|
---|
441 | MY_VSLICK_DB="vslick.stu"
|
---|
442 | fi
|
---|
443 | # MacOS: Implement me!
|
---|
444 | fi
|
---|
445 |
|
---|
446 | MY_VER_NUM="0"
|
---|
447 | MY_VER="0.0.0"
|
---|
448 | for subdir in "${MY_SLICKDIR_}/"*;
|
---|
449 | do
|
---|
450 | if test -f "${subdir}/${MY_USERCPP_H}" -o -f "${subdir}/${MY_VSLICK_DB}"; then
|
---|
451 | MY_CUR_VER_NUM=0
|
---|
452 | MY_CUR_VER=`echo "${subdir}" | ${MY_SED} -e 's,^.*/,,g'`
|
---|
453 |
|
---|
454 | # Convert the dotted version number to an integer, checking that
|
---|
455 | # it is all numbers in the process.
|
---|
456 | set `echo "${MY_CUR_VER}" | ${MY_SED} 's/\./ /g' `
|
---|
457 | i=100000000
|
---|
458 | while test $# -gt 0;
|
---|
459 | do
|
---|
460 | if ! ${MY_EXPR} "$1" + 1 > /dev/null 2> /dev/null; then
|
---|
461 | MY_CUR_VER_NUM=0;
|
---|
462 | break
|
---|
463 | fi
|
---|
464 | if test "$i" -gt 0; then
|
---|
465 | MY_CUR_VER_NUM=$((${MY_CUR_VER_NUM} + $1 * $i))
|
---|
466 | i=$(($i / 100))
|
---|
467 | fi
|
---|
468 | shift
|
---|
469 | done
|
---|
470 |
|
---|
471 | # More recent that what we have?
|
---|
472 | if test "${MY_CUR_VER_NUM}" -gt "${MY_VER_NUM}"; then
|
---|
473 | MY_VER_NUM="${MY_CUR_VER_NUM}"
|
---|
474 | MY_VER="${MY_CUR_VER}"
|
---|
475 | fi
|
---|
476 | fi
|
---|
477 | done
|
---|
478 |
|
---|
479 | MY_SLICKDIR="${MY_SLICKDIR_}/${MY_VER}"
|
---|
480 | MY_USERCPP_H_FULL="${MY_SLICKDIR}/${MY_USERCPP_H}"
|
---|
481 | if test -d "${MY_SLICKDIR}"; then
|
---|
482 | echo "Found SlickEdit v${MY_VER} preprocessor file: ${MY_USERCPP_H_FULL}"
|
---|
483 | else
|
---|
484 | echo "Failed to locate SlickEdit preprocessor file. You need to manually merge ${MY_USERCPP_H}."
|
---|
485 | MY_USERCPP_H_FULL=""
|
---|
486 | fi
|
---|
487 |
|
---|
488 | # Generate our
|
---|
489 | MY_FILE="${MY_USERCPP_H}"
|
---|
490 | ${MY_CAT} > ${MY_FILE} <<EOF
|
---|
491 | #define IN_SLICKEDIT
|
---|
492 | #define RT_C_DECLS_BEGIN
|
---|
493 | #define RT_C_DECLS_END
|
---|
494 | #define RT_NO_THROW
|
---|
495 | #define RT_THROW(type) throw(type)
|
---|
496 | #define RT_GCC_EXTENSION'
|
---|
497 | #define RT_COMPILER_GROKS_64BIT_BITFIELDS'
|
---|
498 | #define RT_COMPILER_WITH_80BIT_LONG_DOUBLE'
|
---|
499 |
|
---|
500 | #define ATL_NO_VTABLE
|
---|
501 | #define BEGIN_COM_MAP(a)
|
---|
502 | #define COM_INTERFACE_ENTRY(a)
|
---|
503 | #define COM_INTERFACE_ENTRY2(a,b)
|
---|
504 | #define COM_INTERFACE_ENTRY3(a,b,c)
|
---|
505 | #define COM_INTERFACE_ENTRY4(a,b,c,d)
|
---|
506 | #define END_COM_MAP(a)
|
---|
507 |
|
---|
508 | #define COM_DECL_READONLY_ENUM_AND_COLLECTION(a)
|
---|
509 | #define COMGETTER(n) n
|
---|
510 | #define COMSETTER(n) n
|
---|
511 | #define ComSafeArrayIn(t,a) t a[]
|
---|
512 | #define ComSafeArrayOut(t,a) t * a[]
|
---|
513 | #define DECLARE_CLASSFACTORY(a)
|
---|
514 | #define DECLARE_CLASSFACTORY_SINGLETON(a)
|
---|
515 | #define DECLARE_REGISTRY_RESOURCEID(a)
|
---|
516 | #define DECLARE_NOT_AGGREGATABLE(a)
|
---|
517 | #define DECLARE_PROTECT_FINAL_CONSTRUCT(a)
|
---|
518 | #define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a();
|
---|
519 | #define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {}
|
---|
520 | #define NS_DECL_ISUPPORTS
|
---|
521 | #define NS_IMETHOD virtual nsresult
|
---|
522 | #define NS_IMETHOD_(type) virtual type
|
---|
523 | #define NS_IMETHODIMP nsresult
|
---|
524 | #define NS_IMETHODIMP_(type) type
|
---|
525 | #define PARSERS_EXPORT
|
---|
526 | EOF
|
---|
527 | if test -n "${MY_WINDOWS_HOST}"; then
|
---|
528 | ${MY_CAT} >> ${MY_FILE} <<EOF
|
---|
529 | #define COM_STRUCT_OR_CLASS(I) struct I
|
---|
530 | #define STDMETHOD(m) virtual HRESULT m
|
---|
531 | #define STDMETHOD_(type,m) virtual type m
|
---|
532 | #define STDMETHODIMP HRESULT
|
---|
533 | #define STDMETHODIMP_(type) type
|
---|
534 | EOF
|
---|
535 | else
|
---|
536 | ${MY_CAT} >> ${MY_FILE} <<EOF
|
---|
537 | #define COM_STRUCT_OR_CLASS(I) class I
|
---|
538 | #define STDMETHOD(m) virtual nsresult m
|
---|
539 | #define STDMETHOD_(type,m) virtual type m
|
---|
540 | #define STDMETHODIMP nsresult
|
---|
541 | #define STDMETHODIMP_(type) type
|
---|
542 | EOF
|
---|
543 | fi
|
---|
544 | ${MY_CAT} >> ${MY_FILE} <<EOF
|
---|
545 | #define VBOX_SCRIPTABLE(a) public a
|
---|
546 | #define VBOX_SCRIPTABLE_IMPL(a)
|
---|
547 | #define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a)
|
---|
548 |
|
---|
549 | #define CTX_SUFF(var) var##R3
|
---|
550 | #define CTXAllSUFF(var) var##R3
|
---|
551 | #define CTXSUFF(var) var##HC
|
---|
552 | #define OTHERCTXSUFF(var) var##GC
|
---|
553 | #define CTXALLMID(first, last) first##R3##last
|
---|
554 | #define CTXMID(first, last) first##HC##last
|
---|
555 | #define OTHERCTXMID(first, last) first##GC##last
|
---|
556 | #define CTXTYPE(GCType, R3Type, R0Type) R3Type
|
---|
557 | #define RCTYPE(RCType, HCType) RCType
|
---|
558 | #define GCTYPE(GCType, HCType) GCType
|
---|
559 | #define RCPTRTYPE(RCType) RCType
|
---|
560 | #define GCPTRTYPE(GCType) GCType
|
---|
561 | #define HCPTRTYPE(HCType) HCType
|
---|
562 | #define R3R0PTRTYPE(HCType) HCType
|
---|
563 | #define R0PTRTYPE(R3Type) R3Type
|
---|
564 | #define R3PTRTYPE(R0Type) R0Type
|
---|
565 | #define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__
|
---|
566 | #define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction
|
---|
567 | #define RT_SRC_POS_ARGS pszFile, iLine, pszFunction
|
---|
568 | #define RTCALL
|
---|
569 | #define DECLINLINE(type) inline type
|
---|
570 | #define DECL_FORCE_INLINE(type) inline type
|
---|
571 | #define DECL_INVALID(type) type
|
---|
572 |
|
---|
573 | #define PDMDEVINSINT_DECLARED 1
|
---|
574 | #define VBOX_WITH_HGCM 1
|
---|
575 | #define VBOXCALL
|
---|
576 |
|
---|
577 | #define PGM_ALL_CB_DECL(type) type
|
---|
578 | #define PGM_ALL_CB2_DECL(type) type
|
---|
579 | #define PGM_CTX(a,b) b
|
---|
580 | #define PGM_CTX3(a,b,c) c
|
---|
581 | #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name)
|
---|
582 | #define PGM_GST_NAME_REAL(name) PGM_CTX3(name)
|
---|
583 | #define PGM_GST_NAME_PROT(name) PGM_CTX3(pgm,GstProt,name)
|
---|
584 | #define PGM_GST_NAME_32BIT(name) PGM_CTX3(pgm,Gst32Bit,name)
|
---|
585 | #define PGM_GST_NAME_PAE(name) PGM_CTX3(pgm,GstPAE,name)
|
---|
586 | #define PGM_GST_NAME_AMD64(name) PGM_CTX3(pgm,GstAMD64,name)
|
---|
587 | #define PGM_GST_DECL(type, name) type PGM_GST_NAME(name)
|
---|
588 | #define PGM_SHW_NAME(name) PGM_GST_NAME_AMD64(name)
|
---|
589 | #define PGM_SHW_NAME_32BIT(name) PGM_CTX3(pgm,Shw32Bit,name)
|
---|
590 | #define PGM_SHW_NAME_PAE(name) PGM_CTX3(pgm,ShwPAE,name)
|
---|
591 | #define PGM_SHW_NAME_AMD64(name) PGM_CTX3(pgm,ShwAMD64,name)
|
---|
592 | #define PGM_SHW_NAME_NESTED(name) PGM_CTX3(pgm,ShwNested,name)
|
---|
593 | #define PGM_SHW_NAME_EPT(name) PGM_CTX3(pgm,ShwEPT,name)
|
---|
594 | #define PGM_SHW_DECL(type, name) type PGM_SHW_NAME(name)
|
---|
595 | #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name)
|
---|
596 | #define PGM_BTH_NAME_32BIT_REAL(name) PGM_CTX3(pgm,Bth,name)
|
---|
597 | #define PGM_BTH_NAME_32BIT_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
598 | #define PGM_BTH_NAME_32BIT_32BIT(name) PGM_CTX3(pgm,Bth,name)
|
---|
599 | #define PGM_BTH_NAME_PAE_REAL(name) PGM_CTX3(pgm,Bth,name)
|
---|
600 | #define PGM_BTH_NAME_PAE_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
601 | #define PGM_BTH_NAME_PAE_32BIT(name) PGM_CTX3(pgm,Bth,name)
|
---|
602 | #define PGM_BTH_NAME_PAE_PAE(name) PGM_CTX3(pgm,Bth,name)
|
---|
603 | #define PGM_BTH_NAME_AMD64_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
604 | #define PGM_BTH_NAME_AMD64_AMD64(name) PGM_CTX3(pgm,Bth,name)
|
---|
605 | #define PGM_BTH_NAME_NESTED_REAL(name) PGM_CTX3(pgm,Bth,name)
|
---|
606 | #define PGM_BTH_NAME_NESTED_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
607 | #define PGM_BTH_NAME_NESTED_32BIT(name) PGM_CTX3(pgm,Bth,name)
|
---|
608 | #define PGM_BTH_NAME_NESTED_PAE(name) PGM_CTX3(pgm,Bth,name)
|
---|
609 | #define PGM_BTH_NAME_NESTED_AMD64(name) PGM_CTX3(pgm,Bth,name)
|
---|
610 | #define PGM_BTH_NAME_EPT_REAL(name) PGM_CTX3(pgm,Bth,name)
|
---|
611 | #define PGM_BTH_NAME_EPT_PROT(name) PGM_CTX3(pgm,Bth,name)
|
---|
612 | #define PGM_BTH_NAME_EPT_32BIT(name) PGM_CTX3(pgm,Bth,name)
|
---|
613 | #define PGM_BTH_NAME_EPT_PAE(name) PGM_CTX3(pgm,Bth,name)
|
---|
614 | #define PGM_BTH_NAME_EPT_AMD64(name) PGM_CTX3(pgm,Bth,name)
|
---|
615 | #define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name)
|
---|
616 |
|
---|
617 | #define FNIEMOP_STUB(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) { return VERR_NOT_IMPLEMENTED; }
|
---|
618 | #define FNIEMOP_DEF(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
|
---|
619 | #define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0)
|
---|
620 | #define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0, a_Type1 a_Name1)
|
---|
621 | #define IEM_CIMPL_DEF_0(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)
|
---|
622 | #define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0)
|
---|
623 | #define IEM_CIMPL_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1)
|
---|
624 | #define IEM_CIMPL_DEF_3(a_Name, a_Type0, a_Name0, a_Type1, a_Name1, a_Type2, a_Name2) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1, , a_Type2 a_Name2)
|
---|
625 | #define IEM_MC_LOCAL(a_Type, a_Name) a_Type a_Name
|
---|
626 | #define IEM_MC_ARG(a_Type, a_Name, a_iArg) a_Type a_Name
|
---|
627 | #define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) a_Type const a_Name = a_Value
|
---|
628 | #define IEM_STATIC
|
---|
629 |
|
---|
630 | #define RTASN1_IMPL_GEN_SEQ_OF_TYPEDEFS_AND_PROTOS(a_SeqOfType, a_ItemType, a_DeclMacro, a_ImplExtNm) typedef struct a_SeqOfType { RTASN1SEQUENCECORE SeqCore; RTASN1ALLOCATION Allocation; uint32_t cItems; RT_CONCAT(P,a_ItemType) paItems; } a_SeqOfType; typedef a_SeqOfType *P##a_SeqOfType, const *PC##a_SeqOfType; int a_ImplExtNm##_DecodeAsn1(struct RTASN1CURSOR *pCursor, uint32_t fFlags, P##a_SeqOfType pThis, const char *pszErrorTag); int a_ImplExtNm##_Compare(PC##a_SeqOfType pLeft, PC##a_SeqOfType pRight)
|
---|
631 | #define RTASN1_IMPL_GEN_SET_OF_TYPEDEFS_AND_PROTOS(a_SetOfType, a_ItemType, a_DeclMacro, a_ImplExtNm) typedef struct a_SetOfType { RTASN1SETCORE SetCore; RTASN1ALLOCATION Allocation; uint32_t cItems; RT_CONCAT(P,a_ItemType) paItems; } a_SetOfType; typedef a_SetOfType *P##a_SetOfType, const *PC##a_SetOfType; int a_ImplExtNm##_DecodeAsn1(struct RTASN1CURSOR *pCursor, uint32_t fFlags, P##a_SetOfType pThis, const char *pszErrorTag); int a_ImplExtNm##_Compare(PC##a_SetOfType pLeft, PC##a_SetOfType pRight)
|
---|
632 | #define RTASN1TYPE_STANDARD_PROTOTYPES_NO_GET_CORE(a_TypeNm, a_DeclMacro, a_ImplExtNm) int a_ImplExtNm##_Init(P##a_TypeNm pThis, PCRTASN1ALLOCATORVTABLE pAllocator); int a_ImplExtNm##_Clone(P##a_TypeNm pThis, PC##a_TypeNm) pSrc, PCRTASN1ALLOCATORVTABLE pAllocator); void a_ImplExtNm##_Delete(P##a_TypeNm pThis); int a_ImplExtNm##_Enum(P##a_TypeNm pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser); int a_ImplExtNm##_Compare(PC##a_TypeNm) pLeft, PC##a_TypeNm pRight); int a_ImplExtNm##_DecodeAsn1(PRTASN1CURSOR pCursor, uint32_t fFlags, P##a_TypeNm pThis, const char *pszErrorTag); int a_ImplExtNm##_CheckSanity(PC##a_TypeNm pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
|
---|
633 | #define RTASN1TYPE_STANDARD_PROTOTYPES(a_TypeNm, a_DeclMacro, a_ImplExtNm, a_Asn1CoreNm) inline PRTASN1CORE a_ImplExtNm##_GetAsn1Core(PC##a_TypeNm pThis) { return (PRTASN1CORE)&pThis->a_Asn1CoreNm; } inline bool a_ImplExtNm##_IsPresent(PC##a_TypeNm pThis) { return pThis && RTASN1CORE_IS_PRESENT(&pThis->a_Asn1CoreNm); } RTASN1TYPE_STANDARD_PROTOTYPES_NO_GET_CORE(a_TypeNm, a_DeclMacro, a_ImplExtNm)
|
---|
634 |
|
---|
635 | #define BS3_DECL(type) type
|
---|
636 | #define BS3_DECL_CALLBACK(type) type
|
---|
637 | #define TMPL_NM(name) name##_mmm
|
---|
638 | #define TMPL_FAR_NM(name) name##_mmm_far
|
---|
639 | #define BS3_CMN_NM(name) name
|
---|
640 | #define BS3_CMN_FAR_NM(name) name
|
---|
641 | #define BS3_CMN_FN_NM(name) name
|
---|
642 | #define BS3_DATA_NM(name) name
|
---|
643 | #define BS3_FAR
|
---|
644 | #define BS3_FAR_CODE
|
---|
645 | #define BS3_FAR_DATA
|
---|
646 | #define BS3_NEAR
|
---|
647 | #define BS3_NEAR_CODE
|
---|
648 | #define BS3_CMN_PROTO_STUB(a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
|
---|
649 | #define BS3_CMN_PROTO_NOSB(a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
|
---|
650 | #define BS3_CMN_DEF( a_RetType, a_Name, a_Params) a_RetType a_Name a_Params
|
---|
651 | #define BS3_MODE_PROTO_STUB(a_RetType, a_Name, a_Params) \
|
---|
652 | a_RetType a_Name##_mmm a_Params; \
|
---|
653 | a_RetType a_Name##_mmm_far a_Params; \
|
---|
654 | a_RetType a_Name##_rm a_Params; \
|
---|
655 | a_RetType a_Name##_pe16 a_Params; \
|
---|
656 | a_RetType a_Name##_pe16_32 a_Params; \
|
---|
657 | a_RetType a_Name##_pe16_v86 a_Params; \
|
---|
658 | a_RetType a_Name##_pe32 a_Params; \
|
---|
659 | a_RetType a_Name##_pe32_16 a_Params; \
|
---|
660 | a_RetType a_Name##_pev86 a_Params; \
|
---|
661 | a_RetType a_Name##_pp16 a_Params; \
|
---|
662 | a_RetType a_Name##_pp16_32 a_Params; \
|
---|
663 | a_RetType a_Name##_pp16_v86 a_Params; \
|
---|
664 | a_RetType a_Name##_pp32 a_Params; \
|
---|
665 | a_RetType a_Name##_pp32_16 a_Params; \
|
---|
666 | a_RetType a_Name##_ppv86 a_Params; \
|
---|
667 | a_RetType a_Name##_pae16 a_Params; \
|
---|
668 | a_RetType a_Name##_pae16_32 a_Params; \
|
---|
669 | a_RetType a_Name##_pae16_v86 a_Params; \
|
---|
670 | a_RetType a_Name##_pae32 a_Params; \
|
---|
671 | a_RetType a_Name##_pae32_16 a_Params; \
|
---|
672 | a_RetType a_Name##_paev86 a_Params; \
|
---|
673 | a_RetType a_Name##_lm16 a_Params; \
|
---|
674 | a_RetType a_Name##_lm32 a_Params; \
|
---|
675 | a_RetType a_Name##_lm64 a_Params; \
|
---|
676 | a_RetType a_Name##_rm_far a_Params; \
|
---|
677 | a_RetType a_Name##_pe16_far a_Params; \
|
---|
678 | a_RetType a_Name##_pe16_v86_far a_Params; \
|
---|
679 | a_RetType a_Name##_pe32_16_far a_Params; \
|
---|
680 | a_RetType a_Name##_pev86_far a_Params; \
|
---|
681 | a_RetType a_Name##_pp16_far a_Params; \
|
---|
682 | a_RetType a_Name##_pp16_v86_far a_Params; \
|
---|
683 | a_RetType a_Name##_pp32_16_far a_Params; \
|
---|
684 | a_RetType a_Name##_ppv86_far a_Params; \
|
---|
685 | a_RetType a_Name##_pae16_far a_Params; \
|
---|
686 | a_RetType a_Name##_pae16_v86_far a_Params; \
|
---|
687 | a_RetType a_Name##_pae32_16_far a_Params; \
|
---|
688 | a_RetType a_Name##_paev86_far a_Params; \
|
---|
689 | a_RetType a_Name##_lm16_far a_Params
|
---|
690 | #define BS3_MODE_PROTO_NOSB(a_RetType, a_Name, a_Params) \
|
---|
691 | a_RetType a_Name##_mmm a_Params; \
|
---|
692 | a_RetType a_Name##_mmm_far a_Params; \
|
---|
693 | a_RetType a_Name##_rm a_Params; \
|
---|
694 | a_RetType a_Name##_pe16 a_Params; \
|
---|
695 | a_RetType a_Name##_pe16_32 a_Params; \
|
---|
696 | a_RetType a_Name##_pe16_v86 a_Params; \
|
---|
697 | a_RetType a_Name##_pe32 a_Params; \
|
---|
698 | a_RetType a_Name##_pe32_16 a_Params; \
|
---|
699 | a_RetType a_Name##_pev86 a_Params; \
|
---|
700 | a_RetType a_Name##_pp16 a_Params; \
|
---|
701 | a_RetType a_Name##_pp16_32 a_Params; \
|
---|
702 | a_RetType a_Name##_pp16_v86 a_Params; \
|
---|
703 | a_RetType a_Name##_pp32 a_Params; \
|
---|
704 | a_RetType a_Name##_pp32_16 a_Params; \
|
---|
705 | a_RetType a_Name##_ppv86 a_Params; \
|
---|
706 | a_RetType a_Name##_pae16 a_Params; \
|
---|
707 | a_RetType a_Name##_pae16_32 a_Params; \
|
---|
708 | a_RetType a_Name##_pae16_v86 a_Params; \
|
---|
709 | a_RetType a_Name##_pae32 a_Params; \
|
---|
710 | a_RetType a_Name##_pae32_16 a_Params; \
|
---|
711 | a_RetType a_Name##_paev86 a_Params; \
|
---|
712 | a_RetType a_Name##_lm16 a_Params; \
|
---|
713 | a_RetType a_Name##_lm32 a_Params; \
|
---|
714 | a_RetType a_Name##_lm64 a_Params; \
|
---|
715 | a_RetType a_Name##_rm_far a_Params; \
|
---|
716 | a_RetType a_Name##_pe16_far a_Params; \
|
---|
717 | a_RetType a_Name##_pe16_v86_far a_Params; \
|
---|
718 | a_RetType a_Name##_pe32_16_far a_Params; \
|
---|
719 | a_RetType a_Name##_pev86_far a_Params; \
|
---|
720 | a_RetType a_Name##_pp16_far a_Params; \
|
---|
721 | a_RetType a_Name##_pp16_v86_far a_Params; \
|
---|
722 | a_RetType a_Name##_pp32_16_far a_Params; \
|
---|
723 | a_RetType a_Name##_ppv86_far a_Params; \
|
---|
724 | a_RetType a_Name##_pae16_far a_Params; \
|
---|
725 | a_RetType a_Name##_pae16_v86_far a_Params; \
|
---|
726 | a_RetType a_Name##_pae32_16_far a_Params; \
|
---|
727 | a_RetType a_Name##_paev86_far a_Params; \
|
---|
728 | a_RetType a_Name##_lm16_far a_Params
|
---|
729 | #define BS3_MODE_EXPAND_EXTERN_DATA16(a_VarType, a_VarName, a_Suffix) \
|
---|
730 | extern a_VarType a_VarName##_rm a_Suffix; \
|
---|
731 | extern a_VarType a_VarName##_pe16 a_Suffix; \
|
---|
732 | extern a_VarType a_VarName##_pe16_32 a_Suffix; \
|
---|
733 | extern a_VarType a_VarName##_pe16_v86 a_Suffix; \
|
---|
734 | extern a_VarType a_VarName##_pe32 a_Suffix; \
|
---|
735 | extern a_VarType a_VarName##_pe32_16 a_Suffix; \
|
---|
736 | extern a_VarType a_VarName##_pev86 a_Suffix; \
|
---|
737 | extern a_VarType a_VarName##_pp16 a_Suffix; \
|
---|
738 | extern a_VarType a_VarName##_pp16_32 a_Suffix; \
|
---|
739 | extern a_VarType a_VarName##_pp16_v86 a_Suffix; \
|
---|
740 | extern a_VarType a_VarName##_pp32 a_Suffix; \
|
---|
741 | extern a_VarType a_VarName##_pp32_16 a_Suffix; \
|
---|
742 | extern a_VarType a_VarName##_ppv86 a_Suffix; \
|
---|
743 | extern a_VarType a_VarName##_pae16 a_Suffix; \
|
---|
744 | extern a_VarType a_VarName##_pae16_32 a_Suffix; \
|
---|
745 | extern a_VarType a_VarName##_pae16_v86 a_Suffix; \
|
---|
746 | extern a_VarType a_VarName##_pae32 a_Suffix; \
|
---|
747 | extern a_VarType a_VarName##_pae32_16 a_Suffix; \
|
---|
748 | extern a_VarType a_VarName##_paev86 a_Suffix; \
|
---|
749 | extern a_VarType a_VarName##_lm16 a_Suffix; \
|
---|
750 | extern a_VarType a_VarName##_lm32 a_Suffix; \
|
---|
751 | extern a_VarType a_VarName##_lm64 a_Suffix
|
---|
752 |
|
---|
753 | EOF
|
---|
754 |
|
---|
755 | MY_HDR_FILES=` echo ${MY_ROOT_DIR}/include/VBox/*.h ${MY_ROOT_DIR}/include/VBox/vmm/*.h \
|
---|
756 | | ${MY_SED} -e 's,${MY_ROOT_DIR}/include/VBox/err.h,,' `
|
---|
757 | MY_HDR_FILES="${MY_HDR_FILES} ${MY_ROOT_DIR}/include/iprt/cdefs.h"
|
---|
758 | ${MY_SED} \
|
---|
759 | -e '/__cdecl/d' \
|
---|
760 | -e '/^ *# *define.*DECL/!d' \
|
---|
761 | -e '/DECLS/d' \
|
---|
762 | -e '/DECLARE_CLS_/d' \
|
---|
763 | -e '/_SRC_POS_DECL/d' \
|
---|
764 | -e '/declspec/d' \
|
---|
765 | -e '/__attribute__/d' \
|
---|
766 | -e 's/# */#/g' \
|
---|
767 | -e 's/ */ /g' \
|
---|
768 | -e '/ DECLEXPORT_CLASS/d' \
|
---|
769 | -e 's/ *VBOXCALL//' \
|
---|
770 | -e 's/ *RTCALL//' \
|
---|
771 | -e '/ DECLASM(type) type/d' \
|
---|
772 | -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
|
---|
773 | -e '/define *DECLINLINE(type)/d' \
|
---|
774 | -e '/define *DECL_FORCE_INLINE(type)/d' \
|
---|
775 | -e '/ *DECL_INVALID(/d' \
|
---|
776 | \
|
---|
777 | -e 's/(type) DECLHIDDEN(type)/(type) type/' \
|
---|
778 | -e 's/(type) DECLEXPORT(type)/(type) type/' \
|
---|
779 | -e 's/(type) DECLIMPORT(type)/(type) type/' \
|
---|
780 | -e 's/(a_Type) DECLHIDDEN(a_Type)/(a_Type) a_Type/' \
|
---|
781 | -e 's/(a_Type) DECLEXPORT(a_Type)/(a_Type) a_Type/' \
|
---|
782 | -e 's/(a_Type) DECLIMPORT(a_Type)/(a_Type) a_Type/' \
|
---|
783 | \
|
---|
784 | --append "${MY_FILE}" \
|
---|
785 | ${MY_HDR_FILES}
|
---|
786 |
|
---|
787 | ${MY_CAT} "${MY_FILE}" \
|
---|
788 | | ${MY_SED} -e 's/_/\x1F/g' -e 's/(/\x1E/g' -e 's/[[:space:]][[:space:]]*/\x1C/g' \
|
---|
789 | | ${MY_SED} -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \
|
---|
790 | | ${MY_SORT} \
|
---|
791 | | ${MY_SED} -e '/#define/s/$/ \/\/ vbox/' --output "${MY_FILE}.2"
|
---|
792 |
|
---|
793 | # Eliminate duplicates.
|
---|
794 | > "${MY_FILE}.3"
|
---|
795 | exec < "${MY_FILE}.2"
|
---|
796 | MY_PREV_DEFINE=""
|
---|
797 | while read MY_LINE;
|
---|
798 | do
|
---|
799 | MY_DEFINE=`echo "${MY_LINE}" | ${MY_SED} -e 's/^#define \([^ ()]*\).*$/\1/' `
|
---|
800 | if test "${MY_DEFINE}" != "${MY_PREV_DEFINE}"; then
|
---|
801 | MY_PREV_DEFINE=${MY_DEFINE}
|
---|
802 | echo "${MY_LINE}" >> "${MY_FILE}.3"
|
---|
803 | fi
|
---|
804 | done
|
---|
805 |
|
---|
806 | # Append non-vbox bits from the current user config.
|
---|
807 | if test -n "${MY_USERCPP_H_FULL}" -a -f "${MY_USERCPP_H_FULL}"; then
|
---|
808 | ${MY_SED} -e '/ \/\/ vbox$/d' -e '/^[[:space:]]*$/d' --append "${MY_FILE}.3" "${MY_USERCPP_H_FULL}"
|
---|
809 | fi
|
---|
810 |
|
---|
811 | # Finalize the file (sort + blank lines).
|
---|
812 | ${MY_CAT} "${MY_FILE}.3" \
|
---|
813 | | ${MY_SED} -e 's/$/\n/' --output "${MY_FILE}"
|
---|
814 | ${MY_RM} -f "${MY_FILE}.2" "${MY_FILE}.3"
|
---|
815 |
|
---|
816 | # Install it.
|
---|
817 | if test -n "${MY_USERCPP_H_FULL}" -a -d "${MY_SLICKDIR}"; then
|
---|
818 | if test -f "${MY_USERCPP_H_FULL}"; then
|
---|
819 | ${MY_MV} -vf "${MY_USERCPP_H_FULL}" "${MY_USERCPP_H_FULL}.bak"
|
---|
820 | ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
|
---|
821 | echo "Updated the SlickEdit preprocessor file. (Previous version renamed to .bak.)"
|
---|
822 | else
|
---|
823 | ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}"
|
---|
824 | echo "Created the SlickEdit preprocessor file."
|
---|
825 | fi
|
---|
826 | fi
|
---|
827 | }
|
---|
828 |
|
---|
829 | ###### end of functions ####
|
---|
830 |
|
---|
831 |
|
---|
832 | #
|
---|
833 | # Parse arguments.
|
---|
834 | #
|
---|
835 | while test $# -ge 1;
|
---|
836 | do
|
---|
837 | ARG=$1
|
---|
838 | shift
|
---|
839 | case "$ARG" in
|
---|
840 |
|
---|
841 | --rootdir)
|
---|
842 | if test $# -eq 0; then
|
---|
843 | echo "error: missing --rootdir argument." 1>&2
|
---|
844 | exit 1;
|
---|
845 | fi
|
---|
846 | MY_ROOT_DIR="$1"
|
---|
847 | shift
|
---|
848 | ;;
|
---|
849 |
|
---|
850 | --outdir)
|
---|
851 | if test $# -eq 0; then
|
---|
852 | echo "error: missing --outdir argument." 1>&2
|
---|
853 | exit 1;
|
---|
854 | fi
|
---|
855 | MY_OUT_DIR="$1"
|
---|
856 | shift
|
---|
857 | ;;
|
---|
858 |
|
---|
859 | --project-base)
|
---|
860 | if test $# -eq 0; then
|
---|
861 | echo "error: missing --project-base argument." 1>&2
|
---|
862 | exit 1;
|
---|
863 | fi
|
---|
864 | MY_PRJ_PRF="$1"
|
---|
865 | shift
|
---|
866 | ;;
|
---|
867 |
|
---|
868 | --workspace)
|
---|
869 | if test $# -eq 0; then
|
---|
870 | echo "error: missing --workspace argument." 1>&2
|
---|
871 | exit 1;
|
---|
872 | fi
|
---|
873 | MY_WS_NAME="$1"
|
---|
874 | shift
|
---|
875 | ;;
|
---|
876 |
|
---|
877 | --windows-host)
|
---|
878 | MY_WINDOWS_HOST=1
|
---|
879 | ;;
|
---|
880 |
|
---|
881 | --minimal)
|
---|
882 | MY_OPT_MINIMAL=1
|
---|
883 | ;;
|
---|
884 |
|
---|
885 | --slickedit-config)
|
---|
886 | MY_SLICK_CONFIG="$1"
|
---|
887 | shift
|
---|
888 | ;;
|
---|
889 |
|
---|
890 | # usage
|
---|
891 | --h*|-h*|-?|--?)
|
---|
892 | echo "usage: $0 [--rootdir <rootdir>] [--outdir <outdir>] [--project-base <prefix>] [--workspace <name>] [--minimal] [--slickedit-config <DIR>]"
|
---|
893 | echo ""
|
---|
894 | echo "If --outdir is specified, you must specify a --rootdir relative to it as well."
|
---|
895 | exit 1;
|
---|
896 | ;;
|
---|
897 |
|
---|
898 | # default
|
---|
899 | *)
|
---|
900 | echo "error: Invalid parameter '$ARG'" 1>&2
|
---|
901 | exit 1;
|
---|
902 |
|
---|
903 | esac
|
---|
904 | done
|
---|
905 |
|
---|
906 |
|
---|
907 | #
|
---|
908 | # From now on everything *MUST* succeed.
|
---|
909 | #
|
---|
910 | set -e
|
---|
911 |
|
---|
912 |
|
---|
913 | #
|
---|
914 | # Make sure the output directory exists, is valid and clean.
|
---|
915 | #
|
---|
916 | ${MY_RM} -f \
|
---|
917 | "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \
|
---|
918 | "${MY_OUT_DIR}/${MY_WS_NAME}" \
|
---|
919 | "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`"
|
---|
920 | ${MY_MKDIR} -p "${MY_OUT_DIR}"
|
---|
921 | cd "${MY_OUT_DIR}"
|
---|
922 |
|
---|
923 |
|
---|
924 | #
|
---|
925 | # Determine the invocation to conjure up kmk.
|
---|
926 | #
|
---|
927 | my_abs_dir "tools"
|
---|
928 | if test -n "${MY_WINDOWS_HOST}"; then
|
---|
929 | MY_KMK_INVOCATION="${MY_ABS_DIR}/win.x86/bin/rexx.exe ${MY_ABS_DIR}/envSub.cmd kmk.exe"
|
---|
930 | else
|
---|
931 | MY_KMK_INVOCATION="/usr/bin/env LANG=C ${MY_ABS_DIR}/env.sh --quiet --no-wine kmk"
|
---|
932 | fi
|
---|
933 |
|
---|
934 |
|
---|
935 | #
|
---|
936 | # Generate the projects and workspace.
|
---|
937 | #
|
---|
938 | # Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done.
|
---|
939 | #
|
---|
940 |
|
---|
941 | # src/VBox/Runtime
|
---|
942 | my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime"
|
---|
943 |
|
---|
944 | # src/VBox/VMM
|
---|
945 | my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \
|
---|
946 | "include/VBox/vmm/cfgm.h" \
|
---|
947 | "include/VBox/vmm/cpum.*" \
|
---|
948 | "include/VBox/vmm/dbgf.h" \
|
---|
949 | "include/VBox/vmm/em.h" \
|
---|
950 | "include/VBox/vmm/gim.h" \
|
---|
951 | "include/VBox/vmm/apic.h" \
|
---|
952 | "include/VBox/vmm/gmm.*" \
|
---|
953 | "include/VBox/vmm/gvm.*" \
|
---|
954 | "include/VBox/vmm/hm*.*" \
|
---|
955 | "include/VBox/vmm/iom.h" \
|
---|
956 | "include/VBox/vmm/mm.h" \
|
---|
957 | "include/VBox/vmm/patm.*" \
|
---|
958 | "include/VBox/vmm/pdm*.h" \
|
---|
959 | "include/VBox/vmm/pgm.*" \
|
---|
960 | "include/VBox/vmm/rem.h" \
|
---|
961 | "include/VBox/vmm/selm.*" \
|
---|
962 | "include/VBox/vmm/ssm.h" \
|
---|
963 | "include/VBox/vmm/stam.*" \
|
---|
964 | "include/VBox/vmm/tm.h" \
|
---|
965 | "include/VBox/vmm/trpm.*" \
|
---|
966 | "include/VBox/vmm/vm.*" \
|
---|
967 | "include/VBox/vmm/vmm.*"
|
---|
968 |
|
---|
969 | # src/recompiler
|
---|
970 | my_generate_project "REM" "src/recompiler" --begin-incs \
|
---|
971 | "include" \
|
---|
972 | "src/recompiler" \
|
---|
973 | "src/recompiler/target-i386" \
|
---|
974 | "src/recompiler/tcg/i386" \
|
---|
975 | "src/recompiler/Sun/crt" \
|
---|
976 | --end-includes \
|
---|
977 | "src/recompiler" \
|
---|
978 | "src/VBox/VMM/include/REMInternal.h" \
|
---|
979 | "src/VBox/VMM/VMMAll/REMAll.cpp"
|
---|
980 |
|
---|
981 | # src/VBox/Additions
|
---|
982 | my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd"
|
---|
983 | my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux"
|
---|
984 | my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2"
|
---|
985 | my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris"
|
---|
986 | my_generate_project "Add-haiku" "src/VBox/Additions/haiku" --begin-incs "include" "src/VBox/Additions/haiku" --end-includes "src/VBox/Additions/haiku"
|
---|
987 | my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT"
|
---|
988 | test -z "$MY_OPT_MINIMAL" && \
|
---|
989 | my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11"
|
---|
990 | my_generate_project "Add-Control" "src/VBox/Additions/common/VBoxControl" --begin-incs "include" "src/VBox/Additions/common/VBoxControl" --end-includes "src/VBox/Additions/common/VBoxControl"
|
---|
991 | my_generate_project "Add-GuestDrv" "src/VBox/Additions/common/VBoxGuest" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest" --end-includes "src/VBox/Additions/common/VBoxGuest" "include/VBox/VBoxGuest*.*"
|
---|
992 | my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuestLib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuestLib" --end-includes "src/VBox/Additions/common/VBoxGuestLib" "include/VBox/VBoxGuest*.*"
|
---|
993 | my_generate_project "Add-Service" "src/VBox/Additions/common/VBoxService" --begin-incs "include" "src/VBox/Additions/common/VBoxService" --end-includes "src/VBox/Additions/common/VBoxService"
|
---|
994 | if test -z "$MY_OPT_MINIMAL"; then
|
---|
995 | my_generate_project "Add-crOpenGL" "src/VBox/Additions/common/crOpenGL" --begin-incs "include" "src/VBox/Additions/common/crOpenGL" --end-includes "src/VBox/Additions/common/crOpenGL"
|
---|
996 | my_generate_project "Add-CredProv" "src/VBox/Additions/WINNT/VBoxCredProv" --begin-incs "include" "src/VBox/Additions/WINNT/VBoxCredProv" --end-includes "src/VBox/Additions/WINNT/VBoxCredProv"
|
---|
997 | my_generate_project "Add-GINA" "src/VBox/Additions/WINNT/VBoxGINA" --begin-incs "include" "src/VBox/Additions/WINNT/VBoxGINA" --end-includes "src/VBox/Additions/WINNT/VBoxGINA"
|
---|
998 | fi
|
---|
999 |
|
---|
1000 | # src/VBox/Debugger
|
---|
1001 | my_generate_project "Debugger" "src/VBox/Debugger" --begin-incs "include" "src/VBox/Debugger" --end-includes "src/VBox/Debugger" "include/VBox/dbggui.h" "include/VBox/dbg.h"
|
---|
1002 |
|
---|
1003 | # src/VBox/Devices
|
---|
1004 | my_generate_project "Devices" "src/VBox/Devices" --begin-incs "include" "src/VBox/Devices" --end-includes "src/VBox/Devices" "include/VBox/pci.h" "include/VBox/pdm*.h"
|
---|
1005 | ## @todo split this up.
|
---|
1006 |
|
---|
1007 | # src/VBox/Disassembler
|
---|
1008 | my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h"
|
---|
1009 |
|
---|
1010 | # src/VBox/Frontends
|
---|
1011 | test -z "$MY_OPT_MINIMAL" && \
|
---|
1012 | my_generate_project "FE-VBoxBalloonCtrl" "src/VBox/Frontends/VBoxBalloonCtrl" --begin-incs "include" "src/VBox/Frontends/VBoxBalloonCtrl" --end-includes "src/VBox/Frontends/VBoxBalloonCtrl"
|
---|
1013 | my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage"
|
---|
1014 | my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless"
|
---|
1015 | my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL"
|
---|
1016 | my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell"
|
---|
1017 | # noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE"
|
---|
1018 | FE_VBOX_WRAPPERS=""
|
---|
1019 | for d in ${MY_OUT_DIRS};
|
---|
1020 | do
|
---|
1021 | if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then
|
---|
1022 | FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include"
|
---|
1023 | break
|
---|
1024 | fi
|
---|
1025 | done
|
---|
1026 | if test -n "${FE_VBOX_WRAPPERS}"; then
|
---|
1027 | my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" "${FE_VBOX_WRAPPERS}" --end-includes "src/VBox/Frontends/VirtualBox" "${FE_VBOX_WRAPPERS}/COMWrappers.cpp" "${FE_VBOX_WRAPPERS}/COMWrappers.h"
|
---|
1028 | else
|
---|
1029 | my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox"
|
---|
1030 | fi
|
---|
1031 |
|
---|
1032 | # src/VBox/GuestHost
|
---|
1033 | my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI"
|
---|
1034 | test -z "$MY_OPT_MINIMAL" && \
|
---|
1035 | my_generate_project "DnD-GH" "src/VBox/GuestHost/DragAndDrop" --begin-incs "include" --end-includes "src/VBox/GuestHost/DragAndDrop"
|
---|
1036 | my_generate_project "OpenGL-GH" "src/VBox/GuestHost/OpenGL" --begin-incs "include" "src/VBox/GuestHost/OpenGL" --end-includes "src/VBox/GuestHost/OpenGL"
|
---|
1037 | my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard"
|
---|
1038 |
|
---|
1039 | # src/VBox/HostDrivers
|
---|
1040 | my_generate_project "SUP" "src/VBox/HostDrivers/Support" --begin-incs "include" "src/VBox/HostDrivers/Support" --end-includes "src/VBox/HostDrivers/Support" "include/VBox/sup.h" "include/VBox/sup.mac"
|
---|
1041 | my_generate_project "VBoxNetAdp" "src/VBox/HostDrivers/VBoxNetAdp" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetAdp" --end-includes "src/VBox/HostDrivers/VBoxNetAdp" "include/VBox/intnet.h"
|
---|
1042 | my_generate_project "VBoxNetFlt" "src/VBox/HostDrivers/VBoxNetFlt" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetFlt" --end-includes "src/VBox/HostDrivers/VBoxNetFlt" "include/VBox/intnet.h"
|
---|
1043 | my_generate_project "VBoxUSB" "src/VBox/HostDrivers/VBoxUSB" --begin-incs "include" "src/VBox/HostDrivers/VBoxUSB" --end-includes "src/VBox/HostDrivers/VBoxUSB" "include/VBox/usblib*.h" "include/VBox/usbfilter.h"
|
---|
1044 |
|
---|
1045 | # src/VBox/HostServices
|
---|
1046 | my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestControl" --end-includes "src/VBox/HostServices/GuestControl"
|
---|
1047 | my_generate_project "DragAndDrop" "src/VBox/HostServices/DragAndDrop" --begin-incs "include" "src/VBox/HostServices/DragAndDrop" --end-includes "src/VBox/HostServices/DragAndDrop"
|
---|
1048 | my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties"
|
---|
1049 | my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard"
|
---|
1050 | my_generate_project "SharedFolders" "src/VBox/HostServices/SharedFolders" --begin-incs "include" "src/VBox/HostServices/SharedFolders" --end-includes "src/VBox/HostServices/SharedFolders" "include/VBox/shflsvc.h"
|
---|
1051 | my_generate_project "OpenGL-HS" "src/VBox/HostServices/SharedOpenGL" --begin-incs "include" "src/VBox/HostServices/SharedOpenGL" --end-includes "src/VBox/HostServices/SharedOpenGL"
|
---|
1052 |
|
---|
1053 | # src/VBox/ImageMounter
|
---|
1054 | my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter"
|
---|
1055 |
|
---|
1056 | # src/VBox/Installer
|
---|
1057 | my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer"
|
---|
1058 |
|
---|
1059 | # src/VBox/Main
|
---|
1060 | my_generate_project "Main" "src/VBox/Main" --begin-incs "include" "src/VBox/Main/include" --end-includes "src/VBox/Main" "include/VBox/com" "include/VBox/settings.h"
|
---|
1061 | ## @todo seperate webservices and Main. pick the right headers. added generated headers.
|
---|
1062 |
|
---|
1063 | # src/VBox/Network
|
---|
1064 | my_generate_project "Net-DHCP" "src/VBox/NetworkServices/DHCP" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/DHCP"
|
---|
1065 | my_generate_project "Net-NAT" "src/VBox/NetworkServices/NAT" --begin-incs "include" "src/VBox/NetworkServices/NAT" --end-includes "src/VBox/NetworkServices/NAT" "src/VBox/Devices/Network/slirp"
|
---|
1066 | my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib"
|
---|
1067 |
|
---|
1068 | # src/VBox/RDP
|
---|
1069 | my_generate_project "RDP-Client" "src/VBox/RDP/client-1.8.3" --begin-incs "include" "src/VBox/RDP/client-1.8.3" --end-includes "src/VBox/RDP/client-1.8.3"
|
---|
1070 | my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server"
|
---|
1071 | my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient"
|
---|
1072 | my_generate_project "RDP-Misc" "src/VBox/RDP" --begin-incs "include" --end-includes "src/VBox/RDP/auth" "src/VBox/RDP/tscpasswd" "src/VBox/RDP/x11server"
|
---|
1073 |
|
---|
1074 | # src/VBox/Storage
|
---|
1075 | my_generate_project "Storage" "src/VBox/Storage" --begin-incs "include" "src/VBox/Storage" --end-includes "src/VBox/Storage"
|
---|
1076 |
|
---|
1077 | # src/VBox/ValidationKit
|
---|
1078 | my_generate_project "ValidationKit" "src/VBox/ValidationKit" --begin-incs "include" --end-includes "src/VBox/ValidationKit"
|
---|
1079 |
|
---|
1080 | # src/VBox/ExtPacks
|
---|
1081 | my_generate_project "ExtPacks" "src/VBox/ExtPacks" --begin-incs "include" --end-includes "src/VBox/ExtPacks"
|
---|
1082 |
|
---|
1083 | # src/apps/adpctl - misplaced.
|
---|
1084 | my_generate_project "adpctl" "src/apps/adpctl" --begin-incs "include" --end-includes "src/apps/adpctl"
|
---|
1085 |
|
---|
1086 | # src/bldprogs
|
---|
1087 | my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs"
|
---|
1088 |
|
---|
1089 | # A few things from src/lib
|
---|
1090 | my_generate_project "zlib" "src/libs/zlib-1.2.8" --begin-incs "include" --end-includes "src/libs/zlib-1.2.8/*.c" "src/libs/zlib-1.2.8/*.h"
|
---|
1091 | my_generate_project "liblzf" "src/libs/liblzf-3.4" --begin-incs "include" --end-includes "src/libs/liblzf-3.4"
|
---|
1092 | my_generate_project "libpng" "src/libs/libpng-1.2.54" --begin-incs "include" --end-includes "src/libs/libpng-1.2.54/*.c" "src/libs/libpng-1.2.54/*.h"
|
---|
1093 | my_generate_project "openssl" "src/libs/openssl-1.0.1s" --begin-incs "include" "src/libs/openssl-1.0.1s/crypto" --end-includes "src/libs/openssl-1.0.1s"
|
---|
1094 | my_generate_project "curl" "src/libs/curl-7.47.0" --begin-incs "include" "src/libs/curl-7.47.0/include" --end-includes "src/libs/curl-7.47.0"
|
---|
1095 | my_generate_project "kStuff" "src/libs/kStuff" --begin-incs "include" "src/libs/kStuff/kStuff/include" --end-includes "src/libs/kStuff"
|
---|
1096 |
|
---|
1097 |
|
---|
1098 | # include/VBox
|
---|
1099 | my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox"
|
---|
1100 |
|
---|
1101 | # Misc
|
---|
1102 | my_generate_project "misc" "." --begin-incs "include" --end-includes \
|
---|
1103 | "configure" \
|
---|
1104 | "configure.vbs" \
|
---|
1105 | "Config.kmk" \
|
---|
1106 | "Makefile.kmk" \
|
---|
1107 | "src/Makefile.kmk" \
|
---|
1108 | "src/VBox/Makefile.kmk"
|
---|
1109 |
|
---|
1110 |
|
---|
1111 | # out/x.y/z/bin/sdk/bindings/xpcom
|
---|
1112 | XPCOM_INCS="src/libs/xpcom18a4"
|
---|
1113 | for d in \
|
---|
1114 | "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \
|
---|
1115 | "out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE}/dist/sdk/bindings/xpcom" \
|
---|
1116 | "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \
|
---|
1117 | "out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE}/bin/sdk/bindings/xpcom" \
|
---|
1118 | "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \
|
---|
1119 | "out/linux.x86/debug/bin/sdk/bindings/xpcom" \
|
---|
1120 | "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \
|
---|
1121 | "out/darwin.x86/debug/bin/dist/bindings/xpcom" \
|
---|
1122 | "out/haiku.amd64/debug/bin/sdk/bindings/xpcom" \
|
---|
1123 | "out/haiku.x86/debug/bin/sdk/bindings/xpcom" \
|
---|
1124 | "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \
|
---|
1125 | "out/solaris.x86/debug/bin/sdk/bindings/xpcom";
|
---|
1126 | do
|
---|
1127 | if test -d "${MY_ROOT_DIR}/${d}"; then
|
---|
1128 | my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}"
|
---|
1129 | XPCOM_INCS="${d}/include"
|
---|
1130 | break
|
---|
1131 | fi
|
---|
1132 | done
|
---|
1133 |
|
---|
1134 | # lib/xpcom
|
---|
1135 | my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4"
|
---|
1136 |
|
---|
1137 | my_generate_workspace
|
---|
1138 |
|
---|
1139 |
|
---|
1140 | #
|
---|
1141 | # Update the history file if present.
|
---|
1142 | #
|
---|
1143 | MY_FILE="${MY_WS_NAME}histu"
|
---|
1144 | if test -f "${MY_FILE}"; then
|
---|
1145 | echo "Updating ${MY_FILE}..."
|
---|
1146 | ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old"
|
---|
1147 | ${MY_SED} -n \
|
---|
1148 | -e '/PROJECT_CACHE/d' \
|
---|
1149 | -e '/\[TreeExpansion2\]/d' \
|
---|
1150 | -e '/^\[/p' \
|
---|
1151 | -e '/: /p' \
|
---|
1152 | -e '/^CurrentProject/p' \
|
---|
1153 | "${MY_FILE}.old" > "${MY_FILE}"
|
---|
1154 | fi
|
---|
1155 |
|
---|
1156 |
|
---|
1157 | #
|
---|
1158 | # Generate and update the usercpp.h/unxcpp.h file.
|
---|
1159 | #
|
---|
1160 | my_generate_usercpp_h
|
---|
1161 |
|
---|
1162 |
|
---|
1163 | echo "done"
|
---|