0

我一直在为我一直在研究的应用程序尝试不同的框架。我主要使用了appjs和deskshell。我现在正在尝试deskshell。谁能帮我做一个闪屏?我什至不知道如何开始它。这是我到目前为止所拥有的(非常基本的)。

默认.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
}

应用程序.js:

var running = deskShell.startApp({

});
4

1 回答 1

0

查看 API 和相关文档表明不支持闪屏(传统意义上的)。

归根结底,您的应用程序只是 html。我怀疑您的意思可能是“我如何显示应用程序”。如果是这样,那么您应该查看deskshell.org 网站上的第一个示例。您需要安装 SDK 才能运行deskshell,但一旦安装,就可以轻松运行它们。

您可以有一个 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.desk 文件所在的目录下创建 app.js 文件。我遇到的下一个问题是你有“后端”:“节点”。我从您的 app.desk 文件中删除了“主”选项,并将“后端”:“节点”更改为“后端”:“无”。


快速更新。重读原始问题,发现提供了一个 app.js。所以我重新创建了原始问题提供的场景。我使用了以下结构:

...\VPN.desk
...\app.js
...\contents\Default.html

一切正常,无需更改 .desk 文件或 html。为了测试,我双击了 VPN.desk 并打开了应用程序。没有生成日志文件。请注意,我从http://deskshell.org/安装了 windows SDK

于 2014-01-16T04:18:54.490 回答