mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 10:32:35 -05:00
Compare commits
11 Commits
962b18e8fa
...
de9b643129
Author | SHA1 | Date | |
---|---|---|---|
de9b643129 | |||
e430e0aad0 | |||
61fd4d2f91 | |||
b72cd83189 | |||
290292ec94 | |||
d22865d79b | |||
5c5b999a09 | |||
0c0e6bd243 | |||
dd06489d63 | |||
41df9d3d88 | |||
63d56bcac9 |
25
.github/workflows/pre-release.yaml
vendored
25
.github/workflows/pre-release.yaml
vendored
@ -49,31 +49,6 @@ jobs:
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
- name: Create and import code signing certificate
|
||||
shell: pwsh
|
||||
run: |
|
||||
[System.IO.File]::WriteAllBytes("$env:USERPROFILE\code-signing-cert.pfx", [System.Convert]::FromBase64String("$env:CERTIFICATE_BASE64"))
|
||||
Import-PfxCertificate -FilePath "$env:USERPROFILE\code-signing-cert.pfx" -CertStoreLocation Cert:\CurrentUser\My
|
||||
|
||||
- name: Code sign winutil.ps1
|
||||
shell: pwsh
|
||||
run: |
|
||||
$cert = Get-ChildItem -Path Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
|
||||
if ($null -eq $cert) { throw "Code signing certificate not found" }
|
||||
Set-AuthenticodeSignature -FilePath ./winutil.ps1 -Certificate $cert -TimeStampServer "http://timestamp.digicert.com"
|
||||
|
||||
- name: Verify code signature
|
||||
shell: pwsh
|
||||
run: |
|
||||
$signature = Get-AuthenticodeSignature -FilePath ./winutil.ps1
|
||||
if ($signature.Status -ne 'Valid') { throw "Code signing failed" }
|
||||
|
||||
- name: Upload winutil.ps1 as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: winutil
|
||||
path: ./winutil.ps1
|
||||
|
||||
- name: Generate Release Notes
|
||||
id: generate_notes
|
||||
uses: release-drafter/release-drafter@v6
|
||||
|
@ -349,7 +349,7 @@
|
||||
"content": "Display Driver Uninstaller",
|
||||
"description": "Display Driver Uninstaller (DDU) is a tool for completely uninstalling graphics drivers from NVIDIA, AMD, and Intel. It is useful for troubleshooting graphics driver-related issues.",
|
||||
"link": "https://www.wagnardsoft.com/display-driver-uninstaller-DDU-",
|
||||
"winget": "ddu"
|
||||
"winget": "Wagnardsoft.DisplayDriverUninstaller"
|
||||
},
|
||||
"deluge": {
|
||||
"category": "Utilities",
|
||||
@ -1863,14 +1863,6 @@
|
||||
"link": "https://sagethumbs.en.lo4d.com/windows",
|
||||
"winget": "CherubicSoftware.SageThumbs"
|
||||
},
|
||||
"samsungmagician": {
|
||||
"category": "Utilities",
|
||||
"choco": "samsung-magician",
|
||||
"content": "Samsung Magician",
|
||||
"description": "Samsung Magician is a utility for managing and optimizing Samsung SSDs.",
|
||||
"link": "https://semiconductor.samsung.com/consumer-storage/magician/",
|
||||
"winget": "Samsung.SamsungMagician"
|
||||
},
|
||||
"sandboxie": {
|
||||
"category": "Utilities",
|
||||
"choco": "sandboxie",
|
||||
@ -1983,14 +1975,6 @@
|
||||
"link": "http://www.uderzo.it/main_products/space_sniffer/",
|
||||
"winget": "UderzoSoftware.SpaceSniffer"
|
||||
},
|
||||
"spotube": {
|
||||
"category": "Multimedia Tools",
|
||||
"choco": "spotube",
|
||||
"content": "Spotube",
|
||||
"description": "Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile! ",
|
||||
"link": "https://github.com/KRTirtho/spotube",
|
||||
"winget": "KRTirtho.Spotube"
|
||||
},
|
||||
"starship": {
|
||||
"category": "Development",
|
||||
"choco": "starship",
|
||||
|
@ -3087,8 +3087,7 @@
|
||||
"
|
||||
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
|
||||
Write-Host Restarting explorer.exe ...
|
||||
$process = Get-Process -Name \"explorer\"
|
||||
Stop-Process -InputObject $process
|
||||
Stop-Process -Name \"explorer\" -Force
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
@ -3096,8 +3095,7 @@
|
||||
Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Recurse -Confirm:$false -Force
|
||||
# Restarting Explorer in the Undo Script might not be necessary, as the Registry change without restarting Explorer does work, but just to make sure.
|
||||
Write-Host Restarting explorer.exe ...
|
||||
$process = Get-Process -Name \"explorer\"
|
||||
Stop-Process -InputObject $process
|
||||
Stop-Process -Name \"explorer\" -Force
|
||||
"
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/rightclickmenu"
|
||||
@ -3380,7 +3378,7 @@
|
||||
},
|
||||
"WPFToggleStartMenuRecommendations": {
|
||||
"Content": "Recommendations in Start Menu",
|
||||
"Description": "If disabled then you will not see recommendations in the Start Menu. | Enables 'iseducationenvironment' | Relogin Required.",
|
||||
"Description": "If disabled then you will not see recommendations in the Start Menu. | Enables 'iseducationenvironment' | Relogin Required. | WARNING: This will also disable Windows Spotlight on your Lock Screen as a side effect.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a104_",
|
||||
|
@ -34,7 +34,8 @@ function Find-AppsByNameOrDescription {
|
||||
if ($_.Tag -like "CategoryWrapPanel_*") {
|
||||
# Search for Apps that match the search string
|
||||
$_.Children | Foreach-Object {
|
||||
if ($sync.configs.applicationsHashtable.$($_.Tag).Content -like "*$SearchString*") {
|
||||
$appEntry = $sync.configs.applicationsHashtable.$($_.Tag)
|
||||
if ($appEntry.Content -like "*$SearchString*" -or $appEntry.Description -like "*$SearchString*") {
|
||||
# Show the App and the parent CategoryWrapPanel if the string is found
|
||||
$_.Visibility = [Windows.Visibility]::Visible
|
||||
$_.parent.Visibility = [Windows.Visibility]::Visible
|
||||
|
@ -18,7 +18,7 @@ function Initialize-InstallAppEntry {
|
||||
$border.Style = $sync.Form.Resources.AppEntryBorderStyle
|
||||
$border.Tag = $appKey
|
||||
$border.ToolTip = $Apps.$appKey.description
|
||||
$border.Add_MouseUp({
|
||||
$border.Add_MouseLeftButtonUp({
|
||||
$childCheckbox = ($this.Child | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0]
|
||||
$childCheckBox.isChecked = -not $childCheckbox.IsChecked
|
||||
})
|
||||
@ -32,6 +32,13 @@ function Initialize-InstallAppEntry {
|
||||
$this.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallUnselectedColor")
|
||||
}
|
||||
})
|
||||
$border.Add_MouseRightButtonUp({
|
||||
# Store the selected app in a global variable so it can be used in the popup
|
||||
$sync.appPopupSelectedApp = $this.Tag
|
||||
# Set the popup position to the current mouse position
|
||||
$sync.appPopup.PlacementTarget = $this
|
||||
$sync.appPopup.IsOpen = $true
|
||||
})
|
||||
|
||||
$checkBox = New-Object Windows.Controls.CheckBox
|
||||
$checkBox.Name = $appKey
|
||||
|
@ -7,7 +7,7 @@ function Initialize-WPFUI {
|
||||
|
||||
switch ($TargetGridName) {
|
||||
"appscategory"{
|
||||
# TODO
|
||||
# TODO
|
||||
# Switch UI generation of the sidebar to this function
|
||||
# $sync.ItemsControl = Initialize-InstallAppArea -TargetElement $TargetGridName
|
||||
# ...
|
||||
@ -44,6 +44,69 @@ function Initialize-WPFUI {
|
||||
$sync.selectedAppsPopup.IsOpen = $false
|
||||
}
|
||||
})
|
||||
|
||||
# Creates the popup that is displayed when the user right-clicks on an app entry
|
||||
# This popup contains buttons for installing, uninstalling, and viewing app information
|
||||
|
||||
$appPopup = New-Object Windows.Controls.Primitives.Popup
|
||||
$appPopup.StaysOpen = $false
|
||||
$appPopup.Placement = [System.Windows.Controls.Primitives.PlacementMode]::Bottom
|
||||
$appPopup.AllowsTransparency = $true
|
||||
# Store the popup globally so the position can be set later
|
||||
$sync.appPopup = $appPopup
|
||||
|
||||
$appPopupStackPanel = New-Object Windows.Controls.StackPanel
|
||||
$appPopupStackPanel.Orientation = "Horizontal"
|
||||
$appPopupStackPanel.Add_MouseLeave({
|
||||
$sync.appPopup.IsOpen = $false
|
||||
})
|
||||
$appPopup.Child = $appPopupStackPanel
|
||||
|
||||
$appButtons = @(
|
||||
[PSCustomObject]@{ Name = "Install"; Icon = [char]0xE118 },
|
||||
[PSCustomObject]@{ Name = "Uninstall"; Icon = [char]0xE74D },
|
||||
[PSCustomObject]@{ Name = "Info"; Icon = [char]0xE946 }
|
||||
)
|
||||
foreach ($button in $appButtons) {
|
||||
$newButton = New-Object Windows.Controls.Button
|
||||
$newButton.Style = $sync.Form.Resources.AppEntryButtonStyle
|
||||
$newButton.Content = $button.Icon
|
||||
$appPopupStackPanel.Children.Add($newButton) | Out-Null
|
||||
|
||||
# Dynamically load the selected app object so the buttons can be reused and do not need to be created for each app
|
||||
switch ($button.Name) {
|
||||
"Install" {
|
||||
$newButton.Add_MouseEnter({
|
||||
$appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp)
|
||||
$this.ToolTip = "Install or Upgrade $($appObject.content)"
|
||||
})
|
||||
$newButton.Add_Click({
|
||||
$appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp)
|
||||
Invoke-WPFInstall -PackagesToInstall $appObject
|
||||
})
|
||||
}
|
||||
"Uninstall" {
|
||||
$newButton.Add_MouseEnter({
|
||||
$appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp)
|
||||
$this.ToolTip = "Uninstall $($appObject.content)"
|
||||
})
|
||||
$newButton.Add_Click({
|
||||
$appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp)
|
||||
Invoke-WPFUnInstall -PackagesToUninstall $appObject
|
||||
})
|
||||
}
|
||||
"Info" {
|
||||
$newButton.Add_MouseEnter({
|
||||
$appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp)
|
||||
$this.ToolTip = "Open the application's website in your default browser`n$($appObject.link)"
|
||||
})
|
||||
$newButton.Add_Click({
|
||||
$appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp)
|
||||
Start-Process $appObject.link
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"appspanel" {
|
||||
$sync.ItemsControl = Initialize-InstallAppArea -TargetElement $TargetGridName
|
||||
|
@ -376,12 +376,15 @@ if ($sync["ISOLanguage"].Items.Count -eq 1) {
|
||||
}
|
||||
$sync["ISOLanguage"].SelectedIndex = 0
|
||||
|
||||
$sync["SearchBar"].Add_TextChanged({
|
||||
if ($sync.SearchBar.Text -ne "") {
|
||||
$sync.SearchBarClearButton.Visibility = "Visible"
|
||||
} else {
|
||||
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
||||
}
|
||||
# The SearchBarTimer is used to delay the search operation until the user has stopped typing for a short period
|
||||
# This prevents the ui from stuttering when the user types quickly as it dosnt need to update the ui for every keystroke
|
||||
|
||||
$searchBarTimer = New-Object System.Windows.Threading.DispatcherTimer
|
||||
$searchBarTimer.Interval = [TimeSpan]::FromMilliseconds(300)
|
||||
$searchBarTimer.IsEnabled = $false
|
||||
|
||||
$searchBarTimer.add_Tick({
|
||||
$searchBarTimer.Stop()
|
||||
switch ($sync.currentTab) {
|
||||
"Install" {
|
||||
Find-AppsByNameOrDescription -SearchString $sync.SearchBar.Text
|
||||
@ -391,6 +394,17 @@ $sync["SearchBar"].Add_TextChanged({
|
||||
}
|
||||
}
|
||||
})
|
||||
$sync["SearchBar"].Add_TextChanged({
|
||||
if ($sync.SearchBar.Text -ne "") {
|
||||
$sync.SearchBarClearButton.Visibility = "Visible"
|
||||
} else {
|
||||
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
||||
}
|
||||
if ($searchBarTimer.IsEnabled) {
|
||||
$searchBarTimer.Stop()
|
||||
}
|
||||
$searchBarTimer.Start()
|
||||
})
|
||||
|
||||
$sync["Form"].Add_Loaded({
|
||||
param($e)
|
||||
@ -465,7 +479,8 @@ $sync["AboutMenuItem"].Add_Click({
|
||||
|
||||
$authorInfo = @"
|
||||
Author : <a href="https://github.com/ChrisTitusTech">@christitustech</a>
|
||||
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>
|
||||
UI : <a href="https://github.com/MyDrift-user">@MyDrift-user</a>, <a href="https://github.com/Marterich">@Marterich</a>
|
||||
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>, <a href="https://github.com/Marterich">@Marterich</a>
|
||||
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>, <a href="https://github.com/CodingWonders">@CodingWonders</a>
|
||||
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
||||
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
||||
|
1
sign.bat
Normal file
1
sign.bat
Normal file
@ -0,0 +1 @@
|
||||
signtool.exe sign /td sha256 /tr http://timestamp.digicert.com /fd sha256 /n "CT Tech Group LLC" .\winutil.ps1
|
@ -117,7 +117,54 @@
|
||||
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Style>
|
||||
<Style x:Key="AppEntryButtonStyle" TargetType="Button">
|
||||
<Setter Property="Width" Value="{DynamicResource IconButtonSize}"/>
|
||||
<Setter Property="Height" Value="{DynamicResource IconButtonSize}"/>
|
||||
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="{DynamicResource IconFontSize}"
|
||||
Background="Transparent"/>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid>
|
||||
<Border x:Name="BackgroundBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{DynamicResource ButtonBorderThickness}"
|
||||
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundPressedColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
||||
<Setter Property="Foreground" Value="DimGray"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
</Style>
|
||||
<Style TargetType="Button" x:Key="HoverButtonStyle">
|
||||
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
|
Reference in New Issue
Block a user