]> granicus.if.org Git - graphviz/commitdiff
remove use of sed in Visual Studio files
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Feb 2021 05:18:38 +0000 (21:18 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 27 Feb 2021 18:12:09 +0000 (10:12 -0800)
It should now be possible to build Graphviz using Visual Studio on Windows
without sed installed.

lib/version/version.vcxproj

index 478a3d1992943f078948fbf9fa3385bd8ea67eb2..9c2a7d36ebddcdaa2b58384e18195b643a6d1b10 100644 (file)
@@ -94,8 +94,8 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </Link>
     <PreBuildEvent>
-      <Command>python3 $(SolutionDir)gen_version.py --committer-date-graphviz | sed "s/\(.*\)/#define BUILDDATE \"\1\"/" &gt; $(SolutionDir)windows\include\builddate.h
-python3 $(SolutionDir)gen_version.py | sed "s/\(.*\)/#define VERSION \"\1\"/" &gt; $(SolutionDir)windows\include\version.h
+      <Command>python3 $(SolutionDir)gen_version.py --committer-date-graphviz --definition &gt; $(SolutionDir)windows\include\builddate.h
+python3 $(SolutionDir)gen_version.py --definition &gt; $(SolutionDir)windows\include\version.h
 </Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -115,8 +115,8 @@ python3 $(SolutionDir)gen_version.py | sed "s/\(.*\)/#define VERSION \"\1\"/" &g
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </Link>
     <PreBuildEvent>
-      <Command>python3 $(SolutionDir)gen_version.py --committer-date-graphviz | sed "s/\(.*\)/#define BUILDDATE \"\1\"/" &gt; $(SolutionDir)windows\include\builddate.h
-python3 $(SolutionDir)gen_version.py | sed "s/\(.*\)/#define VERSION \"\1\"/" &gt; $(SolutionDir)windows\include\version.h
+      <Command>python3 $(SolutionDir)gen_version.py --committer-date-graphviz --definition &gt; $(SolutionDir)windows\include\builddate.h
+python3 $(SolutionDir)gen_version.py --definition &gt; $(SolutionDir)windows\include\version.h
 </Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -132,8 +132,8 @@ python3 $(SolutionDir)gen_version.py | sed "s/\(.*\)/#define VERSION \"\1\"/" &g
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </Link>
     <PreBuildEvent>
-      <Command>python3 $(SolutionDir)gen_version.py --committer-date-graphviz | sed "s/\(.*\)/#define BUILDDATE \"\1\"/" &gt; $(SolutionDir)windows\include\builddate.h
-python3 $(SolutionDir)gen_version.py | sed "s/\(.*\)/#define VERSION \"\1\"/" &gt; $(SolutionDir)windows\include\version.h
+      <Command>python3 $(SolutionDir)gen_version.py --committer-date-graphviz --definition &gt; $(SolutionDir)windows\include\builddate.h
+python3 $(SolutionDir)gen_version.py --definition &gt; $(SolutionDir)windows\include\version.h
 </Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -153,8 +153,8 @@ python3 $(SolutionDir)gen_version.py | sed "s/\(.*\)/#define VERSION \"\1\"/" &g
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </Link>
     <PreBuildEvent>
-      <Command>python3 $(SolutionDir)gen_version.py --committer-date-graphviz | sed "s/\(.*\)/#define BUILDDATE \"\1\"/" &gt; $(SolutionDir)windows\include\builddate.h
-python3 $(SolutionDir)gen_version.py | sed "s/\(.*\)/#define VERSION \"\1\"/" &gt; $(SolutionDir)windows\include\version.h
+      <Command>python3 $(SolutionDir)gen_version.py --committer-date-graphviz --definition &gt; $(SolutionDir)windows\include\builddate.h
+python3 $(SolutionDir)gen_version.py --definition &gt; $(SolutionDir)windows\include\version.h
 </Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>