AppImage file to App

This commit is contained in:
Caleb Gardner
2024-09-28 06:28:54 -05:00
parent 096b5052a8
commit 90f47a3456
4 changed files with 157 additions and 2 deletions
+18
View File
@@ -31,6 +31,24 @@ type App struct {
// Image []byte TODO
}
func ProcessAppImage(fil string) (*App, error) {
ai, err := goappimage.NewAppImage(fil)
if err != nil {
return nil, err
}
app := App{
Name: ai.Name,
// Image: ,
Execs: []Exe{
{
Filename: fil,
Type: AppImage,
},
},
}
return &app, nil
}
func ProcessDir(dir string) (*App, error) {
fils, err := os.ReadDir(dir)
if err != nil {