none
Fmerge.exe Clarification RRS feed

  • Question

  • I am trying to understand how the fmerge.exe works. So this is what I understood so far:

    During the make run-time image the fmerge.exe get called and it merges the .bib, .reg, .dat, and .db files. I thought  fmerge.exe merges files located in the FLATRELEASEDIR. However, if I just add a file(e.g. newfile.dat), it doesn't merge the newfile.dat to the initobj.dat. Also, the subprojects .bib, .dat, .db, .reg files are not included the FLATRELEASEDIR but they are merged to the ce.bib, initobj.dat, and so on. 

    • How and from where does fmerge.exe call the subprojects .bib, .dat, etc. files? What files are involved in the process?
    • To use PostFMergeObj.bat, and other similar .bat files, do I just have to place them in the FLATRELEASEDIR?

    Thanks!



    • Edited by TakashiKun Friday, September 23, 2011 3:16 PM
    Friday, September 23, 2011 3:08 PM

Answers

  • Fmerge does not merge any and all files, it has a specific list of files that it merges.   To see this, look at the makeimg output where you will see the command line showing which files are merged and in which order they are merged.

    Your subprojects files are merged to create PBUserProjects.*


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    • Marked as answer by TakashiKun Monday, September 26, 2011 2:30 PM
    Friday, September 23, 2011 3:38 PM
    Moderator
  • If I remember correctly, the fmerge merges the file in %_FLATRELEASEDIR%\postproc\
    Perhaps put the script in PreMakeImg.bat would fullfill your need.
    • Marked as answer by TakashiKun Monday, September 26, 2011 2:30 PM
    Saturday, September 24, 2011 6:01 AM

All replies

  • Fmerge does not merge any and all files, it has a specific list of files that it merges.   To see this, look at the makeimg output where you will see the command line showing which files are merged and in which order they are merged.

    Your subprojects files are merged to create PBUserProjects.*


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    • Marked as answer by TakashiKun Monday, September 26, 2011 2:30 PM
    Friday, September 23, 2011 3:38 PM
    Moderator
  • Thanks for your answer. Looking at the build.log helps a lot question! From now on, I will look at logs always!

    Now I am having another issue:

    I am trying to merge a .dat to PBUserProjects.dat file.

    So I have the following PreFMergeObj.bat:

     

    @echo off
    echo PreFmergeObj.bat entry.
    pushd %_FLATRELEASEDIR%
    
    echo copy ServiceWebsite.dat and PBUserProjects to PBUserProjects.txt
    copy PBUserProjects.dat+ServiceWebsite.dat PBUserProjects.txt
    
    echo delete PBUserProjects.dat
    del PBUserProjects.dat
    
    echo rename PBUserProjects.txt to .dat
    ren PBUserProjects.txt PBUserProjects.dat
    
    popd
    echo PreFmergeObj.bat exit.
    @echo on

     

    So it runs before it merges .dat merges together. The log have the following output:

     

    CreateFileSystem:
      MAKEIMG: BUILDMSG: Calling C:\WINCE700\OSDesigns\Project\ProjectPrototype\ProjectPrototype\RelDir\VirtualPC_x86_Release\PreFmergeObj.bat
    PreFmergeObj.bat entry. copy ServiceWebsite.dat and PBUserProjects to PBUserProjects.txt PBUserProjects.dat ServiceWebsite.dat 1 file(s) copied. delete PBUserProjects.dat rename PBUserProjects.txt to .dat PreFmergeObj.bat exit. Fmerge Task: Calling "Fmerge -obj C:\WINCE700\OSDesigns\Project\ProjectPrototype\ProjectPrototype\RelDir\VirtualPC_x86_Release\initobj.tmp common.dat ie7.dat servers.dat cellcore.dat ossvcs.dat shell.dat wceshellfe.dat wceappsfe.dat directx.dat mediaapps.dat project.dat platform.dat PBUserProjects.dat OSDesign.dat." fmerge for Windows CE (Release) (Built on Jul 30 2008 19:10:50) txt2ucde: Input file: C:\WINCE700\OSDesigns\Project\ProjectPrototype\ProjectPrototype\RelDir\VirtualPC_x86_Release\initobj.tmp Output File: C:\WINCE700\OSDesigns\Project\ProjectPrototype\ProjectPrototype\RelDir\VirtualPC_x86_Release\initobj.dat.
    txt2ucde: LOCALE environment variable: 0409. Default code page: 1252. txt2ucde: Converting to Unicode using code page 1252.

     

    I checked the PBUserProjects.dat in the FLATRELEASEDIR and there were changes made by PreFMergeObj.bat. 

    So I looked into the InitObj.tmp(or InitObj.dat) and they didn't include the entries from the new PBUserProjects.dat.

    From my understanding, the PBUserProjects.dat is copied to more than one folder, but I believe Fmerge tool uses the copy located in the FLATRELEASEDIR; so I didn't worry in changing the other copies. And also, I believe the PBUserProjects.dat is created by the BuildRel which occurs before the Fmerge.

     

    What am I doing wrong?

     



    • Edited by TakashiKun Friday, September 23, 2011 9:02 PM
    Friday, September 23, 2011 8:50 PM
  • If I remember correctly, the fmerge merges the file in %_FLATRELEASEDIR%\postproc\
    Perhaps put the script in PreMakeImg.bat would fullfill your need.
    • Marked as answer by TakashiKun Monday, September 26, 2011 2:30 PM
    Saturday, September 24, 2011 6:01 AM