Skip to content

Commit

Permalink
Version 1.1.0, exe nicht mehr kopieren
Browse files Browse the repository at this point in the history
  • Loading branch information
BerndK committed Nov 13, 2015
1 parent fc8757d commit 2990196
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
8 changes: 6 additions & 2 deletions SvgConverter/FileUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ public enum PathIs

public static class FileUtils
{

/// <summary>
/// Creates a relative path from one file or folder to another.
/// </summary>
/// <param name="fromPath">Contains the directory that defines the start of the relative path.</param>
/// <param name="fromIs">Is the fromPath a File or a Folder</param>
/// <param name="toPath">Contains the path that defines the endpoint of the relative path.</param>
/// <param name="toIs">Is the toPath a File or a Folder</param>
/// <returns>The relative path from the start directory to the end path or <c>toPath</c> if the paths are not related.</returns>
/// <exception cref="ArgumentNullException"></exception>
/// <exception cref="UriFormatException"></exception>
Expand All @@ -29,6 +30,7 @@ public static String MakeRelativePath(String fromPath, PathIs fromIs, String toP
if (String.IsNullOrEmpty(fromPath)) throw new ArgumentNullException("fromPath");
if (String.IsNullOrEmpty(toPath)) throw new ArgumentNullException("toPath");

//Slash am Ende anfügen, damit Uri damit klarkommt und weiß, was ein Folder ist, und was nicht
if (!fromPath.EndsWith(Path.DirectorySeparatorChar.ToString()) &&
!fromPath.EndsWith(Path.AltDirectorySeparatorChar.ToString()) &&
fromIs == PathIs.Folder)
Expand All @@ -52,7 +54,9 @@ public static String MakeRelativePath(String fromPath, PathIs fromIs, String toP
}
if (relativePath == string.Empty)
relativePath = ".\\";
return relativePath.TrimEnd(Path.DirectorySeparatorChar); //dies macht Probleme, insbesondere in CommandLine wenn quoted
//ein \ am Ende entfernen, dies macht Probleme, insbesondere in CommandLine wenn quoted
//zudem scheint der .Net - Standard zu sein, kein \ am Ende zu haben vgl. Path.GetDirectoryname()
return relativePath.TrimEnd(Path.DirectorySeparatorChar);
}
}
}
3 changes: 1 addition & 2 deletions SvgToXaml/Payload/T4Template.tt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Xml.Linq" #>
<#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #>
<#
<#@ import namespace="System.Collections.Generic" #><#
string xamlFile = Path.ChangeExtension(this.Host.TemplateFile, ".xaml");
string nameSpace;
string prefix;
Expand Down
4 changes: 2 additions & 2 deletions SvgToXaml/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
20 changes: 10 additions & 10 deletions SvgToXaml/ViewModels/SvgImagesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ private void BuildBatchFile(string outFileName, ResKeyInfo compResKeyInfo)

File.WriteAllText(Path.Combine(CurrentDir, "Update.cmd"), batchText);

//Copy ExeFile
var srcFile = Environment.GetCommandLineArgs().First();
var destFile = Path.Combine(CurrentDir, Path.GetFileName(srcFile));
//Console.WriteLine("srcFile:", srcFile);
//Console.WriteLine("destFile:", destFile);
if (!string.Equals(srcFile, destFile, StringComparison.OrdinalIgnoreCase))
{
Console.WriteLine("Copying file...");
File.Copy(srcFile, destFile, true);
}
////Copy ExeFile
//var srcFile = Environment.GetCommandLineArgs().First();
//var destFile = Path.Combine(CurrentDir, Path.GetFileName(srcFile));
////Console.WriteLine("srcFile:", srcFile);
////Console.WriteLine("destFile:", destFile);
//if (!string.Equals(srcFile, destFile, StringComparison.OrdinalIgnoreCase))
//{
// Console.WriteLine("Copying file...");
// File.Copy(srcFile, destFile, true);
//}
}
}

Expand Down
3 changes: 1 addition & 2 deletions WpfDemoApp/ImagesC/ImagesC.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Windows;

namespace WpfDemoApp.ImagesC
Expand Down
3 changes: 1 addition & 2 deletions WpfDemoApp/ImagesC/ImagesC.tt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Xml.Linq" #>
<#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #>
<#
<#@ import namespace="System.Collections.Generic" #><#
string xamlFile = Path.ChangeExtension(this.Host.TemplateFile, ".xaml");
string nameSpace;
string prefix;
Expand Down

0 comments on commit 2990196

Please sign in to comment.