PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: John Montenigro on September 03, 2008, 09:12:00 PM

Title: Resource file mods?
Post by: John Montenigro on September 03, 2008, 09:12:00 PM
Paul,

I've been away from programming for over a year, and am gearing up to attempt finishing two old projects. I'm using FF ver 2.86...

With reference to the following discussion:
   http://www.powerbasic.com/support/pbforums/showthread.php?p=295079#post295079


Would it be possible, when FF creates the file: 
   CODEGEN_VALUESCOMPARISON_RESOURCE.rc

to have it insert the following lines, just before the very last END:

    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 0x4E4   //US English, Multilingual
    END

(where the values following "Translation" match the preceding BLOCK's hex values...)


Does FF use any templates that I could modify, or would this be a change within the engine?

Or is there a way I can do this myself from within my FF code? (If so, where and how would I do that?)

Thanks!
-John

(BTW: just read a post about your recent(?) wedding?! Congratulations!)
Title: Re: Resource file mods?
Post by: TechSupport on September 03, 2008, 10:17:46 PM
Hi John,

There is no "automatic" way to insert that block in the resource. Well, it can be done through a pre-compile user tool but that would be a bit of a hack. The best way to handle this would be to create your own resource file through "Project", "Add Resource Module" and inser the whole blocks yourself:

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0x0
FILEOS VOS_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
Begin
  BLOCK "StringFileInfo"
  Begin
    BLOCK "040904E4"
    Begin
     
      VALUE "FileVersion",       "1.0.0.0\0"
      VALUE "ProductVersion",    "1.0.0.0\0"
      VALUE "Internal Name",  "Project1\0"
      VALUE "Original Filename",  "Project1.exe\0"
     
    End
  End
 
  BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 0x4E4   //US English, Multilingual
    END
End


You would then go into "Project Properties" and click the "Omit Version Information from Resource File". Basically, you will control the version information yourself in your user added resource file.

Title: Re: Resource file mods?
Post by: TechSupport on September 03, 2008, 10:18:28 PM
Oh, yes, I got married last October.... :)  OMG, it's been almost a year already!
Title: Re: Resource file mods?
Post by: John Montenigro on September 03, 2008, 10:21:32 PM
OK, I forgot about the "Omit" checkbox... no problem!

As for "almost a year already!"  ...just proves the old adage: Time flies when you're having... fun!  ;)
Title: Re: Resource file mods?
Post by: John Montenigro on September 04, 2008, 12:07:50 AM
Update: I have my resource file all set, and it satisfies my need: that my StringFileInfo is now visible when viewed through Sysinternals Process Explorer...

I asked one of the techs at Sysinternals why PE wouldn't show these strings while Windows Explorer would. He thought that PE enforced a more "strict" interpretation of coding standards, whereas Explorer was more "forgiving" of code that didn't comply.

Whatever the reason, I use PE all the time, and it bothered me that none of my information would display. So now I'm all set! And I hope this is useful to others!

Paul: I noticed that the same problem exists (PE does not display Description and Company Name) for your FFengine.exe... You might want to add that "VarFileInfo" block to your FF3 compilation?!

Best regards,
-John