Skip to content

Commit

Permalink
Renamed plugin & broader build
Browse files Browse the repository at this point in the history
  • Loading branch information
Advaith3600 committed Jan 22, 2024
1 parent b8e3492 commit 0a15e97
Show file tree
Hide file tree
Showing 20 changed files with 489 additions and 468 deletions.
770 changes: 372 additions & 398 deletions .gitignore

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$ErrorActionPreference = "Stop"

$projectDirectory = "$PSScriptRoot\Community.PowerToys.Run.Plugin.CurrencyConverter"
[xml]$xml = Get-Content -Path "$projectDirectory\Community.PowerToys.Run.Plugin.CurrencyConverter.csproj"
$version = $xml.Project.PropertyGroup.Version
$version = "$version".Trim()

foreach ($platform in "x64", "ARM64")
{
if (Test-Path -Path "$projectDirectory\bin")
{
Remove-Item -Path "$projectDirectory\bin\*" -Recurse
}

if (Test-Path -Path "$projectDirectory\obj")
{
Remove-Item -Path "$projectDirectory\obj\*" -Recurse
}

dotnet build $projectDirectory.sln -c Release /p:Platform=$platform

Remove-Item -Path "$projectDirectory\bin\*" -Recurse -Include *.xml, *.pdb, PowerToys.*, Wox.*
Rename-Item -Path "$projectDirectory\bin\$platform\Release" -NewName "CurrencyConverter"

Compress-Archive -Path "$projectDirectory\bin\$platform\CurrencyConverter" -DestinationPath "$PSScriptRoot\CurrencyConverter-$version-$platform.zip"
}
41 changes: 41 additions & 0 deletions Community.PowerToys.Run.Plugin.CurrencyConverter.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34408.163
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Community.PowerToys.Run.Plugin.CurrencyConverter", "Community.PowerToys.Run.Plugin.CurrencyConverter\Community.PowerToys.Run.Plugin.CurrencyConverter.csproj", "{7875DA56-4FE0-4857-87D7-31449500637A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7875DA56-4FE0-4857-87D7-31449500637A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7875DA56-4FE0-4857-87D7-31449500637A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7875DA56-4FE0-4857-87D7-31449500637A}.Debug|ARM64.ActiveCfg = Debug|ARM64
{7875DA56-4FE0-4857-87D7-31449500637A}.Debug|ARM64.Build.0 = Debug|ARM64
{7875DA56-4FE0-4857-87D7-31449500637A}.Debug|x64.ActiveCfg = Debug|x64
{7875DA56-4FE0-4857-87D7-31449500637A}.Debug|x64.Build.0 = Debug|x64
{7875DA56-4FE0-4857-87D7-31449500637A}.Debug|x86.ActiveCfg = Debug|Any CPU
{7875DA56-4FE0-4857-87D7-31449500637A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7875DA56-4FE0-4857-87D7-31449500637A}.Release|Any CPU.Build.0 = Release|Any CPU
{7875DA56-4FE0-4857-87D7-31449500637A}.Release|ARM64.ActiveCfg = Release|ARM64
{7875DA56-4FE0-4857-87D7-31449500637A}.Release|ARM64.Build.0 = Release|ARM64
{7875DA56-4FE0-4857-87D7-31449500637A}.Release|x64.ActiveCfg = Release|x64
{7875DA56-4FE0-4857-87D7-31449500637A}.Release|x64.Build.0 = Release|x64
{7875DA56-4FE0-4857-87D7-31449500637A}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E4749FD8-991C-4A8D-B643-2990ED0A790D}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>Community.PowerToys.Run.Plugin.CurrencyConverter</RootNamespace>
<AssemblyName>Community.PowerToys.Run.Plugin.CurrencyConverter</AssemblyName>
<Version>1.0.2</Version>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<Platforms>AnyCPU;x64;ARM64</Platforms>
</PropertyGroup>

<ItemGroup Condition="'$(Platform)' == 'x64'">
<Reference Include="libs\x64\PowerToys.Common.UI.dll" />
<Reference Include="libs\x64\PowerToys.ManagedCommon.dll" />
<Reference Include="libs\x64\PowerToys.Settings.UI.Lib.dll" />
<Reference Include="libs\x64\Wox.Infrastructure.dll" />
<Reference Include="libs\x64\Wox.Plugin.dll" />
</ItemGroup>

<ItemGroup Condition="'$(Platform)' == 'ARM64'">
<Reference Include="libs\ARM64\PowerToys.Common.UI.dll" />
<Reference Include="libs\ARM64\PowerToys.ManagedCommon.dll" />
<Reference Include="libs\ARM64\PowerToys.Settings.UI.Lib.dll" />
<Reference Include="libs\ARM64\Wox.Infrastructure.dll" />
<Reference Include="libs\ARM64\Wox.Plugin.dll" />
</ItemGroup>

<ItemGroup>
<None Update="images\icon-black.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="images\icon-white.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="plugin.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using Wox.Plugin;
using Microsoft.PowerToys.Settings.UI.Library;

using Clipboard = System.Windows.Clipboard;

namespace PowerToysRunCurrencyConverter
namespace Community.PowerToys.Run.Plugin.CurrencyConverter
{
public class Main : IPlugin, ISettingProvider
{
Expand All @@ -21,7 +22,7 @@ public class Main : IPlugin, ISettingProvider

private Dictionary<string, (double, DateTime)> ConversionCache = new Dictionary<string, (double, DateTime)>();
private readonly HttpClient Client = new HttpClient();
private readonly RegionInfo regionInfo = new RegionInfo(CultureInfo.CurrentCulture.LCID);
private readonly RegionInfo regionInfo = new RegionInfo(CultureInfo.CurrentCulture.Name);

This comment has been minimized.

Copy link
@Advaith3600

Advaith3600 Jan 22, 2024

Author Owner

Fixes #1


private int ConversionDirection;
private string LocalCurrency, GlobalCurrency;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"ActionKeyword": "$$",
"Name": "Currency Converter",
"Author": "advaith3600",
"Version": "1.0.1",
"Version": "1.0.2",
"Language": "csharp",
"Website": "https://github.com/advaith3600/powertoys-run-currency-converter",
"ExecuteFileName": "PowerToysRunCurrencyConverter.dll",
"Website": "https://github.com/advaith3600/PowerToys-Run-Currency-Converter",
"ExecuteFileName": "Community.PowerToys.Run.Plugin.CurrencyConverter.dll",
"IsGlobal": false,
"IcoPathDark": "images\\icon-white.png",
"IcoPathLight": "images\\icon-black.png"
Expand Down
25 changes: 0 additions & 25 deletions PowerToysRunCurrencyConverter.sln

This file was deleted.

40 changes: 0 additions & 40 deletions PowerToysRunCurrencyConverter/PowerToysRunCurrencyConverter.csproj

This file was deleted.

0 comments on commit 0a15e97

Please sign in to comment.