Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#990 #989) Update to latest chocolatey bits #991

Merged
merged 3 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<HintPath>..\packages\Caliburn.Micro.3.2.0\lib\net45\Caliburn.Micro.Platform.Core.dll</HintPath>
</Reference>
<Reference Include="chocolatey">
<HintPath>..\packages\chocolatey.lib.2.0.0-alpha-20230317-982\lib\net48\chocolatey.dll</HintPath>
<HintPath>..\packages\chocolatey.lib.2.0.0-beta-20230320-998\lib\net48\chocolatey.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private Condition="'$(Configuration)' != 'Debug'">False</Private>
</Reference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public async Task<IEnumerable<Package>> GetInstalledPackages()
config =>
{
config.CommandName = CommandNameType.list.ToString();
config.ListCommand.LocalOnly = true;
});

var chocoConfig = _choco.GetConfiguration();
Expand Down Expand Up @@ -227,9 +226,6 @@ public async Task<PackageOperationResult> InstallPackage(
config.ApplyInstallArgumentsToDependencies = advancedInstallOptions.ApplyInstallArgumentsToDependencies;
config.ApplyPackageParametersToDependencies = advancedInstallOptions.ApplyPackageParametersToDependencies;
config.AllowDowngrade = advancedInstallOptions.AllowDowngrade;
#pragma warning disable CS0618 // Type or member is obsolete
config.AllowMultipleVersions = advancedInstallOptions.AllowMultipleVersions;
#pragma warning restore CS0618 // Type or member is obsolete
config.IgnoreDependencies = advancedInstallOptions.IgnoreDependencies;
config.ForceDependencies = advancedInstallOptions.ForceDependencies;
config.SkipPackageInstallProvider = advancedInstallOptions.SkipPowerShell;
Expand Down Expand Up @@ -278,7 +274,7 @@ public async Task<PackageResults> Search(string query, PackageSearchOptions opti
_choco.Set(
config =>
{
config.CommandName = CommandNameType.list.ToString();
config.CommandName = "search";
config.Input = query;
config.AllVersions = options.IncludeAllVersions;
config.ListCommand.Page = options.CurrentPage;
Expand Down Expand Up @@ -653,9 +649,6 @@ private static Package GetMappedPackage(GetChocolatey choco, PackageResult packa
var packageInfo = packageInfoService.get_package_information(package.PackageMetadata);
mappedPackage.IsPinned = packageInfo.IsPinned;
mappedPackage.IsInstalled = !string.IsNullOrWhiteSpace(package.InstallLocation) || forceInstalled;
#pragma warning disable CS0618 // Type or member is obsolete
mappedPackage.IsSideBySide = packageInfo.IsSideBySide;
#pragma warning restore CS0618 // Type or member is obsolete

mappedPackage.IsPrerelease = mappedPackage.Version.IsPrerelease;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public class AdvancedInstallViewModel : ObservableBase, IClosableChildWindow<Adv
private bool _applyInstallArgumentsToDependencies;
private bool _applyPackageParametersToDependencies;
private bool _allowDowngrade;
private bool _allowMultipleVersions;
private bool _ignoreDependencies;
private bool _forceDependencies;
private bool _skipPowerShell;
Expand Down Expand Up @@ -226,12 +225,6 @@ public bool AllowDowngrade
set { SetPropertyValue(ref _allowDowngrade, value); }
}

public bool AllowMultipleVersions
{
get { return _allowMultipleVersions; }
set { SetPropertyValue(ref _allowMultipleVersions, value); }
}

public bool IgnoreDependencies
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ public class PackageViewModel :

private bool _isPinned;

private bool _isSideBySide;

private bool _isPrerelease;

private string _language;
Expand Down Expand Up @@ -171,7 +169,7 @@ public string[] Authors

public bool IsUninstallAllowed => _allowedCommandsService.IsUninstallCommandAllowed;

public bool CanUpdate => IsInstalled && !IsPinned && !IsSideBySide && IsOutdated;
public bool CanUpdate => IsInstalled && !IsPinned && IsOutdated;

public bool IsUpgradeAllowed => _allowedCommandsService.IsUpgradeCommandAllowed;

Expand Down Expand Up @@ -262,22 +260,6 @@ public bool IsPinned
}
}

public bool IsSideBySide
{
get
{
return _isSideBySide;
}

set
{
if (SetPropertyValue(ref _isSideBySide, value))
{
NotifyPropertyChanged(nameof(CanUpdate));
}
}
}

public bool IsOutdated
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,6 @@
<mah:MetroHeader Header="{lang:Localize AdvancedChocolateyDialog_AllowDowngrade_Header}" Tag="{lang:Localize AdvancedChocolateyDialog_AllowDowngrade_ToolTip}">
<mah:ToggleSwitch VerticalAlignment="Center" IsOn="{Binding AllowDowngrade}" />
</mah:MetroHeader>
<mah:MetroHeader Background="{DynamicResource MahApps.Brushes.Gray10}" Header="{lang:Localize AdvancedChocolateyDialog_AllowMultipleVersions_Header}" Tag="{lang:Localize AdvancedChocolateyDialog_AllowMultipleVersions_ToolTip}">
<mah:ToggleSwitch VerticalAlignment="Center" IsOn="{Binding AllowMultipleVersions}" />
</mah:MetroHeader>
<mah:MetroHeader Header="{lang:Localize AdvancedChocolateyDialog_SkipPowerShell_Header}" Tag="{lang:Localize AdvancedChocolateyDialog_SkipPowerShell_ToolTip}">
<mah:ToggleSwitch VerticalAlignment="Center" IsOn="{Binding SkipPowerShell}" />
</mah:MetroHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
ToolTip="{lang:Localize LocalSourceView_ToolTip_Pinned}"
Kind="Pin" Margin="0 2"
Visibility="{Binding IsPinned, Mode=OneWay, Converter={StaticResource BooleanToVisibility}}" />
<iconPacks:PackIconEntypo Width="24" Height="24"
ToolTip="{lang:Localize LocalSourceView_ToolTip_InstalledSideBySide}"
Kind="Bookmarks" Margin="0 2"
Visibility="{Binding IsSideBySide, Mode=OneWay, Converter={StaticResource BooleanToVisibility}}" />
</StackPanel>

<TextBlock Grid.Row="2"
Expand Down Expand Up @@ -281,7 +277,6 @@
<DataTemplate DataType="{x:Type items:IPackageViewModel}">
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconEntypo ToolTip="{lang:Localize LocalSourceView_ToolTip_Pinned}" Kind="Pin" Visibility="{Binding IsPinned, Converter={StaticResource BooleanToVisibilityHidden}}" />
<iconPacks:PackIconEntypo ToolTip="{lang:Localize LocalSourceView_ToolTip_InstalledSideBySide}" Kind="Bookmarks" Visibility="{Binding IsSideBySide, Converter={StaticResource BooleanToVisibilityHidden}}" />
<TextBlock Text="{Binding Title}"/>
</StackPanel>
</DataTemplate>
Expand Down
2 changes: 1 addition & 1 deletion Source/ChocolateyGui.Common.Windows/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<package id="BuildTools.FxCop" version="1.0.1" targetFramework="net40" />
<package id="Caliburn.Micro" version="3.2.0" targetFramework="net48" />
<package id="Caliburn.Micro.Core" version="3.2.0" targetFramework="net48" />
<package id="chocolatey.lib" version="2.0.0-alpha-20230317-982" targetFramework="net48" />
<package id="chocolatey.lib" version="2.0.0-beta-20230320-998" targetFramework="net48" />
<package id="ControlzEx" version="4.4.0" targetFramework="net48" />
<package id="Fizzler" version="1.2.0" targetFramework="net48" />
<package id="HarfBuzzSharp" version="2.6.1.4" targetFramework="net48" />
Expand Down
2 changes: 1 addition & 1 deletion Source/ChocolateyGui.Common/ChocolateyGui.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<HintPath>..\packages\AutoMapper.7.0.1\lib\net45\AutoMapper.dll</HintPath>
</Reference>
<Reference Include="chocolatey">
<HintPath>..\packages\chocolatey.lib.2.0.0-alpha-20230317-982\lib\net48\chocolatey.dll</HintPath>
<HintPath>..\packages\chocolatey.lib.2.0.0-beta-20230320-998\lib\net48\chocolatey.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private Condition="'$(Configuration)' != 'Debug'">False</Private>
</Reference>
Expand Down
2 changes: 0 additions & 2 deletions Source/ChocolateyGui.Common/Models/AdvancedInstall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ public class AdvancedInstall

public bool AllowDowngrade { get; set; }

public bool AllowMultipleVersions { get; set; }

public bool IgnoreDependencies { get; set; }

public bool ForceDependencies { get; set; }
Expand Down
2 changes: 0 additions & 2 deletions Source/ChocolateyGui.Common/Models/Package.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public class Package

public bool IsPinned { get; set; }

public bool IsSideBySide { get; set; }

public bool IsPrerelease { get; set; }

public string Language { get; set; }
Expand Down
27 changes: 0 additions & 27 deletions Source/ChocolateyGui.Common/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions Source/ChocolateyGui.Common/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,6 @@ Or if there is a traditional way to show sorting by the Title in your language,
<data name="RemoteSourceViewModel_FetchingPackages" xml:space="preserve">
<value>Fetching packages...</value>
</data>
<data name="LocalSourceView_ToolTip_InstalledSideBySide" xml:space="preserve">
<value>Installed Side by Side with another version of the same package.</value>
</data>
<data name="LocalSourceView_ToolTip_Pinned" xml:space="preserve">
<value>Pinned</value>
</data>
Expand Down Expand Up @@ -1064,12 +1061,6 @@ Please contact your System Administrator to enable this operation.</value>
<data name="AdvancedChocolateyDialog_AllowEmptyChecksums_ToolTip" xml:space="preserve">
<value>Allow packages to have empty/missing checksums for downloaded resources from non-secure locations (HTTP, FTP). Using this switch is not recommended if using sources that download resources from the internet. Only overrides the value in the configuration when 'On' is specified.</value>
</data>
<data name="AdvancedChocolateyDialog_AllowMultipleVersions_Header" xml:space="preserve">
<value>Allow Multiple Versions</value>
</data>
<data name="AdvancedChocolateyDialog_AllowMultipleVersions_ToolTip" xml:space="preserve">
<value>Should multiple versions of a package be installed?</value>
</data>
<data name="AdvancedChocolateyDialog_ApplyInstallArgumentsToDependencies_Header" xml:space="preserve">
<value>Apply Install Arguments to Dependencies</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public interface IPackageViewModel

bool IsPinned { get; set; }

bool IsSideBySide { get; set; }

bool IsPrerelease { get; set; }

string Language { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Source/ChocolateyGui.Common/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="Autofac" version="4.6.1" targetFramework="net452" />
<package id="AutoMapper" version="7.0.1" targetFramework="net48" />
<package id="BuildTools.FxCop" version="1.0.1" targetFramework="net452" />
<package id="chocolatey.lib" version="2.0.0-alpha-20230317-982" targetFramework="net48" />
<package id="chocolatey.lib" version="2.0.0-beta-20230320-998" targetFramework="net48" />
<package id="LiteDB" version="5.0.15" targetFramework="net48" />
<package id="log4net" version="2.0.12" targetFramework="net452" />
<package id="Microsoft.VisualStudio.Threading" version="15.4.4" targetFramework="net452" />
Expand Down
2 changes: 1 addition & 1 deletion Source/ChocolateyGui/ChocolateyGui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<HintPath>..\packages\Caliburn.Micro.3.2.0\lib\net45\Caliburn.Micro.Platform.Core.dll</HintPath>
</Reference>
<Reference Include="chocolatey">
<HintPath>..\packages\chocolatey.lib.2.0.0-alpha-20230317-982\lib\net48\chocolatey.dll</HintPath>
<HintPath>..\packages\chocolatey.lib.2.0.0-beta-20230320-998\lib\net48\chocolatey.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private Condition="'$(Configuration)' != 'Debug'">False</Private>
</Reference>
Expand Down
2 changes: 1 addition & 1 deletion Source/ChocolateyGui/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<package id="BuildTools.FxCop" version="1.0.1" targetFramework="net452" />
<package id="Caliburn.Micro" version="3.2.0" targetFramework="net452" />
<package id="Caliburn.Micro.Core" version="3.2.0" targetFramework="net452" />
<package id="chocolatey.lib" version="2.0.0-alpha-20230317-982" targetFramework="net48" />
<package id="chocolatey.lib" version="2.0.0-beta-20230320-998" targetFramework="net48" />
<package id="ControlzEx" version="4.4.0" targetFramework="net48" />
<package id="Fizzler" version="1.2.0" targetFramework="net48" />
<package id="HarfBuzzSharp" version="2.6.1.4" targetFramework="net48" />
Expand Down
2 changes: 1 addition & 1 deletion Source/ChocolateyGuiCli/ChocolateyGuiCli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<HintPath>..\packages\Autofac.4.6.1\lib\net45\Autofac.dll</HintPath>
</Reference>
<Reference Include="chocolatey">
<HintPath>..\packages\chocolatey.lib.2.0.0-alpha-20230317-982\lib\net48\chocolatey.dll</HintPath>
<HintPath>..\packages\chocolatey.lib.2.0.0-beta-20230320-998\lib\net48\chocolatey.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private Condition="'$(Configuration)' != 'Debug'">False</Private>
</Reference>
Expand Down
2 changes: 1 addition & 1 deletion Source/ChocolateyGuiCli/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="Autofac" version="4.6.1" targetFramework="net452" />
<package id="BuildTools.FxCop" version="1.0.1" targetFramework="net452" />
<package id="chocolatey.lib" version="2.0.0-alpha-20230317-982" targetFramework="net48" />
<package id="chocolatey.lib" version="2.0.0-beta-20230320-998" targetFramework="net48" />
<package id="LiteDB" version="5.0.15" targetFramework="net48" />
<package id="log4net" version="2.0.12" targetFramework="net452" />
<package id="Serilog" version="2.5.0" targetFramework="net48" />
Expand Down