Including SQLite DB in release build

10 views
Skip to first unread message

caleb

unread,
Apr 6, 2011, 10:36:40 PM4/6/11
to restfulx-framework
Hello Dima,

What is the best way to include a sqlite DB with a release build? I
have an AIR app which is working as expected, but I need to somehow
make the data portable to go along w/ the app.

Thank you

Dima Berastau

unread,
Apr 7, 2011, 2:25:49 PM4/7/11
to restfulx-...@googlegroups.com
Hey Caleb,

I am not sure that's possible, I could be wrong though. You could have the app installed and then maybe seed the database first time the app runs using your remote server as source?

Dima

> --
> You received this message because you are subscribed to the Google Groups "restfulx-framework" group.
> To post to this group, send email to restfulx-...@googlegroups.com.
> To unsubscribe from this group, send email to restfulx-framew...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/restfulx-framework?hl=en.
>

Caleb Adam Haye

unread,
Apr 7, 2011, 2:29:47 PM4/7/11
to restfulx-...@googlegroups.com, Dima Berastau
Hi Dima,

First of all, thanks for the reply.  I think I found an answer...

var dbFile:File = File.applicationDirectory.resolvePath("db/software.db");
var dbWorkFile:File = File.documentsDirectory.resolvePath("software.db");

if(!dbWorkFile.exists){
    dbFile.copyTo(dbWorkedFile);
}

That should do the trick, although I had to move on to other tasks and haven't yet tried it.

Did you see my earlier message about dependencies not being loaded? http://groups.google.com/group/restfulx-framework/browse_thread/thread/b925ccdfc98104e9?pli=1 .. that one is still bugging me

Thanks man!
--
Caleb Adam Haye | Fire, Inc. | ca...@fire.coop
www.fire.coop. (707) 701-FIRE f. (888) FAX-7933

Dima Berastau

unread,
Apr 7, 2011, 4:10:00 PM4/7/11
to Caleb Adam Haye, restfulx-...@googlegroups.com
I've had a quick look at the issue about dependencies. It looks like bug with AIRServiceProvider and will need to be resolved. The suggested work-around is to index models you want (as you figured out) and not rely on RestfulX to index them for you. I'll create a ticket for this.

Dima

Caleb Adam Haye

unread,
Apr 7, 2011, 4:45:29 PM4/7/11
to Dima Berastau, restfulx-...@googlegroups.com
Awesome, thanks Dima.

Great work, as always!

--
Caleb Adam Haye | Fire, Inc. | ca...@fire.coop
www.fire.coop. (707) 701-FIRE f. (888) FAX-7933


Reply all
Reply to author
Forward
0 new messages