原文访问实在太慢,转载到这里方便访问。

Building a Crosswalk application

Crosswalk is a runtime for HTML5 applications. This means that any existing HTML5 applications should run on Crosswalk, providing they already run in a modern browser (Chrome, Firefox, Safari).

For the purposes of this tutorial, we use the simplest possible Crosswalk application: one HTML file.

However, because Crosswalk applications are intended to integrate well with the target environment, they require an additional file, manifest.json , containing metadata for that purpose. The manifest can be used to specify icons to use at different resolutions, set an app description, adjust content security policy settings, and otherwise configure how the app integrates with the target environment.

A simple application

1.First, create a directory called xwalk-simple for the project:

> mkdir xwalk-simple/
> cd xwalk-simple/

2.Next, copy an icon file to that directory, to serve as the application icon. You can use this icon:

To use this example, right click on the image and select Save Image As… (or its equivalent in your browser). Save it into the xwalk-simple directory as icon.ico. (Note that this image is from the Crosswalk source code and is BSD licensed.)

If you have your own favourite icon, copy that to the xwalk-simple directory instead. It should be 96 pixels square or larger.

3.Create two text files inside xwalk-simple. (Create them using any text editor, such as Notepad.):

  • index.html

This is a single HTML file which represents the user interface for the application. For the purposes of this tutorial, we are not using any CSS or JavaScript.

The content should be:

<!DOCTYPE html>
<html><head><meta name="viewport"content="width=device-width, initial-scale=1.0"><meta charset="utf-8"><title>simple</title></head><body><p>hello world</p></body>
</html>
  • manifest.json

This contains the application metadata (see above).

The content should be:

{"name": "simple","xwalk_package_id": "com.app.simple","xwalk_version": "0.0.1","start_url": "index.html","icons": [{"src": "icon.ico","sizes": "96x96","type": "image/vnd.microsoft.icon","density": "4.0"}]
}

See the manifest documentation for more information.

4.From inside the xwalk-simple directory, run:

> crosswalk-pkg --platforms=windows .

The crosswalk-pkg command above can be run from any location by putting the path to your project directory as the last parameter.

This will download the Crosswalk libraries, package the application defined in the specified manifest.json file and produce an .msi (in our example com.app.simple-0.1.0.0.msi). The .msi is currently a 64-bit build of Crosswalk for Windows and will only run on 64-bit Windows. Once you’ve done this, you’re ready to run the application on a target.

What’s next?

Run on Windows

Building a Crosswalk application相关推荐

  1. Building a Console Application on Windows Mobile

    http://blog.tangcs.com/2009/03/18/create-wm-console-application/ 转载于:https://www.cnblogs.com/WarrenT ...

  2. Crosswalk Project for Linux

    原文实在太慢,转载到这里方便访问. Crosswalk Project for Linux The Crosswalk Project for Linux enables the creation o ...

  3. android ndk platform,Android NDK Platform Build and Application

    摘要: Since the launch of Android NDK,the official guide of its building process and application under ...

  4. Crosswalk Project for Android

    原文访问太慢,转载到这里方便访问. Crosswalk Project for Android This section describes how to create web and hybrid ...

  5. 在ASP.NET 2.0中建立站点导航层次

    站点导航提供程序--ASP.NET 2.0中的站点导航提供程序暴露了应用程序中的页面的导航信息,它允许你单独地定义站点的结构,而不用考虑页面的实际物理布局.默认的站点导航提供程序是基于XML的,但是你 ...

  6. swift通知栏推送_如何使用Swift和Laravel使用推送通知创建iOS加密跟踪应用

    swift通知栏推送 by Neo Ighodaro 由新Ighodaro 如何使用Swift和Laravel使用推送通知创建iOS加密跟踪应用 (How to create an iOS crypt ...

  7. mvn 默认scope_maven scope 的作用

    一: 1.Maven中的依赖作用范围概述 Maven中使用 scope 来指定当前包的依赖范围和依赖的传递性.常见的可选值有:compile, provided, runtime, test, sys ...

  8. The Future of Silverlight --December 2, 2010 at 9:00

    微软宣布 2010 年 12 月 2 日将会举办由微软企业副总裁 Scott Guthrie 主旨演讲的 Silverlight Firestarter 发布会,主题为"Silverligh ...

  9. ubuntu 安装nginx,php,mysql。常见错误解决

    2019独角兽企业重金招聘Python工程师标准>>> sudo apt-get install -y libpcre3 libpcre3-dev zlib1g-dev ./conf ...

最新文章

  1. [转]Supporting OData Query Options in ASP.NET Web API 2
  2. 社交电商助推3000万微商大军,全民皆微商的时代即将来临?
  3. MFC SetWindowPos
  4. 易混淆知识点(1):word-wrap和word-break傻傻分不清楚
  5. 远程查看室内亮暗情况
  6. Ubuntu 开发者展示在 Ubuntu 20.04 上流畅运行 Microsoft Office 应用
  7. CCIE考试现在需要面试了
  8. Vijos 1041题:神风堂人数
  9. Oracle linux系统安装oracle11g
  10. 关于csgo的观看录像fps低_CSGO如何设置视频选项高FPS
  11. HDU-2036 改革春风吹满地
  12. Android androidx.startup:startup-runtime的minCompileSdk问题
  13. mysql的存储过程,循环执行插入语句
  14. 网站商务通与百度商桥的区别
  15. 关于前端导出文件打不开的问题
  16. 初中计算机卡片的制作教案,《运用Word制作电子贺卡》教学设计
  17. 含有使字的诗句_带有强字的诗句
  18. Linux查看服务器配置命令
  19. 没有赏味期限,只有来日方长
  20. python电子病历交接班系统_亚马逊电子病历上的Pydoop

热门文章

  1. 华为u8860刷机方法比较+变砖补救+rom定制与签名
  2. python练习题 019:苹果和虫子2
  3. win10原生输入法间隔变大解决办法
  4. 激活win10 2016企业版
  5. src[Object,Object]
  6. 在c语言中 n的作用是什么,c语言中(n)的意思,C语言中‘#92;n#39;是什么意思
  7. stm32CubeMX环境下完成流水灯的设计
  8. DX SDK Jun10 安装失败解决方法
  9. C-JUN 蛋白的生物学意义
  10. ado.net/dapper 的多sql语句执行的疑惑