Skip to content

Commit

Permalink
Embedded PS1 scripts into the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
4r7if3x committed Jun 7, 2023
1 parent 5158158 commit bacd8d1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 36 deletions.
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{ps1,rtf}]
[*.rtf]
end_of_line = crlf

[*.ps1]
indent_style = tab

[{.gitignore,*.desktop}]
indent_size = 0

Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,24 @@ jobs:
- name: Install dependencies
if: ${{ matrix.os == 'windows' }}
shell: powershell
run: .\resources\packaging\windows\scripts\npcap.ps1 -ARCH ${{ matrix.arch }} -OEM "${{ secrets.NPCAP_OEM_URL }}"
run: |
Write-Host "::group::Npcap SDK"
$ARCH = "${{ matrix.arch }}"
Invoke-WebRequest -Uri "https://npcap.com/dist/npcap-sdk-1.13.zip" -OutFile "$env:TEMP\npcap-sdk.zip" -Verbose
Expand-Archive -LiteralPath "$env:TEMP\npcap-sdk.zip" -DestinationPath "$env:TEMP\npcap-sdk" -Verbose
$LibPath = switch ($ARCH)
{
"i386" { "Lib" }
"amd64" { "Lib\x64" }
"arm64" { "Lib\ARM64" }
default { throw "$ARCH is not supported!" }
}
Add-Content -Path "$env:GITHUB_ENV" -Value "LIB=$env:TEMP\npcap-sdk\$LibPath"
Write-Host "::endgroup::"
Write-Host "::group::Npcap DLL"
Invoke-WebRequest -Uri "${{ secrets.NPCAP_OEM_URL }}" -OutFile "$env:TEMP\npcap-oem.exe" -Verbose
Start-Process -FilePath "$env:TEMP\npcap-oem.exe" -ArgumentList "/S" -Wait
Write-Host "::endgroup::"
- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -264,7 +281,14 @@ jobs:

- name: Install dependencies
shell: powershell
run: .\resources\packaging\windows\scripts\wix.ps1
run: |
Write-Host "::group::WiX Toolset"
Invoke-WebRequest `
-Uri "https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip" `
-OutFile "$env:TEMP\wix-binaries.zip" -Verbose
Expand-Archive -LiteralPath "$env:TEMP\wix-binaries.zip" -DestinationPath "$env:TEMP\wix" -Verbose
Set-Item -Path env:Path -Value "$env:Path;$env:TEMP\wix"
Write-Host "::endgroup::"
- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down
25 changes: 0 additions & 25 deletions resources/packaging/windows/scripts/npcap.ps1

This file was deleted.

5 changes: 0 additions & 5 deletions resources/packaging/windows/scripts/wix.ps1

This file was deleted.

0 comments on commit bacd8d1

Please sign in to comment.