-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from NetlifeBackupSolutions/use_version_1.6.2
Use version 1.6.2
- Loading branch information
Showing
105 changed files
with
3,572 additions
and
1,015 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
Winium/Microsoft.Phone.Tools.Deploy.Patched/DependencyFinder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
// Patched version of DependencyFinder for Windows 10 UWP manifest support | ||
// Type: Microsoft.Phone.Tools.Deploy.DependencyFinder | ||
// Assembly: Microsoft.Phone.Tools.Deploy, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 | ||
// MVID: 86EA135B-1DD4-4D0E-BB40-E685CB8C02D7 | ||
// Assembly location: C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy\Microsoft.Phone.Tools.Deploy.dll | ||
namespace Microsoft.Phone.Tools.Deploy.Patched | ||
{ | ||
#region | ||
|
||
using System; | ||
using System.IO; | ||
using System.Linq; | ||
|
||
using Microsoft.Phone.Tools.Common; | ||
|
||
#endregion | ||
|
||
public class DependencyFinder | ||
{ | ||
#region Public Methods and Operators | ||
|
||
public static string[] GetAppDependencyPackages(string packageFilePath) | ||
{ | ||
var info = Utils.ReadAppManifestInfoFromPackage(packageFilePath); | ||
|
||
return | ||
info.AppDependencies.Select(depend => GetAppDependencyPackageFileName(packageFilePath, depend, info)) | ||
.Where(dependencyPackageFileName => !string.IsNullOrEmpty(dependencyPackageFileName)) | ||
.ToArray(); | ||
} | ||
|
||
#endregion | ||
|
||
#region Methods | ||
|
||
private static bool DoesPackageFileMatchDependencyRequirement(string fileNameToCheck, AppDependency depend) | ||
{ | ||
// NOTE: Uses patched Utils | ||
var appManifestInfo = Utils.ReadAppManifestInfoFromPackage(fileNameToCheck); | ||
if (StringComparer.InvariantCultureIgnoreCase.Equals(appManifestInfo.Name, depend.Name)) | ||
{ | ||
return appManifestInfo.AppVersion >= depend.MinVersion; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
private static string FindMatchinDependencyRequirementInDirectory( | ||
string packageFileName, | ||
string directory, | ||
AppDependency depend) | ||
{ | ||
if (!Directory.Exists(directory)) | ||
{ | ||
return null; | ||
} | ||
|
||
foreach (var str in Directory.GetFiles(directory, "*.appx", SearchOption.AllDirectories)) | ||
{ | ||
if (!StringComparer.InvariantCultureIgnoreCase.Equals(packageFileName, str) | ||
&& DoesPackageFileMatchDependencyRequirement(str, depend)) | ||
{ | ||
return str; | ||
} | ||
} | ||
|
||
return null; | ||
} | ||
|
||
private static string GetAppDependencyPackageFileName( | ||
string packageFileName, | ||
AppDependency depend, | ||
IAppManifestInfo info) | ||
{ | ||
var path1 = Path.Combine(Path.GetDirectoryName(packageFileName), "Dependencies"); | ||
var str = Path.Combine(path1, info.ProcessorArchitecture); | ||
var strArray = new[] | ||
{ | ||
Path.GetDirectoryName(packageFileName), str, path1, Constants.WindowsPhoneApp81SDKRoot | ||
}; | ||
foreach (var directory in strArray) | ||
{ | ||
var requirementInDirectory = FindMatchinDependencyRequirementInDirectory( | ||
packageFileName, | ||
directory, | ||
depend); | ||
if (!string.IsNullOrEmpty(requirementInDirectory)) | ||
{ | ||
return requirementInDirectory; | ||
} | ||
} | ||
|
||
return null; | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Type: Microsoft.Phone.Tools.Deploy.DeviceInfo | ||
// Assembly: Microsoft.Phone.Tools.Deploy, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 | ||
// MVID: 86EA135B-1DD4-4D0E-BB40-E685CB8C02D7 | ||
// Assembly location: C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy\Microsoft.Phone.Tools.Deploy.dll | ||
namespace Microsoft.Phone.Tools.Deploy.Patched | ||
{ | ||
public class DeviceInfo | ||
{ | ||
#region Constructors and Destructors | ||
|
||
internal DeviceInfo(string deviceid, string deviceName) | ||
{ | ||
this.DeviceId = deviceid; | ||
this.DeviceName = deviceName; | ||
} | ||
|
||
#endregion | ||
|
||
#region Properties | ||
|
||
internal string DeviceId { get; private set; } | ||
|
||
internal string DeviceName { get; private set; } | ||
|
||
#endregion | ||
|
||
#region Public Methods and Operators | ||
|
||
public override string ToString() | ||
{ | ||
return this.DeviceName; | ||
} | ||
|
||
#endregion | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
Winium/Microsoft.Phone.Tools.Deploy.Patched/Microsoft.Phone.Tools.Deploy.Patched.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{13B4DF5C-E542-4A7A-8F00-929D423B522C}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Microsoft.Phone.Tools.Deploy.Patched</RootNamespace> | ||
<AssemblyName>Microsoft.Phone.Tools.Deploy.Patched</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\x86\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<DebugType>full</DebugType> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<ErrorReport>prompt</ErrorReport> | ||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> | ||
<OutputPath>bin\x86\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<ErrorReport>prompt</ErrorReport> | ||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Microsoft.Phone.Tools.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=x86" /> | ||
<Reference Include="Microsoft.Phone.Tools.Deploy"> | ||
<HintPath>C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy\Microsoft.Phone.Tools.Deploy.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.SmartDevice.Connectivity.Interface, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | ||
<Reference Include="Microsoft.SmartDevice.MultiTargeting.Connectivity, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.IO.Compression" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="DependencyFinder.cs" /> | ||
<Compile Include="DeviceInfo.cs" /> | ||
<Compile Include="Package10.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Utils.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
Oops, something went wrong.