32 lines
576 B
Go
32 lines
576 B
Go
|
package action
|
||
|
|
||
|
import (
|
||
|
log "github.com/sirupsen/logrus"
|
||
|
|
||
|
. "ios-wrapper/internal/wrapper/ofile"
|
||
|
)
|
||
|
|
||
|
type addDylib struct {
|
||
|
dylib_to_add []string
|
||
|
}
|
||
|
|
||
|
func (action *addDylib) withMacho(mf *MachoFile) error {
|
||
|
for _, dylib := range action.dylib_to_add {
|
||
|
mf.Context().AddDylib(dylib)
|
||
|
log.WithFields(log.Fields{
|
||
|
"dylib": dylib,
|
||
|
}).Info("Add Load Dylib Command")
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (action *addDylib) withFat(ff *FatFile) error {
|
||
|
return defaultWithFat(action, ff)
|
||
|
}
|
||
|
|
||
|
func NewAddDylibAction(dylib_to_add []string) *addDylib {
|
||
|
return &addDylib{
|
||
|
dylib_to_add,
|
||
|
}
|
||
|
}
|