我一直在试验一个我一直在研究的应用程序的不同框架。我主要使用了应用程序和桌面。我现在正在尝试桌面。有人能帮我弄个喷溅的屏幕吗?我都不知道该怎么开始。以下是我到目前为止(非常基本)所掌握的内容。
Default.html:
<!DOCTYPE html>
<html lang="en">
<head>
<title> Anon VPN Connection Software </title>
<link rel="stylesheet" type="text/css" href="" />
<link rel="stylesheet" type="text/css" href="" />
<link rel="stylesheet" type="text/css" href="" />
<link rel="stylesheet" type="text/css" href="" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
</head>
<body lang="en" onLoad="">
<p> Anon VPN Connection Software </p>
</body>
</html>Anon VPN.desk:
{
"name": "Anon VPN Connection Software",
"author": "Dustin Angeletti",
"Descript": "Anon VPN, SSH+, and SSH Connection Software",
"licence": "MIT",
"version": "1.0",
"frontend": "chromium-portable",
"backend": "node",
"main": "app.js",
"defaultLocation": "Default.html",
"htdocs": "contents",
"width": "800",
"height": "500",
"exitOnAppWinClose": true
}app.js:
var running = deskShell.startApp({
});发布于 2014-01-16 04:18:54
从API和相关文档中可以看出,不支持启动屏幕(在传统意义上)。
说到底,您的应用程序只是html。我怀疑你的意思是“我该如何展示一个应用程序”。如果是这样,那么您应该查看deskshell.org网站上的第一个示例。您需要安装SDK,以便可以运行桌面,但一旦安装,就很容易运行它们。
您可以有一个index.htm,其中包含以下内容:
<html>
<head>
<title>Hellow World</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>然后只需要app.desk文件:
{
"name": "html_helloworld",
"version": "0.1",
"author": "unknown",
"description": "Hello world example.",
"licence": "MIT",
"htdocs": "htdocs",
"frontend": "chromium-portable",
"backend": "none",
"width": "300",
"height": "300",
"defaultLocation": "index.htm"
,"appSocket":false
}然后,您所需要做的就是按如下方式设置文件结构:
...\html_helloworld\app.desk
...\html_helloworld\htdocs\index.htm然后,您应该能够通过双击app.desk文件来启动它。我做了上面的测试,工作正常。
我也尝试了你的申请(正如你已经发布的),但它没有工作。原因是我没有在与app.js文件相同的目录中创建一个app.desk文件。我遇到的下一个问题是您有“后端”:“节点”。我从您的app.desk文件中删除了"main“optoin,并将”后端“:”节点“更改为”后端“:”无“。
一个快速的更新。重读原来的问题,并意识到有一个app.js提供。因此,我重新创建了原来的问题提供的场景。我使用了以下结构:
...\VPN.desk
...\app.js
...\contents\Default.html所有操作都很好,没有对.desk文件或html进行任何更改。为了进行测试,我双击了VPN.desk并打开了应用程序。没有生成日志文件。请注意,我从http://deskshell.org/安装了windows SDK。
https://stackoverflow.com/questions/21151187
复制相似问题