Kaydet (Commit) a334c468 authored tarafından Jean-Tiare LE BIGOT's avatar Jean-Tiare LE BIGOT Kaydeden (comit) Stephan Bergmann

Tool to ease rdb file update to work on fdo#46808

Add a simple shell script to ease the regeneration of
types.rdb. This is a bit tricky to do and error prone.
I hope it will encourage people to work on fdo#46808.

Signed-off-by: Stephan Bergmann <sbergman@redhat.com> with additional changes:
* Moved offapi/update-rdb.sh to offapi/type_reference/update-rdb.sh, to make
  clear that it is all about offapi/type_reference only.
* Changed update-rdb.sh to take a list of idl files, so that a single instance
  of the script works for both offapi and udkapi.
* Some more simplifications/clean up of update-rdb.sh.
* Removed the udkapi/update-rdb.sh symlink (to avoid potential problems with
  symlinks checked into the git repo, like on Windows).
* Undid accidental(?) changes to typelibrary_history.txt, added a note about
  update-rdb.sh.

Change-Id: Ic1923e2b2b3af64251019b619b33c728a05b4a14
üst b8b05478
Example of updating an incompatibly-changed type (com.sun.star.script.Converter,
in this example) in the accompanying types.rdb:
in this example) in the accompanying types.rdb (see also update-rdb.sh):
.../core> mkdir tmp
.../core> LD_LIBRARY_PATH=.../core/solver/unxlngx6/lib \
......
#!/bin/bash
# Basic argument checks
if [ $# -lt 1 ]
then
echo "usage:"
echo " $0 <idl file list>"
echo ""
echo "example:"
echo " $0 \\"
echo " offapi/com/sun/star/auth/SSOManagerFactory.idl \\"
echo " offapi/com/sun/star/auth/SSOPasswordCache.idl"
exit 1
fi
# Load env vars
source "$(dirname "$0")"/../../config_host.mk 2>/dev/null
set -e
mkdir tmp
for i in "$@"; do
"${OUTDIR_FOR_BUILD?}"/bin/regmerge tmp/out1.rdb /UCR \
"${WORKDIR_FOR_BUILD?}"/UnoApiPartTarget/"${i%.idl}".urd
done
"${OUTDIR_FOR_BUILD?}"/bin/regmerge tmp/out2.rdb / \
"${SRC_ROOT?}"/offapi/type_reference/types.rdb tmp/out1.rdb
echo "sanity check diff:"
diff <("${OUTDIR_FOR_BUILD?}"/bin/regview \
"${SRC_ROOT?}"/offapi/type_reference/types.rdb) \
<("${OUTDIR_FOR_BUILD?}"/bin/regview tmp/out2.rdb) && $? -le 1
mv tmp/out2.rdb "${SRC_ROOT?}"/offapi/type_reference/types.rdb
rm -r tmp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment