Debian Codegraph @

tools/build-tool/data/custom_editor_template_rebuild.sh

raw symbols SCIP
1 #!/bin/bash
2 set -eu
3
4 # Update files in custom_editor_template/ based on current editor source code.
5 # Uses "sed" (assuming it is GNU sed).
6
7 EDITOR_SOURCE_ROOT=../../castle-editor/
8
9 cp -f "${EDITOR_SOURCE_ROOT}castle_editor.ico" custom_editor_template/
10
11 cp -f "${EDITOR_SOURCE_ROOT}castle_editor.lpr" custom_editor_template/
12 sed --in-place \
13 -e 's|// This line will be automatically uncommented by tools/build-tool/data/custom_editor_template_rebuild.sh|// This line was uncommented by tools/build-tool/data/custom_editor_template_rebuild.sh|' \
14 -e 's|//castle_editor_automatic_package|castle_editor_automatic_package|' \
15 custom_editor_template/castle_editor.lpr
16
17 cp -f "${EDITOR_SOURCE_ROOT}castle_editor.lpi" custom_editor_template/
18 sed --in-place \
19 -e 's|<RequiredPackages Count="4">|<RequiredPackages Count="5">|' \
20 -e 's|</RequiredPackages>|<Item5> <PackageName Value="castle_editor_automatic_package"/> </Item5> </RequiredPackages>|' \
21 -e 's|<Filename Value="\(code/[_a-zA-Z0-9]\+.pas\)"|<Filename Value="${CASTLE_ENGINE_PATH}tools/castle-editor/\1"|' \
22 -e 's|<Filename Value="../common-code/|<Filename Value="${CASTLE_ENGINE_PATH}tools/common-code/|' \
23 -e 's|<IncludeFiles Value="../../src/common_includes;$(ProjOutDir)"/>|<IncludeFiles Value="${CASTLE_ENGINE_PATH}src/common_includes;$(ProjOutDir)"/>|' \
24 -e 's|<OtherUnitFiles Value="../common-code;code"/>|<OtherUnitFiles Value="${CASTLE_ENGINE_PATH}tools/castle-editor/code;${CASTLE_ENGINE_PATH}tools/common-code"/>|' \
25 -e 's|</SearchPaths>|<Libraries Value="${ABSOLUTE_LIBRARY_PATHS}" /> </SearchPaths>|' \
26 -e 's|<ConfigFilePath Value="../../castle-fpc-messages.cfg"/>|<ConfigFilePath Value="${CASTLE_ENGINE_PATH}castle-fpc-messages.cfg"/>|' \
27 -e 's|<Filename Value="castle-editor"/>|<Filename Value="castle-editor-new"/>|' \
28 custom_editor_template/castle_editor.lpi