现在的位置: 首页 > 综合 > 正文

使用vs2010搭建libreoffice openoffice UNO sdk开发环境(二)

2013年08月13日 ⁄ 综合 ⁄ 共 1591字 ⁄ 字号 评论关闭

上文提到的setsdkenv_windows.bat这个批处理,现在就要派上用场了,现在就要靠它配置运行环境,上图:

1.首先需要配置的是sdk的安装目录,如果我们正常安装了openoffice,然后安装sdk的话,这边默认就已经有路径了,直接回车即可。

下面不贴图,直接给出显示的英文句子

2. Enter the Office base installation directory [D:\Program Files\OpenOffice.org 3]:

设置openoffice安装路径,正常情况下已经有默认的了,直接回车。

3.Enter GNU make (3.79.1 or higher) tools directory []:

设置mingw中bin文件夹路径,我的在D:\Program Files\MinGW\bin下面,具体可以根据自己的安装路径填写,然后回车。

4.Enter a zip (2.3 or higher) tools directory []:

设置zip.exe的路径,我的在F:\public_lib\tools下。

5.Enter the directory of the C++ compiler (optional) [D:\Program Files\Microsoft Visual Studio 10.0\VC\bin]:

设置vc路径,10.0表示是vs2010,如果你还安装了vs2008的话,默认出现的可能是D:\Program Files\Microsoft Visual Studio 9.0\VC\bin,如果这样的话,就再重新输入2010的安装目录。

6.Enter the directory of the C# and VB.NET compilers (optional) [C:\Windows\Microsoft.NET\Framework\v2.0.50727]:

设置c#路径,vs安装时一并安装的话,这边直接有默认路径了。

7.Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [D:\Program Files\Java\jdk1.7.0_09]:

设置jdk路径,如果没有安装的话,可以直接回车跳过。

8.Default output directory is the "c:\openoffice.org3.4_sdk". 
Enter an existent directory if you prefer a different one. 
But note that only a path without spaces is allowed because of a limitation of gnu make. (optional) [c:\openoffice.org3.4_sdk]:

设置输出路径,根据喜好,自己设吧。

9.Automatic deployment of UNO components (YES/NO) [YES]:

默认YES,自动注册编译出的组件。

回车,设置完成,批处理退出。

而后会自动生成另外一个批处理 C:/Documents and Settings/<username>/Application Data/%OO_SDK_NAME%/setsdkenv_windows.bat

此时如果是win7,可能路径是这样的 C:\Users\Administrator\AppData\Roaming\openoffice.org3.4_sdk\setsdkenv_windows.bat

这个批处理里面实际填入了刚才设置的各种路径,如果中间过程有设置错误,可以删除这个批处理,然后重新运行sdk安装目录下的 setsdkenv_windows.bat。

以后使用make来编译的话,每次都需要先运行sdk安装目录下的 setsdkenv_windows.bat,来配置编译环境,运行后出现下图:

环境配置成功。

抱歉!评论已关闭.