From 55c2e9e7e24a4bc2016fc54a5ffaf22aa094eb58 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 15 Nov 2022 11:02:47 +0300 Subject: Allow using bin/list-dispatch-commands.py with separate builddir Change-Id: Ide1c43c603b4a82534cc116133852f5f05858a2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142723 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- bin/list-dispatch-commands.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/list-dispatch-commands.py b/bin/list-dispatch-commands.py index dad2f01ffee2..f4832f12b777 100755 --- a/bin/list-dispatch-commands.py +++ b/bin/list-dispatch-commands.py @@ -16,11 +16,17 @@ Script to generate https://wiki.documentfoundation.org/Development/DispatchComma import os +# It is assumed that the script is called from $BUILDDIR; +# and __file__ refers to the script location in $SRCDIR. +# This allows to use it in separate builddir configuration. +srcdir = os.path.dirname(os.path.realpath(__file__)) + '/..' # go up from /bin +builddir = os.getcwd() + REPO = 'https://opengrok.libreoffice.org/xref/core/' BLACKLIST = ('_SwitchViewShell0', '_SwitchViewShell1', '_SwitchViewShell2', '_SwitchViewShell3', '_SwitchViewShell4') -XCU_DIR = 'officecfg/registry/data/org/openoffice/Office/UI/' +XCU_DIR = srcdir + '/officecfg/registry/data/org/openoffice/Office/UI/' XCU_FILES = ( XCU_DIR + 'BasicIDECommands.xcu', XCU_DIR + 'CalcCommands.xcu', XCU_DIR + 'ChartCommands.xcu', @@ -31,7 +37,7 @@ XCU_FILES = ( XCU_DIR + 'BasicIDECommands.xcu', XCU_DIR + 'ReportCommands.xcu', XCU_DIR + 'WriterCommands.xcu') -HXX_DIR = './workdir/SdiTarget/' +HXX_DIR = builddir + '/workdir/SdiTarget/' HXX_FILES = ( HXX_DIR + 'basctl/sdi/basslots.hxx', HXX_DIR + 'sc/sdi/scslots.hxx', HXX_DIR + 'sd/sdi/sdgslots.hxx', @@ -41,12 +47,12 @@ HXX_FILES = ( HXX_DIR + 'basctl/sdi/basslots.hxx', HXX_DIR + 'svx/sdi/svxslots.hxx', HXX_DIR + 'sw/sdi/swslots.hxx') -SDI_FILES = ( 'sc/sdi/scalc.sdi', - 'sd/sdi/sdraw.sdi', - 'sfx2/sdi/sfx.sdi', - 'starmath/sdi/smath.sdi', - 'svx/sdi/svx.sdi', - 'sw/sdi/swriter.sdi') +SDI_FILES = ( srcdir + '/sc/sdi/scalc.sdi', + srcdir + '/sd/sdi/sdraw.sdi', + srcdir + '/sfx2/sdi/sfx.sdi', + srcdir + '/starmath/sdi/smath.sdi', + srcdir + '/svx/sdi/svx.sdi', + srcdir + '/sw/sdi/swriter.sdi') # Category is defined by the 1st file where the command has been found. Precedence: 1. xcu, 2. hxx, 3. sdi. MODULES = {'BasicIDE': 'Basic IDE, Forms, Dialogs', -- cgit