GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-Apr-2009, 03:02
klubbin klubbin is offline
New Member
 
Join Date: Apr 2009
Posts: 2
klubbin is on a distinguished road

How to add file info in CPP to compiled EXE?


I'm fairly new to CPP, although I have a bit of background in some non-compiled languages (VB, perl, etc.)
I've finished writing a simple console application that writes some registry keys.

I compiled it, and the application works as designed in all tests so far.

what I'm trying to do is add version and other file information to the compiled EXE.

I'm using MinGW to compile on my Windows computer.

The specific things I'm trying to add are what comes up when you right-click on the EXE file and choose Properties. Thing such as "Product Version", "Copyright", and "Description".

I've looked around, and I found RCVERSION, and used it to create the following "version.h" file, but I don't know what to do from here, or even if this is what I need to do at all:

CPP / C++ / C Code:
#define __FILEVERSION__    "1.0.0.15"
#define __PRODUCTVERSION__ "1.0.0.0"
#define __COMPANY__        "My Company Name"
#ifdef _DEBUG
  #define __PRODUCT__      "Reg Writer (Debug)"
  #define __DESCRIPTION__  "Reg Writer (Debug)"
  #define __PRIVATEBUILD__ "-Debug"
#else
  #define __PRODUCT__      "Reg Writer"
  #define __DESCRIPTION__  "Reg Writer"
  #define __PRIVATEBUILD__ ""
#endif
#define __COPYRIGHT__      "© 2009 My Company Name"

#define __CB_DATE__        ""
#define __CB_TIME__        ""
#define __CB_VERSION__     ""


I'd appreciate any guidance in accomplishing this. Please let me know if there are any other details you need.


Thanks in advance!
  #2  
Old 05-Apr-2009, 22:05
klubbin klubbin is offline
New Member
 
Join Date: Apr 2009
Posts: 2
klubbin is on a distinguished road

Re: How to add file info in CPP to compiled EXE?


I ended up figuring out what I needed to do, although I'm still reviewing it to make sure that I fully understand it.

i downloaded the sample project they have with www.codeproject.com, and I sorta reverse-engineered what they did for the versioning, and it has nothing to do with using a "version.h" file in any way.

basically, I had to add a block to my .rc file with the info, and then re-compile and now I have the info I want. I just have to customize it a bit further and then I'll be good to go.

in case anyone else is looking for this info, I found Microsoft's guide on this here:

Article aa381058 "VERSIONINFO Resource" @ msdn.microsoft.com

this site also has a good article:

Article c4539 "Versioning in Windows" @ www.codeguru.com



Thanks so much for your support here, and I look forward to helping out and learning more here in the future!
 
 

Recent GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Airport Log program using 3D linked List : problem reading from file batrsau C Programming Language 11 29-Feb-2008 08:44
Hard drive/CPU Diagnoses Issues binarybug Computer Hardware Forum 1 22-Jan-2007 20:23
After execution - Error cannot locate /Skin File? WSCH C++ Forum 1 05-Mar-2005 21:03
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 12:28
CD Buring Failed skanth2000 Computer Hardware Forum 1 15-Nov-2003 04:52

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:59.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.