Skip to content

Commit

Permalink
Merge pull request #1163 from mandiant/internet-detect-fix
Browse files Browse the repository at this point in the history
Fix internet_detector not installing
  • Loading branch information
emtuls authored Nov 15, 2024
2 parents 914d0e1 + fdeea9b commit fe713e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/internet_detector.vm/internet_detector.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>internet_detector.vm</id>
<version>1.0.0.20241029</version>
<version>1.0.0.20241112</version>
<authors>Elliot Chernofsky and Ana Martinez Gomez</authors>
<description>Tool that changes the background and a taskbar icon if it detects internet connectivity</description>
<dependencies>
Expand Down
8 changes: 4 additions & 4 deletions packages/internet_detector.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fe713e9

Please sign in to comment.