feat(binana): change tool to deposit generated files into an 'artifacts' folder that isn't retained by repository history

This commit is contained in:
phaneron 2026-02-28 02:34:20 -05:00
parent 68f52b8efd
commit 47b08df145
44 changed files with 904 additions and 622 deletions

View file

@ -0,0 +1,35 @@
package profile
import (
"fmt"
"slices"
)
type CompileArtifactsParams struct {
CompressX64dbgDatabase bool
}
func (profile *Profile) CompileArtifacts(params *CompileArtifactsParams) (err error) {
if !profile.loaded {
panic(profile.loaded)
}
compilers := []struct {
OS []string
Name string
Fn func(*Profile, *CompileArtifactsParams) error
}{
{[]string{"windows", "linux", "darwin"}, "Ghidra", compile_ghidra_artifacts},
{[]string{"windows", "linux", "darwin"}, "IDA Pro", compile_idapro_artifacts},
{[]string{"windows"}, "x64dbg", compile_x64dbg_artifacts},
}
for _, compiler := range compilers {
if slices.Contains(compiler.OS, profile.Info.OS) {
fmt.Println("compiling artifacts for", compiler.Name)
if err = compiler.Fn(profile, params); err != nil {
return
}
}
}
return
}