Thursday, September 17, 2009

How to add a file into OS image

  1. For adding any file into OS image, you need to know about .bib file. What is the .bib file and what it structure is?
  2. You can add the files using .bib file. You can declare the files in FILES section or MODULE section and your file will be added. Better read about FILES and MODULES section from web.
    • If your file is an Native executable, add it in MODULE section
    • If your file is an Managed executable, add it in FILES section
    • If your file is not an executable, add it in FILES section

  3. Ordering is not important here.
  4. For example I am adding an .exe file (Native code), .dll file and a .txt file.
    MODULES
    ; Name Path Memory Type
    ; ---------- -------------------------------- -----------

    LogStatus.dll $(_FLATRELEASEDIR)\LogStatus.dll NK
    LoadTest.exe $(_FLATRELEASEDIR)\LoadTest.exe NK


    FILES
    ; Name Path Memory Type
    ; ---------- -------------------------------- -----------
    MyFile.txt $(_FLATRELEASEDIR)\MyFile.txt NK

  5. Name: Name of the file which you want to add in the OS image. Its not necessary that this name should be same as the original file. If you want to add file abcd.txt as XYZ.abc, here you can provide name as XYZ.txt.

    Path: Path of the file, which need to be added in the path.

    Memory Type: Name of the memory area where this file will be loaded.

  6. Open your project.bib file and add your file.

  7. After providing all these info, Do a “Copy Files to Release Directory”. It will first clear your build folder and then will copy all the bib, reg and other required files. Then do the “Make Run Time Image”. Makeimg.exe will read your bib file entry and look for the specified file at the path which you have declared in “Path” section above. Once your image is up, yoy could find oput your file in \Windows folder.


No comments:

Post a Comment