Skip to content

Commit 88fa7f5

Browse files
committed
Improve how dependencies are checked and installed
1 parent b74dece commit 88fa7f5

File tree

6 files changed

+17
-8
lines changed

6 files changed

+17
-8
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ To translate WingetUI to other languages or to update an old translation, please
144144
| <img src='https://flagcdn.com/no.svg' width=20> &nbsp; Norwegian (nynorsk) | 100% | [yrjarv](https://github.com/yrjarv) |
145145
| <img src='https://flagcdn.com/nl.svg' width=20> &nbsp; Dutch - Nederlands | 100% | [abbydiode](https://github.com/abbydiode), [Stephan-P](https://github.com/Stephan-P) |
146146
| <img src='https://flagcdn.com/pl.svg' width=20> &nbsp; Polish - Polski | 99% | [KamilZielinski](https://github.com/KamilZielinski), [kwiateusz](https://github.com/kwiateusz), [RegularGvy13](https://github.com/RegularGvy13), [ThePhaseless](https://github.com/ThePhaseless) |
147-
| <img src='https://flagcdn.com/br.svg' width=20> &nbsp; Portuguese (Brazil) | 99% | [maisondasilva](https://github.com/maisondasilva), [ppvnf](https://github.com/ppvnf), [Rodrigo-Matsuura](https://github.com/Rodrigo-Matsuura), [wanderleihuttel](https://github.com/wanderleihuttel) |
147+
| <img src='https://flagcdn.com/br.svg' width=20> &nbsp; Portuguese (Brazil) | 100% | [maisondasilva](https://github.com/maisondasilva), [ppvnf](https://github.com/ppvnf), [Rodrigo-Matsuura](https://github.com/Rodrigo-Matsuura), [thiagojramos](https://github.com/thiagojramos), [wanderleihuttel](https://github.com/wanderleihuttel) |
148148
| <img src='https://flagcdn.com/pt.svg' width=20> &nbsp; Portuguese (Portugal) | 99% | [PoetaGA](https://github.com/PoetaGA), [Tiago_Ferreira](https://github.com/Tiago_Ferreira) |
149149
| <img src='https://flagcdn.com/ro.svg' width=20> &nbsp; Romanian - Română | 100% | [SilverGreen93](https://github.com/SilverGreen93), TZACANEL |
150150
| <img src='https://flagcdn.com/ru.svg' width=20> &nbsp; Russian - Русский | 100% | [bropines](https://github.com/bropines), [DvladikD](https://github.com/DvladikD), [flatron4eg](https://github.com/flatron4eg), [katrovsky](https://github.com/katrovsky), Sergey, sklart |
@@ -162,7 +162,7 @@ To translate WingetUI to other languages or to update an old translation, please
162162
| <img src='https://flagcdn.com/cn.svg' width=20> &nbsp; Simplified Chinese (China) | 100% | Aaron Liu, adfnekc, [arthurfsy2](https://github.com/arthurfsy2), [bai0012](https://github.com/bai0012), BUGP Association, ciaran, CnYeSheng, Cololi, [FloatStream](https://github.com/FloatStream), [SpaceTimee](https://github.com/SpaceTimee), Yisme |
163163
| <img src='https://flagcdn.com/tw.svg' width=20> &nbsp; Traditional Chinese (Taiwan) | 99% | Aaron Liu, CnYeSheng, Cololi, [Henryliu880922](https://github.com/Henryliu880922), [yrctw](https://github.com/yrctw) |
164164

165-
Last updated: Sun Jun 30 00:12:46 2024
165+
Last updated: Mon Jul 1 14:39:12 2024
166166
<!-- END Autogenerated translations -->
167167

168168

src/UniGetUI.PackageEngine.Managers.Dotnet/DotNet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public DotNet() : base()
2323
new ManagerDependency(
2424
".NET Tools Outdated",
2525
Path.Join(Environment.SystemDirectory, "windowspowershell\\v1.0\\powershell.exe"),
26-
"-ExecutionPolicy Bypass -NoLogo -NoProfile -Command \"& {dotnet tool install --global dotnet-tools-outdated: ; if($error.count -ne 0){pause}}\"",
26+
"-ExecutionPolicy Bypass -NoLogo -NoProfile -Command \"& {dotnet tool install --global dotnet-tools-outdated --add-source https://api.nuget.org/v3/index.json; if($error.count -ne 0){pause}}\"",
2727
async () => (await CoreTools.Which("dotnet-tools-outdated.exe")).Item1)
2828
];
2929

src/UniGetUI.PackageEngine.Managers.Scoop/Scoop.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,18 @@ public class Scoop : PackageManager
2424
public Scoop(): base()
2525
{
2626
Dependencies = [
27+
// Scoop-Search is required for search to work
2728
new ManagerDependency(
2829
"Scoop-Search",
2930
Path.Join(Environment.SystemDirectory, "windowspowershell\\v1.0\\powershell.exe"),
3031
"-ExecutionPolicy Bypass -NoLogo -NoProfile -Command \"& {scoop install main/scoop-search; if($error.count -ne 0){pause}}\"",
31-
async () => (await CoreTools.Which("scoop-search.exe")).Item1)
32+
async () => (await CoreTools.Which("scoop-search.exe")).Item1),
33+
// GIT is required for scoop updates to work
34+
new ManagerDependency(
35+
"Git",
36+
Path.Join(Environment.SystemDirectory, "windowspowershell\\v1.0\\powershell.exe"),
37+
"-ExecutionPolicy Bypass -NoLogo -NoProfile -Command \"& {scoop install main/git; if($error.count -ne 0){pause}}\"",
38+
async () => (await CoreTools.Which("git.exe")).Item1)
3239
];
3340

3441
Capabilities = new ManagerCapabilities()
@@ -37,7 +44,7 @@ public Scoop(): base()
3744
CanSkipIntegrityChecks = true,
3845
CanRemoveDataOnUninstall = true,
3946
SupportsCustomArchitectures = true,
40-
SupportedCustomArchitectures = new Architecture[] { Architecture.X86, Architecture.X64, Architecture.Arm64 },
47+
SupportedCustomArchitectures = [Architecture.X86, Architecture.X64, Architecture.Arm64],
4148
SupportsCustomScopes = true,
4249
SupportsCustomSources = true,
4350
Sources = new ManagerSource.Capabilities()

src/UniGetUI.PackageEngine.PackageManagerClasses/Manager/Classes/ManagerProperties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace UniGetUI.PackageEngine.ManagerClasses.Manager
44
{
5-
public class ManagerProperties
5+
public struct ManagerProperties
66
{
77
public bool IsDummy = false;
88
public string Name { get; set; } = "Unset";

src/UniGetUI.PackageEngine.PackageManagerClasses/Manager/Classes/ManagerStatus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace UniGetUI.PackageEngine.Classes.Manager.ManagerHelpers
22
{
3-
public class ManagerStatus
3+
public struct ManagerStatus
44
{
55
public string Version = "";
66
public bool Found = false;

src/UniGetUI/Assets/Utilities/install_scoop.cmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
SET unigetuipath=%~dp0..\unigetui.exe
2+
SET unigetuipath=%~dp0..\wingetui.exe
33
set pwsh=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
44
echo Scoop Installer Assistant - UniGetUI
55
echo This script will install Scoop and its dependencies, since it appears that they are not installed on your machine.
@@ -10,10 +10,12 @@ cls
1010
if %errorlevel% equ 0 (
1111
echo UniGetUI will be restarted to continue.
1212
pause
13+
taskkill /im wingetui.exe /f
1314
taskkill /im unigetui.exe /f
1415
start /b "%unigetuipath%" /i
1516
) else (
1617
pause
18+
taskkill /im wingetui.exe /f
1719
taskkill /im unigetui.exe /f
1820
start /b "%unigetuipath%" /i
1921
)

0 commit comments

Comments
 (0)