Commit Graph
23 Commits
Author SHA1 Message Date
Neil Roberts 7fa1f52d5c scripting: Add a CppUnitTest for the QuickJS script provider
Tests that it correctly reads the filesystem to find files, the
Creatable and Editable properties work and that it can execute a script.

Change-Id: I613cf539f256c1ba464fa523f431fcf6e95da5f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204519
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-30 10:40:21 +02:00
Neil Roberts 1d324602ba Add an XBrowseNode implementation for QuickJS
Adds an XBrowseNode implementation for JavaScript scripts using the
QuickJS bindings so that JS files can be found and executed from the
macro organizer. Unlike in Python macros, the entire source file becomes
a single macro instead of trying to find function definitions in the
source.

Change-Id: I73d0c6e6fc6bb7ffd4f6164d1f1887d03bfdfe62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203219
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-30 10:39:18 +02:00
Neil Roberts e5900bee28 scripting: Add script provider helpers for files with single macros
Adds a set of helpers to implement a script provider where the script
files are the entire macro. The provider only needs to make a subclass
of the abstract SingleScriptFactory class to provide the filename
extension, language name and a method to convert the contents of a file
to an XScript. The parts about handling file browsing and reading the
file contents are in the shared helper code.

This is based on the script provider from Luno.

Change-Id: Id39f3a07e887898650b0d77ec493011fb5acc858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203216
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-30 10:36:31 +02:00
Jan-Marek Glogowski fb308c193b Fix --disable-scripting for DESKTOP build
Unfortunatly we cannot add --disable-scripting to
sub_conf_defaults, because Java currently has no
equivalent to the PYTHON_FOR_BUILD setting.

Change-Id: I89938a17307a363f5de808200914940503312829
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126186
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-03 06:46:24 +01:00
Michael Stahl d90427d767 scripting: more inconsistent Package conditions
Change-Id: Ifcefef2de15aab4dae6e14b3e689504d4fe9d11e
2016-12-07 22:45:08 +01:00
Michael Stahl 3ee7d4899e scripting: Android tinderbox can't find python package
Change-Id: I08e968563b751470e63de5f2bf91e30b31c97430
2016-12-07 21:42:10 +01:00
Tor Lillqvist 7cd3c44a9e Match conditionals in Repository.mk
Change-Id: Ibc97588de9d414e05184593e4e9c1aeba94959f3
2016-12-07 19:49:52 +02:00
Tor Lillqvist 9ecac3874d Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTING
Feature test macros that govern conditional compilation should be
defined in config_*.h include files, not on the compilation command
line.

Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
2014-10-22 09:30:23 +03:00
Takeshi Abe 541761d7b8 prefer makefile-gmake-mode
Change-Id: I9cc9bfbddd3a90e00eee3e674994e5d6207f9034
2014-04-28 23:35:42 +09:00
Norbert Thiebaud d5d721a130 ENABLE_SCRIPTING_* Harmonize ENABLE_* variable to TRUE/<nothing>
Change-Id: I937967889da75062c792cf377ce4e13c67526162
Reviewed-on: https://gerrit.libreoffice.org/5702
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-08-30 19:59:02 +00:00
Tor Lillqvist 08452f1208 Rename SOLAR_JAVA to ENABLE_JAVA and HAVE_FEATURE_JAVA
Change-Id: Ib451bdb3c1c2ca42347abfde44651d5cf5eef4f3
2013-08-19 10:29:04 +03:00
David Tardon bf7df610a1 install example java scripts using filelist
Change-Id: I3f5df5be726fe0788a17d632fe1021ccaf4c1951
2013-04-30 17:48:51 +02:00
Michael Meeks 72e5d0c8fb Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-30 13:34:06 +01:00
Julien Nabet 687a821e3b fdo#63197: convert 3 out 4 from scripting part
Change-Id: Ie359d0ef00f62dd3c2d1f1dfd86e115409438e76
Reviewed-on: https://gerrit.libreoffice.org/3470
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-19 04:05:13 +00:00
David Ostrovsky b0e42ed298 fix build breakage: ENABLE_SCRIPTING_PYTHON was already removed
Change-Id: I22cfcb848fbf7e9568fd4e2a43994ed361a8e1a7
2013-02-20 22:42:55 +01:00
Stephan Bergmann 1f3496e204 Turn Python Scripting Provider from bundled extension to plain code
To avoid unnecessary confusion between the newly plain code and any instance of
the old extension still installed (per-user or shared), I renamed the UNO
implementation identifier org.openoffice.pyuno.LanguageScriptProviderForPython
to org.libreoffice.pyuno.LanguageScriptProviderForPython.  Also, existing
installations of the extension are explicitly not migrated to new user profiles.

Change-Id: Id3dd66ba5e52e0962f7ad0ccb5e4ad5b0bec97fa
2012-11-30 10:28:25 +01:00
Matúš Kukan 772d15fb8c create these rdbs directly in scripting
Change-Id: I8a44de06f9a16308a5ff82ad77d059e5dde544f9
2012-08-09 16:16:50 +02:00
Tor Lillqvist c16bc82637 s/interpreters/scripting/ 2012-02-27 16:51:56 +02:00
Tor Lillqvist 4c737b6470 Decouple disabling of scripting (BASIC &co) from OS being iOS 2012-02-27 10:06:22 +02:00
Tor Lillqvist 81cf9f5099 Bypass building BASIC and scripting related modules for iOS
Any LO-based app distributed through the App Store can't have
scripting or extendability anyway.

Sure, this will break the build elsewhere because of missing headers.
No big deal, I will take care of that eventually. It isn't as if there
would anybody else building for iOS anyway, as far as I know. If there
is, please make yourself heard.
2012-01-27 22:43:58 +02:00
Stephan Bergmann a72a7dc500 fdo#42312: Change bsh and js script providers from extensions to optional modules.
Their jar files reference other non-URE jars, so they cannot be extensions.
bsh.jar has been moved into the optional module (it used to be installed
always, but it looks like only the bsh script provider needs it; also, it
had been added to URE_MORE_JAVA_CLASSPATH_URLS if SYSTEM_BSH, which also
appears unnecessary as it is mentioned with an absolute file URL in the
Class-Path of the script provider jar).
js.jar has been included in the optional module (it used to be not installed
at all?).
2011-11-03 14:18:59 +01:00
Matúš Kukan a116d39db6 finished converting scripting to gbuild 2011-10-01 17:26:24 +02:00
Matúš Kukan 3250c79071 convert scripting to gbuild - first step
There are java and extensions missing.
2011-10-01 17:16:42 +02:00