Skip to content

Commit

Permalink
Updated Cursor function
Browse files Browse the repository at this point in the history
  • Loading branch information
farag2 committed Jan 3, 2025
1 parent 0ab8c7a commit 078b1e7
Show file tree
Hide file tree
Showing 31 changed files with 1,844 additions and 1,543 deletions.
9 changes: 6 additions & 3 deletions Wrapper/Config/config_Windows_10.json
Original file line number Diff line number Diff line change
Expand Up @@ -1552,10 +1552,13 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist -Redistributables",
"Arg": {
"Zero": {
"Tag": ""
"Tag": "2015_2022_x86"
},
"One": {
"Tag": "2015_2022_x64"
}
},
"Preset": "",
Expand All @@ -1565,7 +1568,7 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"Arg": {
"Zero": {
"Tag": "NET8x64"
Expand Down
9 changes: 6 additions & 3 deletions Wrapper/Config/config_Windows_10_LTSC.json
Original file line number Diff line number Diff line change
Expand Up @@ -1479,10 +1479,13 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist -Redistributables",
"Arg": {
"Zero": {
"Tag": ""
"Tag": "2015_2022_x86"
},
"One": {
"Tag": "2015_2022_x64"
}
},
"Preset": "",
Expand All @@ -1494,7 +1497,7 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"Arg": {
"Zero": {
"Tag": "NET8x64"
Expand Down
9 changes: 6 additions & 3 deletions Wrapper/Config/config_Windows_11.json
Original file line number Diff line number Diff line change
Expand Up @@ -1475,10 +1475,13 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist -Redistributables",
"Arg": {
"Zero": {
"Tag": ""
"Tag": "2015_2022_x86"
},
"One": {
"Tag": "2015_2022_x64"
}
},
"Preset": "",
Expand All @@ -1488,7 +1491,7 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"Arg": {
"Zero": {
"Tag": "NET8x64"
Expand Down
9 changes: 6 additions & 3 deletions Wrapper/Config/config_Windows_11_LTSC.json
Original file line number Diff line number Diff line change
Expand Up @@ -1485,10 +1485,13 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist -Redistributables",
"Arg": {
"Zero": {
"Tag": ""
"Tag": "2015_2022_x86"
},
"One": {
"Tag": "2015_2022_x64"
}
},
"Preset": "",
Expand All @@ -1499,7 +1502,7 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"Arg": {
"Zero": {
"Tag": "NET8x64"
Expand Down
10 changes: 7 additions & 3 deletions Wrapper/Localizations/de-DE/tooltip_Windows_10.json
Original file line number Diff line number Diff line change
Expand Up @@ -1368,17 +1368,21 @@
},
{
"Region": "System",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist",
"Arg": {
"Zero": {
"Tag": "",
"Tag": "2015_2022_x86",
"ToolTip": "Installieren Sie die neueste unterstützte Microsoft Visual C++ Redistributable 2015–2022 x86."
},
"One": {
"Tag": "2015_2022_x64",
"ToolTip": "Installieren Sie die neueste unterstützte Microsoft Visual C++ Redistributable 2015–2022 x64."
}
}
},
{
"Region": "System",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"ToolTip": "Installieren Sie die neueste .NET Desktop Runtime 8, 9 x64.",
"Arg": {
"Zero": {
Expand Down
10 changes: 7 additions & 3 deletions Wrapper/Localizations/de-DE/tooltip_Windows_11.json
Original file line number Diff line number Diff line change
Expand Up @@ -1302,17 +1302,21 @@
},
{
"Region": "System",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist",
"Arg": {
"Zero": {
"Tag": "",
"Tag": "2015_2022_x86",
"ToolTip": "Installieren Sie die neueste unterstützte Microsoft Visual C++ Redistributable 2015–2022 x86."
},
"One": {
"Tag": "2015_2022_x64",
"ToolTip": "Installieren Sie die neueste unterstützte Microsoft Visual C++ Redistributable 2015–2022 x64."
}
}
},
{
"Region": "System",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"ToolTip": "Installieren Sie die neueste .NET Desktop Runtime 8, 9 x64.",
"Arg": {
"Zero": {
Expand Down
12 changes: 8 additions & 4 deletions Wrapper/Localizations/en-US/tooltip_Windows_10.json
Original file line number Diff line number Diff line change
Expand Up @@ -1364,17 +1364,21 @@
},
{
"Region": "System",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist -Redistributables",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 (x86/x64)."
"Tag": "2015_2022_x86",
"ToolTip": "Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 x86."
},
"One": {
"Tag": "2015_2022_x64",
"ToolTip": "Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 x64."
}
}
},
{
"Region": "System",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"ToolTip": "Install the latest .NET Desktop Runtime 8, 9 x64.",
"Arg": {
"Zero": {
Expand Down
12 changes: 8 additions & 4 deletions Wrapper/Localizations/en-US/tooltip_Windows_11.json
Original file line number Diff line number Diff line change
Expand Up @@ -1302,17 +1302,21 @@
},
{
"Region": "System",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist -Redistributables",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 (x86/x64)."
"Tag": "2015_2022_x86",
"ToolTip": "Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 x86."
},
"One": {
"Tag": "2015_2022_x64",
"ToolTip": "Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 x64."
}
}
},
{
"Region": "System",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"ToolTip": "Install the latest .NET Desktop Runtime 8, 9 x64.",
"Arg": {
"Zero": {
Expand Down
12 changes: 8 additions & 4 deletions Wrapper/Localizations/ru-RU/tooltip_Windows_10.json
Original file line number Diff line number Diff line change
Expand Up @@ -1368,17 +1368,21 @@
},
{
"Region": "System",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist -Redistributables",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 (x86/x64)."
"Tag": "2015_2022_x86",
"ToolTip": "Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 x86."
},
"One": {
"Tag": "2015_2022_x64",
"ToolTip": "Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 x64."
}
}
},
{
"Region": "System",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"ToolTip": "Установить последнюю версию .NET Desktop Runtime 8, 9 x64.",
"Arg": {
"Zero": {
Expand Down
12 changes: 8 additions & 4 deletions Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
Original file line number Diff line number Diff line change
Expand Up @@ -1302,17 +1302,21 @@
},
{
"Region": "System",
"Function": "InstallVCRedist",
"Function": "Install-VCRedist -Redistributables",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 (x86/x64)."
"Tag": "2015_2022_x86",
"ToolTip": "Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 x86."
},
"One": {
"Tag": "2015_2022_x64",
"ToolTip": "Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 x64."
}
}
},
{
"Region": "System",
"Function": "InstallDotNetRuntimes -Runtimes",
"Function": "Install-DotNetRuntimes -Runtimes",
"ToolTip": "Установить последнюю версию .NET Desktop Runtime 8, 9 x64.",
"Arg": {
"Zero": {
Expand Down
38 changes: 31 additions & 7 deletions src/Sophia_Script_for_Windows_10/Functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -164,24 +164,48 @@ $Parameters = @{
}
}

# If a module command is InstallDotNetRuntimes
if ($Command -eq "InstallDotNetRuntimes")
# If a module command is Install-VCRedist
if ($Command -eq "Install-VCRedist")
{
# Get all command arguments, excluding defaults
foreach ($ParameterSet in $ParameterSets.Name)
{
# If an argument is Redistributables
if ($ParameterSet -eq "Redistributables")
{
$ValidValues = ((Get-Command -Name Install-VCRedist).Parametersets.Parameters | Where-Object -FilterScript {$null -eq $_.Attributes.AliasNames}).Attributes.ValidValues
foreach ($ValidValue in $ValidValues)
{
# The "Install-VCRedist -Redistributables <function>" construction
"Install-VCRedist" + " " + "-" + $ParameterSet + " " + $ValidValue | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
}

# The "Install-VCRedist -Redistributables <functions>" construction
"Install-VCRedist" + " " + "-" + $ParameterSet + " " + ($ValidValues -join ", ") | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
}

continue
}
}

# If a module command is Install-DotNetRuntimes
if ($Command -eq "Install-DotNetRuntimes")
{
# Get all command arguments, excluding defaults
foreach ($ParameterSet in $ParameterSets.Name)
{
# If an argument is Runtimes
if ($ParameterSet -eq "Runtimes")
{
$ValidValues = ((Get-Command -Name InstallDotNetRuntimes).Parametersets.Parameters | Where-Object -FilterScript {$null -eq $_.Attributes.AliasNames}).Attributes.ValidValues
$ValidValues = ((Get-Command -Name Install-DotNetRuntimes).Parametersets.Parameters | Where-Object -FilterScript {$null -eq $_.Attributes.AliasNames}).Attributes.ValidValues
foreach ($ValidValue in $ValidValues)
{
# The "InstallDotNetRuntimes -Runtimes <function>" construction
"InstallDotNetRuntimes" + " " + "-" + $ParameterSet + " " + $ValidValue | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
# The "Install-DotNetRuntimes -Runtimes <function>" construction
"Install-DotNetRuntimes" + " " + "-" + $ParameterSet + " " + $ValidValue | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
}

# The "InstallDotNetRuntimes -Runtimes <functions>" construction
"InstallDotNetRuntimes" + " " + "-" + $ParameterSet + " " + ($ValidValues -join ", ") | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
# The "Install-DotNetRuntimes -Runtimes <functions>" construction
"Install-DotNetRuntimes" + " " + "-" + $ParameterSet + " " + ($ValidValues -join ", ") | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
}

continue
Expand Down
Loading

0 comments on commit 078b1e7

Please sign in to comment.