Skip to content

Commit

Permalink
Adding Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
steffenfritz committed Oct 24, 2024
1 parent fce908b commit f56dad8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,17 @@ jobs:
- name: Build YARA-X C API and locate .pc file
run: |
cd yara-x
cargo cinstall -p yara-x-capi --release --destdir=$env:USERPROFILE\\yara_install
# Suche die .pc Datei
$PC_FILE = Get-ChildItem -Path $env:USERPROFILE\\yara_install -Recurse -Filter yara_x_capi.pc
cargo cinstall -p yara-x-capi --release --target=x86_64-pc-windows-msvc --destdir=$env:USERPROFILE\\yara_install
# Suche die .pc Datei und setze den Pfad
$PC_FILE = Get-ChildItem -Recurse -Filter "yara_x_capi.pc" $env:USERPROFILE\\yara_install
if (-not $PC_FILE) {
Write-Error "Error: yara_x_capi.pc not found"
exit 1
}
$PC_DIR = Split-Path $PC_FILE.FullName
Write-Host "Found yara_x_capi.pc in $PC_DIR"
$env:PKG_CONFIG_PATH = $PC_DIR
Write-Host "Setting PKG_CONFIG_PATH to $PC_DIR"
# Debug Ausgabe
Get-ChildItem $PC_DIR
Expand All @@ -73,6 +74,9 @@ jobs:
$env:PKG_CONFIG_PATH = "$env:USERPROFILE\\yara_install\\usr\\local\\lib\\pkgconfig"
$env:CGO_CFLAGS = "-I$env:USERPROFILE\\yara_install\\usr\\local\\include"
$env:CGO_LDFLAGS = "-L$env:USERPROFILE\\yara_install\\usr\\local\\lib"
# Debug: Zeige den Inhalt des pkg-config-Pfads
Get-ChildItem $env:PKG_CONFIG_PATH
# Verifiziere pkg-config und CFLAGS
pkg-config --cflags --libs yara_x_capi
# Baue das Go-Binary mit der Rust-Bibliothek
Expand Down

0 comments on commit f56dad8

Please sign in to comment.