aboutsummaryrefslogtreecommitdiff
path: root/build_msvc/msbuild
diff options
context:
space:
mode:
Diffstat (limited to 'build_msvc/msbuild')
-rw-r--r--build_msvc/msbuild/tasks/hexdump.targets53
-rw-r--r--build_msvc/msbuild/tasks/replaceinfile.targets35
2 files changed, 0 insertions, 88 deletions
diff --git a/build_msvc/msbuild/tasks/hexdump.targets b/build_msvc/msbuild/tasks/hexdump.targets
deleted file mode 100644
index 12868a9874..0000000000
--- a/build_msvc/msbuild/tasks/hexdump.targets
+++ /dev/null
@@ -1,53 +0,0 @@
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <UsingTask
- TaskName="HeaderFromHexdump"
- TaskFactory="CodeTaskFactory"
- AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll" >
- <ParameterGroup>
- <RawFilePath Required="true" />
- <HeaderFilePath Required="true" />
- <SourceHeader Required="true" />
- <SourceFooter Required="true" />
- </ParameterGroup>
- <Task>
- <Using Namespace="System"/>
- <Using Namespace="System.IO"/>
- <Code Type="Fragment" Language="cs">
-<![CDATA[
-Log.LogMessage("msbuild inline hexdump task for " + RawFilePath + ".");
-if(File.Exists(RawFilePath) == false) {
- Log.LogError("hexdump task could not locate " + RawFilePath + ".");
-}
-else {
- FileInfo inFileInfo = new FileInfo(RawFilePath);
- FileInfo outFileInfo = new FileInfo(HeaderFilePath);
-
- if (outFileInfo.Exists == false || inFileInfo.LastWriteTime > outFileInfo.LastWriteTime)
- {
- using (Stream inStm = File.OpenRead(RawFilePath))
- {
- using (StreamWriter sw = new StreamWriter(HeaderFilePath))
- {
- sw.WriteLine(SourceHeader);
- int count = 0;
- int rawChar = inStm.ReadByte();
- while(rawChar != -1)
- {
- sw.Write("0x{0:x2}, ", rawChar);
- count++;
- if(count % 8 == 0)
- {
- sw.WriteLine();
- }
- rawChar = inStm.ReadByte();
- }
- sw.WriteLine(SourceFooter);
- }
- }
- }
-}
-]]>
- </Code>
- </Task>
- </UsingTask>
-</Project> \ No newline at end of file
diff --git a/build_msvc/msbuild/tasks/replaceinfile.targets b/build_msvc/msbuild/tasks/replaceinfile.targets
deleted file mode 100644
index 2ccb8b30e0..0000000000
--- a/build_msvc/msbuild/tasks/replaceinfile.targets
+++ /dev/null
@@ -1,35 +0,0 @@
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <UsingTask
- TaskName="ReplaceInFile"
- TaskFactory="CodeTaskFactory"
- AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll" >
- <ParameterGroup>
- <FilePath Required="true" />
- <Replace Required="true" />
- <By Required="false" />
- <ToFullPath Required="false" />
- </ParameterGroup>
- <Task>
- <Using Namespace="System"/>
- <Using Namespace="System.IO"/>
- <Code Type="Fragment" Language="cs">
-<![CDATA[
-if(File.Exists(FilePath) == false) {
- Log.LogError("replaceinfile task could not locate " + FilePath + ".");
-}
-else {
- var data = File.ReadAllText(FilePath);
- var by = By;
- if (ToFullPath == "true")
- {
- by = Path.GetFullPath(by);
- }
- data = data.Replace(Replace, by);
- Log.LogMessage("Replace '" + Replace + "' by '" + by + "' in " + FilePath);
- File.WriteAllText(FilePath, data, new System.Text.UTF8Encoding(false));
-}
-]]>
- </Code>
- </Task>
- </UsingTask>
-</Project> \ No newline at end of file