安装OMS SDK

来源:互联网 发布:mac可以玩dota2吗 编辑:程序博客网 时间:2024/06/15 14:46

安装OMS SDK(Installing the OMS SDK) 

  下面主要介绍了如何安装、配置OMS SDK。如果你还没有下载最新版本的OMS SDK,请通过下面的链接页面下载,同时链接页面还提供了关于安装、配置和使用方法的介绍。This page describes how to install the OMS SDK and set up your development environment. If you haven't downloaded the SDK yet, you can use the link below to get started. Then read the rest of this document to learn how to install, configure, and use the SDK.

下载SDK Download the SDK

系统和软件要求(System and Software Requirements)

开发OMS程序以及Widget需要使用代码以及工具在OMS SDK中,你需要设置开发环境在你的电脑中,描述如下(To develop OMS applications and Widget applications using the code and tools in the OMS SDK, you need a suitable development computer and development environment, as described below.)

支持的操作系统(Supported Operating Systems:)

  • Windows XP or Vista
  • Linux (tested on Linux Ubuntu 8.04)

支持的开发环境(Supported Development Environments:)

  • Eclipse IDE
    • Eclipse 3.4.2 (Ganymede)
      • Eclipse JDT plugin (included in most Eclipse IDE packages)
      • WST 3.0.4
      • EMF 2.4.2
      • GEF 3.4.2
    • JDK 5 or JDK 6 (JRE alone is not sufficient)
    • Android Development Tools plugin
    • Widget Development Tools plugin
    • Not compatible with Gnu Compiler for Java (gcj)

(注意:如果JDK已经安装到你的开发电脑中,请先确认是要求的版本参考上面的列表)Note: If JDK is already installed on your development computer, please take a moment to make sure that it meets the version requirements listed above.

安装和设置SDK(Installing and Configuring the SDK)

  在下载完SDK后,解压zip文件放到你的电脑中,通常,SDK文件解压后的目录名为oms-sdk-平台-发行版本号,目录中会包含一些子目录如tools、samples等等(After downloading the SDK, unpack the .zip archive to a suitable location on your machine. By default, the SDK files are unpacked into a directory named oms-sdk_<platform>-<release>. The directory contains the subdirectories tools/, samples/, and others. )

 确认解压的SDK目录,之后我们将会用到,这时我们设置ADT插件以及WDT插件使用SDK工具(Make a note of the name and location of the unpacked SDK directory on your system — you will need to refer to the SDK directory later, when setting up the ADT plugin, WDT plugin or using SDK tools. )

Optionally, you can add the path to the SDK tools directory to your path. As mentioned above, the tools/ directory is located in the SDK directory.

  • On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ directory to it. If you don't see a line setting the path, you can add one:
    • export PATH=${PATH}:<your_sdk_dir>/tools
  • On Windows, right click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path under System Variables. Add the full path to the tools/ directory to the path.

Adding tools to your path lets you run the command line tools without needing to supply the full path to the tools directory. Note that, if you update your SDK, you should remember to update your PATH settings to point to the new location, if different.

添加OMS用户库到构建路径在Eclipse集成开发环境中(Adding OMS User Library to Build Path in Eclipse IDE)

In order to use OMS APIs, we need add OMS User Library (oms.jar in the root folder of OMS SDK) to build path. The adding steps are listed as follows:

  1. Select Window > Preferences... to open the Preferences panel.
  2. Select Java > Build Path > User Libraries from the left panel.

add_libraries_preferences

  1. In the User Libraries panel, click New to open 'New User Libraries' dialog and input OMS, and press OK.

add_libraries_newuserlibrary

  1. Click Add JARs to select oms.jar in OMS SDK root folder, and OK. Now the OMS User Library has been added to the build path in Eclipse IDE. When a new OMS project is created, you also need add the OMS User Library to the build path of the created project in order to use OMS APIs.

add_libraries_omsjar