From e6d04bf8e0815899ef2a474f4cb1ff6a74d4bc52 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 8 Sep 2024 23:19:32 -0400 Subject: [PATCH] Support old windows versions Added a test to not error out when the Appx cmdlets are not available (like in the windows 7 box i am using). I had some install issues with creating the bin links so I added "-f". --- install/ExtractPrograms.ps1 | 4 +++- setup.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install/ExtractPrograms.ps1 b/install/ExtractPrograms.ps1 index 12d2c06..fcfbf3d 100644 --- a/install/ExtractPrograms.ps1 +++ b/install/ExtractPrograms.ps1 @@ -329,6 +329,8 @@ Write-Output 'ICONS=()' # Search for installed applications. AppSearchWinReg # Windows Registry -AppSearchUWP # Universal Windows Platform +if (Get-Command Get-AppxPackage -ErrorAction SilentlyContinue){ + AppSearchUWP # Universal Windows Platform +} AppSearchChocolatey # Chocolatey Package Manager AppSearchScoop # Scoop Package Manager diff --git a/setup.sh b/setup.sh index e91bc93..2ebbb50 100755 --- a/setup.sh +++ b/setup.sh @@ -1621,8 +1621,8 @@ function waInstall() { waFindInstalled # Install the WinApps bash scripts. - $SUDO ln -s "./bin/winapps" "${BIN_PATH}/winapps" - $SUDO ln -s "./setup.sh" "${BIN_PATH}/winapps-setup" + $SUDO ln -sf "${SOURCE_PATH}/bin/winapps" "${BIN_PATH}/winapps" + $SUDO ln -sf "${SOURCE_PATH}/setup.sh" "${BIN_PATH}/winapps-setup" # Configure the Windows RDP session application launcher. waConfigureWindows