#1
|
|||
|
|||
Reading a value of Macro from a external file
Hi,
Is there a way to read a value of macro defined in a file. i have a header file something like this #define WIN2K_VERSION 1,0,WIN2K_BLD_ID// for FILEVERSION/PRODUCTVERSION #define STR_PRODUCT_NAME "Test Dummy Software"// for "ProductName" #define STR_BUILD_NUMBER "1.0.0.20080208" // for "FileVersion"/"ProductVersion" NN is being excluded for this demo #define STR_APP_VERSION "1.0" // Test Dummy About box #define szAppBuildNumber _T("(Build 1.0.0.20080208)") // for About dialogs #define szAppBuildDate "2020080208"// numeric, 10-digit build ID #define STR_COMPANY_NAME "Siemens HealthCare Diagnostics" // for "CompanyName" #define szAppCompanyName _T( STR_COMPANY_NAME )// IDC_APP_COMPANY_NAME #define STR_COPYRIGHT "Copyright © Siemens HealthCare Diagnostics 2008. All Rights Reserved" // for "LegalCopyright" #define szAppCopyright _T( STR_COPYRIGHT ) // for About dialogs Where different strings gets updated at the BUILD time, what i wanna do is create a macro in my Visual Build script then read the VALUE of macro defined/updated in my file then allocate the READ value to my visual build macro and then use it for PROPERTIES section of Make VS 2005 . To make myself more clear , lets say STR_szAppBuildNumber in my exteral file hold the value of build number that changes everyday, now I would like to read this value of szAppBuildNumer string and allocate this value to a MACRO defined within VisualBuild script , and then use the VisualBuild macro to assing this value to CONFIGURATIOn of PROPERTIES? Is it possible? Also does VisualBuild allows a user to ADD additional property strings (in C# its is called assemblyAttributes). TIA |
#2
|
|||
|
|||
Re: Reading a value of Macro from a external file
Quote:
Quote:
|
#3
|
|||
|
|||
Re: Re: Reading a value of Macro from a external file
Quote:
I was able to sucessfully add new AssemblyName as per your instructions. however upon compiling new DLL i recieved following error Program.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs Properties\AssemblyInfo.cs(27,12): error CS0246: The type or namespace name 'AssemblyInternalBuild' could not be found (are you missing a using directive or an assembly reference?) Done building project "WindowsApplication1.csproj" -- FAILED. Did i miss something, why cmpiler was not able to find 'AssemblyInternalBuild' ? TIA |
#4
|
|||
|
|||
Apparently AssemblyInternalBuild is not a valid assembly attribute name.
|
#5
|
|||
|
|||
Quote:
TIA |
#6
|
|||
|
|||
|
|