]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commitdiff
Parameterize vendor prefix and PCI device id 8.1.0-rc2
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 8 Sep 2015 16:59:49 +0000 (17:59 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Wed, 9 Sep 2015 16:02:54 +0000 (17:02 +0100)
The XenServer PV vendor prefix ('XS') and PCI device (C000) are still
hard-coded into the XENIFACE package. These need to be stripped out and
replaced by values that can be customized at build time. This patch does
that.

The patch also reverts to building version.h and customizing xeniface.inf
directly in build.py.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
MAINTAINERS
build.py
include/version.hx [deleted file]
src/win32stubagent/WmiAccessor.cpp
src/win32stubagent/w32xagent.rc
src/xeniface.inf
src/xeniface/xeniface.rc
vs2012/xeniface/xeniface.vcxproj
vs2012/xeniface_coinst/xeniface_coinst.vcxproj
vs2013/xeniface/xeniface.vcxproj
vs2013/xeniface_coinst/xeniface_coinst.vcxproj

index 09e9f6514819a9328e95733b649e213e6448221d..88cc97a0484cedd85dd41edfe85b584bc83c4fa7 100644 (file)
@@ -6,19 +6,34 @@ who will advise you on the precise procedure they wish to use.
 
 We also request you follow these basic guidelines:
 
-1.  Make sure you test your changes on both 32- and 64-bit versions of  Windows.
+1.  Make sure you test your changes on both a 32- and 64-bit version of Windows.
+    (The more versions of Windows you can test on the better).
 
 2.  Make sure your changes do not introduce any new prefast warnings.
 
-3.  All submissions must be made under the terms of the "Developer's Certificate
-    of Origin" (DC) and should include a Signed-off-by: line.
+3.  Make a patch available to the relevant maintainer in the list. Use 'diff -u'
+    to make the patch easy to merge. Be prepared to get your changes sent back
+    with seemingly silly requests about formatting and variable names. These
+    aren't as silly as they seem. One job the maintainers do is to keep things
+    looking the same.
 
-2.  All Submissions should use Unix line endings for consitency with the rest of
-    the XenServer project.
+    NOTE that all source should have Unix line endings.
 
-3.  Each patch should include a descriptive commit comment that helps understand
-    why the patch is necessary and why it works. This will be used both for
-    initial review and for new people to understand how the code works later
+    PLEASE see http://wiki.xen.org/wiki/Submitting_Xen_Patches for hints on how
+    to submit a patch in a suitable form. Whilst the PV driver source
+    repositories are distinct from the Xen Project hypervisor source, we will
+    follow the same general patch submission and review process.
+
+    PLEASE try to include any credit lines you want added with the  patch. It
+    avoids people being missed off by mistake and makes it easier to know who
+    wants adding and who doesn't.
+
+    PLEASE document known bugs. If it doesn't work for everything or does
+    something very odd once a month document it.
+
+    PLEASE remember that submissions must be made under the terms of the
+    "Developer's Certificate of Origin" (DCO) and should include a
+    Signed-off-by: line.
 
 4.  Make sure you have the right to submit any changes you make. If you do 
     changes at work you may find your employer owns the patches instead of 
index 5902d0705515a27bf81c897e9fc9efbf6fa37c3a..3be36b9410bfdc14ba72cb3b3dc3dc7af6391d92 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -29,55 +29,68 @@ def make_header():
 
     file = open('include\\version.h', 'w')
 
-    file.write('#define COMPANY_NAME_STR\t"' + os.environ['COMPANY_NAME'] + '"\n')
+    file.write('#define VENDOR_NAME_STR\t\t"' + os.environ['VENDOR_NAME'] + '"\n')
+    file.write('#define VENDOR_PREFIX_STR\t"' + os.environ['VENDOR_PREFIX'] + '"\n')
+
+    if 'VENDOR_DEVICE_ID' in os.environ.keys():
+        file.write('#define VENDOR_DEVICE_ID_STR\t"' + os.environ['VENDOR_DEVICE_ID'] + '"\n')
+
     file.write('#define PRODUCT_NAME_STR\t"' + os.environ['PRODUCT_NAME'] + '"\n')
     file.write('\n')
 
-    file.write('#define MAJOR_VERSION\t' + os.environ['MAJOR_VERSION'] + '\n')
+    file.write('#define OBJECT_PREFIX_STR\t"' + os.environ['OBJECT_PREFIX'] + '"\n')
+    file.write('#define OBJECT_GUID(_Name)\t' + os.environ['OBJECT_PREFIX'] + ' ## _Name ## _GUID\n')
+    file.write('\n')
+
+    file.write('#define MAJOR_VERSION\t\t' + os.environ['MAJOR_VERSION'] + '\n')
     file.write('#define MAJOR_VERSION_STR\t"' + os.environ['MAJOR_VERSION'] + '"\n')
     file.write('\n')
 
-    file.write('#define MINOR_VERSION\t' + os.environ['MINOR_VERSION'] + '\n')
+    file.write('#define MINOR_VERSION\t\t' + os.environ['MINOR_VERSION'] + '\n')
     file.write('#define MINOR_VERSION_STR\t"' + os.environ['MINOR_VERSION'] + '"\n')
     file.write('\n')
 
-    file.write('#define MICRO_VERSION\t' + os.environ['MICRO_VERSION'] + '\n')
+    file.write('#define MICRO_VERSION\t\t' + os.environ['MICRO_VERSION'] + '\n')
     file.write('#define MICRO_VERSION_STR\t"' + os.environ['MICRO_VERSION'] + '"\n')
     file.write('\n')
 
-    file.write('#define BUILD_NUMBER\t' + os.environ['BUILD_NUMBER'] + '\n')
+    file.write('#define BUILD_NUMBER\t\t' + os.environ['BUILD_NUMBER'] + '\n')
     file.write('#define BUILD_NUMBER_STR\t"' + os.environ['BUILD_NUMBER'] + '"\n')
     file.write('\n')
 
-    file.write('#define YEAR\t' + str(now.year) + '\n')
-    file.write('#define YEAR_STR\t"' + str(now.year) + '"\n')
+    file.write('#define YEAR\t\t\t' + str(now.year) + '\n')
+    file.write('#define YEAR_STR\t\t"' + str(now.year) + '"\n')
     file.write('\n')
 
-    file.write('#define MONTH\t' + str(now.month) + '\n')
-    file.write('#define MONTH_STR\t"' + str(now.month) + '"\n')
+    file.write('#define MONTH\t\t\t' + str(now.month) + '\n')
+    file.write('#define MONTH_STR\t\t"' + str(now.month) + '"\n')
     file.write('\n')
 
-    file.write('#define DAY\t' + str(now.day) + '\n')
-    file.write('#define DAY_STR\t"' + str(now.day) + '"\n')
+    file.write('#define DAY\t\t\t' + str(now.day) + '\n')
+    file.write('#define DAY_STR\t\t\t"' + str(now.day) + '"\n')
     file.write('\n')
 
-    file.write('#define OBJECT_PREFIX_STR\t"' + os.environ['OBJECT_PREFIX'] + '"\n')
-    file.write('#define OBJECT_GUID(_Name)\t' + os.environ['OBJECT_PREFIX'] + ' ## _Name ## _GUID\n')
-
     file.close()
 
 
-def copy_inf(name, vs):
+def copy_inf(vs, name):
     src = open('src\\%s.inf' % name, 'r')
-    dst = open(vs+'\\%s.inf' % name, 'w')
+    dst = open('%s\\%s.inf' % (vs, name), 'w')
 
     for line in src:
         line = re.sub('@MAJOR_VERSION@', os.environ['MAJOR_VERSION'], line)
         line = re.sub('@MINOR_VERSION@', os.environ['MINOR_VERSION'], line)
         line = re.sub('@MICRO_VERSION@', os.environ['MICRO_VERSION'], line)
         line = re.sub('@BUILD_NUMBER@', os.environ['BUILD_NUMBER'], line)
-        line = re.sub('@COMPANY_NAME@', os.environ['COMPANY_NAME'], line)
+        line = re.sub('@VENDOR_NAME@', os.environ['VENDOR_NAME'], line)
+        line = re.sub('@VENDOR_PREFIX@', os.environ['VENDOR_PREFIX'], line)
         line = re.sub('@PRODUCT_NAME@', os.environ['PRODUCT_NAME'], line)
+
+        if re.search('@VENDOR_DEVICE_ID@', line):
+            if 'VENDOR_DEVICE_ID' not in os.environ.keys():
+                continue
+            line = re.sub('@VENDOR_DEVICE_ID@', os.environ['VENDOR_DEVICE_ID'], line)
+
         dst.write(line)
 
     dst.close()
@@ -401,11 +414,11 @@ if __name__ == '__main__':
     driver = 'xeniface'
     vs = getVsVersion()
 
-    os.utime('include/version.hx', None)
-    os.utime('src/%s.inf' % driver, None)
+    if 'VENDOR_NAME' not in os.environ.keys():
+        os.environ['VENDOR_NAME'] = 'Xen Project'
 
-    if 'COMPANY_NAME' not in os.environ.keys():
-        os.environ['COMPANY_NAME'] = 'Xen Project'
+    if 'VENDOR_PREFIX' not in os.environ.keys():
+        os.environ['VENDOR_PREFIX'] = 'XP'
 
     if 'PRODUCT_NAME' not in os.environ.keys():
         os.environ['PRODUCT_NAME'] = 'Xen'
@@ -420,18 +433,27 @@ if __name__ == '__main__':
     if 'BUILD_NUMBER' not in os.environ.keys():
         os.environ['BUILD_NUMBER'] = next_build_number()
 
-    print("BUILD_NUMBER=%s" % os.environ['BUILD_NUMBER'])
-
     if 'GIT_REVISION' in os.environ.keys():
         revision = open('revision', 'w')
         print(os.environ['GIT_REVISION'], file=revision)
         revision.close()
 
-    #make_header()
+    print("VENDOR_NAME\t\t'%s'" % os.environ['VENDOR_NAME'])
+    print("VENDOR_PREFIX\t\t'%s'" % os.environ['VENDOR_PREFIX'])
+
+    if 'VENDOR_DEVICE_ID' in os.environ.keys():
+        print("VENDOR_DEVICE_ID\t'%s'" % os.environ['VENDOR_DEVICE_ID'])
 
-    #copy_mof(driver)
+    print("PRODUCT_NAME\t\t'%s'" % os.environ['PRODUCT_NAME'])
+    print("MAJOR_VERSION\t\t%s" % os.environ['MAJOR_VERSION'])
+    print("MINOR_VERSION\t\t%s" % os.environ['MINOR_VERSION'])
+    print("MICRO_VERSION\t\t%s" % os.environ['MICRO_VERSION'])
+    print("BUILD_NUMBER\t\t%s" % os.environ['BUILD_NUMBER'])
+    print()
 
-    #copy_inf(driver, vs)
+    make_header()
+    copy_inf(vs, driver)
+    copy_mof(driver)
 
     symstore_del(driver, 30)
 
diff --git a/include/version.hx b/include/version.hx
deleted file mode 100644 (file)
index a997c94..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) Citrix Systems Inc.
- * All rights reserved.
- * 
- * Redistribution and use in source and binary forms, 
- * with or without modification, are permitted provided 
- * that the following conditions are met:
- * 
- * *   Redistributions of source code must retain the above 
- *     copyright notice, this list of conditions and the 
- *     following disclaimer.
- * *   Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the 
- *     following disclaimer in the documentation and/or other 
- *     materials provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
- * SUCH DAMAGE.
- */
-
-#define COMPANY_NAME_STR       "@COMPANY_NAME@"
-#define PRODUCT_NAME_STR       "@PRODUCT_NAME@"
-
-#define MAJOR_VERSION  @MAJOR_VERSION@
-#define MAJOR_VERSION_STR      "@MAJOR_VERSION@"
-
-#define MINOR_VERSION  @MINOR_VERSION@
-#define MINOR_VERSION_STR      "@MINOR_VERSION@"
-
-#define MICRO_VERSION  @MICRO_VERSION@
-#define MICRO_VERSION_STR      "@MICRO_VERSION@"
-
-#define BUILD_NUMBER   @BUILD_NUMBER@
-#define BUILD_NUMBER_STR       "@BUILD_NUMBER@"
-
-#define YEAR   @YEAR@
-#define YEAR_STR       "@YEAR@"
-
-#define MONTH  @MONTH@
-#define MONTH_STR      "@MONTH@"
-
-#define DAY    @DAY@
-#define DAY_STR        "@DAY@"
-
-#define OBJECT_PREFIX_STR   "@OBJECT_PREFIX@"
-#define OBJECT_GUID(_Name)  @OBJECT_PREFIX@ ## _Name ## _GUID
-
index b4b09f2deb553073bf04fec898ab1d95580b1adb..b85ff8e1247e8e61c5f56d721450ac02f97b9e19 100644 (file)
@@ -862,7 +862,7 @@ IWbemClassObject *openSession(WMIAccessor** wmi, const char *sessionname)
 
     VARIANT var;
     var.vt = VT_BSTR;
-    var.bstrVal=formatBstr(COMPANY_NAME_STR " Xen Win32 Service : %s", sessionname);
+    var.bstrVal=formatBstr(VENDOR_NAME_STR " " PRODUCT_NAME_STR " Win32 Service : %s", sessionname);
 
     if (var.bstrVal == NULL)
         goto formatnamebstrfailed;
index 63083d9da9579f83b50fcf0fe77da3625908fae7..78e5cc78242ee70c6f085e473e9923c3d30e2253 100644 (file)
 
 #include <version.h>
 
-#define VER_COMPANYNAME_STR         COMPANY_NAME_STR
+#define VER_COMPANYNAME_STR         VENDOR_NAME_STR
 #define VER_LEGALCOPYRIGHT_STR      "Copyright (c) Citrix Systems Inc."
 
 #define VER_PRODUCTNAME_STR         "XENIFACE"
 #define VER_PRODUCTVERSION          MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_NUMBER
 #define VER_PRODUCTVERSION_STR      MAJOR_VERSION_STR "." MINOR_VERSION_STR "." MICRO_VERSION_STR "." BUILD_NUMBER_STR
 
-#define VER_INTERNALNAME_STR "w32xagent.exe"
-#define VER_FILEVERSION_STR "1.0"
-#define VER_FILEDESCRIPTION_STR "w32agent"
-#define VER_ORIGINALFILENAME_STR "w32xagent.exe"
+#define VER_INTERNALNAME_STR       "w32xagent.exe"
+#define VER_FILEVERSION_STR        "1.0"
+#define VER_FILEDESCRIPTION_STR     "w32agent"
+#define VER_ORIGINALFILENAME_STR    "w32xagent.exe"
 #define VER_FILETYPE VFT_APP
 #define VER_FILESUBTYPE 0
 
index 9d0b8053976459c1a79f01eb213402ac4bfc22a6..b3112b9615be672f0abab6dfd4ac5d0f9cff6f30 100644 (file)
@@ -32,7 +32,7 @@
 Signature="$WINDOWS NT$"
 Class=System
 ClassGUID={4d36e97d-e325-11ce-bfc1-08002be10318} 
-Provider=%Company%
+Provider=%Vendor%
 DriverVer=01/01/1900,0.0.0.0
 CatalogFile=xeniface.cat
 
@@ -42,15 +42,15 @@ Coinst.NT.Copy = 11
 ServiceDestDir.NT.Copy = 11
 
 [Manufacturer]
-%Company%=Inst,NT$ARCH$
+%Vendor%=Inst,NT$ARCH$
 
 [Inst.NT$ARCH$]
 ; DisplayName              Section           DeviceID
 ; -----------              -------           --------
 
-%XenIfaceDevice.DeviceDesc% =XenIface_Device, XENBUS\VEN_XSC000&DEV_IFACE&REV_08000009
-%XenIfaceDevice.DeviceDesc% =XenIface_Device, XENBUS\VEN_XS0001&DEV_IFACE&REV_08000009
-%XenIfaceDevice.DeviceDesc% =XenIface_Device, XENBUS\VEN_XS0002&DEV_IFACE&REV_08000009
+%XenIfaceDevice.DeviceDesc% =XenIface_Device, XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_IFACE&REV_08000009
+%XenIfaceDevice.DeviceDesc% =XenIface_Device, XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_IFACE&REV_08000009
+%XenIfaceDevice.DeviceDesc% =XenIface_Device, XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_IFACE&REV_08000009
 
 [XenIface_Device.NT$ARCH$]
 CopyFiles=XenIface_Device.NT.Copy, ServiceDestDir.NT.Copy
@@ -104,7 +104,7 @@ xeniface_coinst.dll=1,,
 
 [Strings]
 SPSVCINST_ASSOCSERVICE= 0x00000002
-Company= "@COMPANY_NAME@" 
+Vendor= "@VENDOR_NAME@" 
 DiskId1 = "@PRODUCT_NAME@ Interface Package"
 XenIfaceDevice.DeviceDesc = "@PRODUCT_NAME@ Interface"
 LITESVC_FLAGS= 0x00000800
index df1167d0f9e339d7a3d242448e89409deda6e293..890279991f71c73b42c5ad0359c65a9a91c66327 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <version.h>
 
-#define VER_COMPANYNAME_STR         COMPANY_NAME_STR
+#define VER_COMPANYNAME_STR         VENDOR_NAME_STR
 #define VER_LEGALCOPYRIGHT_STR      "Copyright (c) Citrix Systems Inc."
 
 #define VER_PRODUCTNAME_STR         "XENIFACE"
index 4220f31008bae32e3c6344940ac3c2a0066fc329..a3472baf4de035a8e6e5f248e3b18d07a7eae4b7 100644 (file)
        <PropertyGroup>
                <IncludePath>..\..\include;$(IncludePath)</IncludePath>
                <RunCodeAnalysis>true</RunCodeAnalysis>
-        <EnableInf2cat>false</EnableInf2cat>
-        <CustomBuildBeforeTargets>ClCompile;MofComp;StampInf</CustomBuildBeforeTargets>
+               <EnableInf2cat>false</EnableInf2cat>
                <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
                <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
        </PropertyGroup>
        
-    <ItemDefinitionGroup>
-        <CustomBuildStep>
-            <Command>echo "Build Inf"
-                powershell -Command "(Get-Content ..\..\src\xeniface.inf) -replace '@MAJOR_VERSION@', '$(MAJOR_VERSION)' -replace '@MINOR_VERSION@', '$(MINOR_VERSION)' -replace '@MICRO_VERSION@','$(MICRO_VERSION)' -replace '@BUILD_NUMBER@','$(BUILD_NUMBER)' -replace '@COMPANY_NAME@','$(COMPANY_NAME)' -replace '@PRODUCT_NAME@','$(PRODUCT_NAME)' | Set-Content ..\..\vs2012\xeniface.inf"
-                echo "Modify mof"
-                powershell -Command "(Get-Content ..\..\src\xeniface.mof)  -replace '@OBJECT_PREFIX@','$(OBJECT_PREFIX)' | Set-Content ..\..\src\xeniface\wmi.mof"
-            </Command>
-            <Outputs>..\..\vs2012\xeniface.inf;..\..\src\xeniface\wmi.mof</Outputs>
-            <Inputs>..\..\src\xeniface.inf;..\..\src\xeniface.mof</Inputs>
-        </CustomBuildStep>
-        
+    <ItemDefinitionGroup>       
                <ClCompile>
                        <PreprocessorDefinitions>__MODULE__="XENIFACE";POOL_NX_OPTIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
                        <WarningLevel>EnableAllWarnings</WarningLevel>
index 7e2f29dcb4861a1ed64ae2f9459c04eaee620789..2d75a07d047bc8a34d537ea9f05fc55970af29ee 100644 (file)
                <IncludePath>$(IncludePath)</IncludePath>
                <RunCodeAnalysis>true</RunCodeAnalysis>
                <EnableInf2cat>false</EnableInf2cat>
-        <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
                <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
                <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
        </PropertyGroup>
 
        <ItemDefinitionGroup>
-         <CustomBuildStep>
-            <Command>echo "Build version header"
-           powershell -Command "(Get-Content ..\..\include\version.hx) -replace '@MAJOR_VERSION@', '$(MAJOR_VERSION)' -replace '@MINOR_VERSION@', '$(MINOR_VERSION)' -replace '@MICRO_VERSION@','$(MICRO_VERSION)' -replace '@BUILD_NUMBER@','$(BUILD_NUMBER)' -replace '@COMPANY_NAME@','$(COMPANY_NAME)' -replace '@PRODUCT_NAME@','$(PRODUCT_NAME)' -replace '@DAY@',%24(Get-Date -format %25%25d) -replace '@MONTH@',%24(Get-Date -format %25%25M) -replace '@YEAR@',%24(Get-Date -format yyyy) -replace '@OBJECT_PREFIX@','$(OBJECT_PREFIX)' | Set-Content ..\..\include\version.h"
-           </Command>
-            <Outputs>..\..\include\version.h</Outputs>
-            <Inputs>..\..\include\version.hx</Inputs>
-        </CustomBuildStep>
-
                <ClCompile>
                        <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
                        <PreprocessorDefinitions>__MODULE__="XENIFACE_COINST";%(PreprocessorDefinitions)</PreprocessorDefinitions>
index 65743d47b2f34d1c4eea983a856e177dead90468..fea2ad1acf973bf29e84e33ef7b2e3105a38e47a 100644 (file)
     <IncludePath>..\..\include;$(IncludePath)</IncludePath>
     <RunCodeAnalysis>true</RunCodeAnalysis>
     <EnableInf2cat>false</EnableInf2cat>
-    <CustomBuildBeforeTargets>ClCompile;MofComp;StampInf</CustomBuildBeforeTargets>
     <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
     <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
   </PropertyGroup>
   <ItemDefinitionGroup>
-      <CustomBuildStep>
-            <Command>echo "Build Inf"
-                 powershell -Command "(Get-Content ..\..\src\xeniface.inf) -replace '@MAJOR_VERSION@', '$(MAJOR_VERSION)' -replace '@MINOR_VERSION@', '$(MINOR_VERSION)' -replace '@MICRO_VERSION@','$(MICRO_VERSION)' -replace '@BUILD_NUMBER@','$(BUILD_NUMBER)' -replace '@COMPANY_NAME@','$(COMPANY_NAME)' -replace '@PRODUCT_NAME@','$(PRODUCT_NAME)' | Set-Content ..\..\vs2013\xeniface.inf"
-                echo "Modify mof"
-                powershell -Command "(Get-Content ..\..\src\xeniface.mof)  -replace '@OBJECT_PREFIX@','$(OBJECT_PREFIX)' | Set-Content ..\..\src\xeniface\wmi.mof"
-            </Command>
-            <Outputs>..\..\vs2013\xeniface.inf;..\..\src\xeniface\wmi.mof</Outputs>
-            <Inputs>..\..\src\xeniface.inf;..\..\src\xeniface.mof</Inputs>
-        </CustomBuildStep>
     <ClCompile>
       <PreprocessorDefinitions>__MODULE__="XENIFACE";POOL_NX_OPTIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <WarningLevel>EnableAllWarnings</WarningLevel>
index b577dc83dfc5f0b6344bacbfc674766348cb654b..b80b908ea20c391ac4607033c27ba6a6fd43cf88 100644 (file)
     <IncludePath>$(IncludePath)</IncludePath>
     <RunCodeAnalysis>true</RunCodeAnalysis>
     <EnableInf2cat>false</EnableInf2cat>
-    <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
     <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
     <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
   </PropertyGroup>
   <ItemDefinitionGroup>
-    <CustomBuildStep>
-      <Command>echo "Build version header"
-      powershell -Command "(Get-Content ..\..\include\version.hx) -replace '@MAJOR_VERSION@', '$(MAJOR_VERSION)' -replace '@MINOR_VERSION@', '$(MINOR_VERSION)' -replace '@MICRO_VERSION@','$(MICRO_VERSION)' -replace '@BUILD_NUMBER@','$(BUILD_NUMBER)' -replace '@COMPANY_NAME@','$(COMPANY_NAME)' -replace '@PRODUCT_NAME@','$(PRODUCT_NAME)' -replace '@DAY@',%24(Get-Date -format %25%25d) -replace '@MONTH@',%24(Get-Date -format %25%25M) -replace '@YEAR@',%24(Get-Date -format yyyy) -replace '@OBJECT_PREFIX@','$(OBJECT_PREFIX)' | Set-Content ..\..\include\version.h"
-      </Command>
-      <Outputs>..\..\include\version.h</Outputs>
-      <Inputs>..\..\include\version.hx</Inputs>
-    </CustomBuildStep>
-
     <ClCompile>
       <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>__MODULE__="XENIFACE_COINST";%(PreprocessorDefinitions)</PreprocessorDefinitions>