GreenOpenERP/GreenOdoo 7.0 with Aeroo report enabled on Windows

Q1:为啥要用Windows?
A1:!@#¥%……&*

Q2:8.0都快出了,为啥还要用7.0?
A2:稳定!当然8.0版的Aeroo也有,请自行参照折腾。

正文:
下载GreenOdoo by Buke
鉴于Aeroo Report和OpenOffice相关中文资料匮乏,建议下载英文版,方便看鸟语教程时对照!

nssm将OpenOffice安装为服务(这里服务名定为 AOOUno
nssm在buke的绿色包里已经有了。
命令行:
  1. C:\go7\runtime\bin>nssm install AOOUno
弹出窗口,选择OpenOffice安装路径
path:  C:\Program Files (x86)\OpenOffice 4\program\soffice.exe
Argument:  -nologo -nofirststartwizard -headless -norestore -accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;

关于以上参数的解释:


启动服务:
  1. C:\go7\runtime\bin>nssm start aoouno
  2. AOOUno: START: 操作成功完成。
验证8100端口是否被监听:
  1. C:\go7\runtime\bin>netstat -ano | findstr :8100
  2. TCP 127.0.0.1:8100 0.0.0.0:0 LISTENING 8260
进入任务管理器查看进程,PID 8260对应的正是OpenOffice



改装GreenOdoo
命令行进入AOO安装目录,运行python,输出两个变量 URE_BOOTSTRAP UNO_PATH ,以备后用。
  1. C:\Program Files (x86)\OpenOffice 4\program>python
  2. Python 2.7.6 (default, Apr 15 2014, 10:34:35) [MSC v.1500 32 bit (Intel)] on win32
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> import os
  5. >>> print(os.environ['URE_BOOTSTRAP'])
  6. vnd.sun.star.pathname:C:\Program Files (x86)\OpenOffice 4\program\fundamental.ini
  7. >>> print(os.environ['UNO_PATH'])
  8. C:\Program Files (x86)\OpenOffice 4\program\
  9. >>>
创建C:\go7\runtime\python\Lib\site-packages\uno.pth 文本文档,内容:
  1. c:\\Program Files (x86)\\OpenOffice 4\\program


进入go7文件夹,复制start.bat
  1. C:\go7>copy start.bat start-aeroo.bat
  2. 已复制 1 个文件。
修改start-aeroo.bat,即在PATH添加AOO启动路径,并将以上获得的两个参数添加进来:
  1. SET URE_BOOTSTRAP=vnd.sun.star.pathname:C:\Program Files (x86)\OpenOffice 4\program\fundamental.ini
  2. SET UNO_PATH=C:\Program Files (x86)\OpenOffice 4\program\
  3. SET PATH=%CD%\runtime\pgsql\bin;%CD%\runtime\python;%CD%\runtime\win32\wkhtmltopdf;C:\Program Files (x86)\OpenOffice 4\program;%PATH%.

GreenOdoo运行Aeroo还需要额外的2个模块
注:必须使用0.6.1版,最新的0.7版会报错!
解压后进入Genshi-0.6.1\,将里面的genshi文件夹复制到c:\go7\runtime\python\Lib\site-packages\

解压后进入aeroolib\,将里面的aeroolib文件夹复制到c:\go7\runtime\python\Lib\site-packages\

至此Aeroo Report在Windows下运行环境已搭建完毕!
现在去aeroo官网下模块折腾word、excel报表去吧

小结:
OpenOffice没有绿化是一大遗憾,暂且将就用吧。
期待后续整合OpenOffice Portable版。


参考链接


 





posted @ 2014-07-07 13:13  openlog  阅读(851)  评论(0编辑  收藏  举报