zoukankan      html  css  js  c++  java
  • BlackBerry WebWorks 环境搭建详解

    1.首先工具下载地址:

    https://developer.blackberry.com/html5/download/#smartphones

    每个版本都不一样,本文选择BlackBerry OS 7 and earlier

    image

    需要下载Ripple emulator,WebWorks SDK,BlackBerry Smartphone Simulators

    image  imageimage

    下载SDK和BlackBerry Smartphone Simulator后安装时用指定的默认路径:

    C:\Program Files (x86)\Research In Motion

    安装SDK前确保已安装完1.6或以上版本的JDK.

    2.BlackBerry Smartphone Simulator的安装步骤

    2.1 点击image此处会进入下载界面image此处的手机型号和OS是自己选择的,点击Generic中的任意一个下载image当点击下载时会让你先下载installer,下载完成之后安装installer,然后开始下载手机模拟器,安装到默认路径即可.

    3.配置文件

    3.1 在你的Web服务器的部署文件夹RippleSites中创建一个文件夹,命名为HelloWorld的。

    RippleSites文件会在你第一次浏览http://localhost:9910/HelloWorld/index.html后才会自动生成.

    在此文件夹中创建一个indel.xml文件和一个config.xml文件

    index.html文件的内容为:

    <!DOCTYPE html>

    <html lang="en">

    <head>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width,

    initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,

    user-scalable=no">

    <title>Hello World</title>

    </head>

    <body>

    <p>Hello World!</p>

    </body>

    </html>

    config.xml文件的内容为:

    <?xml version="1.0" encoding="UTF-8"?>

    <widget xmlns="http://www.w3.org/ns/widgets"

    xmlns:rim="http://www.blackberry.com/ns/widgets"

    version="1.0" rim:header="WebWorks Sample">

    <name>Hello World</name>

    <description>This is HelloWorld.</description>

    <content src="index.html"/>

    </widget>

    4.安装插件Ripple

    Ripple emulator下载完是一个ripple-ui.crx文件,它的使用方法是作为一个插件安装到googel chrome浏览器里.

    4.1 打开googel chrome浏览器在地址栏里输入chrome://extensions/然后Enter.点击扩展程序.

    4.2  找到ripple-ui.crx的位置,把它拖动到此页面上,将此插件添加进去,启用之后会在浏览器的此处显示此图标

    image.

    4.3 在google浏览器里点击image将出现如图所示的界面image

    点击Enable,点击Build里的Start Services开启服务器

    4.4 把工程打包并运行显示到手机模拟器上

    点击Build里的Settings填写相关信息,例如:image

    保存此信息,关闭,点击Package&Launch配置相关信息,点击右下角的Lanuch运行,html里的内容将会显示到手机模拟器上.

  • 相关阅读:
    OO设计精要:封装,还是封装(有感于“Why getter and setter methods are evil ”by Allen Holub )
    博客园建议:能否记住在博客园的首页上只显示标题
    戴尔国际英语
    C#代码契约(转)
    C#数组传递和返回
    SecureString
    里氏替换原则
    ASP.NET的Cache(转)
    WCF服务
    C#枚举中的位运算权限分配
  • 原文地址:https://www.cnblogs.com/liushuang/p/2865051.html
Copyright © 2011-2022 走看看