Rev 3058: (merge) windows standalone installer creates and uses plugins directory for system-wide plugins (#129298) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Nov 30 08:03:13 GMT 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3058
revision-id:pqm at pqm.ubuntu.com-20071130080302-lcnafsyhqzjq6fjb
parent: pqm at pqm.ubuntu.com-20071130073050-wqh13t7fars5qbhl
parent: mbp at sourcefrog.net-20071130064221-93l3ehdv7ifm7hhv
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-11-30 08:03:02 +0000
message:
(merge) windows standalone installer creates and uses plugins directory for system-wide plugins (#129298)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
tools/win32/bzr.iss.cog bzr.iss.cog-20060622100836-b3yup582rt3y0nvm-5
------------------------------------------------------------
revno: 3053.2.2
revision-id:mbp at sourcefrog.net-20071130064221-93l3ehdv7ifm7hhv
parent: pqm at pqm.ubuntu.com-20071130062859-ak4qs7qjow25kg0i
parent: bialix at ukr.net-20071123135804-dp3trp5yerx873hp
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: 129298-win32-plugins
timestamp: Fri 2007-11-30 17:42:21 +1100
message:
(merge) windows standalone installer creates and uses plugins directory for system-wide plugins (#129298)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
tools/win32/bzr.iss.cog bzr.iss.cog-20060622100836-b3yup582rt3y0nvm-5
------------------------------------------------------------
revno: 3010.4.3
revision-id:bialix at ukr.net-20071123135804-dp3trp5yerx873hp
parent: bialix at ukr.net-20071123124406-co6oqg9xrd52sz5d
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: plugins.for.bzr.exe
timestamp: Fri 2007-11-23 15:58:04 +0200
message:
teach uninstaller to delete plugins subdirectory; NEWS entry.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
tools/win32/bzr.iss.cog bzr.iss.cog-20060622100836-b3yup582rt3y0nvm-5
------------------------------------------------------------
revno: 3010.4.2
revision-id:bialix at ukr.net-20071123124406-co6oqg9xrd52sz5d
parent: bialix at ukr.net-20071123120144-rzqm0leogkj63d4i
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: plugins.for.bzr.exe
timestamp: Fri 2007-11-23 14:44:06 +0200
message:
Windows standalone installer write to the registry some useful info about paths and bzr version
modified:
tools/win32/bzr.iss.cog bzr.iss.cog-20060622100836-b3yup582rt3y0nvm-5
------------------------------------------------------------
revno: 3010.4.1
revision-id:bialix at ukr.net-20071123120144-rzqm0leogkj63d4i
parent: pqm at pqm.ubuntu.com-20071121045727-gqycrul94d0ssir1
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: plugins.for.bzr.exe
timestamp: Fri 2007-11-23 14:01:44 +0200
message:
bzr.exe: enable to search system-wide plugins in "plugins" subdirectory of installation directory
(e.g. C:\Program Files\Bazaar\plugins).
modified:
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
------------------------------------------------------------
revno: 3053.2.1
revision-id:pqm at pqm.ubuntu.com-20071130062859-ak4qs7qjow25kg0i
parent: pqm at pqm.ubuntu.com-20071130012617-w9ld4lj80b95vufk
parent: pqm at pqm.ubuntu.com-20071130043114-bez1f7e4y16cp7rm
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 1.0
timestamp: Fri 2007-11-30 06:28:59 +0000
message:
Merge bzr.dev to 1.0 branch
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
=== modified file 'NEWS'
--- a/NEWS 2007-11-30 07:30:50 +0000
+++ b/NEWS 2007-11-30 08:03:02 +0000
@@ -96,6 +96,11 @@
sorted chronologically instead of lexicographically with --sort=time.
(Adeodato Simó, #120231)
+ * Windows standalone version of bzr is able to load system-wide plugins from
+ "plugins" subdirectory in installation directory. In addition standalone
+ installer write to the registry (HKLM\SOFTWARE\Bazaar) useful info
+ about paths and bzr version. (Alexander Belchenko, #129298)
+
DOCUMENTATION:
BUG FIXES:
=== modified file 'bzrlib/plugin.py'
--- a/bzrlib/plugin.py 2007-11-13 01:49:34 +0000
+++ b/bzrlib/plugin.py 2007-11-23 12:01:44 +0000
@@ -57,7 +57,21 @@
"""Get the DEFAULT_PLUGIN_PATH"""
global DEFAULT_PLUGIN_PATH
if DEFAULT_PLUGIN_PATH is None:
- DEFAULT_PLUGIN_PATH = osutils.pathjoin(config.config_dir(), 'plugins')
+ path = [osutils.pathjoin(config.config_dir(), 'plugins')]
+ if getattr(sys, 'frozen', None): # bzr.exe
+ # We need to use relative path to system-wide plugin
+ # directory because bzrlib from standalone bzr.exe
+ # could be imported by another standalone program
+ # (e.g. bzr-config; or TortoiseBzr/Olive if/when they
+ # will become standalone exe). [bialix 20071123]
+ # __file__ typically is
+ # C:\Program Files\Bazaar\lib\library.zip\bzrlib\plugin.pyc
+ # then plugins directory is
+ # C:\Program Files\Bazaar\plugins
+ # so relative path is ../../../plugins
+ path.append(osutils.abspath(osutils.pathjoin(
+ osutils.dirname(__file__), '../../../plugins')))
+ DEFAULT_PLUGIN_PATH = os.pathsep.join(path)
return DEFAULT_PLUGIN_PATH
@@ -77,9 +91,11 @@
global _loaded
_loaded = True
+
def _strip_trailing_sep(path):
return path.rstrip("\\/")
+
def set_plugins_path():
"""Set the path for plugins to be loaded from."""
path = os.environ.get('BZR_PLUGIN_PATH',
@@ -141,7 +157,6 @@
else:
# it might be a zip: try loading from the zip.
load_from_zip(d)
- continue
# backwards compatability: load_from_dirs was the old name
=== modified file 'tools/win32/bzr.iss.cog'
--- a/tools/win32/bzr.iss.cog 2007-08-09 08:04:32 +0000
+++ b/tools/win32/bzr.iss.cog 2007-11-23 13:58:04 +0000
@@ -118,6 +118,7 @@
[Dirs]
Name: "{userappdata}\bazaar\2.0"
+Name: "{app}\plugins"; Flags: uninsalwaysuninstall
[Icons]
@@ -132,6 +133,16 @@
Name: Shell; Description: "Add Bzr context menu to shell"; Flags: unchecked
+[Registry]
+Root: HKLM; Subkey: "SOFTWARE\Bazaar"; Flags: noerror uninsdeletekey
+Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "InstallPath"; ValueType: string; ValueData: "{app}"; Flags: noerror
+Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "BzrlibPath"; ValueType: string; ValueData: "{app}\lib\library.zip\bzrlib"; Flags: noerror
+Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "PluginsPath"; ValueType: string; ValueData: "{app}\plugins"; Flags: noerror
+Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "PythonPath"; ValueType: string; ValueData: "{app}\lib\library.zip"; Flags: noerror
+; [[[cog cog.outl('Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "Version"; ValueType: string; ValueData: "%s"; Flags: noerror' % VERSION) ]]]
+; [[[end]]]
+
+
[Run]
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--start-bzr"; Flags: skipifdoesntexist runhidden;
; [[[cog
@@ -148,3 +159,7 @@
[UninstallRun]
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--delete-path --delete-shell-menu --silent"; Flags: skipifdoesntexist runhidden;
+
+
+[UninstallDelete]
+Type: filesandordirs; Name: "{app}\plugins\*"
More information about the bazaar-commits
mailing list