RE: [flexcoders] Re: How do I include a file in the AIR app-storage directory at install time?

2008-12-15 Thread Jim Hayes
If you're using flexbuilder to package, then probably the easiest way is
to check "copy non embedded files to output folder" in project |
properties | flex compiler,
But I find this to be a bit messy at times.
If not, then you can kind of cheat. When you publish your .air file, it
will offer you the choice of files to include in the archive.
If you click "back" at this point then you have the opportunity (outside
of flexbuilder) to copy any files you need to the "bin-release" folder
that gets temporarily created as part of the publishing operation. Back
in flexbuilder, click "next" again and you'll be back in the stage where
you can specify files to include, but now you'll have the opportunity to
select the files you just copied to bin-release.
 
This, however, gets old pretty quickly! 
 
I now have an ant build script that packages everything up for me,
without having to think / remember to copy certain files.
 
I'm not sure if my script is generic enough or even clear enough to be
much help to anyone though, to be honest I found it quite hard work to
get it all working from a nil level of ant knowledge/experience.
If there's anything specific you need to ask on that, however, then I'll
do my best (Though I'm sure many people on the list are better qualified
than myself in that respect).
 
In regard of copying it over, you'll need to check if the file is there
when the app starts, and copy it if not. There's not any scripting in
the Air installer itself.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jim Boone
Sent: 15 December 2008 13:36
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I include a file in the AIR app-storage
directory at install time?
 
I read what you say, but I don't know how to do that. How do I include
it as part of the install? How do I copy it over? Does the AIR install
include some sort of scripting?

Also, on doing more research, I have found that it is not wise to
include files that I am talking about in app-storage and that perhaps
the user directory is more appropriate.

http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html
 

--- In flexcoders@yahoogroups.com 
, "Johannes Nel" 
wrote:
>
> include it in the application directory as part of the instal and
copy it
> over if it does not exist.
> 
> On Mon, Dec 15, 2008 at 5:22 AM, Jim Boone  wrote:
> 
> > Hi,
> >
> > I am new to AIR and I am writing an application that needs access to
a
> > new SQLite database when the user first launches the application. I
> > have considered two options. I could create an empty SQlite database
> > and include it in the app-storage directory when the application
> > installed or I could include an SQL schema file in app-storage and
> > create the database when the user launches the app. Either way, I
want
> > to be able to include an file the the application directory at
install
> > time. I have researched how to do this with no luck. Does anyone
know
> > how I can accomplish this? Thanks!
> >
> > Jim
> >
> > 
> >
> 
> 
> 
> -- 
> j:pn
> \\no comment
>
 

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

Re: [flexcoders] Re: How do I include a file in the AIR app-storage directory at install time?

2008-12-15 Thread Johannes Nel
when creating an install you can include files which get dumped in the
application directory. then on first time startup you use the file api to
copy it over. no you should not write info in the application directory as
permissions can be an issue, but copying from there is pretty simple.
I have an ant script which manages the packaging of air apps on my CI box,
will go and dig it out in a bit.

On Mon, Dec 15, 2008 at 3:36 PM, Jim Boone  wrote:

>   I read what you say, but I don't know how to do that. How do I include
> it as part of the install? How do I copy it over? Does the AIR install
> include some sort of scripting?
>
> Also, on doing more research, I have found that it is not wise to
> include files that I am talking about in app-storage and that perhaps
> the user directory is more appropriate.
>
> http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html
>
> --- In flexcoders@yahoogroups.com ,
> "Johannes Nel" 
> wrote:
>
> >
> > include it in the application directory as part of the instal and
> copy it
> > over if it does not exist.
> >
> > On Mon, Dec 15, 2008 at 5:22 AM, Jim Boone  wrote:
> >
> > > Hi,
> > >
> > > I am new to AIR and I am writing an application that needs access to a
> > > new SQLite database when the user first launches the application. I
> > > have considered two options. I could create an empty SQlite database
> > > and include it in the app-storage directory when the application
> > > installed or I could include an SQL schema file in app-storage and
> > > create the database when the user launches the app. Either way, I want
> > > to be able to include an file the the application directory at install
> > > time. I have researched how to do this with no luck. Does anyone know
> > > how I can accomplish this? Thanks!
> > >
> > > Jim
> > >
> > >
> > >
> >
> >
> >
> > --
> > j:pn
> > \\no comment
> >
>
>  
>



-- 
j:pn
\\no comment