From fdeea9b13b92bfca65de8f6db46e972c6c577401 Mon Sep 17 00:00:00 2001 From: Elliot Chernofsky Date: Tue, 12 Nov 2024 21:25:44 -0500 Subject: [PATCH] Fix internet_detector not installing --- packages/internet_detector.vm/internet_detector.vm.nuspec | 2 +- packages/internet_detector.vm/tools/chocolateyinstall.ps1 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/internet_detector.vm/internet_detector.vm.nuspec b/packages/internet_detector.vm/internet_detector.vm.nuspec index f64f2696..05c97572 100644 --- a/packages/internet_detector.vm/internet_detector.vm.nuspec +++ b/packages/internet_detector.vm/internet_detector.vm.nuspec @@ -2,7 +2,7 @@ internet_detector.vm - 1.0.0.20241029 + 1.0.0.20241112 Elliot Chernofsky and Ana Martinez Gomez Tool that changes the background and a taskbar icon if it detects internet connectivity diff --git a/packages/internet_detector.vm/tools/chocolateyinstall.ps1 b/packages/internet_detector.vm/tools/chocolateyinstall.ps1 index a999eb58..5169f9ef 100644 --- a/packages/internet_detector.vm/tools/chocolateyinstall.ps1 +++ b/packages/internet_detector.vm/tools/chocolateyinstall.ps1 @@ -10,12 +10,12 @@ $toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName New-Item -Path $toolDir -ItemType Directory -Force -ea 0 VM-Assert-Path $toolDir -# Install pyinstaller (needed to build the Python executable) and tool dependencies ('pywin32') -$dependencies = "pyinstaller,pywin32" +# Install pyinstaller 6.11.1 (needed to build the Python executable with a version capable of executing in admin cmd) and tool dependencies ('pywin32') +$dependencies = "pyinstaller==6.11.1,pywin32" VM-Pip-Install $dependencies -# This wrapper is needed because we can't run PyInstaller as admin, so this forces a usermode context. -Start-Process -FilePath 'cmd.exe' -ArgumentList "/c pyinstaller --onefile -w --distpath $toolDir --workpath $packageToolDir --specpath $packageToolDir $packageToolDir\internet_detector.pyw" -Wait +# This wrapper is needed because PyInstaller emits an error when running as admin and this mitigates the issue. +Start-Process -FilePath 'cmd.exe' -WorkingDirectory $toolDir -ArgumentList "/c pyinstaller --onefile -w --log-level FATAL --distpath $toolDir --workpath $packageToolDir --specpath $packageToolDir $packageToolDir\internet_detector.pyw" -Wait # Move images to %VM_COMMON_DIR% directory $imagesPath = Join-Path $packageToolDir "images"