Changeset 95580 in vbox for trunk/tools
- Timestamp:
- Jul 9, 2022 7:28:19 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152208
- Location:
- trunk/tools/bin
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bin/common-gen-workspace.inc.sh
r95579 r95580 33 33 MY_SORT="sort" 34 34 35 35 36 # 36 37 # Globals. 37 38 # 38 MY_PROJECT_FILES=""39 39 MY_OUT_DIRS="\ 40 40 out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE} \ … … 57 57 # 58 58 MY_ROOT_DIR=".." 59 MY_OUT_DIR="SlickEdit"60 MY_PRJ_PRF="VBox-"61 MY_WS_NAME="VirtualBox.vpw"62 MY_DBG=""63 MY_WINDOWS_HOST=""64 MY_OPT_MINIMAL=""65 MY_OPT_USE_WILDCARDS="yes"66 59 67 60 … … 222 215 } 223 216 224 225 ## 226 # Generate folders for the specified directories and files. 227 # 228 # @param $1 The output (base) file name. 229 # @param $2+ The files and directories to traverse. 230 my_generate_folder() 231 { 232 MY_FILE="$1" 233 shift 234 235 # Zap existing file collections. 236 > "${MY_FILE}-All.lst" 237 > "${MY_FILE}-Sources.lst" 238 > "${MY_FILE}-Headers.lst" 239 > "${MY_FILE}-Assembly.lst" 240 > "${MY_FILE}-Testcases.lst" 241 > "${MY_FILE}-Others.lst" 242 243 # Traverse the directories and files. 244 while test $# -ge 1 -a -n "${1}"; 217 ## 218 # Generate the projects. 219 # 220 # This requires the main script to implement the my_generate_project() function. 221 # 222 # Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done. 223 # 224 my_generate_all_projects() 225 { 226 # src/VBox/Runtime 227 my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime" 228 229 # src/VBox/VMM 230 my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \ 231 "include/VBox/vmm/cfgm.h" \ 232 "include/VBox/vmm/cpum.*" \ 233 "include/VBox/vmm/dbgf.h" \ 234 "include/VBox/vmm/em.h" \ 235 "include/VBox/vmm/gim.h" \ 236 "include/VBox/vmm/apic.h" \ 237 "include/VBox/vmm/gmm.*" \ 238 "include/VBox/vmm/gvm.*" \ 239 "include/VBox/vmm/hm*.*" \ 240 "include/VBox/vmm/iom.h" \ 241 "include/VBox/vmm/mm.h" \ 242 "include/VBox/vmm/patm.*" \ 243 "include/VBox/vmm/pdm*.h" \ 244 "include/VBox/vmm/pgm.*" \ 245 "include/VBox/vmm/selm.*" \ 246 "include/VBox/vmm/ssm.h" \ 247 "include/VBox/vmm/stam.*" \ 248 "include/VBox/vmm/tm.h" \ 249 "include/VBox/vmm/trpm.*" \ 250 "include/VBox/vmm/vm.*" \ 251 "include/VBox/vmm/vmm.*" 252 253 # src/VBox/Additions 254 my_generate_project "Add-darwin" "src/VBox/Additions/darwin" --begin-incs "include" "src/VBox/Additions/darwin" --end-includes "src/VBox/Additions/darwin" 255 my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd" 256 my_generate_project "Add-haiku" "src/VBox/Additions/haiku" --begin-incs "include" "src/VBox/Additions/haiku" --end-includes "src/VBox/Additions/haiku" 257 my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux" 258 my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2" 259 my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris" 260 my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT" 261 if test -z "$MY_OPT_MINIMAL"; then 262 my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11" 263 fi 264 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" 265 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*.*" 266 my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuest/lib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest/lib" --end-includes "src/VBox/Additions/common/VBoxGuest/lib" "include/VBox/VBoxGuest/lib/*.*" 267 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" 268 my_generate_project "Add-VBoxVideo" "src/VBox/Additions/common/VBoxVideo" --begin-incs "include" "src/VBox/Additions/common/VBoxVideo" --end-includes "src/VBox/Additions/common/VBoxVideo" 269 if test -z "$MY_OPT_MINIMAL"; then 270 my_generate_project "Add-pam" "src/VBox/Additions/common/pam" --begin-incs "include" "src/VBox/Additions/common/pam" --end-includes "src/VBox/Additions/common/pam" 271 my_generate_project "Add-cmn-test" "src/VBox/Additions/common/testcase" --begin-incs "include" "src/VBox/Additions/common/testcase" --end-includes "src/VBox/Additions/common/testcase" 272 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" 273 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" 274 fi 275 276 # src/VBox/Debugger 277 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" 278 279 # src/VBox/Devices 280 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" 281 ## @todo split this up. 282 283 # src/VBox/Disassembler 284 my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h" 285 286 # src/VBox/Frontends 287 if test -z "$MY_OPT_MINIMAL"; then 288 my_generate_project "FE-VBoxAutostart" "src/VBox/Frontends/VBoxAutostart" --begin-incs "include" "src/VBox/Frontends/VBoxAutostart" --end-includes "src/VBox/Frontends/VBoxAutostart" 289 my_generate_project "FE-VBoxBugReport" "src/VBox/Frontends/VBoxBugReport" --begin-incs "include" "src/VBox/Frontends/VBoxBugReport" --end-includes "src/VBox/Frontends/VBoxBugReport" 290 my_generate_project "FE-VBoxBalloonCtrl" "src/VBox/Frontends/VBoxBalloonCtrl" --begin-incs "include" "src/VBox/Frontends/VBoxBalloonCtrl" --end-includes "src/VBox/Frontends/VBoxBalloonCtrl" 291 fi 292 my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage" 293 my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless" 294 my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL" 295 my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell" 296 # noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE" 297 FE_VBOX_WRAPPERS="" 298 for d in ${MY_OUT_DIRS}; 245 299 do 246 for f in ${MY_ROOT_DIR}/$1; 247 do 248 if test -d "${f}"; 249 then 250 if test -z "${MY_OPT_USE_WILDCARDS}"; 251 then 252 my_sub_tree "${MY_FILE}" "${f}" 253 else 254 case "${f}" in 255 ${MY_ROOT_DIR}/include*) 256 #my_sub_tree "${MY_FILE}" "${f}" "Headers" 257 my_wildcard "${MY_FILE}" "${f}" "Headers" 258 ;; 259 *) my_wildcard "${MY_FILE}" "${f}" 260 ;; 261 esac 262 fi 263 else 264 my_file "${MY_FILE}" "${f}" 265 fi 266 done 267 shift 268 done 269 270 # Generate the folders. 271 if test -s "${MY_FILE}-All.lst"; 272 then 273 ${MY_SORT} "${MY_FILE}-All.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" 274 fi 275 if test -s "${MY_FILE}-Sources.lst"; 276 then 277 echo ' <Folder Name="Sources" Filters="*.c;*.cpp;*.cpp.h;*.c.h;*.m;*.mm;*.pl;*.py;*.as">' >> "${MY_FILE}" 278 ${MY_SORT} "${MY_FILE}-Sources.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" 279 echo ' </Folder>' >> "${MY_FILE}" 280 fi 281 if test -s "${MY_FILE}-Headers.lst"; 282 then 283 if test -z "${MY_OPT_USE_WILDCARDS}"; 284 then 285 echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}" 286 else 287 echo ' <Folder Name="Headers" Filters="">' >> "${MY_FILE}" 288 fi 289 ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" 290 echo ' </Folder>' >> "${MY_FILE}" 291 fi 292 if test -s "${MY_FILE}-Assembly.lst"; 293 then 294 echo ' <Folder Name="Assembly" Filters="*.asm;*.s;*.S;*.inc;*.mac">' >> "${MY_FILE}" 295 ${MY_SORT} "${MY_FILE}-Assembly.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" 296 echo ' </Folder>' >> "${MY_FILE}" 297 fi 298 if test -s "${MY_FILE}-Testcases.lst"; 299 then 300 echo ' <Folder Name="Testcases" Filters="tst*;">' >> "${MY_FILE}" 301 ${MY_SORT} "${MY_FILE}-Testcases.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" 302 echo ' </Folder>' >> "${MY_FILE}" 303 fi 304 if test -s "${MY_FILE}-Others.lst"; 305 then 306 echo ' <Folder Name="Others" Filters="">' >> "${MY_FILE}" 307 ${MY_SORT} "${MY_FILE}-Others.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" 308 echo ' </Folder>' >> "${MY_FILE}" 309 fi 310 311 # Cleanup 312 ${MY_RM} "${MY_FILE}-All.lst" "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" \ 313 "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst" 314 } 315 316 ## 317 # Function generating a project build config. 318 # 319 # @param $1 The project file name. 320 # @param $2 Build config name. 321 # @param $3 Extra kBuild command line options, variant 1. 322 # @param $4 Extra kBuild command line options, variant 2. 323 # @param $4+ Include directories. 324 # @param $N --end-includes 325 my_generate_project_config() 326 { 327 MY_FILE="${1}"; 328 MY_CFG_NAME="${2}"; 329 MY_KMK_EXTRAS1="${3}"; 330 MY_KMK_EXTRAS2="${4}"; 331 MY_KMK_EXTRAS3="${5}"; 332 MY_KMK_EXTRAS4="${6}"; 333 shift; shift; shift; shift; shift; shift; 334 335 echo ' <Config Name="'"${MY_CFG_NAME}"'" OutputFile="" CompilerConfigName="Latest Version">' >> "${MY_FILE}" 336 echo ' <Menu>' >> "${MY_FILE}" 337 338 echo ' <Target Name="Compile" MenuCaption="&Compile" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}" 339 echo ' SaveOption="SaveCurrent" RunFromDir="%p" ClearProcessBuffer="1">' >> "${MY_FILE}" 340 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %p %n.o' >> "${MY_FILE}" 341 if test -n "${MY_KMK_EXTRAS2}"; then 342 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %p %n.o" >> "${MY_FILE}" 343 fi 344 if test -n "${MY_KMK_EXTRAS3}"; then 345 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %p %n.o" >> "${MY_FILE}" 346 fi 347 if test -n "${MY_KMK_EXTRAS4}"; then 348 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %p %n.o" >> "${MY_FILE}" 349 fi 350 echo '"/>' >> "${MY_FILE}" 351 echo ' </Target>' >> "${MY_FILE}" 352 353 echo ' <Target Name="Build" MenuCaption="&Build"CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}" 354 echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}" 355 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %rw' >> "${MY_FILE}" 356 if test -n "${MY_KMK_EXTRAS2}"; then 357 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %rw" >> "${MY_FILE}" 358 fi 359 if test -n "${MY_KMK_EXTRAS3}"; then 360 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %rw" >> "${MY_FILE}" 361 fi 362 if test -n "${MY_KMK_EXTRAS4}"; then 363 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %rw" >> "${MY_FILE}" 364 fi 365 echo '"/>' >> "${MY_FILE}" 366 echo ' </Target>' >> "${MY_FILE}" 367 368 echo ' <Target Name="Rebuild" MenuCaption="&Rebuild" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}" 369 echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}" 370 echo -n ' <Exec CmdLine="'"${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS1}"' -C %rw' >> "${MY_FILE}" 371 if test -n "${MY_KMK_EXTRAS2}"; then 372 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS2} -C %rw rebuild" >> "${MY_FILE}" 373 fi 374 if test -n "${MY_KMK_EXTRAS3}"; then 375 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS3} -C %rw rebuild" >> "${MY_FILE}" 376 fi 377 if test -n "${MY_KMK_EXTRAS4}"; then 378 echo -n " && ${MY_KMK_INVOCATION} ${MY_KMK_EXTRAS4} -C %rw rebuild" >> "${MY_FILE}" 379 fi 380 echo '"/>' >> "${MY_FILE}" 381 echo ' </Target>' >> "${MY_FILE}" 382 383 #echo ' <Target Name="Debug" MenuCaption="&Debug" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}" 384 #echo ' <Exec/>' >> "${MY_FILE}" 385 #echo ' </Target>' >> "${MY_FILE}" 386 #echo ' <Target Name="Execute" MenuCaption="E&xecute" SaveOption="SaveNone" RunFromDir="%rw">'>> "${MY_FILE}" 387 #echo ' <Exec/>' >> "${MY_FILE}" 388 #echo ' </Target>' >> "${MY_FILE}" 389 echo ' </Menu>' >> "${MY_FILE}" 390 391 # 392 # Include directories. 393 # 394 echo ' <Includes>' >> "${MY_FILE}" 395 while test $# -ge 1 -a "${1}" != "--end-includes"; 396 do 397 for f in $1; 398 do 399 my_abs_dir ${f} 400 echo ' <Include Dir="'"${MY_ABS_DIR}/"'"/>' >> "${MY_FILE}" 401 done 402 shift 403 done 404 shift 405 echo ' </Includes>' >> "${MY_FILE}" 406 echo ' </Config>' >> "${MY_FILE}" 407 } 408 409 410 ## 411 # Function generating a project. 412 # 413 # @param $1 The project file name. 414 # @param $2 The project working directory. 415 # @param $3 Dummy separator. 416 # @param $4+ Include directories. 417 # @param $N --end-includes 418 # @param $N+1 Directory sub-trees and files to include in the project. 419 # 420 my_generate_project() 421 { 422 MY_FILE="${MY_PRJ_PRF}${1}.vpj"; 423 echo "Generating ${MY_FILE}..." 424 MY_WRK_DIR="${2}" 425 shift 426 shift 427 shift 428 429 # Add it to the project list for workspace construction later on. 430 MY_PROJECT_FILES="${MY_PROJECT_FILES} ${MY_FILE}" 431 432 433 # 434 # Generate the head bits. 435 # 436 echo '<!DOCTYPE Project SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpj.dtd">' > "${MY_FILE}" 437 echo '<Project' >> "${MY_FILE}" 438 echo ' Version="10.0"' >> "${MY_FILE}" 439 echo ' VendorName="SlickEdit"' >> "${MY_FILE}" 440 echo ' VCSProject="Subversion:"' >> "${MY_FILE}" 441 # echo ' Customized="1"' >> "${MY_FILE}" 442 # echo ' WorkingDir="."' >> "${MY_FILE}" 443 my_abs_dir "${MY_WRK_DIR}" >> "${MY_FILE}" 444 echo ' WorkingDir="'"${MY_ABS_DIR}"'"' >> "${MY_FILE}" 445 echo ' >' >> "${MY_FILE}" 446 my_generate_project_config "${MY_FILE}" "Default" "" "" "" "" $* 447 my_generate_project_config "${MY_FILE}" "Debug + hardening" "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" "" "" "" $* 448 my_generate_project_config "${MY_FILE}" "Release + hardening" "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" "" "" "" $* 449 my_generate_project_config "${MY_FILE}" "Debug+Release + hardening" \ 450 "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" \ 451 "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" \ 452 "" "" $* 453 my_generate_project_config "${MY_FILE}" "Debug w/o hardening" "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" "" "" $* 454 my_generate_project_config "${MY_FILE}" "Release w/o hardening" "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" "" "" $* 455 my_generate_project_config "${MY_FILE}" "Debug+Release w/o hardening" \ 456 "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" \ 457 "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" \ 458 "" "" $* 459 my_generate_project_config "${MY_FILE}" "Debug+Release with and without hardening" \ 460 "KBUILD_TYPE=debug VBOX_WITH_HARDENING=1" \ 461 "KBUILD_TYPE=release VBOX_WITH_HARDENING=1" \ 462 "KBUILD_TYPE=debug VBOX_WITHOUT_HARDENING=1" \ 463 "KBUILD_TYPE=release VBOX_WITHOUT_HARDENING=1" \ 464 $* 465 466 while test $# -ge 1 -a "${1}" != "--end-includes"; 467 do 468 shift; 469 done; 470 shift; 471 472 # 473 # Process directories+files and create folders. 474 # 475 echo ' <Files>' >> "${MY_FILE}" 476 my_generate_folder "${MY_FILE}" $* 477 echo ' </Files>' >> "${MY_FILE}" 478 479 # 480 # The tail. 481 # 482 echo '</Project>' >> "${MY_FILE}" 483 484 return 0 485 } 486 487 488 ## 489 # Generate the workspace 490 # 491 my_generate_workspace() 492 { 493 MY_FILE="${MY_WS_NAME}" 494 echo "Generating ${MY_FILE}..." 495 echo '<!DOCTYPE Workspace SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpw.dtd">' > "${MY_FILE}" 496 echo '<Workspace Version="10.0" VendorName="SlickEdit">' >> "${MY_FILE}" 497 echo ' <Projects>' >> "${MY_FILE}" 498 for i in ${MY_PROJECT_FILES}; 499 do 500 echo ' <Project File="'"${i}"'" />' >> "${MY_FILE}" 501 done 502 echo ' </Projects>' >> "${MY_FILE}" 503 echo '</Workspace>' >> "${MY_FILE}" 504 return 0; 505 } 506 507 508 ## 509 # Generate stuff 510 # 511 my_generate_usercpp_h() 512 { 513 # 514 # Probe the slickedit user config, picking the most recent version. 515 # 516 MY_VSLICK_DB_OLD= 517 if test -z "${MY_SLICK_CONFIG}"; then 518 if test -d "${HOME}/Library/Application Support/SlickEdit"; then 519 MY_SLICKDIR_="${HOME}/Library/Application Support/SlickEdit" 520 MY_USERCPP_H="unxcpp.h" 521 MY_VSLICK_DB="vslick.sta" # was .stu earlier, 24 is using .sta. 522 MY_VSLICK_DB_OLD="vslick.stu" 523 elif test -d "${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"; then 524 MY_SLICKDIR_="${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config" 525 MY_USERCPP_H="usercpp.h" 526 MY_VSLICK_DB="vslick.sta" 527 else 528 MY_SLICKDIR_="${HOME}/.slickedit" 529 MY_USERCPP_H="unxcpp.h" 530 MY_VSLICK_DB="vslick.sta" 531 MY_VSLICK_DB_OLD="vslick.stu" 532 fi 533 else 534 MY_SLICKDIR_="${MY_SLICK_CONFIG}" 535 if test -n "${MY_WINDOWS_HOST}"; then 536 MY_USERCPP_H="usercpp.h" 537 MY_VSLICK_DB="vslick.sta" 538 else 539 MY_USERCPP_H="unxcpp.h" 540 MY_VSLICK_DB="vslick.sta" 541 MY_VSLICK_DB_OLD="vslick.stu" 542 fi 543 # MacOS: Implement me! 544 fi 545 546 MY_VER_NUM="0" 547 MY_VER="0.0.0" 548 for subdir in "${MY_SLICKDIR_}/"*; 549 do 550 if test -f "${subdir}/${MY_USERCPP_H}" \ 551 -o -f "${subdir}/${MY_VSLICK_DB}" \ 552 -o '(' -n "${MY_VSLICK_DB_OLD}" -a -f "${subdir}/${MY_VSLICK_DB_OLD}" ')'; then 553 MY_CUR_VER_NUM=0 554 MY_CUR_VER=`echo "${subdir}" | ${MY_SED} -e 's,^.*/,,g'` 555 556 # Convert the dotted version number to an integer, checking that 557 # it is all numbers in the process. 558 set `echo "${MY_CUR_VER}" | ${MY_SED} 's/\./ /g' ` 559 i=24010000 # == 70*70*70*70; max major version 89. 560 while test $# -gt 0; 561 do 562 if ! ${MY_EXPR} "$1" + 1 > /dev/null 2> /dev/null; then 563 MY_CUR_VER_NUM=0; 564 break 565 fi 566 if test "$i" -gt 0; then 567 MY_CUR_VER_NUM=$((${MY_CUR_VER_NUM} + $1 * $i)) 568 i=$(($i / 70)) 569 fi 570 shift 571 done 572 573 # More recent that what we have? 574 if test "${MY_CUR_VER_NUM}" -gt "${MY_VER_NUM}"; then 575 MY_VER_NUM="${MY_CUR_VER_NUM}" 576 MY_VER="${MY_CUR_VER}" 577 fi 300 if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then 301 FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include" 302 break 578 303 fi 579 304 done 580 581 MY_SLICKDIR="${MY_SLICKDIR_}/${MY_VER}" 582 MY_USERCPP_H_FULL="${MY_SLICKDIR}/${MY_USERCPP_H}" 583 if test -d "${MY_SLICKDIR}"; then 584 echo "Found SlickEdit v${MY_VER} preprocessor file: ${MY_USERCPP_H_FULL}" 305 if test -n "${FE_VBOX_WRAPPERS}"; then 306 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" 585 307 else 586 echo "Failed to locate SlickEdit preprocessor file. You need to manually merge ${MY_USERCPP_H}." 587 echo "dbg: MY_SLICKDIR=${MY_SLICKDIR} MY_USERCPP_H_FULL=${MY_USERCPP_H_FULL}" 588 MY_USERCPP_H_FULL="" 589 fi 590 591 # Generate our 592 MY_FILE="${MY_USERCPP_H}" 593 ${MY_CAT} > ${MY_FILE} <<EOF 594 #define IN_SLICKEDIT 595 #define RT_C_DECLS_BEGIN 596 #define RT_C_DECLS_END 597 #define RT_NOTHROW_PROTO 598 #define RT_NOTHROW_DEF 599 #define RT_NO_THROW_PROTO 600 #define RT_NO_THROW_DEF 601 #define RT_NOEXCEPT 602 #define RT_OVERRIDE 603 #define RT_THROW(type) throw(type) 604 #define RT_GCC_EXTENSION 605 #define RT_COMPILER_GROKS_64BIT_BITFIELDS 606 #define RT_COMPILER_WITH_80BIT_LONG_DOUBLE 607 #define RT_DECL_NTAPI(type) type 608 609 #define ATL_NO_VTABLE 610 #define BEGIN_COM_MAP(a) 611 #define COM_INTERFACE_ENTRY(a) 612 #define COM_INTERFACE_ENTRY2(a,b) 613 #define COM_INTERFACE_ENTRY3(a,b,c) 614 #define COM_INTERFACE_ENTRY4(a,b,c,d) 615 #define END_COM_MAP(a) 616 617 #define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) 618 #define COMGETTER(n) n 619 #define COMSETTER(n) n 620 #define ComSafeArrayIn(t,a) t a[] 621 #define ComSafeArrayOut(t,a) t * a[] 622 #define DECLARE_CLASSFACTORY(a) 623 #define DECLARE_CLASSFACTORY_SINGLETON(a) 624 #define DECLARE_REGISTRY_RESOURCEID(a) 625 #define DECLARE_NOT_AGGREGATABLE(a) 626 #define DECLARE_PROTECT_FINAL_CONSTRUCT(a) 627 #define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a(); 628 #define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {} 629 #define DECLARE_TRANSLATE_METHODS(cls) \ 630 static inline const char *tr(const char *aSourceText, \ 631 const char *aComment = NULL, \ 632 const int aNum = -1) \ 633 { \ 634 return VirtualBoxTranslator::translate(#cls, aSourceText, aComment, aNum); \ 635 } 636 #define DECLARE_COMMON_CLASS_METHODS(cls) \ 637 DECLARE_EMPTY_CTOR_DTOR(cls) \ 638 DECLARE_TRANSLATE_METHODS(cls) 639 #define NS_DECL_ISUPPORTS 640 #define NS_IMETHOD virtual nsresult 641 #define NS_IMETHOD_(type) virtual type 642 #define NS_IMETHODIMP nsresult 643 #define NS_IMETHODIMP_(type) type 644 #define PARSERS_EXPORT 645 EOF 646 if test -n "${MY_WINDOWS_HOST}"; then 647 ${MY_CAT} >> ${MY_FILE} <<EOF 648 #define COM_STRUCT_OR_CLASS(I) struct I 649 #define STDMETHOD(m) virtual HRESULT m 650 #define STDMETHOD_(type,m) virtual type m 651 #define STDMETHODIMP HRESULT 652 #define STDMETHODIMP_(type) type 653 EOF 654 else 655 ${MY_CAT} >> ${MY_FILE} <<EOF 656 #define COM_STRUCT_OR_CLASS(I) class I 657 #define STDMETHOD(m) virtual nsresult m 658 #define STDMETHOD_(type,m) virtual type m 659 #define STDMETHODIMP nsresult 660 #define STDMETHODIMP_(type) type 661 EOF 662 fi 663 ${MY_CAT} >> ${MY_FILE} <<EOF 664 #define VBOX_SCRIPTABLE(a) public a 665 #define VBOX_SCRIPTABLE_IMPL(a) 666 #define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a) 667 668 #define CTX_SUFF(var) var##R3 669 #define CTXAllSUFF(var) var##R3 670 #define CTXSUFF(var) var##HC 671 #define OTHERCTXSUFF(var) var##GC 672 #define CTXALLMID(first, last) first##R3##last 673 #define CTXMID(first, last) first##HC##last 674 #define OTHERCTXMID(first, last) first##GC##last 675 #define CTXTYPE(GCType, R3Type, R0Type) R3Type 676 #define RCTYPE(RCType, HCType) RCType 677 #define GCTYPE(GCType, HCType) GCType 678 #define RCPTRTYPE(RCType) RCType 679 #define GCPTRTYPE(GCType) GCType 680 #define HCPTRTYPE(HCType) HCType 681 #define R3R0PTRTYPE(HCType) HCType 682 #define R0PTRTYPE(R3Type) R3Type 683 #define R3PTRTYPE(R0Type) R0Type 684 #define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ 685 #define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction 686 #define RT_SRC_POS_ARGS pszFile, iLine, pszFunction 687 #define RTCALL 688 #define RT_IPRT_FORMAT_ATTR(a_iFmt, a_iArgs) 689 #define RT_IPRT_FORMAT_ATTR_MAYBE_NULL(a_iFmt, a_iArgs) 690 #define DECLINLINE(type) inline type 691 #define DECL_INLINE_THROW(type) inline type 692 #define DECL_FORCE_INLINE(type) inline type 693 #define DECL_INVALID(type) type 694 695 #define PDMDEVINSINT_DECLARED 1 696 #define VBOX_WITH_HGCM 1 697 #define VBOXCALL 698 699 #define HM_NAMELESS_UNION_TAG(a_Tag) 700 #define HM_UNION_NM(a_Nm) 701 #define HM_STRUCT_NM(a_Nm) 702 703 #define PGM_ALL_CB_DECL(type) type 704 #define PGM_ALL_CB2_DECL(type) type 705 #define PGM_CTX(a,b) b 706 #define PGM_CTX3(a,b,c) c 707 #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name) 708 #define PGM_GST_NAME_REAL(name) pgmGstReal##name 709 #define PGM_GST_NAME_PROT(name) pgmGstProt##name 710 #define PGM_GST_NAME_32BIT(name) pgmGst32Bit##name 711 #define PGM_GST_NAME_PAE(name) pgmGstPAE##name 712 #define PGM_GST_NAME_AMD64(name) pgmGstAMD64##name 713 #define PGM_GST_DECL(type, name) type PGM_GST_NAME(name) 714 #define PGM_SHW_NAME(name) PGM_GST_NAME_AMD64(name) 715 #define PGM_SHW_NAME_32BIT(name) pgmShw32Bit##name 716 #define PGM_SHW_NAME_PAE(name) pgmShwPAE##name 717 #define PGM_SHW_NAME_AMD64(name) pgmShwAMD64##name 718 #define PGM_SHW_NAME_NESTED(name) pgmShwNested##name 719 #define PGM_SHW_NAME_EPT(name) pgmShwEPT##name 720 #define PGM_SHW_DECL(type, name) type PGM_SHW_NAME(name) 721 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name) 722 #define PGM_BTH_NAME_32BIT_REAL(name) pgmBth##name 723 #define PGM_BTH_NAME_32BIT_PROT(name) pgmBth##name 724 #define PGM_BTH_NAME_32BIT_32BIT(name) pgmBth##name 725 #define PGM_BTH_NAME_PAE_REAL(name) pgmBth##name 726 #define PGM_BTH_NAME_PAE_PROT(name) pgmBth##name 727 #define PGM_BTH_NAME_PAE_32BIT(name) pgmBth##name 728 #define PGM_BTH_NAME_PAE_PAE(name) pgmBth##name 729 #define PGM_BTH_NAME_AMD64_PROT(name) pgmBth##name 730 #define PGM_BTH_NAME_AMD64_AMD64(name) pgmBth##name 731 #define PGM_BTH_NAME_NESTED_REAL(name) pgmBth##name 732 #define PGM_BTH_NAME_NESTED_PROT(name) pgmBth##name 733 #define PGM_BTH_NAME_NESTED_32BIT(name) pgmBth##name 734 #define PGM_BTH_NAME_NESTED_PAE(name) pgmBth##name 735 #define PGM_BTH_NAME_NESTED_AMD64(name) pgmBth##name 736 #define PGM_BTH_NAME_EPT_REAL(name) pgmBth##name 737 #define PGM_BTH_NAME_EPT_PROT(name) pgmBth##name 738 #define PGM_BTH_NAME_EPT_32BIT(name) pgmBth##name 739 #define PGM_BTH_NAME_EPT_PAE(name) pgmBth##name 740 #define PGM_BTH_NAME_EPT_AMD64(name) pgmBth##name 741 #define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name) 742 743 #define FNIEMOP_STUB(a_Name) VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) { return VERR_NOT_IMPLEMENTED; } 744 #define FNIEMOP_DEF(a_Name) VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) 745 #define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0) 746 #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) 747 #define FNIEMOPRM_DEF(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, uint8_t bBm) 748 #define IEM_CIMPL_DEF_0(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) 749 #define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0) 750 #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) 751 #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) 752 #define IEM_DECL_IMPL_DEF(a_RetType, a_Name, a_ArgList) a_RetType a_Name a_ArgList 753 #define IEM_MC_LOCAL(a_Type, a_Name) a_Type a_Name 754 #define IEM_MC_ARG(a_Type, a_Name, a_iArg) a_Type a_Name 755 #define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) a_Type const a_Name = a_Value 756 #define IEM_STATIC 757 758 #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) 759 #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) 760 #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) 761 #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) 762 763 #define RTLDRELF_NAME(name) rtldrELF64##name 764 #define RTLDRELF_SUFF(name) name##64 765 #define RTLDRELF_MID(pre,suff) pre##64##suff 766 767 #define BS3_DECL(type) type 768 #define BS3_DECL_CALLBACK(type) type 769 #define TMPL_NM(name) name##_mmm 770 #define TMPL_FAR_NM(name) name##_mmm_far 771 #define BS3_CMN_NM(name) name 772 #define BS3_CMN_FAR_NM(name) name 773 #define BS3_CMN_FN_NM(name) name 774 #define BS3_DATA_NM(name) name 775 #define BS3_FAR 776 #define BS3_FAR_CODE 777 #define BS3_FAR_DATA 778 #define BS3_NEAR 779 #define BS3_NEAR_CODE 780 #define BS3_CMN_PROTO_STUB(a_RetType, a_Name, a_Params) a_RetType a_Name a_Params 781 #define BS3_CMN_PROTO_NOSB(a_RetType, a_Name, a_Params) a_RetType a_Name a_Params 782 #define BS3_CMN_DEF( a_RetType, a_Name, a_Params) a_RetType a_Name a_Params 783 #define BS3_MODE_PROTO_STUB(a_RetType, a_Name, a_Params) \ 784 a_RetType a_Name##_mmm a_Params; \ 785 a_RetType a_Name##_mmm_far a_Params; \ 786 a_RetType a_Name##_rm a_Params; \ 787 a_RetType a_Name##_pe16 a_Params; \ 788 a_RetType a_Name##_pe16_32 a_Params; \ 789 a_RetType a_Name##_pe16_v86 a_Params; \ 790 a_RetType a_Name##_pe32 a_Params; \ 791 a_RetType a_Name##_pe32_16 a_Params; \ 792 a_RetType a_Name##_pev86 a_Params; \ 793 a_RetType a_Name##_pp16 a_Params; \ 794 a_RetType a_Name##_pp16_32 a_Params; \ 795 a_RetType a_Name##_pp16_v86 a_Params; \ 796 a_RetType a_Name##_pp32 a_Params; \ 797 a_RetType a_Name##_pp32_16 a_Params; \ 798 a_RetType a_Name##_ppv86 a_Params; \ 799 a_RetType a_Name##_pae16 a_Params; \ 800 a_RetType a_Name##_pae16_32 a_Params; \ 801 a_RetType a_Name##_pae16_v86 a_Params; \ 802 a_RetType a_Name##_pae32 a_Params; \ 803 a_RetType a_Name##_pae32_16 a_Params; \ 804 a_RetType a_Name##_paev86 a_Params; \ 805 a_RetType a_Name##_lm16 a_Params; \ 806 a_RetType a_Name##_lm32 a_Params; \ 807 a_RetType a_Name##_lm64 a_Params; \ 808 a_RetType a_Name##_rm_far a_Params; \ 809 a_RetType a_Name##_pe16_far a_Params; \ 810 a_RetType a_Name##_pe16_v86_far a_Params; \ 811 a_RetType a_Name##_pe32_16_far a_Params; \ 812 a_RetType a_Name##_pev86_far a_Params; \ 813 a_RetType a_Name##_pp16_far a_Params; \ 814 a_RetType a_Name##_pp16_v86_far a_Params; \ 815 a_RetType a_Name##_pp32_16_far a_Params; \ 816 a_RetType a_Name##_ppv86_far a_Params; \ 817 a_RetType a_Name##_pae16_far a_Params; \ 818 a_RetType a_Name##_pae16_v86_far a_Params; \ 819 a_RetType a_Name##_pae32_16_far a_Params; \ 820 a_RetType a_Name##_paev86_far a_Params; \ 821 a_RetType a_Name##_lm16_far a_Params 822 #define BS3_MODE_PROTO_NOSB(a_RetType, a_Name, a_Params) \ 823 a_RetType a_Name##_mmm a_Params; \ 824 a_RetType a_Name##_mmm_far a_Params; \ 825 a_RetType a_Name##_rm a_Params; \ 826 a_RetType a_Name##_pe16 a_Params; \ 827 a_RetType a_Name##_pe16_32 a_Params; \ 828 a_RetType a_Name##_pe16_v86 a_Params; \ 829 a_RetType a_Name##_pe32 a_Params; \ 830 a_RetType a_Name##_pe32_16 a_Params; \ 831 a_RetType a_Name##_pev86 a_Params; \ 832 a_RetType a_Name##_pp16 a_Params; \ 833 a_RetType a_Name##_pp16_32 a_Params; \ 834 a_RetType a_Name##_pp16_v86 a_Params; \ 835 a_RetType a_Name##_pp32 a_Params; \ 836 a_RetType a_Name##_pp32_16 a_Params; \ 837 a_RetType a_Name##_ppv86 a_Params; \ 838 a_RetType a_Name##_pae16 a_Params; \ 839 a_RetType a_Name##_pae16_32 a_Params; \ 840 a_RetType a_Name##_pae16_v86 a_Params; \ 841 a_RetType a_Name##_pae32 a_Params; \ 842 a_RetType a_Name##_pae32_16 a_Params; \ 843 a_RetType a_Name##_paev86 a_Params; \ 844 a_RetType a_Name##_lm16 a_Params; \ 845 a_RetType a_Name##_lm32 a_Params; \ 846 a_RetType a_Name##_lm64 a_Params; \ 847 a_RetType a_Name##_rm_far a_Params; \ 848 a_RetType a_Name##_pe16_far a_Params; \ 849 a_RetType a_Name##_pe16_v86_far a_Params; \ 850 a_RetType a_Name##_pe32_16_far a_Params; \ 851 a_RetType a_Name##_pev86_far a_Params; \ 852 a_RetType a_Name##_pp16_far a_Params; \ 853 a_RetType a_Name##_pp16_v86_far a_Params; \ 854 a_RetType a_Name##_pp32_16_far a_Params; \ 855 a_RetType a_Name##_ppv86_far a_Params; \ 856 a_RetType a_Name##_pae16_far a_Params; \ 857 a_RetType a_Name##_pae16_v86_far a_Params; \ 858 a_RetType a_Name##_pae32_16_far a_Params; \ 859 a_RetType a_Name##_paev86_far a_Params; \ 860 a_RetType a_Name##_lm16_far a_Params 861 #define BS3_MODE_EXPAND_EXTERN_DATA16(a_VarType, a_VarName, a_Suffix) \ 862 extern a_VarType a_VarName##_rm a_Suffix; \ 863 extern a_VarType a_VarName##_pe16 a_Suffix; \ 864 extern a_VarType a_VarName##_pe16_32 a_Suffix; \ 865 extern a_VarType a_VarName##_pe16_v86 a_Suffix; \ 866 extern a_VarType a_VarName##_pe32 a_Suffix; \ 867 extern a_VarType a_VarName##_pe32_16 a_Suffix; \ 868 extern a_VarType a_VarName##_pev86 a_Suffix; \ 869 extern a_VarType a_VarName##_pp16 a_Suffix; \ 870 extern a_VarType a_VarName##_pp16_32 a_Suffix; \ 871 extern a_VarType a_VarName##_pp16_v86 a_Suffix; \ 872 extern a_VarType a_VarName##_pp32 a_Suffix; \ 873 extern a_VarType a_VarName##_pp32_16 a_Suffix; \ 874 extern a_VarType a_VarName##_ppv86 a_Suffix; \ 875 extern a_VarType a_VarName##_pae16 a_Suffix; \ 876 extern a_VarType a_VarName##_pae16_32 a_Suffix; \ 877 extern a_VarType a_VarName##_pae16_v86 a_Suffix; \ 878 extern a_VarType a_VarName##_pae32 a_Suffix; \ 879 extern a_VarType a_VarName##_pae32_16 a_Suffix; \ 880 extern a_VarType a_VarName##_paev86 a_Suffix; \ 881 extern a_VarType a_VarName##_lm16 a_Suffix; \ 882 extern a_VarType a_VarName##_lm32 a_Suffix; \ 883 extern a_VarType a_VarName##_lm64 a_Suffix 884 885 EOF 886 887 MY_HDR_FILES=` echo ${MY_ROOT_DIR}/include/VBox/*.h ${MY_ROOT_DIR}/include/VBox/vmm/*.h \ 888 | ${MY_SED} -e 's,${MY_ROOT_DIR}/include/VBox/err.h,,' ` 889 MY_HDR_FILES="${MY_HDR_FILES} ${MY_ROOT_DIR}/include/iprt/cdefs.h" 890 ${MY_SED} \ 891 -e '/__cdecl/d' \ 892 -e '/^ *# *define.*DECL/!d' \ 893 -e '/DECLS/d' \ 894 -e '/DECLARE_CLS_/d' \ 895 -e '/_SRC_POS_DECL/d' \ 896 -e '/declspec/d' \ 897 -e '/__attribute__/d' \ 898 -e 's/# */#/g' \ 899 -e 's/ */ /g' \ 900 -e '/ DECLEXPORT_CLASS/d' \ 901 -e 's/ *VBOXCALL//' \ 902 -e 's/ *RTCALL//' \ 903 -e '/ DECLASM(type) type/d' \ 904 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \ 905 -e '/define *DECLINLINE(type)/d' \ 906 -e '/define *DECL_FORCE_INLINE(type)/d' \ 907 -e '/ *DECL_INVALID(/d' \ 908 \ 909 -e 's/(type) DECLHIDDEN(type)/(type) type/' \ 910 -e 's/(type) DECLEXPORT(type)/(type) type/' \ 911 -e 's/(type) DECLIMPORT(type)/(type) type/' \ 912 -e 's/(type) DECL_HIDDEN_NOTHROW(type)/(type) type/' \ 913 -e 's/(type) DECL_EXPORT_NOTHROW(type)/(type) type/' \ 914 -e 's/(type) DECL_IMPORT_NOTHROW(type)/(type) type/' \ 915 -e 's/(a_Type) DECLHIDDEN(a_Type)/(a_Type) a_Type/' \ 916 -e 's/(a_Type) DECLEXPORT(a_Type)/(a_Type) a_Type/' \ 917 -e 's/(a_Type) DECLIMPORT(a_Type)/(a_Type) a_Type/' \ 918 -e 's/(a_Type) DECL_HIDDEN_NOTHROW(a_Type)/(a_Type) a_Type/' \ 919 -e 's/(a_Type) DECL_EXPORT_NOTHROW(a_Type)/(a_Type) a_Type/' \ 920 -e 's/(a_Type) DECL_IMPORT_NOTHROW(a_Type)/(a_Type) a_Type/' \ 921 \ 922 --append "${MY_FILE}" \ 923 ${MY_HDR_FILES} 924 925 ${MY_CAT} "${MY_FILE}" \ 926 | ${MY_SED} -e 's/_/\x1F/g' -e 's/(/\x1E/g' -e 's/[[:space:]][[:space:]]*/\x1C/g' \ 927 | ${MY_SED} -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \ 928 | ${MY_SORT} \ 929 | ${MY_SED} -e '/#define/s/$/ \/\/ vbox/' --output "${MY_FILE}.2" 930 931 # Eliminate duplicates. 932 > "${MY_FILE}.3" 933 exec < "${MY_FILE}.2" 934 MY_PREV_DEFINE="" 935 while read MY_LINE; 308 my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox" 309 fi 310 311 # src/VBox/GuestHost 312 my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI" 313 if test -z "$MY_OPT_MINIMAL"; then 314 my_generate_project "DnD-GH" "src/VBox/GuestHost/DragAndDrop" --begin-incs "include" --end-includes "src/VBox/GuestHost/DragAndDrop" 315 fi 316 my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard" 317 318 # src/VBox/HostDrivers 319 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" 320 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" 321 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" 322 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" 323 my_generate_project "AdpCtl" "src/VBox/HostDrivers/adpctl" --begin-incs "include" --end-includes "src/VBox/HostDrivers/adpctl" 324 325 # src/VBox/HostServices 326 my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestControl" --end-includes "src/VBox/HostServices/GuestControl" 327 my_generate_project "DragAndDrop" "src/VBox/HostServices/DragAndDrop" --begin-incs "include" "src/VBox/HostServices/DragAndDrop" --end-includes "src/VBox/HostServices/DragAndDrop" 328 my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties" 329 my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard" 330 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" 331 332 # src/VBox/ImageMounter 333 my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter" 334 335 # src/VBox/Installer 336 my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer" 337 338 # src/VBox/Main 339 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" 340 ## @todo seperate webservices and Main. pick the right headers. added generated headers. 341 342 # src/VBox/Network 343 my_generate_project "Net-DHCP" "src/VBox/NetworkServices/Dhcpd" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/Dhcpd" 344 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" 345 my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib" 346 347 # src/VBox/RDP 348 my_generate_project "RDP-Client" "src/VBox/RDP/client-1.8.4" --begin-incs "include" "src/VBox/RDP/client-1.8.4" --end-includes "src/VBox/RDP/client-1.8.4" 349 my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server" 350 my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient" 351 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" 352 353 # src/VBox/Storage 354 my_generate_project "Storage" "src/VBox/Storage" --begin-incs "include" "src/VBox/Storage" --end-includes "src/VBox/Storage" 355 356 # src/VBox/ValidationKit 357 my_generate_project "ValidationKit" "src/VBox/ValidationKit" --begin-incs "include" --end-includes "src/VBox/ValidationKit" 358 359 # src/VBox/ExtPacks 360 my_generate_project "ExtPacks" "src/VBox/ExtPacks" --begin-incs "include" --end-includes "src/VBox/ExtPacks" 361 362 # src/bldprogs 363 my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs" 364 365 # A few things from src/lib 366 lib=$(my_get_newest_ver src/libs/zlib) 367 my_generate_project "zlib" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h" 368 lib=$(my_get_newest_ver src/libs/liblzf) 369 my_generate_project "liblzf" "${lib}" --begin-incs "include" --end-includes "${lib}" 370 lib=$(my_get_newest_ver src/libs/libpng) 371 my_generate_project "libpng" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h" 372 lib=$(my_get_newest_ver src/libs/openssl) 373 my_generate_project "openssl" "${lib}" --begin-incs "include" "${lib}/crypto" --end-includes "${lib}" 374 lib=$(my_get_newest_ver src/libs/curl) 375 my_generate_project "curl" "${lib}" --begin-incs "include" "${lib}/include" --end-includes "${lib}" 376 lib=$(my_get_newest_ver src/libs/softfloat) 377 my_generate_project "softfloat" "${lib}" --begin-incs "include" "${lib}/source/include" --end-includes "${lib}" 378 379 # webtools 380 my_generate_project "webtools" "webtools" --begin-incs "include" "webtools/tinderbox/server/Tinderbox3" --end-includes "webtools" 381 382 # include/VBox 383 my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox" 384 385 # Misc 386 my_generate_project "misc" "." --begin-incs "include" --end-includes \ 387 "configure" \ 388 "configure.vbs" \ 389 "Config.kmk" \ 390 "Makefile.kmk" \ 391 "src/Makefile.kmk" \ 392 "src/VBox/Makefile.kmk" \ 393 "tools/env.sh" \ 394 "tools/env.cmd" \ 395 "tools/envSub.vbs" \ 396 "tools/envSub.cmd" \ 397 "tools/win/vbscript" 398 399 400 # out/x.y/z/bin/sdk/bindings/xpcom 401 XPCOM_INCS="src/libs/xpcom18a4" 402 for d in \ 403 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \ 404 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \ 405 "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \ 406 "out/linux.x86/debug/bin/sdk/bindings/xpcom" \ 407 "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \ 408 "out/darwin.x86/debug/bin/dist/bindings/xpcom" \ 409 "out/haiku.amd64/debug/bin/sdk/bindings/xpcom" \ 410 "out/haiku.x86/debug/bin/sdk/bindings/xpcom" \ 411 "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \ 412 "out/solaris.x86/debug/bin/sdk/bindings/xpcom"; 936 413 do 937 MY_DEFINE=`echo "${MY_LINE}" | ${MY_SED} -e 's/^#define \([^ ()]*\).*$/\1/' `938 if test "${MY_DEFINE}" != "${MY_PREV_DEFINE}"; then939 MY_PREV_DEFINE=${MY_DEFINE}940 echo "${MY_LINE}" >> "${MY_FILE}.3"414 if test -d "${MY_ROOT_DIR}/${d}"; then 415 my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}" 416 XPCOM_INCS="${d}/include" 417 break 941 418 fi 942 419 done 943 420 944 # Append non-vbox bits from the current user config. 945 if test -n "${MY_USERCPP_H_FULL}" -a -f "${MY_USERCPP_H_FULL}"; then 946 ${MY_SED} -e '/ \/\/ vbox$/d' -e '/^[[:space:]]*$/d' --append "${MY_FILE}.3" "${MY_USERCPP_H_FULL}" 947 fi 948 949 # Finalize the file (sort + blank lines). 950 ${MY_CAT} "${MY_FILE}.3" \ 951 | ${MY_SED} -e 's/$/\n/' --output "${MY_FILE}" 952 ${MY_RM} -f "${MY_FILE}.2" "${MY_FILE}.3" 953 954 # Install it. 955 if test -n "${MY_USERCPP_H_FULL}" -a -d "${MY_SLICKDIR}"; then 956 if test -f "${MY_USERCPP_H_FULL}"; then 957 ${MY_MV} -vf "${MY_USERCPP_H_FULL}" "${MY_USERCPP_H_FULL}.bak" 958 ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}" 959 echo "Updated the SlickEdit preprocessor file. (Previous version renamed to .bak.)" 960 else 961 ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}" 962 echo "Created the SlickEdit preprocessor file." 963 fi 964 fi 965 } 966 967 ###### end of functions #### 968 969 970 # 971 # Parse arguments. 972 # 973 while test $# -ge 1; 974 do 975 ARG=$1 976 shift 977 case "$ARG" in 978 979 --rootdir) 980 if test $# -eq 0; then 981 echo "error: missing --rootdir argument." 1>&2 982 exit 1; 983 fi 984 MY_ROOT_DIR="$1" 985 shift 986 ;; 987 988 --outdir) 989 if test $# -eq 0; then 990 echo "error: missing --outdir argument." 1>&2 991 exit 1; 992 fi 993 MY_OUT_DIR="$1" 994 shift 995 ;; 996 997 --project-base) 998 if test $# -eq 0; then 999 echo "error: missing --project-base argument." 1>&2 1000 exit 1; 1001 fi 1002 MY_PRJ_PRF="$1" 1003 shift 1004 ;; 1005 1006 --workspace) 1007 if test $# -eq 0; then 1008 echo "error: missing --workspace argument." 1>&2 1009 exit 1; 1010 fi 1011 MY_WS_NAME="$1" 1012 shift 1013 ;; 1014 1015 --windows-host) 1016 MY_WINDOWS_HOST=1 1017 ;; 1018 1019 --minimal) 1020 MY_OPT_MINIMAL=1 1021 ;; 1022 1023 --slickedit-config) 1024 MY_SLICK_CONFIG="$1" 1025 shift 1026 ;; 1027 1028 # usage 1029 --h*|-h*|-?|--?) 1030 echo "usage: $0 [--rootdir <rootdir>] [--outdir <outdir>] [--project-base <prefix>] [--workspace <name>] [--minimal] [--slickedit-config <DIR>]" 1031 echo "" 1032 echo "If --outdir is specified, you must specify a --rootdir relative to it as well." 1033 exit 1; 1034 ;; 1035 1036 # default 1037 *) 1038 echo "error: Invalid parameter '$ARG'" 1>&2 1039 exit 1; 1040 1041 esac 1042 done 1043 1044 1045 # 1046 # From now on everything *MUST* succeed. 1047 # 1048 set -e 1049 1050 1051 # 1052 # Make sure the output directory exists, is valid and clean. 1053 # 1054 ${MY_RM} -f \ 1055 "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \ 1056 "${MY_OUT_DIR}/${MY_WS_NAME}" \ 1057 "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`" 1058 ${MY_MKDIR} -p "${MY_OUT_DIR}" 1059 cd "${MY_OUT_DIR}" 1060 1061 1062 # 1063 # Determine the invocation to conjure up kmk. 1064 # 1065 my_abs_dir "tools" 1066 if test -n "${MY_WINDOWS_HOST}"; then 1067 MY_KMK_INVOCATION="cscript.exe /Nologo ${MY_ABS_DIR}/envSub.vbs --quiet -- kmk.exe" 1068 else 1069 MY_KMK_INVOCATION="/usr/bin/env LANG=C ${MY_ABS_DIR}/env.sh --quiet --no-wine kmk" 1070 fi 1071 1072 1073 # 1074 # Generate the projects and workspace. 1075 # 1076 # Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done. 1077 # 1078 1079 # src/VBox/Runtime 1080 my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime" 1081 1082 # src/VBox/VMM 1083 my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \ 1084 "include/VBox/vmm/cfgm.h" \ 1085 "include/VBox/vmm/cpum.*" \ 1086 "include/VBox/vmm/dbgf.h" \ 1087 "include/VBox/vmm/em.h" \ 1088 "include/VBox/vmm/gim.h" \ 1089 "include/VBox/vmm/apic.h" \ 1090 "include/VBox/vmm/gmm.*" \ 1091 "include/VBox/vmm/gvm.*" \ 1092 "include/VBox/vmm/hm*.*" \ 1093 "include/VBox/vmm/iom.h" \ 1094 "include/VBox/vmm/mm.h" \ 1095 "include/VBox/vmm/patm.*" \ 1096 "include/VBox/vmm/pdm*.h" \ 1097 "include/VBox/vmm/pgm.*" \ 1098 "include/VBox/vmm/selm.*" \ 1099 "include/VBox/vmm/ssm.h" \ 1100 "include/VBox/vmm/stam.*" \ 1101 "include/VBox/vmm/tm.h" \ 1102 "include/VBox/vmm/trpm.*" \ 1103 "include/VBox/vmm/vm.*" \ 1104 "include/VBox/vmm/vmm.*" 1105 1106 # src/VBox/Additions 1107 my_generate_project "Add-darwin" "src/VBox/Additions/darwin" --begin-incs "include" "src/VBox/Additions/darwin" --end-includes "src/VBox/Additions/darwin" 1108 my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd" 1109 my_generate_project "Add-haiku" "src/VBox/Additions/haiku" --begin-incs "include" "src/VBox/Additions/haiku" --end-includes "src/VBox/Additions/haiku" 1110 my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux" 1111 my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2" 1112 my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris" 1113 my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT" 1114 if test -z "$MY_OPT_MINIMAL"; then 1115 my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11" 1116 fi 1117 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" 1118 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*.*" 1119 my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuest/lib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest/lib" --end-includes "src/VBox/Additions/common/VBoxGuest/lib" "include/VBox/VBoxGuest/lib/*.*" 1120 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" 1121 my_generate_project "Add-VBoxVideo" "src/VBox/Additions/common/VBoxVideo" --begin-incs "include" "src/VBox/Additions/common/VBoxVideo" --end-includes "src/VBox/Additions/common/VBoxVideo" 1122 if test -z "$MY_OPT_MINIMAL"; then 1123 my_generate_project "Add-pam" "src/VBox/Additions/common/pam" --begin-incs "include" "src/VBox/Additions/common/pam" --end-includes "src/VBox/Additions/common/pam" 1124 my_generate_project "Add-cmn-test" "src/VBox/Additions/common/testcase" --begin-incs "include" "src/VBox/Additions/common/testcase" --end-includes "src/VBox/Additions/common/testcase" 1125 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" 1126 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" 1127 fi 1128 1129 # src/VBox/Debugger 1130 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" 1131 1132 # src/VBox/Devices 1133 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" 1134 ## @todo split this up. 1135 1136 # src/VBox/Disassembler 1137 my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h" 1138 1139 # src/VBox/Frontends 1140 if test -z "$MY_OPT_MINIMAL"; then 1141 my_generate_project "FE-VBoxAutostart" "src/VBox/Frontends/VBoxAutostart" --begin-incs "include" "src/VBox/Frontends/VBoxAutostart" --end-includes "src/VBox/Frontends/VBoxAutostart" 1142 my_generate_project "FE-VBoxBugReport" "src/VBox/Frontends/VBoxBugReport" --begin-incs "include" "src/VBox/Frontends/VBoxBugReport" --end-includes "src/VBox/Frontends/VBoxBugReport" 1143 my_generate_project "FE-VBoxBalloonCtrl" "src/VBox/Frontends/VBoxBalloonCtrl" --begin-incs "include" "src/VBox/Frontends/VBoxBalloonCtrl" --end-includes "src/VBox/Frontends/VBoxBalloonCtrl" 1144 fi 1145 my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage" 1146 my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless" 1147 my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL" 1148 my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell" 1149 # noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE" 1150 FE_VBOX_WRAPPERS="" 1151 for d in ${MY_OUT_DIRS}; 1152 do 1153 if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then 1154 FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include" 1155 break 1156 fi 1157 done 1158 if test -n "${FE_VBOX_WRAPPERS}"; then 1159 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" 1160 else 1161 my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox" 1162 fi 1163 1164 # src/VBox/GuestHost 1165 my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI" 1166 if test -z "$MY_OPT_MINIMAL"; then 1167 my_generate_project "DnD-GH" "src/VBox/GuestHost/DragAndDrop" --begin-incs "include" --end-includes "src/VBox/GuestHost/DragAndDrop" 1168 fi 1169 my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard" 1170 1171 # src/VBox/HostDrivers 1172 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" 1173 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" 1174 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" 1175 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" 1176 my_generate_project "AdpCtl" "src/VBox/HostDrivers/adpctl" --begin-incs "include" --end-includes "src/VBox/HostDrivers/adpctl" 1177 1178 # src/VBox/HostServices 1179 my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestControl" --end-includes "src/VBox/HostServices/GuestControl" 1180 my_generate_project "DragAndDrop" "src/VBox/HostServices/DragAndDrop" --begin-incs "include" "src/VBox/HostServices/DragAndDrop" --end-includes "src/VBox/HostServices/DragAndDrop" 1181 my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties" 1182 my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard" 1183 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" 1184 1185 # src/VBox/ImageMounter 1186 my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter" 1187 1188 # src/VBox/Installer 1189 my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer" 1190 1191 # src/VBox/Main 1192 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" 1193 ## @todo seperate webservices and Main. pick the right headers. added generated headers. 1194 1195 # src/VBox/Network 1196 my_generate_project "Net-DHCP" "src/VBox/NetworkServices/Dhcpd" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/Dhcpd" 1197 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" 1198 my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib" 1199 1200 # src/VBox/RDP 1201 my_generate_project "RDP-Client" "src/VBox/RDP/client-1.8.4" --begin-incs "include" "src/VBox/RDP/client-1.8.4" --end-includes "src/VBox/RDP/client-1.8.4" 1202 my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server" 1203 my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient" 1204 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" 1205 1206 # src/VBox/Storage 1207 my_generate_project "Storage" "src/VBox/Storage" --begin-incs "include" "src/VBox/Storage" --end-includes "src/VBox/Storage" 1208 1209 # src/VBox/ValidationKit 1210 my_generate_project "ValidationKit" "src/VBox/ValidationKit" --begin-incs "include" --end-includes "src/VBox/ValidationKit" 1211 1212 # src/VBox/ExtPacks 1213 my_generate_project "ExtPacks" "src/VBox/ExtPacks" --begin-incs "include" --end-includes "src/VBox/ExtPacks" 1214 1215 # src/bldprogs 1216 my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs" 1217 1218 # A few things from src/lib 1219 lib=$(my_get_newest_ver src/libs/zlib) 1220 my_generate_project "zlib" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h" 1221 lib=$(my_get_newest_ver src/libs/liblzf) 1222 my_generate_project "liblzf" "${lib}" --begin-incs "include" --end-includes "${lib}" 1223 lib=$(my_get_newest_ver src/libs/libpng) 1224 my_generate_project "libpng" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h" 1225 lib=$(my_get_newest_ver src/libs/openssl) 1226 my_generate_project "openssl" "${lib}" --begin-incs "include" "${lib}/crypto" --end-includes "${lib}" 1227 lib=$(my_get_newest_ver src/libs/curl) 1228 my_generate_project "curl" "${lib}" --begin-incs "include" "${lib}/include" --end-includes "${lib}" 1229 lib=$(my_get_newest_ver src/libs/softfloat) 1230 my_generate_project "softfloat" "${lib}" --begin-incs "include" "${lib}/source/include" --end-includes "${lib}" 1231 1232 # webtools 1233 my_generate_project "webtools" "webtools" --begin-incs "include" "webtools/tinderbox/server/Tinderbox3" --end-includes "webtools" 1234 1235 # include/VBox 1236 my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox" 1237 1238 # Misc 1239 my_generate_project "misc" "." --begin-incs "include" --end-includes \ 1240 "configure" \ 1241 "configure.vbs" \ 1242 "Config.kmk" \ 1243 "Makefile.kmk" \ 1244 "src/Makefile.kmk" \ 1245 "src/VBox/Makefile.kmk" \ 1246 "tools/env.sh" \ 1247 "tools/env.cmd" \ 1248 "tools/envSub.vbs" \ 1249 "tools/envSub.cmd" \ 1250 "tools/win/vbscript" 1251 1252 1253 # out/x.y/z/bin/sdk/bindings/xpcom 1254 XPCOM_INCS="src/libs/xpcom18a4" 1255 for d in \ 1256 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \ 1257 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \ 1258 "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \ 1259 "out/linux.x86/debug/bin/sdk/bindings/xpcom" \ 1260 "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \ 1261 "out/darwin.x86/debug/bin/dist/bindings/xpcom" \ 1262 "out/haiku.amd64/debug/bin/sdk/bindings/xpcom" \ 1263 "out/haiku.x86/debug/bin/sdk/bindings/xpcom" \ 1264 "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \ 1265 "out/solaris.x86/debug/bin/sdk/bindings/xpcom"; 1266 do 1267 if test -d "${MY_ROOT_DIR}/${d}"; then 1268 my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}" 1269 XPCOM_INCS="${d}/include" 1270 break 1271 fi 1272 done 1273 1274 # lib/xpcom 1275 my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4" 1276 1277 my_generate_workspace 1278 1279 1280 # 1281 # Update the history file if present. 1282 # 1283 MY_FILE="${MY_WS_NAME}histu" 1284 if test -f "${MY_FILE}"; then 1285 echo "Updating ${MY_FILE}..." 1286 ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old" 1287 ${MY_SED} -n \ 1288 -e '/PROJECT_CACHE/d' \ 1289 -e '/\[TreeExpansion2\]/d' \ 1290 -e '/^\[/p' \ 1291 -e '/: /p' \ 1292 -e '/^CurrentProject/p' \ 1293 "${MY_FILE}.old" > "${MY_FILE}" 1294 fi 1295 1296 1297 # 1298 # Generate and update the usercpp.h/unxcpp.h file. 1299 # 1300 my_generate_usercpp_h 1301 1302 1303 echo "done" 421 # lib/xpcom 422 my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4" 423 } 424 -
trunk/tools/bin/gen-slickedit-workspace.sh
r95579 r95580 3 3 ## @file 4 4 # Script for generating a SlickEdit workspace. 5 # 6 # The gen-vscode-workspace.sh script is derived from this one, so fixes here 7 # may apply there too. 5 8 # 6 9 … … 18 21 19 22 # 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" 23 # Include code we share with gen-vscode-workspace.sh 24 # 25 MY_SCRIPT_DIR=. 26 case "$0" in 27 */*|*\\*) 28 MY_SCRIPT_DIR=$(echo "$0" | kmk_sed -e 's,[/\][^/\][^/\]*$,,') 29 ;; 30 esac 31 . "${MY_SCRIPT_DIR}/common-gen-workspace.inc.sh" 32 34 33 35 34 # … … 37 36 # 38 37 MY_PROJECT_FILES="" 39 MY_OUT_DIRS="\40 out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE} \41 out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/debug \42 out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/release \43 out/linux.amd64/debug \44 out/linux.x86/debug \45 out/win.amd64/debug \46 out/win.x86/debug \47 out/darwin.amd64/debug \48 out/darwin.x86/debug \49 out/haiku.amd64/debug \50 out/haiku.x86/debug \51 out/solaris.amd64/debug \52 out/solaris.x86/debug";53 38 54 39 … … 56 41 # Parameters w/ defaults. 57 42 # 58 MY_ROOT_DIR=".."59 43 MY_OUT_DIR="SlickEdit" 60 44 MY_PRJ_PRF="VBox-" … … 64 48 MY_OPT_MINIMAL="" 65 49 MY_OPT_USE_WILDCARDS="yes" 66 67 68 ##69 # Gets the absolute path to an existing directory.70 #71 # @param $1 The path.72 my_abs_dir()73 {74 if test -n "${PWD}"; then75 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && echo ${PWD}`76 77 else78 # old cygwin shell has no PWD and need adjusting.79 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && pwd | ${MY_SED} -e 's,^/cygdrive/\(.\)/,\1:/,'`80 fi81 if test -z "${MY_ABS_DIR}"; then82 MY_ABS_DIR="${1}"83 fi84 }85 86 ##87 # Gets the file name part of a path.88 #89 # @param $1 The path.90 my_get_name()91 {92 SAVED_IFS=$IFS93 IFS=":/ "94 set $195 while test $# -gt 1 -a -n "${2}";96 do97 shift;98 done99 100 IFS=$SAVED_IFS101 #echo "$1"102 export MY_GET_NAME=$1103 }104 105 ##106 # Gets the newest version of a library (like openssl).107 #108 # @param $1 The library base path relative to root.109 my_get_newest_ver()110 {111 cd "${MY_ROOT_DIR}" > /dev/null112 latest=113 for ver in "$1"*;114 do115 if test -z "${latest}" || "${MY_EXPR}" "${ver}" ">" "${latest}" > /dev/null; then116 latest="${ver}"117 fi118 done119 if test -z "${latest}"; then120 echo "error: could not find any version of: $1" >&2;121 exit 1;122 fi123 echo "${latest}"124 return 0;125 }126 127 128 ##129 # Generate file entry for the specified file if it was found to be of interest.130 #131 # @param $1 The output file name base.132 # @param $2 The file name.133 # @param $3 Optional folder override.134 my_file()135 {136 # sort and filter by file type.137 case "$2" in138 # drop these.139 *.kup|*~|*.pyc|*.exe|*.sys|*.dll|*.o|*.obj|*.lib|*.a|*.ko)140 return 0141 ;;142 143 # by prefix or directory component.144 tst*|*/testcase/*)145 MY_FOLDER="$1-Testcases.lst"146 ;;147 148 # by extension.149 *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h|*.java)150 MY_FOLDER="$1-Sources.lst"151 ;;152 153 *.h|*.hpp|*.mm)154 MY_FOLDER="$1-Headers.lst"155 ;;156 157 *.asm|*.s|*.S|*.inc|*.mac)158 MY_FOLDER="$1-Assembly.lst"159 ;;160 161 *)162 MY_FOLDER="$1-Others.lst"163 ;;164 esac165 if test -n "$3";166 then167 MY_FOLDER="$1-$3.lst"168 fi169 170 ## @todo only files which are in subversion.171 # if ${MY_SVN} info "${2}" > /dev/null 2>&1; then172 my_get_name "${2}"173 echo ' <!-- sortkey: '"${MY_GET_NAME}"' --> <F N="'"${2}"'"/>' >> "${MY_FOLDER}"174 # fi175 }176 177 ##178 # Generate file entry for the specified file if it was found to be of interest.179 #180 # @param $1 The output file name base.181 # @param $2 The wildcard spec.182 # @param $3 Optional folder override.183 my_wildcard()184 {185 if test -n "$3"; then186 MY_FOLDER="$1-$3.lst"187 else188 MY_FOLDER="$1-All.lst"189 fi190 EXCLUDES="*.log;*.kup;*~;*.bak;*.bak?;*.pyc;*.exe;*.sys;*.dll;*.o;*.obj;*.lib;*.a;*.ko;*.class;*.cvsignore;*.done;*.project;*.actionScriptProperties;*.scm-settings;*.svnpatch.rej;*.svn-base;.svn/*;*.gitignore;*.gitattributes;*.gitmodules;*.swagger-codegen-ignore;*.png;*.bmp;*.jpg"191 echo ' <F N="'"${2}"'/*" Recurse="1" Excludes="'"${EXCLUDES}"'"/>' >> "${MY_FOLDER}"192 }193 194 ##195 # Generate file entries for the specified sub-directory tree.196 #197 # @param $1 The output filename.198 # @param $2 The sub-directory.199 # @param $3 Optional folder override.200 my_sub_tree()201 {202 if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi203 204 # Skip .svn directories.205 case "$2" in206 */.svn|*/.svn)207 return 0208 ;;209 esac210 211 # Process the files in the directory.212 for f in $2/*;213 do214 if test -d "${f}";215 then216 my_sub_tree "${1}" "${f}" "${3}"217 else218 my_file "${1}" "${f}" "${3}"219 fi220 done221 return 0;222 }223 50 224 51 … … 410 237 ## 411 238 # Function generating a project. 239 # 240 # This is called from my_generate_all_projects() in the common code. 412 241 # 413 242 # @param $1 The project file name. … … 1072 901 1073 902 # 1074 # Generate the projects and workspace. 1075 # 1076 # Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done. 1077 # 1078 1079 # src/VBox/Runtime 1080 my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime" 1081 1082 # src/VBox/VMM 1083 my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \ 1084 "include/VBox/vmm/cfgm.h" \ 1085 "include/VBox/vmm/cpum.*" \ 1086 "include/VBox/vmm/dbgf.h" \ 1087 "include/VBox/vmm/em.h" \ 1088 "include/VBox/vmm/gim.h" \ 1089 "include/VBox/vmm/apic.h" \ 1090 "include/VBox/vmm/gmm.*" \ 1091 "include/VBox/vmm/gvm.*" \ 1092 "include/VBox/vmm/hm*.*" \ 1093 "include/VBox/vmm/iom.h" \ 1094 "include/VBox/vmm/mm.h" \ 1095 "include/VBox/vmm/patm.*" \ 1096 "include/VBox/vmm/pdm*.h" \ 1097 "include/VBox/vmm/pgm.*" \ 1098 "include/VBox/vmm/selm.*" \ 1099 "include/VBox/vmm/ssm.h" \ 1100 "include/VBox/vmm/stam.*" \ 1101 "include/VBox/vmm/tm.h" \ 1102 "include/VBox/vmm/trpm.*" \ 1103 "include/VBox/vmm/vm.*" \ 1104 "include/VBox/vmm/vmm.*" 1105 1106 # src/VBox/Additions 1107 my_generate_project "Add-darwin" "src/VBox/Additions/darwin" --begin-incs "include" "src/VBox/Additions/darwin" --end-includes "src/VBox/Additions/darwin" 1108 my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd" 1109 my_generate_project "Add-haiku" "src/VBox/Additions/haiku" --begin-incs "include" "src/VBox/Additions/haiku" --end-includes "src/VBox/Additions/haiku" 1110 my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux" 1111 my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2" 1112 my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris" 1113 my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT" 1114 if test -z "$MY_OPT_MINIMAL"; then 1115 my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11" 1116 fi 1117 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" 1118 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*.*" 1119 my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuest/lib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest/lib" --end-includes "src/VBox/Additions/common/VBoxGuest/lib" "include/VBox/VBoxGuest/lib/*.*" 1120 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" 1121 my_generate_project "Add-VBoxVideo" "src/VBox/Additions/common/VBoxVideo" --begin-incs "include" "src/VBox/Additions/common/VBoxVideo" --end-includes "src/VBox/Additions/common/VBoxVideo" 1122 if test -z "$MY_OPT_MINIMAL"; then 1123 my_generate_project "Add-pam" "src/VBox/Additions/common/pam" --begin-incs "include" "src/VBox/Additions/common/pam" --end-includes "src/VBox/Additions/common/pam" 1124 my_generate_project "Add-cmn-test" "src/VBox/Additions/common/testcase" --begin-incs "include" "src/VBox/Additions/common/testcase" --end-includes "src/VBox/Additions/common/testcase" 1125 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" 1126 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" 1127 fi 1128 1129 # src/VBox/Debugger 1130 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" 1131 1132 # src/VBox/Devices 1133 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" 1134 ## @todo split this up. 1135 1136 # src/VBox/Disassembler 1137 my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h" 1138 1139 # src/VBox/Frontends 1140 if test -z "$MY_OPT_MINIMAL"; then 1141 my_generate_project "FE-VBoxAutostart" "src/VBox/Frontends/VBoxAutostart" --begin-incs "include" "src/VBox/Frontends/VBoxAutostart" --end-includes "src/VBox/Frontends/VBoxAutostart" 1142 my_generate_project "FE-VBoxBugReport" "src/VBox/Frontends/VBoxBugReport" --begin-incs "include" "src/VBox/Frontends/VBoxBugReport" --end-includes "src/VBox/Frontends/VBoxBugReport" 1143 my_generate_project "FE-VBoxBalloonCtrl" "src/VBox/Frontends/VBoxBalloonCtrl" --begin-incs "include" "src/VBox/Frontends/VBoxBalloonCtrl" --end-includes "src/VBox/Frontends/VBoxBalloonCtrl" 1144 fi 1145 my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage" 1146 my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless" 1147 my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL" 1148 my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell" 1149 # noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE" 1150 FE_VBOX_WRAPPERS="" 1151 for d in ${MY_OUT_DIRS}; 1152 do 1153 if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then 1154 FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include" 1155 break 1156 fi 1157 done 1158 if test -n "${FE_VBOX_WRAPPERS}"; then 1159 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" 1160 else 1161 my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox" 1162 fi 1163 1164 # src/VBox/GuestHost 1165 my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI" 1166 if test -z "$MY_OPT_MINIMAL"; then 1167 my_generate_project "DnD-GH" "src/VBox/GuestHost/DragAndDrop" --begin-incs "include" --end-includes "src/VBox/GuestHost/DragAndDrop" 1168 fi 1169 my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard" 1170 1171 # src/VBox/HostDrivers 1172 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" 1173 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" 1174 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" 1175 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" 1176 my_generate_project "AdpCtl" "src/VBox/HostDrivers/adpctl" --begin-incs "include" --end-includes "src/VBox/HostDrivers/adpctl" 1177 1178 # src/VBox/HostServices 1179 my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestControl" --end-includes "src/VBox/HostServices/GuestControl" 1180 my_generate_project "DragAndDrop" "src/VBox/HostServices/DragAndDrop" --begin-incs "include" "src/VBox/HostServices/DragAndDrop" --end-includes "src/VBox/HostServices/DragAndDrop" 1181 my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties" 1182 my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard" 1183 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" 1184 1185 # src/VBox/ImageMounter 1186 my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter" 1187 1188 # src/VBox/Installer 1189 my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer" 1190 1191 # src/VBox/Main 1192 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" 1193 ## @todo seperate webservices and Main. pick the right headers. added generated headers. 1194 1195 # src/VBox/Network 1196 my_generate_project "Net-DHCP" "src/VBox/NetworkServices/Dhcpd" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/Dhcpd" 1197 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" 1198 my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib" 1199 1200 # src/VBox/RDP 1201 my_generate_project "RDP-Client" "src/VBox/RDP/client-1.8.4" --begin-incs "include" "src/VBox/RDP/client-1.8.4" --end-includes "src/VBox/RDP/client-1.8.4" 1202 my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server" 1203 my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient" 1204 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" 1205 1206 # src/VBox/Storage 1207 my_generate_project "Storage" "src/VBox/Storage" --begin-incs "include" "src/VBox/Storage" --end-includes "src/VBox/Storage" 1208 1209 # src/VBox/ValidationKit 1210 my_generate_project "ValidationKit" "src/VBox/ValidationKit" --begin-incs "include" --end-includes "src/VBox/ValidationKit" 1211 1212 # src/VBox/ExtPacks 1213 my_generate_project "ExtPacks" "src/VBox/ExtPacks" --begin-incs "include" --end-includes "src/VBox/ExtPacks" 1214 1215 # src/bldprogs 1216 my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs" 1217 1218 # A few things from src/lib 1219 lib=$(my_get_newest_ver src/libs/zlib) 1220 my_generate_project "zlib" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h" 1221 lib=$(my_get_newest_ver src/libs/liblzf) 1222 my_generate_project "liblzf" "${lib}" --begin-incs "include" --end-includes "${lib}" 1223 lib=$(my_get_newest_ver src/libs/libpng) 1224 my_generate_project "libpng" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h" 1225 lib=$(my_get_newest_ver src/libs/openssl) 1226 my_generate_project "openssl" "${lib}" --begin-incs "include" "${lib}/crypto" --end-includes "${lib}" 1227 lib=$(my_get_newest_ver src/libs/curl) 1228 my_generate_project "curl" "${lib}" --begin-incs "include" "${lib}/include" --end-includes "${lib}" 1229 lib=$(my_get_newest_ver src/libs/softfloat) 1230 my_generate_project "softfloat" "${lib}" --begin-incs "include" "${lib}/source/include" --end-includes "${lib}" 1231 1232 # webtools 1233 my_generate_project "webtools" "webtools" --begin-incs "include" "webtools/tinderbox/server/Tinderbox3" --end-includes "webtools" 1234 1235 # include/VBox 1236 my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox" 1237 1238 # Misc 1239 my_generate_project "misc" "." --begin-incs "include" --end-includes \ 1240 "configure" \ 1241 "configure.vbs" \ 1242 "Config.kmk" \ 1243 "Makefile.kmk" \ 1244 "src/Makefile.kmk" \ 1245 "src/VBox/Makefile.kmk" \ 1246 "tools/env.sh" \ 1247 "tools/env.cmd" \ 1248 "tools/envSub.vbs" \ 1249 "tools/envSub.cmd" \ 1250 "tools/win/vbscript" 1251 1252 1253 # out/x.y/z/bin/sdk/bindings/xpcom 1254 XPCOM_INCS="src/libs/xpcom18a4" 1255 for d in \ 1256 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \ 1257 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \ 1258 "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \ 1259 "out/linux.x86/debug/bin/sdk/bindings/xpcom" \ 1260 "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \ 1261 "out/darwin.x86/debug/bin/dist/bindings/xpcom" \ 1262 "out/haiku.amd64/debug/bin/sdk/bindings/xpcom" \ 1263 "out/haiku.x86/debug/bin/sdk/bindings/xpcom" \ 1264 "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \ 1265 "out/solaris.x86/debug/bin/sdk/bindings/xpcom"; 1266 do 1267 if test -d "${MY_ROOT_DIR}/${d}"; then 1268 my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}" 1269 XPCOM_INCS="${d}/include" 1270 break 1271 fi 1272 done 1273 1274 # lib/xpcom 1275 my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4" 1276 903 # Generate the projects (common code) and workspace. 904 # 905 my_generate_all_projects # in common-gen-workspace-projects.inc.sh 1277 906 my_generate_workspace 1278 907 -
trunk/tools/bin/gen-vscode-workspace.sh
r95579 r95580 4 4 # Script for generating a Visual Studio Code (vscode) workspace. 5 5 # 6 7 # 8 # Copyright (C) 2022 Oracle Corporation 6 # This is derived from gen-slickedit-workspace.sh, so fixes may apply to both. 7 # 8 9 # 10 # Copyright (C) 2009-2022 Oracle Corporation 9 11 # 10 12 # This file is part of VirtualBox Open Source Edition (OSE), as … … 18 20 19 21 # 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" 22 # Include code we share with gen-slickedit-workspace.sh 23 # 24 MY_SCRIPT_DIR=. 25 case "$0" in 26 */*|*\\*) 27 MY_SCRIPT_DIR=$(echo "$0" | kmk_sed -e 's,[/\][^/\][^/\]*$,,') 28 ;; 29 esac 30 . "${MY_SCRIPT_DIR}/common-gen-workspace.inc.sh" 31 34 32 35 33 # … … 37 35 # 38 36 MY_PROJECT_FILES="" 39 MY_OUT_DIRS="\40 out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE} \41 out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/debug \42 out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/release \43 out/linux.amd64/debug \44 out/linux.x86/debug \45 out/win.amd64/debug \46 out/win.x86/debug \47 out/darwin.amd64/debug \48 out/darwin.x86/debug \49 out/haiku.amd64/debug \50 out/haiku.x86/debug \51 out/solaris.amd64/debug \52 out/solaris.x86/debug";53 37 54 38 … … 56 40 # Parameters w/ defaults. 57 41 # 58 MY_ROOT_DIR=".."59 42 MY_VSCODE_DIR=".vscode" 60 43 MY_VSCODE_FILE_DOT_EXT=".json" 61 44 MY_OUT_DIR=${MY_VSCODE_DIR} 62 45 MY_PRJ_PRF="VBox-" 63 MY_WS_NAME="virtualbox.vscode-workspace" 46 MY_WS_NAME="virtualbox.vscode-workspace" ## @todo v1.69 wants to open *.code-workspace... 64 47 MY_DBG="" 65 48 MY_WINDOWS_HOST="" … … 67 50 MY_OPT_USE_WILDCARDS="yes" 68 51 69 70 ##71 # Gets the absolute path to an existing directory.72 #73 # @param $1 The path.74 my_abs_dir()75 {76 if test -n "${PWD}"; then77 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && echo ${PWD}`78 79 else80 # old cygwin shell has no PWD and need adjusting.81 MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && pwd | ${MY_SED} -e 's,^/cygdrive/\(.\)/,\1:/,'`82 fi83 if test -z "${MY_ABS_DIR}"; then84 MY_ABS_DIR="${1}"85 fi86 }87 88 ##89 # Gets the file name part of a path.90 #91 # @param $1 The path.92 my_get_name()93 {94 SAVED_IFS=$IFS95 IFS=":/ "96 set $197 while test $# -gt 1 -a -n "${2}";98 do99 shift;100 done101 102 IFS=$SAVED_IFS103 #echo "$1"104 export MY_GET_NAME=$1105 }106 107 ##108 # Gets the newest version of a library (like openssl).109 #110 # @param $1 The library base path relative to root.111 my_get_newest_ver()112 {113 cd "${MY_ROOT_DIR}" > /dev/null114 latest=115 for ver in "$1"*;116 do117 if test -z "${latest}" || "${MY_EXPR}" "${ver}" ">" "${latest}" > /dev/null; then118 latest="${ver}"119 fi120 done121 if test -z "${latest}"; then122 echo "error: could not find any version of: $1" >&2;123 exit 1;124 fi125 echo "${latest}"126 return 0;127 }128 129 130 ##131 # Generate file entry for the specified file if it was found to be of interest.132 #133 # @param $1 The output file name base.134 # @param $2 The file name.135 # @param $3 Optional folder override.136 my_file()137 {138 # sort and filter by file type.139 case "$2" in140 # drop these.141 *.kup|*~|*.pyc|*.exe|*.sys|*.dll|*.o|*.obj|*.lib|*.a|*.ko)142 return 0143 ;;144 145 # by prefix or directory component.146 tst*|*/testcase/*)147 MY_FOLDER="$1-Testcases.lst"148 ;;149 150 # by extension.151 *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h|*.java)152 MY_FOLDER="$1-Sources.lst"153 ;;154 155 *.h|*.hpp|*.mm)156 MY_FOLDER="$1-Headers.lst"157 ;;158 159 *.asm|*.s|*.S|*.inc|*.mac)160 MY_FOLDER="$1-Assembly.lst"161 ;;162 163 *)164 MY_FOLDER="$1-Others.lst"165 ;;166 esac167 if test -n "$3";168 then169 MY_FOLDER="$1-$3.lst"170 fi171 172 ## @todo only files which are in subversion.173 # if ${MY_SVN} info "${2}" > /dev/null 2>&1; then174 my_get_name "${2}"175 echo ' <!-- sortkey: '"${MY_GET_NAME}"' --> <F N="'"${2}"'"/>' >> "${MY_FOLDER}"176 # fi177 }178 179 ##180 # Generate file entry for the specified file if it was found to be of interest.181 #182 # @param $1 The output file name base.183 # @param $2 The wildcard spec.184 # @param $3 Optional folder override.185 my_wildcard()186 {187 if test -n "$3"; then188 MY_FOLDER="$1-$3.lst"189 else190 MY_FOLDER="$1-All.lst"191 fi192 EXCLUDES="*.log;*.kup;*~;*.bak;*.bak?;*.pyc;*.exe;*.sys;*.dll;*.o;*.obj;*.lib;*.a;*.ko;*.class;*.cvsignore;*.done;*.project;*.actionScriptProperties;*.scm-settings;*.svnpatch.rej;*.svn-base;.svn/*;*.gitignore;*.gitattributes;*.gitmodules;*.swagger-codegen-ignore;*.png;*.bmp;*.jpg"193 echo ' <F N="'"${2}"'/*" Recurse="1" Excludes="'"${EXCLUDES}"'"/>' >> "${MY_FOLDER}"194 }195 196 ##197 # Generate file entries for the specified sub-directory tree.198 #199 # @param $1 The output filename.200 # @param $2 The sub-directory.201 # @param $3 Optional folder override.202 my_sub_tree()203 {204 if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi205 206 # Skip .svn directories.207 case "$2" in208 */.svn|*/.svn)209 return 0210 ;;211 esac212 213 # Process the files in the directory.214 for f in $2/*;215 do216 if test -d "${f}";217 then218 my_sub_tree "${1}" "${f}" "${3}"219 else220 my_file "${1}" "${f}" "${3}"221 fi222 done223 return 0;224 }225 52 226 53 ## … … 442 269 shift 443 270 444 # Make sure that the .vscode project dir exists. 445 mkdir -p "$MY_FILE_PATH" 271 # Make sure that the .vscode project dir exists. But do *NOT* create the 272 # parent dir, it must already exist. Duh! 273 test -d "${MY_FILE_PATH}" || ${MY_MKDIR} "${MY_FILE_PATH}" 446 274 447 275 MY_FILE="${MY_FILE_PATH}/c_cpp_properties${MY_VSCODE_FILE_DOT_EXT}"; … … 537 365 for i in ${MY_PROJECT_FILES}; 538 366 do 539 MY_PRJ_NAME=$(echo $i | cut -d ":" -f 1)540 MY_PRJ_PATH=$(echo $i | cut -d ":" -f 2)367 MY_PRJ_NAME=$(echo $i | ${MY_SED} -e 's/:.*$//') 368 MY_PRJ_PATH=$(echo $i | ${MY_SED} -e 's/^.*://') 541 369 echo ' {' >> "${MY_FILE}" 542 370 echo ' "name": "'"${MY_PRJ_NAME}"'",' >> "${MY_FILE}" … … 631 459 632 460 # 633 # Save the absolute path to the root directory. 634 # 461 # Make sure the output directory exists, is valid and clean. 462 # 463 ## @todo r=bird: The above statement is *extremely* misleading. This script will 464 # create .vscode subdirs all over the place, and the root one doesn't seem to 465 # have any special purpose compared to the rest. Guess this is just fluff 466 # inherited from gen-slickedit-workspace.sh. 467 ${MY_RM} -f \ 468 "${MY_OUT_DIR}"*.json \ 469 "${MY_OUT_DIR}/${MY_ROOT_DIR}/${MY_WS_NAME}" 470 ${MY_MKDIR} -p "${MY_OUT_DIR}" 471 472 # Enter the directory (or ${MY_ROOT_DIR} + my_abs_dir won't work) and save the absolute root path. 635 473 cd "${MY_OUT_DIR}" 636 474 my_abs_dir "." 637 MY_FILE_ROOT_DIR=${MY_ABS_DIR} 638 639 640 # 641 # Make sure the output directory exists, is valid and clean. 642 # 643 ${MY_RM} -f \ 644 "${MY_OUT_DIR}"*.json \ 645 "${MY_FILE_ROOT_DIR}/${MY_WS_NAME}" 646 ${MY_MKDIR} -p "${MY_OUT_DIR}" 475 MY_FILE_ROOT_DIR=${MY_ABS_DIR} ## @todo r=bird: 'FILE' or 'DIR'? ;-) 647 476 648 477 … … 659 488 fi 660 489 661 # 662 # Generate the projects and workspace. 663 # 664 # Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done. 665 # 666 667 # src/VBox/Runtime 668 my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime" 669 670 # src/VBox/VMM 671 my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \ 672 "include/VBox/vmm/cfgm.h" \ 673 "include/VBox/vmm/cpum.*" \ 674 "include/VBox/vmm/dbgf.h" \ 675 "include/VBox/vmm/em.h" \ 676 "include/VBox/vmm/gim.h" \ 677 "include/VBox/vmm/apic.h" \ 678 "include/VBox/vmm/gmm.*" \ 679 "include/VBox/vmm/gvm.*" \ 680 "include/VBox/vmm/hm*.*" \ 681 "include/VBox/vmm/iom.h" \ 682 "include/VBox/vmm/mm.h" \ 683 "include/VBox/vmm/patm.*" \ 684 "include/VBox/vmm/pdm*.h" \ 685 "include/VBox/vmm/pgm.*" \ 686 "include/VBox/vmm/selm.*" \ 687 "include/VBox/vmm/ssm.h" \ 688 "include/VBox/vmm/stam.*" \ 689 "include/VBox/vmm/tm.h" \ 690 "include/VBox/vmm/trpm.*" \ 691 "include/VBox/vmm/vm.*" \ 692 "include/VBox/vmm/vmm.*" 693 694 # src/VBox/Additions 695 my_generate_project "Add-darwin" "src/VBox/Additions/darwin" --begin-incs "include" "src/VBox/Additions/darwin" --end-includes "src/VBox/Additions/darwin" 696 my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd" 697 my_generate_project "Add-haiku" "src/VBox/Additions/haiku" --begin-incs "include" "src/VBox/Additions/haiku" --end-includes "src/VBox/Additions/haiku" 698 my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux" 699 my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2" 700 my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris" 701 my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT" 702 if test -z "$MY_OPT_MINIMAL"; then 703 my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11" 704 fi 705 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" 706 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*.*" 707 my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuest/lib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest/lib" --end-includes "src/VBox/Additions/common/VBoxGuest/lib" "include/VBox/VBoxGuest/lib/*.*" 708 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" 709 my_generate_project "Add-VBoxVideo" "src/VBox/Additions/common/VBoxVideo" --begin-incs "include" "src/VBox/Additions/common/VBoxVideo" --end-includes "src/VBox/Additions/common/VBoxVideo" 710 if test -z "$MY_OPT_MINIMAL"; then 711 my_generate_project "Add-pam" "src/VBox/Additions/common/pam" --begin-incs "include" "src/VBox/Additions/common/pam" --end-includes "src/VBox/Additions/common/pam" 712 my_generate_project "Add-cmn-test" "src/VBox/Additions/common/testcase" --begin-incs "include" "src/VBox/Additions/common/testcase" --end-includes "src/VBox/Additions/common/testcase" 713 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" 714 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" 715 fi 716 717 # src/VBox/Debugger 718 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" 719 720 # src/VBox/Devices 721 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" 722 ## @todo split this up. 723 724 # src/VBox/Disassembler 725 my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h" 726 727 # src/VBox/Frontends 728 if test -z "$MY_OPT_MINIMAL"; then 729 my_generate_project "FE-VBoxAutostart" "src/VBox/Frontends/VBoxAutostart" --begin-incs "include" "src/VBox/Frontends/VBoxAutostart" --end-includes "src/VBox/Frontends/VBoxAutostart" 730 my_generate_project "FE-VBoxBugReport" "src/VBox/Frontends/VBoxBugReport" --begin-incs "include" "src/VBox/Frontends/VBoxBugReport" --end-includes "src/VBox/Frontends/VBoxBugReport" 731 my_generate_project "FE-VBoxBalloonCtrl" "src/VBox/Frontends/VBoxBalloonCtrl" --begin-incs "include" "src/VBox/Frontends/VBoxBalloonCtrl" --end-includes "src/VBox/Frontends/VBoxBalloonCtrl" 732 fi 733 my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage" 734 my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless" 735 my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL" 736 my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell" 737 # noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE" 738 FE_VBOX_WRAPPERS="" 739 for d in ${MY_OUT_DIRS}; 740 do 741 if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then 742 FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include" 743 break 744 fi 745 done 746 if test -n "${FE_VBOX_WRAPPERS}"; then 747 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" 748 else 749 my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox" 750 fi 751 752 # src/VBox/GuestHost 753 my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI" 754 if test -z "$MY_OPT_MINIMAL"; then 755 my_generate_project "DnD-GH" "src/VBox/GuestHost/DragAndDrop" --begin-incs "include" --end-includes "src/VBox/GuestHost/DragAndDrop" 756 fi 757 my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard" 758 759 # src/VBox/HostDrivers 760 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" 761 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" 762 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" 763 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" 764 my_generate_project "AdpCtl" "src/VBox/HostDrivers/adpctl" --begin-incs "include" --end-includes "src/VBox/HostDrivers/adpctl" 765 766 # src/VBox/HostServices 767 my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestControl" --end-includes "src/VBox/HostServices/GuestControl" 768 my_generate_project "DragAndDrop" "src/VBox/HostServices/DragAndDrop" --begin-incs "include" "src/VBox/HostServices/DragAndDrop" --end-includes "src/VBox/HostServices/DragAndDrop" 769 my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties" 770 my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard" 771 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" 772 773 # src/VBox/ImageMounter 774 my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter" 775 776 # src/VBox/Installer 777 my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer" 778 779 # src/VBox/Main 780 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" 781 ## @todo seperate webservices and Main. pick the right headers. added generated headers. 782 783 # src/VBox/Network 784 my_generate_project "Net-DHCP" "src/VBox/NetworkServices/Dhcpd" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/Dhcpd" 785 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" 786 my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib" 787 788 # src/VBox/RDP 789 my_generate_project "RDP-Client" "src/VBox/RDP/client-1.8.4" --begin-incs "include" "src/VBox/RDP/client-1.8.4" --end-includes "src/VBox/RDP/client-1.8.4" 790 my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server" 791 my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient" 792 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" 793 794 # src/VBox/Storage 795 my_generate_project "Storage" "src/VBox/Storage" --begin-incs "include" "src/VBox/Storage" --end-includes "src/VBox/Storage" 796 797 # src/VBox/ValidationKit 798 my_generate_project "ValidationKit" "src/VBox/ValidationKit" --begin-incs "include" --end-includes "src/VBox/ValidationKit" 799 800 # src/VBox/ExtPacks 801 my_generate_project "ExtPacks" "src/VBox/ExtPacks" --begin-incs "include" --end-includes "src/VBox/ExtPacks" 802 803 # src/bldprogs 804 my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs" 805 806 # A few things from src/lib 807 lib=$(my_get_newest_ver src/libs/zlib) 808 my_generate_project "zlib" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h" 809 lib=$(my_get_newest_ver src/libs/liblzf) 810 my_generate_project "liblzf" "${lib}" --begin-incs "include" --end-includes "${lib}" 811 lib=$(my_get_newest_ver src/libs/libpng) 812 my_generate_project "libpng" "${lib}" --begin-incs "include" --end-includes "${lib}/*.c" "${lib}/*.h" 813 lib=$(my_get_newest_ver src/libs/openssl) 814 my_generate_project "openssl" "${lib}" --begin-incs "include" "${lib}/crypto" --end-includes "${lib}" 815 lib=$(my_get_newest_ver src/libs/curl) 816 my_generate_project "curl" "${lib}" --begin-incs "include" "${lib}/include" --end-includes "${lib}" 817 lib=$(my_get_newest_ver src/libs/softfloat) 818 my_generate_project "softfloat" "${lib}" --begin-incs "include" "${lib}/source/include" --end-includes "${lib}" 819 820 # webtools 821 my_generate_project "webtools" "webtools" --begin-incs "include" "webtools/tinderbox/server/Tinderbox3" --end-includes "webtools" 822 823 # include/VBox 824 my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox" 825 826 # Misc 827 my_generate_project "misc" "." --begin-incs "include" --end-includes \ 828 "configure" \ 829 "configure.vbs" \ 830 "Config.kmk" \ 831 "Makefile.kmk" \ 832 "src/Makefile.kmk" \ 833 "src/VBox/Makefile.kmk" \ 834 "tools/env.sh" \ 835 "tools/env.cmd" \ 836 "tools/envSub.vbs" \ 837 "tools/envSub.cmd" \ 838 "tools/win/vbscript" 839 840 841 # out/x.y/z/bin/sdk/bindings/xpcom 842 XPCOM_INCS="src/libs/xpcom18a4" 843 for d in \ 844 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \ 845 "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \ 846 "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \ 847 "out/linux.x86/debug/bin/sdk/bindings/xpcom" \ 848 "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \ 849 "out/darwin.x86/debug/bin/dist/bindings/xpcom" \ 850 "out/haiku.amd64/debug/bin/sdk/bindings/xpcom" \ 851 "out/haiku.x86/debug/bin/sdk/bindings/xpcom" \ 852 "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \ 853 "out/solaris.x86/debug/bin/sdk/bindings/xpcom"; 854 do 855 if test -d "${MY_ROOT_DIR}/${d}"; then 856 my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}" 857 XPCOM_INCS="${d}/include" 858 break 859 fi 860 done 861 862 # lib/xpcom 863 my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4" 864 490 491 # 492 # Generate the projects (common code) and workspace. 493 # 494 my_generate_all_projects # in common-gen-workspace-projects.inc.sh 865 495 my_generate_workspace 866 496 867 497 868 869 870 498 echo "done"
Note:
See TracChangeset
for help on using the changeset viewer.