From: Foster B. <fbr...@ad...> - 2009-06-01 16:51:38
|
On 30/05/09 12:34 PM, "Robert Dailey" <rcd...@gm...> wrote: > So I found out that adobe::find_resource() is being used to try to find > glossary.xstr. However, it only uses the root_path() for searching, which > isn't very flexible at all. How about making this function check a few more > places, in particular the working directory. Also, it would be a nice feature > to be able to specify a list of resource directories at the command line for > the begin app and have those be used for searching for resources, amongst > other obvious paths. The resource system in APL definitely lacks a more robust design; that being said, it is not used outside of Adobe Begin, so it's limited use has prevented further development of it. If you would like to improve it to better suit your needs, please feel free. How would you specify additional resource directories at the command line for Adobe Begin? The idea is that it's a double-clickable app, so I'm missing something here. > Doing this will prevent me from having to copy files around via CMake to > ensure that resources can be found. I can make these changes myself, if you > guys think it would be a good idea. I'm leaning more towards the command-line > parameter approach for specifying resource directories. If the resource directories you are interested in finding (e.g., the working directory or a common a preferences directory) can be derived from the OS (even if it's an OS-specific routine) then I'd think it would be better for the app to discover those directories automatically. There are platform-specific source directories for both Mac and Windows that the resource system would be able to tap into to solve this problem. > Another comment: The root_path() is basically a singleton, and not thread safe > at all. It would be ideal to make > resource "hints" a concept, possibly create a new class called ResourceReposit > ory, which can be given directory hints (where to find resources) and can be u > sed to obtain resources. Can you describe a use case where one thread would want a different set of resource directories than another? As for the thread safety issue, it shouldn't be too hard to turn root_path into a threadsafe type. As I said before, there's no concerted effort going on inside Adobe to improve APL. Occasionally bug fixes will be made and utility code shuffled around to make it more accessible to external sources, but most of it is unused. You're welcome to work out ways of improving it. Blessings, Foster > On Fri, May 29, 2009 at 7:56 PM, Robert Dailey <rcd...@gm...> wrote: >> Hello, >> >> So I've got the Begin app compiling and linking under CMake, however it >> cannot >> find resources during the loading process. I pointed the working directory in >> Visual Studio to the begin/resources directory, but this does not seem to >> help. I tried referencing the bjam scripts as well, but since I am not >> familiar with bjam I had trouble finding anything helpful. >> >> Can anyone give me some pointers? It is trying to find glossary.xstr. > -- Foster T. Brereton <ἰχθύς>< Ro 3:21-26 Computer Scientist 2 --- Photoshop Engineering --- Adobe Systems "What 99 percent of programmers need to know is not how to build components but how to use them." -- Alexander Stepanov |