32 lines
543 B
Go
32 lines
543 B
Go
|
package action
|
||
|
|
||
|
import (
|
||
|
log "github.com/sirupsen/logrus"
|
||
|
|
||
|
. "ios-wrapper/internal/wrapper/ofile"
|
||
|
)
|
||
|
|
||
|
type addRpath struct {
|
||
|
rpath []string
|
||
|
}
|
||
|
|
||
|
func (action *addRpath) withMacho(mf *MachoFile) error {
|
||
|
for _, rpath := range action.rpath {
|
||
|
mf.Context().AddRPath(rpath)
|
||
|
log.WithFields(log.Fields{
|
||
|
"rpath": rpath,
|
||
|
}).Info("Add Rpath Command")
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (action *addRpath) withFat(ff *FatFile) error {
|
||
|
return defaultWithFat(action, ff)
|
||
|
}
|
||
|
|
||
|
func NewAddRpathAction(rpath []string) *addRpath {
|
||
|
return &addRpath{
|
||
|
rpath,
|
||
|
}
|
||
|
}
|