Shop OBEX P1 Docs P2 Docs Learn Events
Library Folders — Parallax Forums

Library Folders

linuxgeeklinuxgeek Posts: 45
edited 2006-09-05 19:40 in Propeller 1
I have been working my way through the Propeller Manual, and am doing fine with it. I notice there are just two possibilities for searching for library files. I would really like to see a user definable library path added.

When I am writing software, I prefer to keep my personal written libraries (objects) that I have already tested and debugged in a folder separate from those things I am currently working on. I don't care for putting my tested objects and such in with vendor (in this case Parallax) supplied stuff.

I am looking forward to being able to start working with the Propeller this week, if my PRC board arrives. The more of the manual I get through, the more anxious and excited I get about working with the Propeller and the more possibilities I see for it.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I can handle complexity.. It's the SIMPLE things that confound me.
The Dynaplex Network - Home of The Octabot Project
http://www.thedynaplex.org

Comments

  • simonlsimonl Posts: 866
    edited 2006-09-05 13:47
    I'll second all of that [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
  • linuxgeeklinuxgeek Posts: 45
    edited 2006-09-05 17:49
    simonl said...
    I'll second all of that [noparse];)[/noparse]

    Actually, it would be REALLY nice if we could define what all of the library folders are.

    It could be done easily by having the Propeller Tool look at an environment variable such as PROPELLER_LIB and searching the paths contained there until what is needed is found or it doesn't find anything and generates an error.

    PROPELLER_LIB would default to the current standard paths when the Propeller Tool is installed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I can handle complexity.. It's the SIMPLE things that confound me.
    The Dynaplex Network - Home of The Octabot Project
    http://www.thedynaplex.org
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-09-05 18:05
    This topic was also brought up in the following thread about a CVS system/library repository: http://forums.parallax.com/showthread.php?p=601542 Two two topics are integrally intertwined.

    -Phil
  • linuxgeeklinuxgeek Posts: 45
    edited 2006-09-05 18:49
    Phil Pilgrim (PhiPi) said...
    This topic was also brought up in the following thread about a CVS system/library repository: http://forums.parallax.com/showthread.php?p=601542 Two two topics are integrally intertwined.

    -Phil

    These two topics are not really related, and I think that thread is getting to confused and hard to follow. People there are talking about two things that should not necessarily be connected and in some ways the whole issue is being over complicated in my opinion.

    This topic is just discussing the paths the Propeller Tool searches for files when it compiles a project. The two topics are only intertwined if you insist that the local directory structure on a developer's computer be tied to the way CVS might be setup, which I do not think is a good idea at all.

    I want to be able to define my own development directory structure, independent of what soembody somewhere else might have setup. This is just me though and I just want the flexibility to do as I want for my development environment.

    Maybe I am misunderstanding something from that other thread, so please correct me if I am wrong. I am just asking for a simple method to define my own local development directory structure.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I can handle complexity.. It's the SIMPLE things that confound me.
    The Dynaplex Network - Home of The Octabot Project
    http://www.thedynaplex.org
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-09-05 19:21
    Perhaps you're right insofar as there are two separate (but, I maintain, related) issues here. One is structuring the library hierarchically, with subdirectories, so it's maintainable, and which would match the structure of an online repository for objects obtained from it. The other is being able to specify to the IDE where each library is found. My suggestion in the other thread was to use a PATH system variable, which lists not only the library root directories, but the order in which they're searched. That way you can put your development directory ahead of the others in PATH, and any objects found there will supercede like-named objects in lower-priority libraries. This is the way Perl does it, and it works quite well. You can even include metacommands in a Perl program to append directories ahead of your PATH temporarily, so it doesn't have to be done at the system level. Something like this in the IDE would really be nice. And I hope it can be done this way and not by using absolute directory paths in the OBJ section. To do the latter would get quite messy, since every instance of an OBJ spec would have to be changed. For this reason, I believe the OBJ section should deal with relative paths only.

    -Phil

    Addendum: One thing that's always in the back of my mind when suggesting stuff like this is the impact on Jeff's IDE coding and Chip's compiler coding. On the surface, neither the hierarchical directories nor the PATH idea would seem to entail anything terribly disruptive. But where this could get pretty complicated is in the creation of archives. This is because an archive will be created in the creator's library environment but has to be usable in a different environment. It may be as simple as prepending the archive's root directory to the user's path so its objects supercede any the user may already have. But it's definitely worth examining this situation more closely.

    Post Edited (Phil Pilgrim (PhiPi)) : 9/5/2006 7:46:30 PM GMT
  • linuxgeeklinuxgeek Posts: 45
    edited 2006-09-05 19:40
    Phil Pilgrim (PhiPi) said...
    The other is being able to specify to the IDE where each library is found. My suggestion in the other thread was to use a PATH system variable, which lists not only the library root directories, but the order in which they're searched. That way you can put your development directory ahead of the others in PATH, and any objects found there will supercede like-named objects in lower-priority libraries. This is the way Perl does it, and it works quite well.

    This is exactly what I would like to have in the Propeller Tool now and what I suggested in an earlier post here.
    Phil Pilgrim (PhiPi) said...
    And I hope it can be done this way and not by using absolute directory paths in the OBJ section. To do the latter would get quite messy, since every instance of an OBJ spec would have to be changed. For this reason, I believe the OBJ section should deal with relative paths only.l

    I agree. I do NOT want to have to specify file paths within my source code just so the compiler can find something. Having to do so is just a bad idea.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I can handle complexity.. It's the SIMPLE things that confound me.
    The Dynaplex Network - Home of The Octabot Project
    http://www.thedynaplex.org
Sign In or Register to comment.