Rename profile/icons to profile/binmeta

This commit is contained in:
Daniel
2023-12-19 15:33:45 +01:00
parent a88de1532c
commit 2ae24656fc
23 changed files with 49 additions and 49 deletions

View File

@@ -10,7 +10,7 @@ import (
"github.com/safing/portbase/log"
"github.com/safing/portmaster/process"
"github.com/safing/portmaster/profile"
"github.com/safing/portmaster/profile/icons"
"github.com/safing/portmaster/profile/binmeta"
)
func init() {
@@ -124,7 +124,7 @@ func (h *AppImageHandler) CreateProfile(p *process.Process) *profile.Profile {
if tag, ok := p.GetTag(appImagePathTagKey); ok {
return profile.New(&profile.Profile{
Source: profile.SourceLocal,
Name: icons.GenerateBinaryNameFromPath(p.Path),
Name: binmeta.GenerateBinaryNameFromPath(p.Path),
PresentationPath: p.Path,
UsePresentationPath: true,
Fingerprints: []profile.Fingerprint{
@@ -141,7 +141,7 @@ func (h *AppImageHandler) CreateProfile(p *process.Process) *profile.Profile {
if tag, ok := p.GetTag(appImageMountIDTagKey); ok {
return profile.New(&profile.Profile{
Source: profile.SourceLocal,
Name: icons.GenerateBinaryNameFromPath(p.Path),
Name: binmeta.GenerateBinaryNameFromPath(p.Path),
PresentationPath: p.Path,
UsePresentationPath: true,
Fingerprints: []profile.Fingerprint{

View File

@@ -5,7 +5,7 @@ import (
"github.com/safing/portmaster/process"
"github.com/safing/portmaster/profile"
"github.com/safing/portmaster/profile/icons"
"github.com/safing/portmaster/profile/binmeta"
)
func init() {
@@ -69,7 +69,7 @@ func (h *flatpakHandler) CreateProfile(p *process.Process) *profile.Profile {
if tag, ok := p.GetTag(flatpakIDTagKey); ok {
return profile.New(&profile.Profile{
Source: profile.SourceLocal,
Name: icons.GenerateBinaryNameFromPath(p.Path),
Name: binmeta.GenerateBinaryNameFromPath(p.Path),
PresentationPath: p.Path,
UsePresentationPath: true,
Fingerprints: []profile.Fingerprint{

View File

@@ -14,7 +14,7 @@ import (
"github.com/safing/portmaster/process"
"github.com/safing/portmaster/profile"
"github.com/safing/portmaster/profile/icons"
"github.com/safing/portmaster/profile/binmeta"
)
func init() {
@@ -161,7 +161,7 @@ func (h *InterpHandler) CreateProfile(p *process.Process) *profile.Profile {
for _, ext := range it.Extensions {
scriptName, _ = strings.CutSuffix(scriptName, ext)
}
scriptName = icons.GenerateBinaryNameFromPath(scriptName)
scriptName = binmeta.GenerateBinaryNameFromPath(scriptName)
return profile.New(&profile.Profile{
Source: profile.SourceLocal,

View File

@@ -5,7 +5,7 @@ import (
"github.com/safing/portmaster/process"
"github.com/safing/portmaster/profile"
"github.com/safing/portmaster/profile/icons"
"github.com/safing/portmaster/profile/binmeta"
)
func init() {
@@ -117,7 +117,7 @@ func (h *SnapHandler) CreateProfile(p *process.Process) *profile.Profile {
return profile.New(&profile.Profile{
Source: profile.SourceLocal,
Name: icons.GenerateBinaryNameFromPath(tag.Value),
Name: binmeta.GenerateBinaryNameFromPath(tag.Value),
PresentationPath: p.Path,
UsePresentationPath: hasVersion,
Fingerprints: []profile.Fingerprint{

View File

@@ -9,7 +9,7 @@ import (
"github.com/safing/portbase/utils/osdetail"
"github.com/safing/portmaster/process"
"github.com/safing/portmaster/profile"
"github.com/safing/portmaster/profile/icons"
"github.com/safing/portmaster/profile/binmeta"
)
func init() {
@@ -86,7 +86,7 @@ func (h *SVCHostTagHandler) CreateProfile(p *process.Process) *profile.Profile {
// Create new profile based on tag.
newProfile := profile.New(&profile.Profile{
Source: profile.SourceLocal,
Name: "Windows Service: " + icons.GenerateBinaryNameFromPath(tag.Value),
Name: "Windows Service: " + binmeta.GenerateBinaryNameFromPath(tag.Value),
UsePresentationPath: false,
Fingerprints: []profile.Fingerprint{
{
@@ -99,9 +99,9 @@ func (h *SVCHostTagHandler) CreateProfile(p *process.Process) *profile.Profile {
})
// Load default icon for windows service.
icon, err := icons.LoadAndSaveIcon(context.TODO(), `C:\Windows\System32\@WLOGO_48x48.png`)
icon, err := binmeta.LoadAndSaveIcon(context.TODO(), `C:\Windows\System32\@WLOGO_48x48.png`)
if err == nil {
newProfile.Icons = []icons.Icon{*icon}
newProfile.Icons = []binmeta.Icon{*icon}
}
return newProfile

View File

@@ -8,7 +8,7 @@ import (
"github.com/safing/portbase/utils"
"github.com/safing/portmaster/process"
"github.com/safing/portmaster/profile"
"github.com/safing/portmaster/profile/icons"
"github.com/safing/portmaster/profile/binmeta"
)
func init() {
@@ -101,7 +101,7 @@ func (h *WinStoreHandler) CreateProfile(p *process.Process) *profile.Profile {
if tag, ok := p.GetTag(winStoreAppNameTagKey); ok {
return profile.New(&profile.Profile{
Source: profile.SourceLocal,
Name: icons.GenerateBinaryNameFromPath(tag.Value),
Name: binmeta.GenerateBinaryNameFromPath(tag.Value),
PresentationPath: p.Path,
UsePresentationPath: true,
Fingerprints: []profile.Fingerprint{