Air:安装时写入应用程序存储目录?

发布于 2024-10-24 01:03:53 字数 528 浏览 5 评论 0原文

我正在编写一个 Adob​​e Air HTML 应用程序。我想在安装过程中写入应用程序存储目录,并认为你可以为我指明正确的方向。

我有一组示例“配置文件”(文本文件)包含在我们的应用程序中。我想将示例放入应用程序存储(或文档存储)中,因为用户可以自由删除它们、修改它们等。另外,我不想在更新期间重写文件,只想进行初始安装。

但据我所知,安装程序仅写入应用程序目录。是否有对 ADT 进行简单的命令行更改以将文件发送到应用程序存储目录?

到目前为止,我对解决方法的想法如下:

  1. 将文件包含在应用程序目录“Examples”中

  2. 启动时,检查“Examples”文件夹是否存在在Application Storage/Document Storage目录中

  3. 如果不存在,将app:/Examples文件夹复制到Application中Storage/Document 存储目录

但如果这是安装程序的一部分,那就容易多了。如果有任何其他信息有帮助,请告诉我。谢谢!

I'm writing an Adobe Air HTML app. I want to write to the application storage directory during installation, and thought you could point me in the right direction.

I've got a set of example "profiles" (text files) to include with our application. I would like to put the examples into Application Storage (or Document Storage), since the user is free to delete them, modify them, etc. Also, I don't want to re-write the files during Updates, only an initial installation.

But as far as I can figure out, the installer only writes to the application directory. Is there a simple command line change to ADT to send files to the application storage directory?

Here's my thought so far for a workaround:

  1. Include the files in the application directory "Examples"

  2. On startup, check if the "Examples" folder is in the Application Storage/Document Storage directory

  3. If it doesn't exist, copy app:/Examples folder into the Application Storage/Document storage directory

But it would be a lot easier if this was part of the installer. Let me know if any other information would be helpful. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妄司 2024-10-31 01:03:53

没有任何方法可以自定义普通的 AIR 安装程序。您的解决方法就是做到这一点的方法。

There isn't any way to customize the normal AIR installer. Your workaround is the way to do it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文