-
-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathparse_delphi_sources.sh
More file actions
executable file
·30 lines (24 loc) · 1.01 KB
/
parse_delphi_sources.sh
File metadata and controls
executable file
·30 lines (24 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -eu
# --------------------------------------------------------------------
# Parse Delphi source code.
# You need to have Delphi installed for this to work.
# Edit SOURCES_DIR below to point to the Delphi source code on your system.
# --------------------------------------------------------------------
# Assume pasdoc is on $PATH, if PASDOC_BIN not set.
PASDOC_BIN="${PASDOC_BIN:-pasdoc}"
SOURCES_DIR="C:/Program Files (x86)/Embarcadero/Studio/37.0/source/"
OUTPUT_DIR="delphi_sources"
mkdir -p "${OUTPUT_DIR}"
find "${SOURCES_DIR}" -type f -name "*.pas" > "${OUTPUT_DIR}/sources.txt"
# Note that we define MSWINDOWS, because System.Curl for parsing
# requires either MSWINDOWS or POSIX . It cannot be parsed without
# either of those defined.
# shellcheck disable=SC2086
"${PASDOC_BIN}" \
--define MSWINDOWS \
--output="${OUTPUT_DIR}" \
--source="${OUTPUT_DIR}/sources.txt" \
--include "${SOURCES_DIR}/Indy10/Core/" \
--include "${SOURCES_DIR}/soap/" \
| tee "${OUTPUT_DIR}/pasdoc.log"