goappimage

package module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 18 Imported by: 0

README

GoAppImage

DEPRECIATED! This library is now available at probonopd/go-appimage

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAppImagesWithMatchingUpdateInformation

func FindAppImagesWithMatchingUpdateInformation(updateinformation string) []string

FindAppImagesWithMatchingUpdateInformation finds registered AppImages that have matching upate information embedded

func FindMostRecentAppImageWithMatchingUpdateInformation

func FindMostRecentAppImageWithMatchingUpdateInformation(updateinformation string) string

FindMostRecentAppImageWithMatchingUpdateInformation finds the most recent registered AppImage that havs matching upate information embedded

func LaunchMostRecentAppImage

func LaunchMostRecentAppImage(updateinformation string, args []string, quiet bool)

LaunchMostRecentAppImage launches an the most recent application for a given updateinformation that we found among the integrated AppImages. Kinda like poor man's Launch Services. Probably we should make as much use of it as possible. Downside: Applications without updateinformation cannot be used in this way.

Types

type AppImage

type AppImage struct {
	Path              string
	ImageType         int
	URI               string
	Md5               string
	DesktopFilename   string
	DesktopFilepath   string
	ThumbnailFilename string
	ThumbnailFilepath string
	Offset            int64
	RawContents       string
	UpdateInformation string
	NiceName          string
}

AppImage handles AppImage files. Currently it is using using a static build of mksquashfs/unsquashfs but eventually may be rewritten to do things natively in Go

func NewAppImage

func NewAppImage(path string) AppImage

NewAppImage creates an AppImage object from the location defined by path. The AppImage object will also be created if path does not exist, because the AppImage that used to be there may need to be removed and for this the functions of an AppImage are needed. Non-existing and invalid AppImages will have type -1.

func (AppImage) DiscoverContents added in v0.1.1

func (ai AppImage) DiscoverContents(verbose bool)

DiscoverContents Fills rawcontents with the raw output of our extraction tools, libarchive and unsquashfs. This is a slow operation and should hence only be done once we are sure that we really need this information. Maybe we should consider to have a fixed directory inside the AppDir for everything that should be extracted, or a MANIFEST file. That would save us this slow work at runtime

func (AppImage) ExtractFile

func (ai AppImage) ExtractFile(filepath string, destinationdirpath string, verbose bool) error

ExtractFile extracts a file from from filepath (which may contain * wildcards) in an AppImage to the destinationdirpath. Returns err in case of errors, or nil. TODO: resolve symlinks TODO: Should this be a io.Reader()?

func (AppImage) ReadUpdateInformation

func (ai AppImage) ReadUpdateInformation() (string, error)

ReadUpdateInformation reads updateinformation from an AppImage Returns updateinformation string and error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL