Ticket #998: set_registry_key_for_win32.txt

File set_registry_key_for_win32.txt, 10.4 KB (added by freestorm, at 2010-03-14T14:24:57Z)
Line 
1Sun Mar 14 15:01:32 CET 2010  freestorm77@gmail.com
2  * set_registry_key_for_win32.txt
3 
4  This patch is only for Win32 environment.
5  It create a Windows Registry key on startup of Tahoe.
6  In this key we put the current basedir of Tahoe.
7  After that we don't need to use -d with Cli commands.
8 
9  This Registry key is set on "start" or "run" startup options.
10  Credits: Frederic Marti <freestorm77@gmail.com>
11 
12
13New patches:
14
15[set_registry_key_for_win32.txt
16freestorm77@gmail.com**20100314140132
17 Ignore-this: b74734cc6657c470907e6aee7906263a
18 
19 This patch is only for Win32 environment.
20 It create a WIndows Registry key on startup of Tahoe.
21 In this key we put the current basedir of Tahoe.
22 After that we don't need to use -d with Cli commands.
23 
24 It create this Registry key with "start" or "run" startup options.
25 Credits: Frederic Marti <freestorm77@gmail.com>
26 
27] {
28hunk ./src/allmydata/scripts/startstop_node.py 40
29     if not os.path.isdir(basedir):
30         print >>err, "%s does not look like a directory at all" % basedir
31         return 1
32+
33+    # If we are under Win32 OS , we create the registry key: "HKEY_CURRENT_USER\Software\Allmydata\Base Dir Path"
34+    # with current node path.
35+    if sys.platform == "win32":   
36+        from allmydata.windows import registry
37+        registry.set_registry_setting("Software\Allmydata","Base Dir Path",basedir,_winreg.REG_SZ,_winreg.HKEY_CURRENT_USER)   
38     for fn in os.listdir(basedir):
39         if fn.endswith(".tac"):
40             tac = fn
41hunk ./src/allmydata/scripts/startstop_node.py 208
42     else:
43         os.chdir(basedir)
44 
45+    # If we are under Win32 OS , we create the registry key: "HKEY_CURRENT_USER\Software\Allmydata\Base Dir Path"
46+    # with current node path.
47+    if sys.platform == "win32":
48+        from allmydata.windows import registry
49+        registry.set_registry_setting("Software\Allmydata","Base Dir Path",basedir,_winreg.REG_SZ,_winreg.HKEY_CURRENT_USER)
50+
51     # set up twisted logging. this will become part of the node rsn.
52     logdir = os.path.join(basedir, 'logs')
53     if not os.path.exists(logdir):
54}
55
56Context:
57
58[setup: add licensing declaration for setuptools (noticed by the FSF compliance folks)
59zooko@zooko.com**20100309184415
60 Ignore-this: 2dfa7d812d65fec7c72ddbf0de609ccb
61]
62[setup: fix error in licensing declaration from Shawn Willden, as noted by the FSF compliance division
63zooko@zooko.com**20100309163736
64 Ignore-this: c0623d27e469799d86cabf67921a13f8
65]
66[CREDITS to Jacob Appelbaum
67zooko@zooko.com**20100304015616
68 Ignore-this: 70db493abbc23968fcc8db93f386ea54
69]
70[desert-island-build-with-proper-versions
71jacob@appelbaum.net**20100304013858]
72[docs: a few small edits to try to guide newcomers through the docs
73zooko@zooko.com**20100303231902
74 Ignore-this: a6aab44f5bf5ad97ea73e6976bc4042d
75 These edits were suggested by my watching over Jake Appelbaum's shoulder as he completely ignored/skipped/missed install.html and also as he decided that debian.txt wouldn't help him with basic installation. Then I threw in a few docs edits that have been sitting around in my sandbox asking to be committed for months.
76]
77[TAG allmydata-tahoe-1.6.1
78david-sarah@jacaranda.org**20100228062314
79 Ignore-this: eb5f03ada8ea953ee7780e7fe068539
80]
81[Change install.html to reference 1.6.1 instead of 1.6.0
82david-sarah@jacaranda.org**20100228061941
83 Ignore-this: 4738440e66a12dcf2cadf968fba5337
84]
85[docs: fix the asymptotic network performance of mutable file download in performance.txt, rename the howto-make-a-release file
86zooko@zooko.com**20100228061439
87 Ignore-this: c983b2fa7864f717ec17fb556f8a95d2
88]
89[Change code that gives a base32 SI or an empty string to be more straightforward. (#948)
90david-sarah@jacaranda.org**20100227065551
91 Ignore-this: ba2b0eb430635fcfb09faeca5046ed21
92]
93[Additional test for DIR2-LIT directories in test_web.py, fixed version (#948)
94david-sarah@jacaranda.org**20100225041824
95 Ignore-this: 86d710f438439f27aa372b84411af011
96]
97[Updates to NEWS for 1.6.1
98david-sarah@jacaranda.org**20100224081542
99 Ignore-this: ae1ca1892d7013bcb5f54f201459632
100]
101[Additional fixes for DIR2-LIT More Info page and deep-check/manifest operations (#948)
102david-sarah@jacaranda.org**20100224080220
103 Ignore-this: 3b431b712f380b5476231ebd99648a7f
104]
105[directories: add DIR2-LIT directories to test_deepcheck.py (#948)
106david-sarah@jacaranda.org**20100224075433
107 Ignore-this: ed1dcbe45870f5efae0ebbcdff677a4b
108]
109[dirnode: add tests of literal dirnodes (current and fix for #948)
110david-sarah@jacaranda.org**20100224043345
111 Ignore-this: f18cd17d72ed2495a646fa6c3af42aa1
112]
113[Additional fix for abbrev_si, with test
114david-sarah@jacaranda.org**20100222033652
115 Ignore-this: 7dc1c7031cd395fb4ec0a5aa96e69a10
116]
117[Additions to test_web.py for #948
118david-sarah@jacaranda.org**20100222025352
119 Ignore-this: b99be703923efc75db75894a05e6a527
120]
121[Change direct accesses to an_uri.storage_index to calls to .get_storage_index() (fixes #948)
122david-sarah@jacaranda.org**20100222024504
123 Ignore-this: 91f6fccb5fd9456aa0e02d312f902928
124]
125[Tweak to 'tahoe ls --help' output (#837)
126david-sarah@jacaranda.org**20100224030231
127 Ignore-this: 9c86ff8ee1f2c9b8a4f6e205a58905f
128]
129[Test behaviour of 'tahoe ls' for unknown objects (#837)
130david-sarah@jacaranda.org**20100224025913
131 Ignore-this: b999f6239796a90cadb41e8650aa3782
132]
133[Improve behaviour of 'tahoe ls' for unknown objects, addressing kevan's comments
134david-sarah@jacaranda.org**20100220061313
135 Ignore-this: 6205025c477f1c999473a4ae67e1c83
136]
137[docs: update relnotes.txt for v1.6.1
138zooko@zooko.com**20100224065755
139 Ignore-this: 6d078e94425462ac8d074e3e7c82da28
140]
141[docs: NEWS and relnotes-short.txt and CREDITS for v1.6.1
142zooko@zooko.com**20100224065231
143 Ignore-this: 41c056ae48c639e5a934d4c1983bc118
144]
145[misc/coverage.el: improve filename matching
146Brian Warner <warner@lothar.com>**20100224044757
147 Ignore-this: 8d9fb1d2a71e01370da006a2fef04346
148]
149[test_util.py: improve coverage of util.time_format
150Brian Warner <warner@lothar.com>**20100224044637
151 Ignore-this: bd93495132fe73a9c117d35c1a4e2d72
152]
153[docs/performance.txt: split out CPU from network, expand on mutable costs
154Brian Warner <warner@lothar.com>**20100224043813
155 Ignore-this: 4779e78ca0eed1dcbd1652e6287219f1
156]
157[docs/FTP: the Twisted patch (t3462) has landed, will be in the next release
158Brian Warner <warner@lothar.com>**20100223210402
159 Ignore-this: ddc5c8da8c95d8c19380d8c7ecbaf18
160]
161[Change OphandleTable to use a deterministic clock, so we can test it
162Kevan Carstensen <kevan@isnotajoke.com>**20100220210713
163 Ignore-this: a7437f4eda359bdfa243bd534f23bf52
164 
165 To test the changes for #577, we need a deterministic way to simulate
166 the passage of long periods of time. twisted.internet.task.Clock seems,
167 from my Googling, to be the way to go for this functionality. I changed
168 a few things so that OphandleTable would use twisted.internet.task.Clock
169 when testing:
170 
171   * WebishServer.__init___ now takes an optional 'clock' parameter,
172   * which it passes to the root.Root instance it creates.
173   * root.Root.__init__ now takes an optional 'clock' parameter, which it
174     passes to the OphandleTable.__init__ method.
175   * OphandleTable.__init__ now takes an optional 'clock' parameter. If
176     it is provided, and it isn't None, its callLater method will be used
177     to schedule ophandle expirations (as opposed to using
178     reactor.callLater, which is what OphandleTable does normally).
179   * The WebMixin object in test_web.py now sets a self.clock parameter,
180     which is a twisted.internet.task.Clock that it feeds to the
181     WebishServer it creates.
182 
183 Tests using the WebMixin can control the passage of time in
184 OphandleTable by accessing self.clock.
185]
186[Add tests for the ophandle expiration behavior in #577
187Kevan Carstensen <kevan@isnotajoke.com>**20100221010455
188 Ignore-this: 87a435108999c24920354b58fd78353f
189]
190[Update docs/frontends/webapi.txt to reflect the new expiration times in #577
191Kevan Carstensen <kevan@isnotajoke.com>**20100221010716
192 Ignore-this: cefee2ba800c285ae4148fe2dff39a3b
193]
194[Increase ophandle expiration times, per #577
195Kevan Carstensen <kevan@isnotajoke.com>**20100221010512
196 Ignore-this: 247f61fe8855a0c76fef3777a957f495
197]
198[More cleanups to test_cli using new utilities for reading and writing files.
199david-sarah@jacaranda.org**20100206013855
200 Ignore-this: 9fd2294406b346bfe9144fff6a61f789
201]
202[Fix race conditions and missing callback in allmydata.test.test_cli.Cp.test_copy_using_filecap, add utilities for one-liner reading and writing of files, and fix cases in test_cli where files were not being closed after writing.
203david-sarah@jacaranda.org**20100206013727
204 Ignore-this: 49da6c33190d526a4ae84c472f04d5f4
205]
206[setup: comment-out the dependency on pycrypto, see #953
207zooko@zooko.com**20100215050844
208 Ignore-this: 2751120921ff35b8189d8fcd896da149
209]
210[Add tests for #939
211Kevan Carstensen <kevan@isnotajoke.com>**20100212062137
212 Ignore-this: 5459e8c64ba76cca70aa720e68549637
213]
214[Alter CLI utilities to handle nonexistent aliases better
215Kevan Carstensen <kevan@isnotajoke.com>**20100211024318
216 Ignore-this: e698ea4a57f5fe27c24336581ca0cf65
217]
218[web/storage.py: display total-seen on the last-complete-cycle line. For #940.
219Brian Warner <warner@lothar.com>**20100208002010
220 Ignore-this: c0ed860f3e9628d3171d2b055d96c5aa
221]
222[adding pycrypto to the auto dependencies
223secorp@allmydata.com**20100206054314
224 Ignore-this: b873fc00a6a5b001d30d479e6053cf2f
225]
226[docs running.html - "tahoe run ." does not work with the current installation, replaced with "tahoe start ."
227secorp@allmydata.com**20100206165320
228 Ignore-this: fdb2dcb0e417d303cd43b1951a4f8c03
229]
230[code coverage: replace figleaf with coverage.py, should work on py2.6 now.
231Brian Warner <warner@lothar.com>**20100203165421
232 Ignore-this: 46ab590360be6a385cb4fc4e68b6b42c
233 
234 It still lacks the right HTML report (the builtin report is very pretty, but
235 lacks the "lines uncovered" numbers that I want), and the half-finished
236 delta-from-last-run measurements.
237]
238[More comprehensive changes and ticket references for NEWS
239david-sarah@jacaranda.org**20100202061256
240 Ignore-this: 696cf0106e8a7fd388afc5b55fba8a1b
241]
242[docs: install.html: link into Python 2.5.5 download page
243zooko@zooko.com**20100202065852
244 Ignore-this: 1a9471b8175b7de5741d8445a7ede29d
245]
246[TAG allmydata-tahoe-1.6.0
247zooko@zooko.com**20100202061125
248 Ignore-this: dee6ade7ac1452cf5d1d9c69a8146d84
249]
250Patch bundle hash:
251e3d0ecbe5809f3ccc29fb6f6ca3678fdd625d389