Skip to content

Commit

Permalink
Add chromium installation to the windows ami (#293)
Browse files Browse the repository at this point in the history
* Add chromium installation to the windows ami

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Resolve typo

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Resolve typo

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

---------

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon authored May 25, 2023
1 parent 4877ca8 commit 14f1051
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packer/scripts/windows/scoop-install-alpinewsl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ scoop config no_junction true
# Install alpine
scoop bucket add extras
scoop install alpinewsl

# Scoop clean cache
scoop cache rm --all
15 changes: 15 additions & 0 deletions packer/scripts/windows/scoop-install-commons.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,17 @@ $userenv2 = [System.Environment]::GetEnvironmentVariable("Path", [System.Environ
$nodePathFixed = "C:\\Users\\Administrator\\scoop\\persist\\volta\\appdata\\bin"
[System.Environment]::SetEnvironmentVariable("PATH", $userenv2 + ";$nodePathFixed", [System.EnvironmentVariableTarget]::User)

# Install chromium (internally it is chrome.exe in app directory)
scoop install chromium
$chromiumName = 'chrome.exe'
$chromiumDir = 'C:\\Users\\Administrator\\scoop\\apps\\chromium'
$chromiumFound = (Get-ChildItem -Path $chromiumDir -Filter $chromiumName -Recurse | %{$_.FullName} | select -first 1)
$chromiumFound
$chromiumPathFound = $chromiumPathFound.replace("$chromiumName", '')
$chromiumPathFound
# Add BROWSER_PATH path to User Env Var for cypress test to retrieve chromium.exe path
[System.Environment]::SetEnvironmentVariable("BROWSER_PATH", "$chromiumPathFound", [System.EnvironmentVariableTarget]::User)

# Install ruby24
scoop install ruby24
ruby --version
Expand All @@ -170,3 +181,7 @@ cmake --version

# Install zip
scoop install zip

# Scoop clean cache
scoop cache rm --all

0 comments on commit 14f1051

Please sign in to comment.