Code Libraries and Standalone Applications

Peter Haworth pete at mollysrevenge.com
Sat Apr 17 17:41:50 EDT 2010


I'm hoping I can get some advice from the people on this list who know  
a lot more that I do about the mechanics of distributing a standalone  
application.

While developing my application, I wrote a number of commands that I  
insert as front scripts to the app.  The scripts for these command  
were all on cards within the application stack file but I've moved  
them out of that file and into a separate code library file so I can  
use them in other future apps.  I changed the insert commands in my  
application to load the scripts from the code library stack file  
instead of from the application stack file and all seems to be working  
fine after a couple of initial glitches.

Now I'm realising that when I distribute the application as a  
standalone,  the file path to the code library stack (currently hard  
coded in my app) will certainly be different than it is on my computer.

I have the same issue with a library of objects with custom behaviors  
that currently resides on a card in my application which  I would like  
to move out of the application and into a separate object library  
stack file for use in other apps.  Plus, there's a more difficult  
problem with the object library in that the behavior definitions are  
all hard coded long ids that include a reference to the file path to  
my application stack.

I guess I could just include a copy of both library stacks in every  
app but that seems to defeat the purpose of central libraries

I'm sure these problems have been solved many times and I'd appreciate  
some guidance on the best way to handle this before I go charging down  
the wrong path!


Thanks,

Pete Haworth




More information about the use-livecode mailing list