[ ant-contrib-Bugs-941119 ] Generic version branding
"SourceForge.net" <[email protected]> Wed, 01 Aug 2007 10:11:05 -0700
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #941119, was opened at 2004-04-23 19:53
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=941119&group_id=36177
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: cpptasks
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Curt Arnold (carnold)
Assigned to: Curt Arnold (carnold)
Summary: Generic version branding
Initial Comment:
Have committed the shell for generic version as part of
bug 940985. Currently, multiple versioninfo elements
may be placed as children of project or cc elements.
However, at this time, versioninfo elements have no
effect on the generated executables and are marked as
experimental in the generated documentation.
When placed under project and given an id, the version
info can be referenced or extended by versioninfo
elements under cc elements.
When placed under cc, the first active versioninfo will
be used to generate the appropriate resources or modify
module naming.
samples/cppunit.ant has and will continue to have
examples of the use of versioninfo.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2007-08-01 10:11
Message:
Logged In: NO
The patch above worked for me too. Thanks God I found this comment! :)
Please apply the patch ("VS_VERSION_INFO VERSIONINFO" -> "1 VERSIONINFO")
and release some newer version.
TIA,
--oleg
----------------------------------------------------------------------
Comment By: Heath Nielson (heathn)
Date: 2006-11-22 13:48
Message:
Logged In: YES
user_id=1651883
Originator: NO
I too had a problem getting the version resource recognized by Windows.
However, including windows.h did not fix the problem for me. When
constructing the VERSIONINFO block I noticed that the version ID was set to
VS_VERSION_INFO. The Microsoft docs
(http://msdn2.microsoft.com/en-gb/library/aa381058.aspx) clearly state that
this value must be a 1. When I made the change, windows recognized the
version resource block. Patch:
--- src/net/sf/antcontrib/cpptasks/platforms/WindowsPlatform.java.orig
2006-05-19 08:48:38.000000000 -0600
+++ src/net/sf/antcontrib/cpptasks/platforms/WindowsPlatform.java
2006-11-22 13:32:42.343750000 -0700
@@ -217,7 +217,7 @@
//writer.write("#include \"windows.h\"\n");
- writer.write("VS_VERSION_INFO VERSIONINFO\n");
+ writer.write("1 VERSIONINFO\n");
StringBuffer buf = new StringBuffer("FILEVERSION ");
encodeVersion(buf, parseVersion(versionInfo.getFileversion()));
buf.append("\nPRODUCTVERSION ");
----------------------------------------------------------------------
Comment By: kwas (kwas)
Date: 2006-06-16 08:08
Message:
Logged In: YES
user_id=1405186
Commenting #include "windows.h" wasn't a good idea :(
Although MSDN says that we'll need windows.h only if we want
use named constants in .rc file, actually version info won't
be shown at all if we don't include windows.h (version
information is written to .exe or .dll, but doesn't show up
in file properties). So uncommenting line in
net.sf.antcontrib.cpptasks.platforms.WindowsPlatform that
writes #include "windows.h" to generated versioninfo.rc will
make version info accessible from file properties. At least
for msrc. I use MSVS 2003 on Win XP SP2.
----------------------------------------------------------------------
Comment By: Curt Arnold (carnold)
Date: 2004-05-20 19:35
Message:
Logged In: YES
user_id=27193
The attach patch removes the include of windows.h and
switches from symbolic constants to literals.
Borland's resource compiler does not have windows.h in its
default include path and apparently ignores brc32.cfg.
The patch places the symbolics in the generated code, which
should hopefully preserve the readability.
----------------------------------------------------------------------
Comment By: Curt Arnold (carnold)
Date: 2004-05-10 21:49
Message:
Logged In: YES
user_id=27193
The attached file is an initial implementation for Windows
compilers (tested with msvc and bcc). If a versioninfo is
specified, versioninfo.rc will be created and added to the
compile set. A resource compiler must be specified to
compile the file. See samples/cppunit.ant for a usage
example and the javadoc of
net.sf.antcontrib.cpptasks.VersionInfo for documentation.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=941119&group_id=36177
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/