Compare commits

..

50 Commits

Author SHA1 Message Date
8782aaa74f remove unused autofallback 2025-02-28 20:08:48 +01:00
daf75a1d4a toggle showselected on GetInstalled 2025-02-28 19:53:22 +01:00
6b5db60ce7 remove scrollviewer from WPFUIElements 2025-02-28 19:33:58 +01:00
df29188f1e Merge branch 'main' into appspanelrestyle 2025-02-28 11:07:10 -06:00
a6bababb43 remove installation scope
- remove all 3 radiobuttons from appnavigation.json
2024-11-03 16:27:43 +01:00
5514025577 run preprocessing 2024-11-02 13:51:48 +01:00
c46a7eaa40 disable autofallback checkbox 2024-11-02 13:51:15 +01:00
e0e8daf4e2 Fix Bug where Scrollviewer dosnt work 2024-10-29 21:51:07 +01:00
cf2f741408 Split up the functions to seperate files like the rest of the repo 2024-10-28 22:53:03 +01:00
7d0e4df4ec Add a Popup Dropdown for Selected Apps with the ability to deselect them 2024-10-27 21:24:20 +01:00
7e6634d99d disable show selected filter on clear selection 2024-10-27 16:03:23 +01:00
f04b52d0db ToggleButtonStyle animation
- add hover animation to white dot
- remove IsPressed trigger
- improve some comments
2024-10-27 12:59:40 +01:00
402082b376 Add hover effect for the app tiles 2024-10-26 21:00:34 +02:00
79fb48e4df Slight modificatoin to togglebutton style & fix sidebar width 2024-10-26 19:52:23 +02:00
3faa3bad3d reorder buttons & fix Togglebutton toggling if action not possible
- reorder getinstalled and clearselection
- set togglebutton back if no app is selected
2024-10-26 17:16:33 +02:00
d441952e5e Add logic to the new ToggleButtons in the sidebar of the install tab and remove old buttons 2024-10-26 16:36:42 +02:00
c0d6e0bbc7 Togglebutton fixes
- move dot to the right in style
- cleanup code
- fix arrangement of content
2024-10-26 15:25:33 +02:00
fd4d783a04 Improve Togglebutton
- add initial implementation of togglebutton style
- add togglebuttons to appnavigation.json
- refractor UI element creation for Togglebutton
- commit preprocessing changes
2024-10-26 14:08:53 +02:00
e048097c78 Fix weird buggy behaviour in regards to switching the Display Mode and using Show-SelectedOnly 2024-10-21 22:35:00 +02:00
4bfeacf80d Keep the search status when switching between compact and full view 2024-10-21 20:36:06 +02:00
80a933db8e Fix Whitespace when using Search 2024-10-16 08:03:14 +02:00
9dd89136e8 First Try at implementing a Compact Mode for the App page 2024-10-15 23:27:56 +02:00
7b273d5634 Replace Category Label with ToggleButton, Fix Search Bugs 2024-10-14 22:25:23 +02:00
2d0e68c90f Hotfix for Category Expansion during search 2024-10-14 21:31:53 +02:00
ba968d0cb3 Style for Hidden Checkbox but visible Content 2024-10-14 20:46:28 +02:00
8d34e2fa30 Small fixes to the Get-Installed function and formatting stuff 2024-10-14 20:02:36 +02:00
dcf752fdeb Remove Alphabetical List, Sort Apps inside Category Alphabetically 2024-10-14 19:17:12 +02:00
a839acd949 Remove Logic from Invoke-WPFUIElements that is Moved to Invoke-WPFUIApps 2024-10-13 20:55:25 +02:00
f05fece2e5 Re-Add Choco Preference 2024-10-13 20:45:26 +02:00
cf664bd1d3 Add Get-Installed Loading Indicator + small fixes 2024-10-13 20:33:26 +02:00
6d88e51462 LETS GOOO (#12)
* Add Selected Apps Label, Reshuffel the nesting of the checkbox and the label to be able to reference the name from the actual checkbox

* Add visual selection and allow click on the whole app section

* Fix Theme definition to work with theme change

* Fix Highlight on if label or icon is clicked

* change applications.json to powershell object list and refactor UI Creation logic

* Optimization and Add Collapsable Categories

* Add Button functionality for install, uninstall, info, install selected, uninstall selected, clear and implement search

* Rest application.json to Main

* Reset Compile to main

* Pretty much revamp_apps but without changes to applications.json

* Small fixes
2024-10-13 19:25:02 +02:00
5bbc6c6a92 Merge branch 'ChrisTitusTech:main' into appspanelrestyle 2024-10-13 19:14:41 +02:00
fdb156a450 fix radiobuttons 2024-10-02 08:17:47 +02:00
7d90ab8660 add virtualisation & layouting fixes
- commented out prefer choco logic
- add virtualisation
- layouting improvements
2024-10-01 18:55:27 +02:00
f576d57ffc change category of new buttons 2024-09-29 10:24:21 +02:00
4889c1c508 fix app action button logic & move get & clear to sidepanel 2024-09-29 09:56:10 +02:00
ae1a9530f9 format logic for app action buttons 2024-09-29 09:40:28 +02:00
0467c3a7c8 move scrollviewer & app buttons into uielements logic 2024-09-29 09:32:10 +02:00
7686e7fff4 add sort by options 2024-09-28 17:05:25 +02:00
468b7209be rename buttons 2024-09-28 14:26:50 +02:00
15c84f2a1f add button action 2024-09-28 13:47:15 +02:00
5b0ea0b373 cleanup & remove nav from search effects 2024-09-28 13:40:38 +02:00
e8de029483 add notes 2024-09-28 02:21:12 +02:00
af39f43cec noimage fix 2024-09-28 02:19:42 +02:00
5bb940d4d5 fix scrollviewer & reimplement logo logic into ui elements 2024-09-28 02:01:53 +02:00
4c38768b32 add border name 2024-09-28 01:23:28 +02:00
6229ab6dd4 performance improvements
- move get logo to runspace (not working rn)
- readd choco checkbox to mute errors
2024-09-28 01:04:40 +02:00
71c35eccd6 add compatibility for every app 2024-09-28 00:43:56 +02:00
db521534bc add image support via choco db
- add image support via choco db
- backup image should be taken from unigetui db
- backup backup image is some random package one rn
2024-09-28 00:21:22 +02:00
a1188871f4 initial visual implementation
- remove idiotic border logic from Invoke-WPFUIElements
- add "application" type & style
- add "radiobutton" type & style
- remove prefer choco checkbox (did not modify logic outside of xaml, so i currently get errors due to that)
2024-09-27 22:54:07 +02:00
6 changed files with 169 additions and 118 deletions

View File

@ -7,10 +7,10 @@ body:
attributes:
value: |
# 🐞 **Issue Report**
Thank you for taking the time to report an issue! Please provide as much detail as possible to help us address the problem efficiently.
Thank you for taking the time to report an issue! Please provide as much detail as possible to help us address the problem efficiently.
## ⚠️ **IMPORTANT**
- 🛠️ **Supported environments only:** We only support Windows 11. Custom ISOs that are not made using Microwin are not supported.
## ⚠️ **IMPORTANT**
- 🛠️ **Supported environments only:** We only support Windows 11. Custom ISOs that are not made using Microwin are not supported.
- 💡 For general questions, use the [Discussions section](https://github.com/Christitustech/winutil/discussions) or join our Community-driven [Discord Server](https://discord.gg/RUbZUZyByQ).
- type: checkboxes

View File

@ -9,7 +9,7 @@ body:
# ✨ **Feature request**
Thank you for taking the time to suggest a feature! Please provide as much detail as possible to help us understand and evaluate your request.
## ⚠️ **IMPORTANT**
## ⚠️ **IMPORTANT**
- 🛠️ **Supported environments only:** We only support Windows 11.
- 💡 For general questions, use the [Discussions section](https://github.com/Christitustech/winutil/discussions) or join our Community-driven [Discord Server](https://discord.gg/RUbZUZyByQ).
@ -54,4 +54,4 @@ body:
label: 🖼️ Additional context
placeholder: "Include screenshots, code blocks (use triple backticks ```), or any other relevant information."
validations:
required: false
required: false

View File

@ -1,6 +1,5 @@
# Import the function (adjust the path according to your setup)
. "./functions/private/Install-WinUtilWinget.ps1"
. "./functions/private/Test-WinUtilPackageManager.ps1"
. "./functions/private/Get-WinUtilWingetLatest.ps1"
# Set up Information stream to be visible
$InformationPreference = "Continue"
@ -8,7 +7,20 @@ $InformationPreference = "Continue"
Write-Host "Starting Winget installation test..." -ForegroundColor Cyan
try {
Install-WinUtilWinget
# Test the function with verbose output
Write-Host "Attempting to run Get-WinUtilWingetLatest..." -ForegroundColor Cyan
Get-WinUtilWingetLatest -Verbose
# Verify Winget is working
if (Get-Command winget -ErrorAction SilentlyContinue) {
Write-Host "Success! Winget is installed and accessible." -ForegroundColor Green
# Display Winget version
Write-Host "`nWinget version:" -ForegroundColor Cyan
winget --version
} else {
Write-Host "Warning: Winget is installed but not accessible in the current session. You may need to restart your terminal." -ForegroundColor Yellow
}
} catch {
Write-Host "Error occurred during testing: $($_.Exception.Message)" -ForegroundColor Red
Write-Host "Stack Trace:" -ForegroundColor Red

View File

@ -423,6 +423,26 @@
"StartupType": "Automatic",
"OriginalType": "Automatic"
},
{
"Name": "DoSvc",
"StartupType": "AutomaticDelayedStart",
"OriginalType": "Automatic"
},
{
"Name": "DsSvc",
"StartupType": "Manual",
"OriginalType": "Manual"
},
{
"Name": "DsmSvc",
"StartupType": "Manual",
"OriginalType": "Manual"
},
{
"Name": "DusmSvc",
"StartupType": "Automatic",
"OriginalType": "Automatic"
},
{
"Name": "EFS",
"StartupType": "Manual",
@ -878,6 +898,11 @@
"StartupType": "Manual",
"OriginalType": "Manual"
},
{
"Name": "SgrmBroker",
"StartupType": "Automatic",
"OriginalType": "Automatic"
},
{
"Name": "SharedAccess",
"StartupType": "Manual",
@ -908,6 +933,11 @@
"StartupType": "Manual",
"OriginalType": "Manual"
},
{
"Name": "StateRepository",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "StiSvc",
"StartupType": "Manual",
@ -943,6 +973,11 @@
"StartupType": "Automatic",
"OriginalType": "Automatic"
},
{
"Name": "TextInputManagementService",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "Themes",
"StartupType": "Automatic",

View File

@ -0,0 +1,104 @@
function Get-WinUtilWingetLatest {
[CmdletBinding()]
param()
<#
.SYNOPSIS
Uses GitHub API to check for the latest release of Winget.
.DESCRIPTION
This function first attempts to update WinGet using winget itself, then falls back to manual installation if needed.
#>
$ProgressPreference = "SilentlyContinue"
$InformationPreference = 'Continue'
try {
$wingetCmd = Get-Command winget -ErrorAction Stop
Write-Information "Attempting to update WinGet using WinGet..."
$result = Start-Process -FilePath "`"$($wingetCmd.Source)`"" -ArgumentList "install -e --accept-source-agreements --accept-package-agreements Microsoft.AppInstaller" -Wait -NoNewWindow -PassThru
if ($result.ExitCode -ne 0) {
throw "WinGet update failed with exit code: $($result.ExitCode)"
}
return $true
}
catch {
Write-Information "WinGet not found or update failed. Attempting to install from Microsoft Store..."
try {
# Try to close any running WinGet processes
Get-Process -Name "DesktopAppInstaller", "winget" -ErrorAction SilentlyContinue | ForEach-Object {
Write-Information "Stopping running WinGet process..."
$_.Kill()
Start-Sleep -Seconds 2
}
# Try to load Windows Runtime assemblies more reliably
$null = [System.Runtime.WindowsRuntime.WindowsRuntimeSystemExtensions]
Add-Type -AssemblyName System.Runtime.WindowsRuntime
# Load required assemblies from Windows SDK
$null = @(
[Windows.Management.Deployment.PackageManager, Windows.Management.Deployment, ContentType = WindowsRuntime]
[Windows.Foundation.Uri, Windows.Foundation, ContentType = WindowsRuntime]
[Windows.Management.Deployment.DeploymentOptions, Windows.Management.Deployment, ContentType = WindowsRuntime]
)
# Initialize PackageManager
$packageManager = New-Object Windows.Management.Deployment.PackageManager
# Rest of the Microsoft Store installation logic
$appxPackage = "https://aka.ms/getwinget"
$uri = New-Object Windows.Foundation.Uri($appxPackage)
$deploymentOperation = $packageManager.AddPackageAsync($uri, $null, "Add")
# Add timeout check for deployment operation
$timeout = 300
$timer = [System.Diagnostics.Stopwatch]::StartNew()
while ($deploymentOperation.Status -eq 0) {
if ($timer.Elapsed.TotalSeconds -gt $timeout) {
throw "Installation timed out after $timeout seconds"
}
Start-Sleep -Milliseconds 100
}
if ($deploymentOperation.Status -eq 1) {
Write-Information "Successfully installed WinGet from Microsoft Store"
return $true
} else {
throw "Installation failed with status: $($deploymentOperation.Status)"
}
}
catch [System.Management.Automation.RuntimeException] {
Write-Information "Windows Runtime components not available. Attempting manual download..."
try {
# Try to close any running WinGet processes
Get-Process -Name "DesktopAppInstaller", "winget" -ErrorAction SilentlyContinue | ForEach-Object {
Write-Information "Stopping running WinGet process..."
$_.Kill()
Start-Sleep -Seconds 2
}
# Fallback to direct download from GitHub
$apiUrl = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
$release = Invoke-RestMethod -Uri $apiUrl
$msixBundleUrl = ($release.assets | Where-Object { $_.name -like "*.msixbundle" }).browser_download_url
$tempFile = Join-Path $env:TEMP "Microsoft.DesktopAppInstaller.msixbundle"
Invoke-WebRequest -Uri $msixBundleUrl -OutFile $tempFile
Add-AppxPackage -Path $tempFile -ErrorAction Stop
Remove-Item $tempFile -Force
Write-Information "Successfully installed WinGet from GitHub release"
return $true
}
catch {
Write-Error "Failed to install WinGet: $_"
return $false
}
}
catch {
Write-Error "Failed to install WinGet: $_"
return $false
}
}
}

View File

@ -33,118 +33,18 @@ function Install-WinUtilWinget {
return
}
Write-Host "Attempting to install/update Winget`r"
try {
$wingetCmd = Get-Command winget -ErrorAction Stop
Write-Information "Attempting to update WinGet using WinGet..."
$result = Start-Process -FilePath "`"$($wingetCmd.Source)`"" -ArgumentList "install -e --accept-source-agreements --accept-package-agreements Microsoft.AppInstaller" -Wait -NoNewWindow -PassThru
if ($result.ExitCode -ne 0) {
throw "WinGet update failed with exit code: $($result.ExitCode)"
}
Write-Output "Refreshing Environment Variables...`n"
$ENV:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
return
} catch {
Write-Information "WinGet not found or update failed. Attempting to install from Microsoft Store..."
}
try {
# Try to close any running WinGet processes
Get-Process -Name "DesktopAppInstaller", "winget" -ErrorAction SilentlyContinue | ForEach-Object {
Write-Information "Stopping running WinGet process..."
$_.Kill()
Start-Sleep -Seconds 2
}
# Try to load Windows Runtime assemblies more reliably
$null = [System.Runtime.WindowsRuntime.WindowsRuntimeSystemExtensions]
Add-Type -AssemblyName System.Runtime.WindowsRuntime
# Load required assemblies from Windows SDK
$null = @(
[Windows.Management.Deployment.PackageManager, Windows.Management.Deployment, ContentType = WindowsRuntime]
[Windows.Foundation.Uri, Windows.Foundation, ContentType = WindowsRuntime]
[Windows.Management.Deployment.DeploymentOptions, Windows.Management.Deployment, ContentType = WindowsRuntime]
)
# Initialize PackageManager
$packageManager = New-Object Windows.Management.Deployment.PackageManager
# Rest of the Microsoft Store installation logic
$appxPackage = "https://aka.ms/getwinget"
$uri = New-Object Windows.Foundation.Uri($appxPackage)
$deploymentOperation = $packageManager.AddPackageAsync($uri, $null, "Add")
# Add timeout check for deployment operation
$timeout = 300
$timer = [System.Diagnostics.Stopwatch]::StartNew()
while ($deploymentOperation.Status -eq 0) {
if ($timer.Elapsed.TotalSeconds -gt $timeout) {
throw "Installation timed out after $timeout seconds"
}
Start-Sleep -Milliseconds 100
}
if ($deploymentOperation.Status -eq 1) {
Write-Information "Successfully installed WinGet from Microsoft Store"
Write-Output "Refreshing Environment Variables...`n"
$ENV:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
return
} else {
throw "Installation failed with status: $($deploymentOperation.Status)"
}
} catch {
Write-Information "Microsoft Store installation failed. Attempting to install from Nuget..."
}
try {
## Nuget Method
Write-Host "Enabling NuGet and Module..."
# Enable TLS 1.2 for the PowerShell session
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Try to register the NuGet package source if not present
if (-not (Get-PackageSource -Name "NuGet" -ErrorAction SilentlyContinue)) {
Register-PackageSource -Name "NuGet" -Location "https://www.nuget.org/api/v2" -ProviderName NuGet -Force
}
# Install NuGet provider with error handling
try {
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false -ErrorAction Stop
} catch {
Write-Warning "Failed to install NuGet provider through standard method. Trying alternative approach..."
Install-PackageProvider -Name NuGet -Source "https://www.powershellgallery.com/api/v2" -Force -Confirm:$false
}
Install-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force
# Check if WinGet was installed successfully through NuGet
$wingetCmd = Get-Command winget -ErrorAction Stop
Write-Information "Successfully installed WinGet through NuGet"
Write-Output "Refreshing Environment Variables...`n"
$ENV:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
return
} catch {
Write-Warning "NuGet installation failed. Attempting to install from GitHub..."
}
# GitHub fallback installation method
$releases_url = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
$asset = (Invoke-RestMethod -Uri $releases_url).assets |
Where-Object { $_.name -match "\.msixbundle$" } |
Select-Object -First 1
$download_url = $asset.browser_download_url
$output_path = Join-Path $env:TEMP $asset.name
Invoke-WebRequest -Uri $download_url -OutFile $output_path
Add-AppxPackage -Path $output_path -ErrorAction Stop
# Verify installation
$wingetCmd = Get-Command winget -ErrorAction Stop
Write-Information "Successfully installed WinGet through GitHub"
# Install Winget via GitHub method.
# Used part of my own script with some modification: ruxunderscore/windows-initialization
Write-Host "Downloading Winget and License File`r"
Get-WinUtilWingetLatest
Write-Host "Enabling NuGet and Module..."
Install-PackageProvider -Name NuGet -Force
Install-Module -Name Microsoft.WinGet.Client -Force
# Winget only needs a refresh of the environment variables to be used.
Write-Output "Refreshing Environment Variables...`n"
$ENV:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
return
} catch {
Write-Error "All installation methods failed. Unable to install WinGet."
throw
Write-Error "Failed to install Winget: $($_.Exception.Message)"
}
}