Permalink
Browse files

adding solution

  • Loading branch information...
ferventcoder committed Dec 13, 2013
1 parent a4d7981 commit b3dbcb851d95e9c0bd7f9f0438b7b087405e7e12
Showing with 3,084 additions and 0 deletions.
  1. +6 −0 .nuget/NuGet.Config
  2. BIN .nuget/NuGet.exe
  3. +71 −0 .nuget/NuGet.targets
  4. +4 −0 .nuget/packages.config
  5. +59 −0 chocolatey.sln
  6. BIN chocolatey.snk
  7. +57 −0 src/chocolatey.console/Program.cs
  8. +4 −0 src/chocolatey.console/Properties/AssemblyInfo.cs
  9. +75 −0 src/chocolatey.console/chocolatey.console.csproj
  10. +5 −0 src/chocolatey.console/packages.config
  11. +213 −0 src/chocolatey.console/targets/Microsoft.Application.targets
  12. +6 −0 src/chocolatey.tests/App.config
  13. +36 −0 src/chocolatey.tests/Properties/AssemblyInfo.cs
  14. +59 −0 src/chocolatey.tests/TinySpec.cs
  15. +82 −0 src/chocolatey.tests/chocolatey.tests.csproj
  16. +6 −0 src/chocolatey.tests/packages.config
  17. +45 −0 src/chocolatey/AssemblyExtensions.cs
  18. +50 −0 src/chocolatey/LogExtensions.cs
  19. +13 −0 src/chocolatey/ObjectExtensions.cs
  20. +7 −0 src/chocolatey/Properties/AssemblyInfo.cs
  21. +64 −0 src/chocolatey/StringExtensions.cs
  22. +91 −0 src/chocolatey/chocolatey.csproj
  23. +11 −0 src/chocolatey/infrastructure/ApplicationParameters.cs
  24. +1,104 −0 src/chocolatey/infrastructure/commandline/Options.cs
  25. +8 −0 src/chocolatey/infrastructure/commands/CommandConstants.cs
  26. +65 −0 src/chocolatey/infrastructure/commands/CommandExecutor.cs
  27. +10 −0 src/chocolatey/infrastructure/configuration/ConfigurationSettings.cs
  28. +425 −0 src/chocolatey/infrastructure/filesystem/DotNetFileSystemService.cs
  29. +14 −0 src/chocolatey/infrastructure/licensing/LicenseValidation.cs
  30. +80 −0 src/chocolatey/infrastructure/logging/ILog.cs
  31. +55 −0 src/chocolatey/infrastructure/logging/Log.cs
  32. +61 −0 src/chocolatey/infrastructure/logging/Log4NetAppender.cs
  33. +78 −0 src/chocolatey/infrastructure/logging/Log4NetLog.cs
  34. +54 −0 src/chocolatey/infrastructure/logging/NullLog.cs
  35. +36 −0 src/chocolatey/infrastructure/logging/log4net.config.xml
  36. +70 −0 src/chocolatey/infrastructure/registration/Bootstrap.cs
  37. +13 −0 src/chocolatey/infrastructure/runners/ChocolateyInstallRunner.cs
  38. +43 −0 src/chocolatey/infrastructure/tokens/TokenReplacer.cs
  39. +4 −0 src/chocolatey/packages.config
View
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
View
Binary file not shown.
View
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<!-- Windows specific commands -->
<NuGetToolsPath Condition=" '$(OS)' == 'Windows_NT'">$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<PackagesConfig Condition=" '$(OS)' == 'Windows_NT'">$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
<PackagesDir Condition=" '$(OS)' == 'Windows_NT'">$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath Condition=" '$(OS)' != 'Windows_NT'">$(SolutionDir).nuget</NuGetToolsPath>
<PackagesConfig Condition=" '$(OS)' != 'Windows_NT' ">packages.config</PackagesConfig>
<PackagesDir Condition=" '$(OS)' != 'Windows_NT'">$(SolutionDir)packages</PackagesDir>
<!-- NuGet command -->
<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
<!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
<PackageSources>""</PackageSources>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition="$(RestorePackages) == ''">false</RestorePackages>
<!-- Property that enables building a package from a project -->
<BuildPackage Condition="$(BuildPackage) == ''">false</BuildPackage>
<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source $(PackageSources) -o "$(PackagesDir)"</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>
<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="!Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />
<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>
</Project>
View
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NuGetEnablePackageRestore" version="2.0.0" />
</packages>
View
@@ -0,0 +1,59 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chocolatey.console", "src\chocolatey.console\chocolatey.console.csproj", "{E24E3386-244F-4404-9E6E-5B53818EA903}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chocolatey.tests", "src\chocolatey.tests\chocolatey.tests.csproj", "{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7656D054-387D-409C-A9FB-62A44599AA77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chocolatey", "src\chocolatey\chocolatey.csproj", "{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E24E3386-244F-4404-9E6E-5B53818EA903}.Debug|Any CPU.ActiveCfg = Debug|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Debug|Mixed Platforms.Build.0 = Debug|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Debug|x86.ActiveCfg = Debug|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Debug|x86.Build.0 = Debug|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Release|Any CPU.ActiveCfg = Release|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Release|Mixed Platforms.ActiveCfg = Release|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Release|Mixed Platforms.Build.0 = Release|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Release|x86.ActiveCfg = Release|x86
{E24E3386-244F-4404-9E6E-5B53818EA903}.Release|x86.Build.0 = Release|x86
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Debug|x86.ActiveCfg = Debug|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Release|Any CPU.Build.0 = Release|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Release|x86.ActiveCfg = Release|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Debug|x86.ActiveCfg = Debug|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Release|Any CPU.Build.0 = Release|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{5C4C60F0-47B1-498E-ABF7-D315E1A94BC9} = {7656D054-387D-409C-A9FB-62A44599AA77}
EndGlobalSection
EndGlobal
View
Binary file not shown.
@@ -0,0 +1,57 @@
namespace chocolatey
{
using System;
using System.IO;
using System.Reflection;
using infrastructure;
using infrastructure.licensing;
using infrastructure.logging;
using infrastructure.registration;
using infrastructure.runners;
public class Program
{
private static void Main(string[] args)
{
var output_directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), ApplicationParameters.name,"logs");
if (!Directory.Exists(output_directory)) Directory.CreateDirectory(output_directory);
Log4NetAppender.configure(output_directory);
Bootstrap.initialize();
Bootstrap.startup();
try
{
"chocolatey".Log().Info(()=> "Starting {0}".FormatWith(ApplicationParameters.name));
var current_assembly = Assembly.GetExecutingAssembly().Location;
var assembly_dir = Path.GetDirectoryName(current_assembly);
var licencse_file = Path.Combine(assembly_dir, "license.xml");
LicenseValidation.Validate(licencse_file);
var runner = new ChocolateyInstallRunner();
runner.run(args);
#if DEBUG
Console.WriteLine("Press enter to continue...");
Console.ReadKey();
#endif
Environment.Exit(0);
}
catch (Exception ex)
{
"chocolatey".Log().Error(() => "{0} had an error on {1} (with user {2}):{3}{4}".FormatWith(
ApplicationParameters.name,
Environment.MachineName,
Environment.UserName,
Environment.NewLine,
ex.ToString()));
#if DEBUG
Console.WriteLine("Press enter to continue...");
Console.ReadKey();
#endif
Environment.Exit(1);
}
}
}
}
@@ -0,0 +1,4 @@
using System.Runtime.InteropServices;
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2f406051-3fe2-45f4-97bf-40968b86c5a9")]
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E24E3386-244F-4404-9E6E-5B53818EA903}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>chocolatey</RootNamespace>
<AssemblyName>choco</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>false</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\SolutionVersion.cs">
<Link>Properties\SolutionVersion.cs</Link>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="targets\Microsoft.Application.targets" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\chocolatey\chocolatey.csproj">
<Project>{5563DC61-35FD-4FAB-B331-9AE1FDB23F80}</Project>
<Name>chocolatey</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project=".\targets\Microsoft.Application.targets" />
<Import Project="..\..\.nuget\NuGet.targets" Condition="Exists('..\..\.nuget\NuGet.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>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="1.2.10" allowedVersions="[1.2.10]" />
<package id="PublishedApplications" version="2.4.0.0" targetFramework="net40" />
</packages>
Oops, something went wrong.

0 comments on commit b3dbcb8

Please sign in to comment.