none
How to include platform.reg in project.reg RRS feed

  • Question

  • Hi

    we have two Reg files. First the platform.reg and as second the project.reg.

    In the platform.reg are all default values for this plarform. The project.reg is to make additional registry entries and to change the default values to other one.

    The linker load this files in an alphabetically order. So my specified registry settings was replaced by the default one.

    How i can change this?

    Monday, January 30, 2012 8:05 AM

Answers

  • To be more precise, the order in which the .reg files are merged is (check the output in plaform builder):

    1. common.reg
    2. registry entries related to the 'public projects' you include in the OS (for example shell.reg, netcfv35.reg, ....)
    3. project.reg
    4. platform.reg
    5. PBUserProjects.reg which is the merge of the .reg files related to the subproject you include in the OS

    The last item override the previous so that's why the workaround I mentioned in the previous e-mail will work. About this the steps are:

    1. Create a new (empty) application subproject which we'll call settings
    2. Remove any reference to settings.exe from settings.bib
    3. Modify the sources file of the project so it looks like
    RELEASETYPE=LOCAL
    
    TARGETNAME=settings
    
    FILE_VIEW_ROOT_FOLDER= \
        ReadMe.txt \
        prelink.bat \
        postlink.bat \
    
    
    SOURCES=
    
    TARGETTYPE=NOTARGET
    POSTLINK_PASS_CMD=postlink.bat
    PRELINK_PASS_CMD=prelink.bat
    FILE_VIEW_PARAMETER_FOLDER= \
        settings.bib \
        settings.reg \
        settings.dat \
        settings.db \
        ProjSysgen.bat \
    
    

    Add the desired entries to settings.reg. If you put, for example

    [HKEY_LOCAL_MACHINE\Ident]
        "Name"="A name overriding previous ones"
        "Desc"="A description overriding previous ones"


    and you run makeimg you'll see that those registry entries are placed at the end of $(_FLATRELEASEDIR)\reginit.ini thus overriding the values defined in the other .reg files.


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by FS-Andermann Tuesday, November 5, 2013 10:44 AM
    Monday, January 30, 2012 1:21 PM

All replies

  • This is an old problem since you would expect that project registry settings override platform (and common) ones. As you noticed, the way fmerge handles the files order is not that one though. I personally use this workaround: I create an OS subproject (called settings for example) which has no code in it, simply the .reg file. In this file I define the reg keys and values I want to change and, since the user added project files are processed later by fmerge, what you put in there (including removing keys or values) override what specified in project, platform and common.
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Monday, January 30, 2012 12:29 PM
  • To be more precise, the order in which the .reg files are merged is (check the output in plaform builder):

    1. common.reg
    2. registry entries related to the 'public projects' you include in the OS (for example shell.reg, netcfv35.reg, ....)
    3. project.reg
    4. platform.reg
    5. PBUserProjects.reg which is the merge of the .reg files related to the subproject you include in the OS

    The last item override the previous so that's why the workaround I mentioned in the previous e-mail will work. About this the steps are:

    1. Create a new (empty) application subproject which we'll call settings
    2. Remove any reference to settings.exe from settings.bib
    3. Modify the sources file of the project so it looks like
    RELEASETYPE=LOCAL
    
    TARGETNAME=settings
    
    FILE_VIEW_ROOT_FOLDER= \
        ReadMe.txt \
        prelink.bat \
        postlink.bat \
    
    
    SOURCES=
    
    TARGETTYPE=NOTARGET
    POSTLINK_PASS_CMD=postlink.bat
    PRELINK_PASS_CMD=prelink.bat
    FILE_VIEW_PARAMETER_FOLDER= \
        settings.bib \
        settings.reg \
        settings.dat \
        settings.db \
        ProjSysgen.bat \
    
    

    Add the desired entries to settings.reg. If you put, for example

    [HKEY_LOCAL_MACHINE\Ident]
        "Name"="A name overriding previous ones"
        "Desc"="A description overriding previous ones"


    and you run makeimg you'll see that those registry entries are placed at the end of $(_FLATRELEASEDIR)\reginit.ini thus overriding the values defined in the other .reg files.


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by FS-Andermann Tuesday, November 5, 2013 10:44 AM
    Monday, January 30, 2012 1:21 PM