×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    53

    bld.inf imports from command line?

    Is there a command line call that will import a bld.inf file into a workspace?

    Failing that, is there an online reference to the command line options for Carbide C++

    Thanks!
    James

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: bld.inf imports from command line?

    You want to manipulate the huge Carbide.c++ (+ the Java VM) through command lines? That sounds scary to me.

    What are you planing to do and what kind of command options would you need?

    You are I hope aware that you can use command line tools to build Symbian projects and that they are totally separated from Carbide.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    53

    Re: bld.inf imports from command line?

    I want to be able to write a script that will parse our .dirs files and create a workspace that contains all of the proper bld.infs. We've got 30+ .infs per project and many different projects. Initial setup using File->Import... is a huge pain.

  4. #4
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: bld.inf imports from command line?

    Well, there's an easy solution for that (though it does have some annoyances that I will let you to identify):

    Place all your projects in a common directory, e.g. C:\Work, so that you will have
    • C:\Work\Project1\group\bld.inf,
    • C:\Work\Project2\group\bld.inf
    • ...
    • C:\Work\Project[n]\group\bld.inf


    Then write a small script that will generate the file C:\Work\bld.inf with the content:
    Code:
    #include "Project1\group\bld.inf"
    #include "Project2\group\bld.inf"
    ...
    #include "Project[n]\group\bld.inf"
    When that's done, import the C:\Work\bld.inf file. That's it.
    Last edited by ltomuta; 2008-06-06 at 19:23. Reason: Typos
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  5. #5
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,491

    Re: bld.inf imports from command line?

    why not write a single bld.inf which will include references to all the bld.inf files? That should be a cleaner solution and non-hacky.

    Edit : Ltomuta has the exact syntax too for you..not it should be easier..no more searching

  6. #6
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    53

    Re: bld.inf imports from command line?

    Unfortunately I'm coming onto a program in the middle of things, so they're already spread way out. Itomuta gave me an idea though. I can have my script build an inf by traversing through the includes, then use that one.

    I'd still like to be able to import it from the command line if possible, and save the trouble of having to import it manually.

    Thanks!

  7. #7
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,491

    Re: bld.inf imports from command line?

    Quote Originally Posted by James McMurray View Post
    Unfortunately I'm coming onto a program in the middle of things, so they're already spread way out. Itomuta gave me an idea though. I can have my script build an inf by traversing through the includes, then use that one.

    I'd still like to be able to import it from the command line if possible, and save the trouble of having to import it manually.

    Thanks!
    I would say that you need not change anything of the project. Write 'the' bld.inf. If somebody wants to use the same..great, they save lots of time and efforts, else, they will find a way. You writing your own, wont break anything anywhere.

  8. #8
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: bld.inf imports from command line?

    How about contacting Carbide's support service?
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  9. #9
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    53

    Re: bld.inf imports from command line?

    Quote Originally Posted by ltomuta View Post
    Well, there's an easy solution for that (though it does have some annoyances that I will let you to identify):

    Place all your projects in a common directory, e.g. C:\Work, so that you will have
    • C:\Work\Project1\group\bld.inf,
    • C:\Work\Project2\group\bld.inf
    • ...
    • C:\Work\Project[n]\group\bld.inf


    Then write a small script that will generate the file C:\Work\bld.inf with the content:
    Code:
    #include "Project1\group\bld.inf"
    #include "Project2\group\bld.inf"
    ...
    #include "Project[n]\group\bld.inf"
    When that's done, import the C:\Work\bld.inf file. That's it.
    I misread this one the first time around because our .dirs files use the same #include syntax. It'll work great. Thanks!

  10. #10
    Registered User
    Join Date
    May 2008
    Posts
    7

    Re: bld.inf imports from command line?

    There is a problem with importing the projects the way suggested (#including the other bld.inf's in a single bld.inf in the root directory).

    Relative paths in the mmp files are relative to the location of the bld.inf file. By importing this new bld.inf file that is in a location different than the originals, these relative paths get messed up, and things won't build in Carbide correctly.

    Why the mmp files use the location of the bld.inf as the base directory for relative paths is beyond me. It adds problems like the one just described.

    Andy

  11. #11
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: bld.inf imports from command line?

    It must be because the bld.inf was intended to be one per project and not one per computer In 98.57% of the cases there are no obvious problems with the default setup.

    The above described hack is just that, a hack. I remember building at least once all the SDK examples using this technique and it worked just fine.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  12. #12
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    53

    Re: bld.inf imports from command line?

    Our structure is set up such that paths weren't a problem. We have .dirs files for each release that point to which bld.infs to include, so I just parsed the .dirs to create the single .inf.

    You're right, there's no problem with using the default of 1 bld.inf per project. Well, beyond my desire not to have to manually recurse through the .dirs files in order to find all the .infs for each release.

  13. #13
    Registered User
    Join Date
    May 2008
    Posts
    7

    Re: bld.inf imports from command line?

    Quote Originally Posted by ltomuta View Post
    It must be because the bld.inf was intended to be one per project and not one per computer
    I have several projects, some of which result in DLLs. Some of the project's DLLs depend on other DLLs that result from other projects. In this case, importing each project as a separate bld.inf file causes Carbide to not know which order to build the projects. Because of this, I tried moving to a single bld.inf file which maintains dependency ordering. Please tell me how I can have the carbide build work in the correct order while keeping one bld.inf per project as you suggest. I'm pretty sure I read on this site that having a single build file keep track of the dependencies is the correct way to do this. Am I mistaken?

    Andy

  14. #14
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: bld.inf imports from command line?

    You can easily have multiple components (exes and DLLs) in the same project.

    You need to have one MMP file per binary but then one bld.inf file can contain a list of all the binaries in the project, through their MMPs of course.

    Here's one example of a project (One_Prj) with one main application and two DLLs.



    The DLLs could be dependent one on the other since with the bld.inf I can control the build order.

    Nice and clean.

    Now, assuming that the other project in the picture, One_Other_Prj is something that for one reason or another you want to build together (but before) the One_Prj. The options discussed here was to create a new bld.inf file, on the same level with the projects and with the following content:

    Code:
    #include "One_Prj\group\bld.inf"
    #include "One_Other_Prj\group\bld.inf"
    Then you can import this file in carbide or build from command line and it will work, at least that's my experience. However you might also be right about some path conflicts.
    Attached Images Attached Images
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  15. #15
    Registered User
    Join Date
    May 2008
    Posts
    7

    Re: bld.inf imports from command line?

    Lucian, thanks for your help. Yeah, I was thinking that these dependant DLLs, etc should have all been part of the same project from the beginning. Unfortunately they were created as separate projects. My trying to merge them into a single bld.inf is not to force the build to build multiple projects but to try to morph the many interdependant projects into a single project, as you have in your example.

    Andy

Similar Threads

  1. Catch 22 - Trying to import bld.inf
    By nokiandriver in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2009-08-19, 12:03
  2. Changing between several bld.inf files within project
    By wande in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2007-11-29, 08:46
  3. Problem with importing a bld.inf file in Carbide C++ express
    By svdwal in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2006-12-06, 18:43
  4. Combining bld.inf files that contain same GNU makefile
    By wande in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2006-11-08, 21:45
  5. bld.inf, Carbide.c++ and porting from 2nd
    By stenlik in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2006-10-31, 04:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •