Documentation
¶
Overview ¶
Package layout knows what an installed WittyMediaServer looks like, on every system and however it was installed, and what its programs are called.
A package has one folder a person looks in, the root, holding what they open. Everything else that runs lives in bin, out of sight:
<root>/WittyMediaServer(.exe) the app, with the tray or menu-bar icon <root>/Uninstall WittyMediaServer.exe Windows only <root>/package-info.json how this copy was installed <root>/wms.json, <root>/data only when someone chose portable mode <root>/bin/wittymediaserver(.exe) the server, and the command line <root>/bin/ffmpeg(.exe), ffprobe(.exe) <root>/modules signed modules for offline use, when it has any
On a Mac the same parts sit where Apple wants them:
WittyMediaServer.app/Contents/MacOS/WittyMediaServer WittyMediaServer.app/Contents/Resources/package-info.json, modules WittyMediaServer.app/Contents/Helpers/wittymediaserver, ffmpeg, ffprobe, ...
A program built from source, or a package from before 0.6.0, has no package-info.json: its root and its bin are simply the folder it is in.
Index ¶
Constants ¶
const ( // DesktopApp is what a person opens: the tray or menu-bar app. DesktopApp = "WittyMediaServer" // ServerCommand is the server and its command line. ServerCommand = "wittymediaserver" // UninstallApp removes everything, asking first (Windows; a Mac has its own app). UninstallApp = "Uninstall WittyMediaServer" // Marker is the file that says a folder is an installed package. Marker = "package-info.json" )
const ( KindSource = "" // built from source, or older than 0.6.0 KindArchive = "archive" // a .zip or .tar.gz someone unpacked KindMSI = "msi" // the Windows installer KindDeb = "deb" // Debian, Ubuntu and relatives KindRPM = "rpm" // Fedora, RHEL, openSUSE and relatives KindPkg = "pkg" // the macOS installer KindFreeBSD = "freebsd-pkg" // FreeBSD's pkg // One file that holds the whole program, read-only: nothing inside can be replaced. KindAppImage = "appimage" // an AppImage someone downloaded and runs KindFlatpak = "flatpak" // a Flatpak bundle KindSnap = "snap" // a Snap )
How a copy was installed. The kind decides who may replace its files.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Package ¶
type Package struct {
Root string // the folder a person looks in, and where portable files go
Bin string // the server and its helpers
Kind string
}
Package is where a copy of the server is.
func (Package) ClearObsolete ¶
func (p Package) ClearObsolete()
ClearObsolete removes what Obsolete names, once a package's new parts are in place. Files still in use stay until the next start.
func (Package) MarkerPath ¶
MarkerPath is this package's marker file.
func (Package) Modules ¶
Modules is where a starter set of signed modules is, when this package has one.
func (Package) ProgramDirs ¶
ProgramDirs are the folders a helper program can be in, best first: its own folder, and for a package updated from an older one, the root.
func (Package) ServerPath ¶
ServerPath is the server program of this package.