[Erp5-report] r22989 - in /erp5/trunk/utils/oood: Common.xcu start.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Aug 13 23:35:47 CEST 2008
Author: kazuhiko
Date: Wed Aug 13 23:35:47 2008
New Revision: 22989
URL: http://svn.erp5.org?rev=22989&view=rev
Log:
copy Common.xcu to skip registration dialog.
Added:
erp5/trunk/utils/oood/Common.xcu
Modified:
erp5/trunk/utils/oood/start.py
Added: erp5/trunk/utils/oood/Common.xcu
URL: http://svn.erp5.org/erp5/trunk/utils/oood/Common.xcu?rev=22989&view=auto
==============================================================================
--- erp5/trunk/utils/oood/Common.xcu (added)
+++ erp5/trunk/utils/oood/Common.xcu Wed Aug 13 23:35:47 2008
@@ -1,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Common" oor:package="org.openoffice.Office">
+ <node oor:name="Help">
+ <node oor:name="Registration">
+ <prop oor:name="ReminderDate" oor:type="xs:string">
+ <value/>
+ </prop>
+ </node>
+ </node>
+ <node oor:name="Misc">
+ <prop oor:name="FirstRun" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+</oor:component-data>
Modified: erp5/trunk/utils/oood/start.py
URL: http://svn.erp5.org/erp5/trunk/utils/oood/start.py?rev=22989&r1=22988&r2=22989&view=diff
==============================================================================
--- erp5/trunk/utils/oood/start.py (original)
+++ erp5/trunk/utils/oood/start.py Wed Aug 13 23:35:47 2008
@@ -33,9 +33,8 @@
import sys
import threading
from urllib import quote
-# Add oood home (= current path) as a place to look for import
-# XXX Is this magical things make oood_home parameter useless in oood config file ?
-sys.path.append(os.path.abspath(os.getcwd()))
+# Add oood home as a place to look for import
+sys.path.append(os.path.abspath(os.path.dirname(__file__)))
# Standard python libs
import getopt, time, glob
@@ -82,13 +81,24 @@
cmd = '%s/%s' % (config.uno_path, BIN)
drive, tail = os.path.splitdrive(config.run_dir.strip('/'))
run_dir = drive + quote(tail)
+ instance_dir = '/%s/oood_instance_%d' %(run_dir,i)
+
+ # copy Common.xcu to skip registration dialog
+ common_xcu_dir = '%s/user/registry/data/org/openoffice/Office' % instance_dir
+ try:
+ os.makedirs(common_xcu_dir)
+ except OSError:
+ pass
+ open('%s/Common.xcu' % common_xcu_dir, 'w').write(
+ open('%s/Common.xcu' % os.path.dirname(__file__)).read())
+
# "'-display :%d' % config.virtual_display_id" argument is not working, that's why we use
# environnment variable. See "man xhost" for more details.
new_context = os.environ
if on_top:
args_and_env = [ BIN # First arg is always the name of the binary software we execute
, '-accept=socket,host=%s,port=%d;urp;' % (config.pool_host, instance_port)
- , '-env:UserInstallation=file:///%s/oood_instance_%d' %(run_dir,i)
+ , '-env:UserInstallation=file://%s' % instance_dir
, new_context
]
else:
@@ -100,7 +110,7 @@
, '-norestore'
, '-nofirststartwizard'
, '-accept=socket,host=%s,port=%d;urp;' % (config.pool_host, instance_port)
- , '-env:UserInstallation=file:///%s/oood_instance_%d' %(run_dir,i)
+ , '-env:UserInstallation=file://%s' % instance_dir
, new_context
]
if WIN:
More information about the Erp5-report
mailing list