portapps

package module
v3.8.1-0...-bb4de4f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 19 Imported by: 0

README

GitHub release Go Report Codecov
Become a sponsor Donate Paypal Twitter Follow Reddit subscribers

About

Portapps is a collection of portable apps for Windows. You can download your favorite application as a portable setup, or a 7z archive.

Each portable app is executed through a wrapper [appname]-portable.exe written in Golang to make the app portable. This will allow you, for example, to use your favorite application on a USB stick.

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. If you want to open a pull request, please read the contributing guidelines.

You can also support this project by becoming a sponsor on GitHub or by making a Paypal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! 🙏

License

MIT. See LICENSE for more details.
Rocket icon credit to Squid Ink.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Info       AppInfo
	Prev       AppPrev
	WinVersion win.Version

	ID   string
	Name string
	Args []string

	RootPath   string
	AppPath    string
	DataPath   string
	WorkingDir string
	Process    string
	// contains filtered or unexported fields
}

App represents an active app object

func New

func New(id string, name string) (app *App, err error)

New creates new app instance

func NewWithCfg

func NewWithCfg(id string, name string, appcfg interface{}) (app *App, err error)

NewWithCfg creates new app instance with an app config

func (*App) Close

func (app *App) Close()

Close closes the app

func (*App) Config

func (app *App) Config() *Config

Config returns app configuration

func (*App) ElectronAppPath

func (app *App) ElectronAppPath() string

ElectronAppPath returns the app electron path

func (*App) ErrorBox

func (app *App) ErrorBox(msg interface{})

ErrorBox display an error message box

func (*App) ErrorBoxLog

func (app *App) ErrorBoxLog(msg interface{})

ErrorBoxLog display an error message box nad log

func (*App) FatalBox

func (app *App) FatalBox(msg interface{})

FatalBox display an error message box and exit

func (*App) FatalBoxLog

func (app *App) FatalBoxLog(msg interface{})

FatalBoxLog display an error message box, log and exit

func (*App) InitLogger

func (app *App) InitLogger() error

InitLogger configures logger

func (*App) Launch

func (app *App) Launch(args []string)

Launch to execute the app with additional args

type AppInfo

type AppInfo struct {
	ID              string `json:"id"`
	GUID            string `json:"guid"`
	Name            string `json:"name"`
	Version         string `json:"version"`
	Release         string `json:"release"`
	Date            string `json:"date"`
	Publisher       string `json:"publisher"`
	URL             string `json:"url"`
	PortappsVersion string `json:"portapps_version"`
}

AppInfo represents portapp.json file structure

type AppPrev

type AppPrev struct {
	Info       AppInfo     `json:"info"`
	WinVersion win.Version `json:"win_version"`
	RootPath   string      `json:"root_path"`
	AppPath    string      `json:"app_path"`
	DataPath   string      `json:"data_path"`
}

AppPrev represents previous settings file structure

type Common

type Common struct {
	DisableLog bool              `yaml:"disable_log" mapstructure:"disable_log"`
	Args       []string          `yaml:"args" mapstructure:"args"`
	Env        map[string]string `yaml:"env" mapstructure:"env"`
	AppPath    string            `yaml:"app_path" mapstructure:"app_path"`
}

Common holds common configuration data

type Config

type Config struct {
	Common Common      `yaml:"common" mapstructure:"common"`
	App    interface{} `yaml:"app,omitempty" mapstructure:"app"`
}

Config holds portapp configuration details

Directories

Path Synopsis
pkg
log
Package log source from https://github.com/rs/zerolog/tree/master/log
Package log source from https://github.com/rs/zerolog/tree/master/log
utl
win

Jump to

Keyboard shortcuts

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