update README.md.

This commit is contained in:
shenmo 2020-11-20 22:15:50 +08:00 committed by Gitee
parent b702fbcf68
commit aaab923a6f

145
README.md

@ -1,37 +1,132 @@
# SparkWebAppRuntime
[](spk://store/development/spark-webapp-runtime-waker) ![](RackMultipart20201120-4-ntgpe9_html_1acb66441c6937a3.gif)
#### 介绍
星火商店网页应用运行环境,旨在简单快捷的将网页封装为应用模式。
![](RackMultipart20201120-4-ntgpe9_html_c5dd964be3f7b4b3.gif)
#### 软件架构
软件架构说明
运行 "spark-webapp-runtime -h" 查看命令行帮助信息
#### 安装教程
用法:./SparkWebAppRuntime [选项]
描述: 星火网页应用运行时
1. xxxx
2. xxxx
3. xxxx
选项:
-h, --help 显示这个此帮助。
-v, --version 显示版本信息。
-p, --parser 启用参数解析方式. 默认顺序解析方式.
-t, --title \<title\> 设置程序的运行标题. 默认是 星火网页应用运行时.
-u, --url \<url\> 设置要打开的目标URL. 默认是空.
-w, --width \<width\> 设置程序运行的宽度. 默认是 1024.
-H, --height \<height\> 设置程序运行的高度. 默认是 768
-i, --ico \<ico\> 设置程序运行的图标.
-d, --desc \<desc\> 设置程序的描述信息.
-c, --cfg \<cfg\> 设置程序运行的配置文件.
-r, --root \<root\> 设置内置WebServer的根路径.
-P, --port \<port\> 设置内置WebServer的监听端口号.
#### 使用说明
这里给大家附送两个例子,帮助大家理解使用
1. xxxx
2. xxxx
3. xxxx
这是一款使用了-r选项自带webserver的一款应用的desktop文件
#### 参与贡献
[Desktop Entry]
Categories=Game;
Encoding=UTF-8
Exec=spark-webapp-runtime -p -u http://localhost:38324 -t "Unfair Undyne" -d "不公平的安黛因传说之下Undertale鱼姐战" -w 720 -H 620 -i /opt/durapps/fairdyne/icon.png -r /opt/durapps/fairdyne/pages -P 38324
Icon=/opt/durapps/fairdyne/icon.png
MimeType=
Name[zh\_CN]=Fairdyne
Name=Fairdyne
StartupWMClass=Fairdyne
Terminal=False
Type=Application
X-Deepin-CreatedBy=com.deepin.dde.daemon.Launcher
X-Deepin-AppID=fairdyne
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
附这款应用的下载链接
[https://dcstore.spark-app.store/store/games/fairdyne/fairdyne\_1.4\_plus\_sm1\_amd64.deb](https://dcstore.spark-app.store/store/games/fairdyne/fairdyne_1.4_plus_sm1_amd64.deb)
#### 特技
欢迎大家积极制作
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
以下是新手教程
**使用教程**
# 0.配置环境
作为星火系列应用我们的设计哲学是M.I.S.(Make it Simple)没错我就是从KISS抄的
配置spark-webapp-runtime环境是非常简单的
只需要
点击
[](spk://store/development/spark-webapp-runtime-waker) ![](RackMultipart20201120-4-ntgpe9_html_64e2d0d76a9e2e60.gif)[
](spk://store/development/spark-webapp-runtime-waker)
即可配置完成
现在我们来测试一下
spark-webapp-runtime
如果你能看到
![](RackMultipart20201120-4-ntgpe9_html_aaa9c7403a5f4461.gif)
那么恭喜你,配置完成了
# 1.简易操作
作为第一种调用方式,简易调用是非常简单粗暴的
你可以试试输入这一段
spark-webapp-runtime 垃圾百度 https://www.baidu.com
看到了么?就是这么简单
![](RackMultipart20201120-4-ntgpe9_html_e6fc0f985ad49a90.gif)
如果觉得默认的1024x768分辨率不合你心意
你可以简单的在后面加上你喜欢的分辨率
比如这样
spark-webapp-runtime 垃圾百度 https://www.baidu.com 768 1024
![](RackMultipart20201120-4-ntgpe9_html_ceac29ecac00fe92.gif)
And你甚至可以使用本地的网页文件
先找到文件
![](RackMultipart20201120-4-ntgpe9_html_52dd6dcf6c40f06a.gif)
在浏览器里打开
![](RackMultipart20201120-4-ntgpe9_html_dd596e3d8bbe0c72.gif)
复制粘贴
spark-webapp-runtime 这是一个本地网页 file:///home/sy120zx/Desktop/Index%20of%20\_store\_games\_fairdyne\_.html 1024 768
![](RackMultipart20201120-4-ntgpe9_html_21550fd9e5d5f3d.gif)
你还可以整一些生草的活
spark-webapp-runtime 垃圾百度 https://www.baidu.com 768 84
![](RackMultipart20201120-4-ntgpe9_html_f41a3cae433a275e.gif)
所以大家学会了么spark-webapp-runtime的简单调用方式
spark-webapp-runtime [标题] [地址]
spark-webapp-runtime [标题] [地址] [宽] [高]
简易调用优点简单符合直觉无需学习就可以使用语法兼容spark-web-core已弃用
缺点:自定义程度低,不支持本地服务器功能
# 2.标准调用