diff options
author | Hossein <hossein@libreoffice.org> | 2021-07-05 04:12:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-07-14 09:02:28 +0200 |
commit | 59577dbb84fae18a3216d57ffec6008af157ce9b (patch) | |
tree | 72ceeeb71bb93e994e89c167e78719482aa71641 /oox/source/drawingml/customshapes/generate.sh | |
parent | 4d8262cab5537409a8cdf0b33b6d4703f7b27c9a (diff) |
Renamed bash-powered README file to generate.sh
* Renamed README file to generate.sh. This file was
both a README file and a bash script
* Added simple instructions to run the script
* A separate README file will be added later
Change-Id: Ic2086c9af9c3497edd9cc557c1d9883b9ee0002b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118394
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox/source/drawingml/customshapes/generate.sh')
-rwxr-xr-x | oox/source/drawingml/customshapes/generate.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/oox/source/drawingml/customshapes/generate.sh b/oox/source/drawingml/customshapes/generate.sh new file mode 100755 index 000000000000..2a0cd3e439b8 --- /dev/null +++ b/oox/source/drawingml/customshapes/generate.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# The Perl code here is used to generate the custom shape presets +# source code. + +# This file is both a README and also, if run as a shell script, does what +# it describes. +# It should be invoked from the libreoffice core top-level source folder: +# ./oox/source/drawingml/customshapes/generate.sh +# The logs will be created in the file: +# ./oox/source/drawingml/customshapes/custom-shapes.log + +# We want to exit on errors... + +set -o errexit + +# To re-generate the code, you need to be on Linux (I think). +# It is not necessary to do a make test-install, just run from instdir. +# oox needs to be build with dbglevel=2 so that DEBUG is defined. + +make oox.clean && make oox dbglevel=2 + +# This reads the +# oox/source/drawingml/customshapes/presetShapeDefinitions.xml file. +# It will produce the file +# oox/source/drawingml/customshapes/pptx/cshape-all.ppx and a whole +# bunch of other files that aren't needed further. + +(cd oox/source/drawingml/customshapes && ./generatePresetsPPTXs.pl) + + +# Then load it and store the debugging output. +# We need only the SAL_INFO output with tag "oox.csdata", plus stderr +# for PropertyMap::dumpData() output. + +SAL_LOG='+INFO.oox.csdata-WARN' instdir/program/soffice --headless --convert-to odp --outdir oox/source/drawingml/customshapes/ oox/source/drawingml/customshapes/pptx/cshape-all.pptx > oox/source/drawingml/customshapes/custom-shapes.log 2>&1 + + +# Now run a script that reads the above log file and generates the +# oox-drawingml-cs-presets data: + +(cd oox/source/drawingml/customshapes && ./generatePresetsData.pl) + + +echo +echo "To see what has been done, run git diff --patience oox/source/drawingml" +echo + |