From e14cee6bd2ff8f2399c6b07c7097a90247179712 Mon Sep 17 00:00:00 2001 From: Sayed Ibrahim Hashimi Date: Tue, 3 May 2016 17:05:47 -0700 Subject: [PATCH] moving files --- .../PecanWaffle.sln => PecanWaffle.sln | 0 .../PecanWaffleSamplesVs.csproj | 71 ----------- .../PecanWaffleSamplesVs/packages.config | 4 - .../PecanWaffleSamplesVs.csproj | 117 ++++++++++++++++++ .../Properties/AssemblyInfo.cs | 0 .../Properties/pecan-waffle-settings.props | 13 ++ PecanWaffleSamplesVs/SolutionWizard.cs | 57 +++++++++ .../index.html | 0 PecanWaffleSamplesVs/packages.config | 7 ++ .../source.extension.vsixmanifest | 0 .../stylesheet.css | 0 11 files changed, 194 insertions(+), 75 deletions(-) rename PecanWaffle/PecanWaffle.sln => PecanWaffle.sln (100%) delete mode 100644 PecanWaffle/PecanWaffleSamplesVs/PecanWaffleSamplesVs.csproj delete mode 100644 PecanWaffle/PecanWaffleSamplesVs/packages.config create mode 100644 PecanWaffleSamplesVs/PecanWaffleSamplesVs.csproj rename {PecanWaffle/PecanWaffleSamplesVs => PecanWaffleSamplesVs}/Properties/AssemblyInfo.cs (100%) create mode 100644 PecanWaffleSamplesVs/Properties/pecan-waffle-settings.props create mode 100644 PecanWaffleSamplesVs/SolutionWizard.cs rename {PecanWaffle/PecanWaffleSamplesVs => PecanWaffleSamplesVs}/index.html (100%) create mode 100644 PecanWaffleSamplesVs/packages.config rename {PecanWaffle/PecanWaffleSamplesVs => PecanWaffleSamplesVs}/source.extension.vsixmanifest (100%) rename {PecanWaffle/PecanWaffleSamplesVs => PecanWaffleSamplesVs}/stylesheet.css (100%) diff --git a/PecanWaffle/PecanWaffle.sln b/PecanWaffle.sln similarity index 100% rename from PecanWaffle/PecanWaffle.sln rename to PecanWaffle.sln diff --git a/PecanWaffle/PecanWaffleSamplesVs/PecanWaffleSamplesVs.csproj b/PecanWaffle/PecanWaffleSamplesVs/PecanWaffleSamplesVs.csproj deleted file mode 100644 index 25a6455..0000000 --- a/PecanWaffle/PecanWaffleSamplesVs/PecanWaffleSamplesVs.csproj +++ /dev/null @@ -1,71 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - Debug - AnyCPU - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {C82C0675-24C6-4660-9564-A58BEB5B7B50} - Library - Properties - PecanWaffleSamplesVs - PecanWaffleSamplesVs - v4.5 - false - true - false - false - false - false - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - Designer - - - - - - - - - ..\packages\pecan-waffle.0.0.15-beta\lib\PecanWaffle.dll - True - - - - - - \ No newline at end of file diff --git a/PecanWaffle/PecanWaffleSamplesVs/packages.config b/PecanWaffle/PecanWaffleSamplesVs/packages.config deleted file mode 100644 index da51bc3..0000000 --- a/PecanWaffle/PecanWaffleSamplesVs/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/PecanWaffleSamplesVs/PecanWaffleSamplesVs.csproj b/PecanWaffleSamplesVs/PecanWaffleSamplesVs.csproj new file mode 100644 index 0000000..3640112 --- /dev/null +++ b/PecanWaffleSamplesVs/PecanWaffleSamplesVs.csproj @@ -0,0 +1,117 @@ + + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + Debug + AnyCPU + 2.0 + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {C82C0675-24C6-4660-9564-A58BEB5B7B50} + Library + Properties + PecanWaffleSamplesVs + PecanWaffleSamplesVs + v4.5 + false + true + false + false + false + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + Designer + + + + + + + + + ..\packages\file-replacer.0.4.5-beta\lib\dotnet\LigerShark.FileReplacer.dll + True + + + ..\packages\pecan-waffle.0.0.15-beta\lib\PecanWaffle.dll + True + + + + + + False + + + False + + + False + + + False + + + + + + + + True + + + True + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + \ No newline at end of file diff --git a/PecanWaffle/PecanWaffleSamplesVs/Properties/AssemblyInfo.cs b/PecanWaffleSamplesVs/Properties/AssemblyInfo.cs similarity index 100% rename from PecanWaffle/PecanWaffleSamplesVs/Properties/AssemblyInfo.cs rename to PecanWaffleSamplesVs/Properties/AssemblyInfo.cs diff --git a/PecanWaffleSamplesVs/Properties/pecan-waffle-settings.props b/PecanWaffleSamplesVs/Properties/pecan-waffle-settings.props new file mode 100644 index 0000000..bcb1002 --- /dev/null +++ b/PecanWaffleSamplesVs/Properties/pecan-waffle-settings.props @@ -0,0 +1,13 @@ + + + + + $(WINDIR)\System32\WindowsPowerShell\v1.0\powershell.exe + dev + Output\ProjectTemplates\CSharp\Pecan Waffle\Multi Project Samples\ + false + ..\packages\ + $(MSBuildProjectDirectory)\templates\ + + + \ No newline at end of file diff --git a/PecanWaffleSamplesVs/SolutionWizard.cs b/PecanWaffleSamplesVs/SolutionWizard.cs new file mode 100644 index 0000000..d462974 --- /dev/null +++ b/PecanWaffleSamplesVs/SolutionWizard.cs @@ -0,0 +1,57 @@ +using PecanWaffle; +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Reflection; +using System.Threading; + +namespace PecanWaffleSamplesVs { + public class SolutionWizard : ProjectWizard { + public SolutionWizard() : base() { + ExtensionInstallDir = (new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName); + Properties["ExtensionInstallDir"] = ExtensionInstallDir; + } + + public override void RunStarted(object automationObject, Dictionary replacementsDictionary, Microsoft.VisualStudio.TemplateWizard.WizardRunKind runKind, object[] customParams) { + EnsurePecanWaffleExtracted(); + + base.RunStarted(automationObject, replacementsDictionary, runKind, customParams); + } + public override void RunFinished() { + // set templatesource + if (string.IsNullOrWhiteSpace(TemplateSource)) { + TemplateSource = ExtensionInstallDir; + } + + base.RunFinished(); + } + + protected string PecanWaffleLocalModulePath + { + get + { + return Path.Combine(ExtensionInstallDir, @"PwModules\"); + } + } + + private void EnsurePecanWaffleExtracted() { + if (!Directory.Exists(PecanWaffleLocalModulePath)) { + var swDir = new DirectoryInfo(ExtensionInstallDir); + var foundFiles = swDir.GetFiles("*.nupkg"); + if (foundFiles == null || foundFiles.Length <= 0) { + throw new FileNotFoundException(string.Format("Didn't find any files matching TemplateBuilder*.nupkg in [{0}]", swDir.FullName)); + } + + foreach (var file in foundFiles) { + var pkgdir = Path.Combine(PecanWaffleLocalModulePath, file.Name); + if (!Directory.Exists(pkgdir)) { + Directory.CreateDirectory(pkgdir); + } + ZipFile.ExtractToDirectory(file.FullName, pkgdir); + } + } + } + + } +} diff --git a/PecanWaffle/PecanWaffleSamplesVs/index.html b/PecanWaffleSamplesVs/index.html similarity index 100% rename from PecanWaffle/PecanWaffleSamplesVs/index.html rename to PecanWaffleSamplesVs/index.html diff --git a/PecanWaffleSamplesVs/packages.config b/PecanWaffleSamplesVs/packages.config new file mode 100644 index 0000000..7c772d6 --- /dev/null +++ b/PecanWaffleSamplesVs/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/PecanWaffle/PecanWaffleSamplesVs/source.extension.vsixmanifest b/PecanWaffleSamplesVs/source.extension.vsixmanifest similarity index 100% rename from PecanWaffle/PecanWaffleSamplesVs/source.extension.vsixmanifest rename to PecanWaffleSamplesVs/source.extension.vsixmanifest diff --git a/PecanWaffle/PecanWaffleSamplesVs/stylesheet.css b/PecanWaffleSamplesVs/stylesheet.css similarity index 100% rename from PecanWaffle/PecanWaffleSamplesVs/stylesheet.css rename to PecanWaffleSamplesVs/stylesheet.css