Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  (maint) update links for pro
  (maint) update tab expansion
  (maint) let the files get unpacked and wait one
  (maint) increase awareness of pro / biz
  • Loading branch information
ferventcoder committed May 22, 2016
2 parents 56acefa + fbe24a8 commit bcf21da
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Please make sure you've read over and agree with the [etiquette regarding commun

## Support Chocolatey!

* Purchase [Chocolatey Professional / Chocolatey for Business](https://bit.ly/choco_pro_business)
* Purchase [Chocolatey Professional / Chocolatey for Business](https://chocolatey.org/pricing)
* [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E8ZPVL5PNTABW)

## See Chocolatey In Action
Expand All @@ -36,7 +36,7 @@ Chocolatey FOSS install showing tab completion and `refreshenv` (a way to update

![install](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_install.gif "Wat? Tab completion and updating environment variables!")

[Chocolatey Professional](https://bit.ly/choco_pro_business) showing private download cache and virus scan protection:
[Chocolatey Professional](https://chocolatey.org/pricing) showing private download cache and virus scan protection:

![install pro](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/chocopro_install_stopped.gif "Get ready! Chocolatey Professional availability is May 2nd, 2016")

Expand Down
6 changes: 3 additions & 3 deletions src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function script:chocoCmdOperations($commands, $command, $filter, $currentArgumen
$script:someCommands = @('-?','search','list','info','install','outdated','upgrade','uninstall','new','pack','push','-h','--help','pin','source','config','feature','apikey')

$allcommands = " --debug --verbose --force --noop --help --accept-license --confirm --limit-output --execution-timeout= --cache-location='' --fail-on-error-output --use-system-powershell"

$proInstallUpgradeOptions = " --skip-download-cache --use-download-cache --skip-virus-check --virus-check --virus-positives-minimum="
$proInstallUpgradeOptions = " --install-directory='Pro/Biz editions' --skip-download-cache --use-download-cache --skip-virus-check --virus-check --virus-positives-minimum="
$proNewOptions = " --file=<biz>"

$commandOptions = @{
list = "--lo --pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user= --password= --local-only --prerelease --include-programs --page= --page-size= --order-by-popularity --download-cache-only" + $allcommands
Expand All @@ -47,7 +47,7 @@ $commandOptions = @{
outdated = "-? --source='' --user= --password=" + $allcommands
upgrade = "-y -whatif -? --pre --version= --except='' --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --source='webpi' --user= --password= --prerelease --forcex86 --not-silent --package-parameters='' --allow-downgrade --allow-multiple-versions --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --fail-on-unfound --fail-on-not-installed --ignore-checksums" + $allcommands + $proInstallUpgradeOptions
uninstall = "-y -whatif -? --force-dependencies --remove-dependencies --all-versions --source='windowsfeatures' --source='webpi' --version= --uninstall-arguments='' --override-arguments --not-silent --params='' --package-parameters='' --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts" + $allcommands
new = "--template-name= --automaticpackage --version= --maintainer='' packageversion= maintainername='' maintainerrepo='' installertype= url='' url64='' silentargs='' -?" + $allcommands
new = "--template-name= --file='Biz editions only' --automaticpackage --version= --maintainer='' packageversion= maintainername='' maintainerrepo='' installertype= url='' url64='' silentargs='' -?" + $allcommands
pack = "--version= -?" + $allcommands
push = "--source='' --api-key= --timeout= -?" + $allcommands
source = "--name= --source='' --user= --password= --priority= -?" + $allcommands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ param(
Pro / Business supports a single, ubiquitous install directory option.
Stop the hassle of determining how to pass install directory overrides
to install arguments for each package / installer type.
Check out Pro / Business - https://bit.ly/choco_pro_business"
Check out Pro / Business - https://chocolatey.org/pricing"
"@ | Write-Warning
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ public class ChocolateyPackageService : IChocolateyPackageService
private readonly IAutomaticUninstallerService _autoUninstallerService;
private readonly IXmlService _xmlService;
private readonly IConfigTransformService _configTransformService;
private const string PRO_BUSINESS_MESSAGE = @"Check out Pro / Business for more features! https://bit.ly/choco_pro_business";
private const string PRO_BUSINESS_MESSAGE = @"
Check out Pro / Business for more features! https://chocolatey.org/pricing";
private const string PRO_BUSINESS_LIST_MESSAGE = @"
Did you know Pro/Business automatically syncs with Programs and
Features? Find out more at https://chocolatey.org/pricing";

private readonly string _shutdownExe = Environment.ExpandEnvironmentVariables("%systemroot%\\System32\\shutdown.exe");

Expand Down Expand Up @@ -152,7 +156,7 @@ public IEnumerable<PackageResult> list_run(ChocolateyConfiguration config)
}
}

randomly_notify_about_pro_business(config);
randomly_notify_about_pro_business(config, PRO_BUSINESS_LIST_MESSAGE);
}

private IEnumerable<PackageResult> report_registry_programs(ChocolateyConfiguration config, IEnumerable<IPackage> list)
Expand Down Expand Up @@ -251,15 +255,16 @@ public void install_noop(ChocolateyConfiguration config)
/// Once every 10 runs or so, Chocolatey FOSS should inform the user of the Pro / Business versions.
/// </summary>
/// <param name="config">The configuration.</param>
/// <param name="message">The message to send.</param>
/// <remarks>We want it random enough not to be annoying, but informative enough for awareness.</remarks>
public void randomly_notify_about_pro_business(ChocolateyConfiguration config)
public void randomly_notify_about_pro_business(ChocolateyConfiguration config, string message = PRO_BUSINESS_MESSAGE)
{
if (!config.Information.IsLicensedVersion && config.RegularOutput)
{
// magic numbers!
if (new Random().Next(1, 10) == 3)
{
this.Log().Warn(ChocolateyLoggers.Important, PRO_BUSINESS_MESSAGE);
this.Log().Warn(ChocolateyLoggers.Important, message);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace chocolatey.infrastructure.app.services
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Threading;
using configuration;
using filesystem;
using infrastructure.commands;
Expand Down Expand Up @@ -115,6 +116,8 @@ public string scan_file(string filePath)
{
var dieZipLocation = _fileSystem.combine_paths(ApplicationParameters.InstallLocation, "tools", "detector.zip");
unzip_die_files(dieZipLocation, dieDllLocation);
// finish unpacking
Thread.Sleep(1000);
}

if (!_fileSystem.file_exists(filePath))
Expand Down

0 comments on commit bcf21da

Please sign in to comment.