Air:安装时写入应用程序存储目录?
我正在编写一个 Adobe Air HTML 应用程序。我想在安装过程中写入应用程序存储目录,并认为你可以为我指明正确的方向。
我有一组示例“配置文件”(文本文件)包含在我们的应用程序中。我想将示例放入应用程序存储(或文档存储)中,因为用户可以自由删除它们、修改它们等。另外,我不想在更新期间重写文件,只想进行初始安装。
但据我所知,安装程序仅写入应用程序目录。是否有对 ADT 进行简单的命令行更改以将文件发送到应用程序存储目录?
到目前为止,我对解决方法的想法如下:
将文件包含在应用程序目录“Examples”中
启动时,检查“Examples”文件夹是否存在在Application Storage/Document Storage目录中
如果不存在,将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:
Include the files in the application directory "Examples"
On startup, check if the "Examples" folder is in the Application Storage/Document Storage directory
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有任何方法可以自定义普通的 AIR 安装程序。您的解决方法就是做到这一点的方法。
There isn't any way to customize the normal AIR installer. Your workaround is the way to do it.