diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-08-16 11:08:32 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-08-18 21:11:16 +0300 |
commit | c6a73009747814513ab5a7277c211449c7378870 (patch) | |
tree | 2adc961b3c83deffcea251c41744f2626e476f38 /scripting | |
parent | 18041138d3169d565755565bdbabd8de596b5ac7 (diff) |
Use subfolder names from <config_folders.h>
Change all instances of hardcoded "program", "share" etc subfolder names to
use those from <config_folders.h> instead. In normal builds, the end result
will not change.
Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
Diffstat (limited to 'scripting')
7 files changed, 15 insertions, 14 deletions
diff --git a/scripting/examples/beanshell/Highlight/ShowDialog.bsh b/scripting/examples/beanshell/Highlight/ShowDialog.bsh index e4d335d22a04..95ccc32bbe32 100755 --- a/scripting/examples/beanshell/Highlight/ShowDialog.bsh +++ b/scripting/examples/beanshell/Highlight/ShowDialog.bsh @@ -55,7 +55,7 @@ boolean tryLoadingLibrary( xmcf, context, name ) } libURL = xme.expandMacros( - "$BRAND_BASE_DIR/share/basic/ScriptBindingLibrary/" + + "$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/basic/ScriptBindingLibrary/" + name.toLowerCase() + ".xlb/"); System.err.println("libURL is: " + libURL); diff --git a/scripting/examples/java/Highlight/HighlightText.java b/scripting/examples/java/Highlight/HighlightText.java index 176b185b5064..99af06f25468 100644 --- a/scripting/examples/java/Highlight/HighlightText.java +++ b/scripting/examples/java/Highlight/HighlightText.java @@ -223,7 +223,7 @@ public class HighlightText implements com.sun.star.awt.XActionListener { } String libURL = xme.expandMacros( - "$BRAND_BASE_DIR/share/basic/ScriptBindingLibrary/" + + "$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/basic/ScriptBindingLibrary/" + name.toLowerCase() + ".xlb/"); System.err.println("libURL is: " + libURL); diff --git a/scripting/examples/javascript/Highlight/ShowDialog.js b/scripting/examples/javascript/Highlight/ShowDialog.js index 7b2012870c15..0f3ccefb836b 100755 --- a/scripting/examples/javascript/Highlight/ShowDialog.js +++ b/scripting/examples/javascript/Highlight/ShowDialog.js @@ -49,7 +49,7 @@ function tryLoadingLibrary( xmcf, context, name ) } libURL = xme.expandMacros( - "$BRAND_BASE_DIR/share/basic/ScriptBindingLibrary/" + + "$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/basic/ScriptBindingLibrary/" + name.toLowerCase() + ".xlb/"); System.err.println("libURL is: " + libURL); diff --git a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java index eb1e560355c2..9c9edba73f6b 100644 --- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java +++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java @@ -125,10 +125,10 @@ public class ScriptMetaData extends ScriptEntry implements Cloneable { // to be exposed at all private static final String SHARE = - "vnd.sun.star.expand:$BRAND_BASE_DIR/share"; + "vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR"; private static final String USER = - "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" + + "vnd.sun.star.expand:${$BRAND_BASE_DIR/BRAND_BIN_SUBDIR/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java index c0d960008263..e14e27a7ee3b 100644 --- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java +++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java @@ -133,7 +133,7 @@ public abstract class ScriptProvider new Type(XMacroExpander.class), serviceObj); XMLParserFactory.setOfficeDTDURL(me.expandMacros( - "$BRAND_BASE_DIR/share/dtd/officedocument/1_0/")); + "$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/dtd/officedocument/1_0/")); } catch ( Exception e ) @@ -211,20 +211,20 @@ public abstract class ScriptProvider if ( originalContextURL.startsWith( "bundled" ) ) { contextUrl = "vnd.sun.star.expand:$BUNDLED_EXTENSIONS"; - extensionDb = "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; + extensionDb = "vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; extensionRepository = "bundled"; } if ( originalContextURL.startsWith( "share" ) ) { - contextUrl = "vnd.sun.star.expand:$BRAND_BASE_DIR/share"; - extensionDb = "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; + contextUrl = "vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR"; + extensionDb = "vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; extensionRepository = "shared"; } else if ( originalContextURL.startsWith( "user" ) ) { - contextUrl = "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; - extensionDb = "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; + contextUrl = "vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; + extensionDb = "vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user"; extensionRepository = "user"; } diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx index e0f42336b335..6a6d0b7fc48c 100644 --- a/scripting/source/provider/URIHelper.cxx +++ b/scripting/source/provider/URIHelper.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_folders.h> #include <com/sun/star/uri/XVndSunStarScriptUrl.hpp> #include <com/sun/star/uri/UriReferenceFactory.hpp> @@ -41,7 +42,7 @@ static const char SHARE_UNO_PACKAGES_URI[] = static const char USER[] = "user"; static const char USER_URI[] = - "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"; + "vnd.sun.star.expand:${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"; static const char USER_UNO_PACKAGES[] = "user:uno_packages"; static const char USER_UNO_PACKAGES_DIR[] = diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index d2e90ba1a5c1..a405ca4b11df 100755 --- a/scripting/source/pyprov/pythonscript.py +++ b/scripting/source/pyprov/pythonscript.py @@ -174,9 +174,9 @@ class MyUriHelper: def __init__( self, ctx, location ): self.s_UriMap = \ - { "share" : "vnd.sun.star.expand:$BRAND_BASE_DIR/share/Scripts/python" , \ + { "share" : "vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/Scripts/python" , \ "share:uno_packages" : "vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE/uno_packages", \ - "user" : "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" + toIniName( "bootstrap") + "::UserInstallation}/user/Scripts/python" , \ + "user" : "vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + toIniName( "bootstrap") + "::UserInstallation}/user/Scripts/python" , \ "user:uno_packages" : "vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/uno_packages" } self.m_uriRefFac = ctx.ServiceManager.createInstanceWithContext("com.sun.star.uri.UriReferenceFactory",ctx) if location.startswith( "vnd.sun.star.tdoc" ): |