Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  (version) 0.10.6.1
  (doc) update CHANGELOG/nuspec
  (GH-1321) Fix: shimgen fails w/unrecognized option
  (doc) note what cacheLocation replaces
  (GH-1319) Delete choco.exe.old failure silent
  (maint) formatting
  (GH-1318) GetChocolatey - ensure one run as admin
  (GH-1318) Fix - Do not fail extracting at runtime
  (GH-1318) Extractor option to not throw error
  (maint) remove unused code
  • Loading branch information
ferventcoder committed Jun 3, 2017
2 parents 297887d + 8d1f4e1 commit abd62bf
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 246 deletions.
2 changes: 1 addition & 1 deletion .uppercut
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<property name="version.major" value="0" overwrite="false" />
<property name="version.minor" value="10" overwrite="false" />
<property name="version.patch" value="6" overwrite="false" />
<property name="version.fix" value="0" overwrite="false" />
<property name="version.fix" value="1" overwrite="false" />
<property name="version.nuget.prerelease" value="" overwrite="false" />
<property name="version.use.build_date" value="false" overwrite="false" />
<property name="assembly.description" value="${project.name} is a product of ${company.name} - All Rights Reserved." overwrite="false" />
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ This covers changes for the "chocolatey" and "chocolatey.lib" packages, which ar

**NOTE**: If you have a licensed edition of Chocolatey ("chocolatey.extension"), refer to this in tandem with [Chocolatey Licensed CHANGELOG](https://github.com/chocolatey/choco/blob/master/CHANGELOG_LICENSED.md).

## [0.10.6.1](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.6.1+is%3Aclosed) (June 3, 2017)

### BUG FIXES
* Fix - shimgen fails with unrecognized option: '/errorendlocation' in .NET 4.0 only environments - see [#1321](https://github.com/chocolatey/choco/issues/1321)
* Fix - Do not fail extracting resources at runtime - see [#1318](https://github.com/chocolatey/choco/issues/1318)
* Fix - Silently fail when deleting choco.exe.old - see [#1319](https://github.com/chocolatey/choco/issues/1319)


## [0.10.6](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.6+is%3Aclosed) (June 1, 2017)

This release includes fixes and adjustments to the API to make it more usable. Search / List has also been improved with the data that it returns when verbose/detailed, along with info always returning a package with information instead of erroring sometimes. The search results from the community package repository now match what you see on the website.
Expand Down
8 changes: 8 additions & 0 deletions nuget/chocolatey/chocolatey.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ In that mess there is a link to the [PowerShell Chocolatey module reference](htt
<releaseNotes>
See all - https://github.com/chocolatey/choco/blob/stable/CHANGELOG.md

## 0.10.6.1

### BUG FIXES
* Fix - shimgen fails with unrecognized option: '/errorendlocation' in .NET 4.0 only environments - see [#1321](https://github.com/chocolatey/choco/issues/1321)
* Fix - Do not fail extracting resources at runtime - see [#1318](https://github.com/chocolatey/choco/issues/1318)
* Fix - Silently fail when deleting choco.exe.old - see [#1319](https://github.com/chocolatey/choco/issues/1319)


## 0.10.6

This release includes fixes and adjustments to the API to make it more usable. Search / List has also been improved with the data that it returns when verbose/detailed, along with info always returning a package with information instead of erroring sometimes. The search results from the community package repository now match what you see on the website.
Expand Down
28 changes: 16 additions & 12 deletions src/chocolatey.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace chocolatey.console
using infrastructure.licensing;
using infrastructure.logging;
using infrastructure.registration;
using infrastructure.tolerance;
using resources;
using Assembly = infrastructure.adapters.Assembly;
using Console = System.Console;
Expand Down Expand Up @@ -109,7 +110,7 @@ private static void Main(string[] args)
if (config.HelpRequested || config.UnsuccessfulParsing)
{
pause_execution_if_debug();
Environment.Exit(config.UnsuccessfulParsing? 1 : 0);
Environment.Exit(config.UnsuccessfulParsing ? 1 : 0);
}

var verboseAppenderName = "{0}LoggingColoredConsoleAppender".format_with(ChocolateyLoggers.Verbose.to_string());
Expand All @@ -122,7 +123,7 @@ private static void Main(string[] args)

remove_old_chocolatey_exe(fileSystem);

AssemblyFileExtractor.extract_all_resources_to_relative_directory(fileSystem, Assembly.GetAssembly(typeof(Program)), ApplicationParameters.InstallLocation, new List<string>(), "chocolatey.console");
AssemblyFileExtractor.extract_all_resources_to_relative_directory(fileSystem, Assembly.GetAssembly(typeof(Program)), ApplicationParameters.InstallLocation, new List<string>(), "chocolatey.console", throwError:false);
//refactor - thank goodness this is temporary, cuz manifest resource streams are dumb
IList<string> folders = new List<string>
{
Expand All @@ -131,7 +132,7 @@ private static void Main(string[] args)
"redirects",
"tools"
};
AssemblyFileExtractor.extract_all_resources_to_relative_directory(fileSystem, Assembly.GetAssembly(typeof(ChocolateyResourcesAssembly)), ApplicationParameters.InstallLocation, folders, ApplicationParameters.ChocolateyFileResources);
AssemblyFileExtractor.extract_all_resources_to_relative_directory(fileSystem, Assembly.GetAssembly(typeof(ChocolateyResourcesAssembly)), ApplicationParameters.InstallLocation, folders, ApplicationParameters.ChocolateyFileResources, throwError: false);

var application = new ConsoleApplication();
application.run(args, config, container);
Expand Down Expand Up @@ -226,15 +227,18 @@ private static void trap_exit_scenarios(ChocolateyConfiguration config)

private static void remove_old_chocolatey_exe(IFileSystem fileSystem)
{
try
{
fileSystem.delete_file(fileSystem.get_current_assembly_path() + ".old");
fileSystem.delete_file(fileSystem.combine_paths(AppDomain.CurrentDomain.BaseDirectory, "choco.exe.old"));
}
catch (Exception ex)
{
"chocolatey".Log().Warn("Attempting to delete choco.exe.old ran into an issue:{0} {1}".format_with(Environment.NewLine, ex.Message));
}
FaultTolerance.try_catch_with_logging_exception(
() =>
{
fileSystem.delete_file(fileSystem.get_current_assembly_path() + ".old");
fileSystem.delete_file(fileSystem.combine_paths(AppDomain.CurrentDomain.BaseDirectory, "choco.exe.old"));
},
errorMessage: "Attempting to delete choco.exe.old ran into an issue",
throwError: false,
logWarningInsteadOfError: true,
logDebugInsteadOfError: false,
isSilent: true
);
}

private static void pause_execution_if_debug()
Expand Down
Binary file modified src/chocolatey.resources/tools/shimgen.exe
Binary file not shown.
62 changes: 38 additions & 24 deletions src/chocolatey.resources/tools/shimgen.license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,60 @@ Copyright (C) 2013 - 2017 RealDimensions Software, LLC ("RDS")
===================================================================
Grant of License
===================================================================
You may use Shim Generator ("shimgen.exe") only with the official Chocolatey
client. The use of shimgen.exe for any other reason is strictly prohibited.
ATTENTION: Shim Generator ("shimgen.exe") is a closed source application with
a proprietary license and its use is strictly limited to the terms of this
license agreement.

If you would like to use this software for any other reason, you must obtain a
personal or commercial license to do so. To do that you must contact RDS at
ferventcoder.com.
RealDimensions Software, LLC ("RDS") grants Chocolatey Software, Inc a revocable,
non-exclusive license to distribute and use shimgen.exe with the official
Chocolatey client (https://chocolatey.org). This license file must be stored in
Chocolatey source next to shimgen.exe and distributed with every copy of
shimgen.exe. The distribution or use of shimgen.exe outside of these terms
without the express written permission of RDS is strictly prohibited.

This software is not free to distribute apart from the Chocolatey client. If you
would like to distribute this software outside of use through Chocolatey, you
must receive written permission from the software owner.
While the source for shimgen.exe is closed source, the shims have reference
source at https://github.com/chocolatey/shimgen/tree/master/shim.

===================================================================
End-User License Agreement
===================================================================
EULA - Shim Generator

IMPORTANT- READ CAREFULLY: This RealDimensions Software ("RDS") End-User License
Agreement ("EULA") is a legal agreement between you ("END USER") and RDS for all
IMPORTANT- READ CAREFULLY: This RealDimensions Software, LLC ("RDS") End-User License
Agreement ("EULA") is a legal agreement between you ("END USER") and RDS for all
RDS products, controls, source code, demos, intermediate files, media, printed
materials, and "online" or electronic documentation ("SOFTWARE PRODUCT(S)")
contained with this distribution.
materials, and "online" or electronic documentation (collectively "SOFTWARE
PRODUCT(S)") contained with this distribution.

RDS grants to END USER as an individual, a personal, nonexclusive license to
install and use the SOFTWARE PRODUCT(S) for the sole purpose of use with the
RDS grants to you as an individual or entity, a personal, non-exclusive license
to install and use the SOFTWARE PRODUCT(S) for the sole purpose of use with the
official Chocolatey client. By installing, copying, or otherwise using the
SOFTWARE PRODUCT(S), END USER agrees to be bound by the terms of this EULA. If
END USER does not agree to any part of the terms of this EULA, DO NOT INSTALL,
USE, OR EVALUATE, ANY PART, FILE OR PORTION OF THE SOFTWARE PRODUCT(S).

ALL SOFTWARE PRODUCT(S) are licensed not sold. If END USER is an individual,
END USER must acquire an individual license for the SOFTWARE PRODUCT(S) from RDS
or its authorized resellers. If END USER is an entity, END USER must acquire an
individual license for each machine running the SOFTWARE PRODUCT(S) within your
organization from RDS or its authorized resellers. Both Virtual and Physical
Machines running the SOFTWARE PRODUCT(S) must be counted in the SOFTWARE
PRODUCT(S) licenses quantity of the organization.
In no event shall RDS be liable to END USER for damages, including any direct,
indirect, special, incidental, or consequential damages of any character arising
as a result of the use or inability to use the SOFTWARE PRODUCT(S) (including
but not limited to damages for loss of goodwill, work stoppage, computer failure
or malfunction, or any and all other commercial damages or losses).

The liability of RDS to END USER for any reason and upon any cause of action
related to the performance of the work under this agreement whether in tort or
in contract or otherwise shall be limited to the amount paid by the END USER to
RDS pursuant to this agreement or as determined by written agreement signed
by both RDS and END USER.

ALL SOFTWARE PRODUCT(S) are licensed not sold. If you are an individual, you
must acquire an individual license for the SOFTWARE PRODUCT(S) from RDS or its
authorized resellers. If you are an entity, you must acquire an individual license
for each machine running the SOFTWARE PRODUCT(S) within your organization from RDS
or its authorized resellers. Both virtual and physical machines running the SOFTWARE
PRODUCT(S) must be counted in the SOFTWARE PRODUCT(S) licenses quantity of the
organization.

===================================================================
Commercial / Personal Licensing
===================================================================
Shim Generator (shimgen.exe) is also offered under personal and commercial
licenses. You can learn more about this option by contacting RDS at
http://ferventcoder.com
Shim Generator ("shimgen.exe") is also offered under personal and commercial
licenses. You can learn more by contacting RDS at http://ferventcoder.com.
3 changes: 2 additions & 1 deletion src/chocolatey/GetChocolatey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ private void extract_resources()
}
catch (Exception ex)
{
this.Log().Error("Unable to extract resources. Please ensure the ChocolateyInstall environment variable is set properly. Details:{0} {1}".format_with(Environment.NewLine,ex.ToString()));
this.Log().Warn(ChocolateyLoggers.Important, "Please ensure that ChocolateyInstall environment variable is set properly and you've run once as an administrator to ensure all resources are extracted.");
this.Log().Error("Unable to extract resources. Please ensure the ChocolateyInstall environment variable is set properly. You may need to run once as an admin to ensure all resources are extracted. Details:{0} {1}".format_with(Environment.NewLine,ex.ToString()));
}

}
Expand Down
2 changes: 0 additions & 2 deletions src/chocolatey/chocolatey.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@
<Compile Include="infrastructure.app\domain\RegistryValueExtensions.cs" />
<Compile Include="infrastructure.app\domain\RegistryValueKindType.cs" />
<Compile Include="infrastructure.app\events\HandlePackageResultCompletedMessage.cs" />
<Compile Include="infrastructure.app\services\FileTypeDetectorService.cs" />
<Compile Include="infrastructure.app\services\IFileTypeDetectorService.cs" />
<Compile Include="infrastructure.app\utility\ArgumentsUtility.cs" />
<Compile Include="infrastructure\synchronization\GlobalMutex.cs" />
<Compile Include="infrastructure\logging\TraceLog.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private static void set_machine_sources(ChocolateyConfiguration config, ConfigFi

private static void set_config_items(ChocolateyConfiguration config, ConfigFileSettings configFileSettings, IFileSystem fileSystem)
{
config.CacheLocation = Environment.ExpandEnvironmentVariables(set_config_item(ApplicationParameters.ConfigSettings.CacheLocation, configFileSettings, string.IsNullOrWhiteSpace(configFileSettings.CacheLocation) ? string.Empty : configFileSettings.CacheLocation, "Cache location if not TEMP folder."));
config.CacheLocation = Environment.ExpandEnvironmentVariables(set_config_item(ApplicationParameters.ConfigSettings.CacheLocation, configFileSettings, string.IsNullOrWhiteSpace(configFileSettings.CacheLocation) ? string.Empty : configFileSettings.CacheLocation, "Cache location if not TEMP folder. Replaces `$env:TEMP` value."));
if (string.IsNullOrWhiteSpace(config.CacheLocation)) {
config.CacheLocation = fileSystem.get_temp_path(); // System.Environment.GetEnvironmentVariable("TEMP");
// TEMP gets set in EnvironmentSettings, so it may already have
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
namespace chocolatey.infrastructure.app.registration
{
using System.Collections.Generic;
using configuration;
using infrastructure.events;
using infrastructure.tasks;
using NuGet;
using SimpleInjector;
using adapters;
using commands;
using cryptography;
using filesystem;
using infrastructure.commands;
using infrastructure.configuration;
Expand Down Expand Up @@ -70,7 +68,6 @@ public void RegisterComponents(Container container)
container.Register<IChocolateyConfigSettingsService, ChocolateyConfigSettingsService>(Lifestyle.Singleton);
container.Register<IChocolateyPackageService, ChocolateyPackageService>(Lifestyle.Singleton);
container.Register<IAutomaticUninstallerService, AutomaticUninstallerService>(Lifestyle.Singleton);
container.Register<IFileTypeDetectorService, FileTypeDetectorService>(Lifestyle.Singleton);
container.Register<ICommandExecutor, CommandExecutor>(Lifestyle.Singleton);
container.Register(() => new CustomString(string.Empty));

Expand Down
Loading

0 comments on commit abd62bf

Please sign in to comment.