UNPKG

@shockpkg/dir-projector

Version:

Package for creating Shockwave Director projectors

339 lines (338 loc) 7.34 kB
/// <reference types="node" /> import { Plist } from '@shockpkg/plist-dom'; import { ProjectorMac } from '../mac'; /** * ProjectorMacApp constructor. * * @param path Output path. */ export declare class ProjectorMacApp extends ProjectorMac { /** * Binary name. * * @default null */ binaryName: string | null; /** * Intel binary package, not universal binary. * * @default false */ intel: boolean; /** * Icon file. * * @default null */ iconFile: string | null; /** * Icon data. * * @default null */ iconData: Readonly<Buffer> | null; /** * Info.plist file. * Currently only supports XML plist. */ infoPlistFile: string | null; /** * Info.plist data. * Currently only supports XML plist. */ infoPlistData: (string | Readonly<string[]> | Readonly<Buffer> | null); /** * Info.plist document. */ infoPlistDocument: Plist | null; /** * PkgInfo file. * * @default null */ pkgInfoFile: string | null; /** * PkgInfo data. * * @default null */ pkgInfoData: string | Readonly<Buffer> | null; /** * Update the bundle name in Info.plist. * Possible values: * - false: Leave untouched. * - true: Output name. * - null: Remove value. * - string: Custom value. */ bundleName: boolean | string | null; /** * Nest Xtras at *.app/Contents/xtras. * * @default false */ nestXtrasContents: boolean; constructor(path: string); /** * Projector file extension. * * @returns File extension. */ get extension(): string; /** * Config file newline characters. * * @returns Newline characters. */ get configNewline(): string; /** * Config file newline characters. * * @returns Newline characters. */ get lingoNewline(): string; /** * If icon is specified. * * @returns Has icon. */ get hasIcon(): boolean; /** * If Info.plist is specified. * * @returns Has Info.plist. */ get hasInfoPlist(): boolean; /** * If PkgInfo is specified. * * @returns Has PkgInfo. */ get hasPkgInfo(): boolean; /** * Get the Projector Resources directory name. * * @returns Directory name. */ get projectorResourcesDirectoryName(): "Projector Intel Resources" | "Projector Resources"; /** * Get app binary name, default. * * @returns File name. */ get appBinaryNameDefault(): string; /** * Get app binary name, custom. * * @returns File name. */ get appBinaryNameCustom(): string | null; /** * Get app binary name. * * @returns File name. */ get appBinaryName(): string; /** * Get app icon name, default. * * @returns File name. */ get appIconNameDefault(): string; /** * Get app icon name, custom. * * @returns File name. */ get appIconNameCustom(): string | null; /** * Get app icon name. * * @returns File name. */ get appIconName(): string; /** * Get app rsrc name, default. * * @returns File name. */ get appRsrcNameDefault(): string; /** * Get app rsrc name, custom. * * @returns File name. */ get appRsrcNameCustom(): string | null; /** * Get app rsrc name. * * @returns File name. */ get appRsrcName(): string; /** * Get app Info.plist path. * * @returns File path. */ get appPathInfoPlist(): string; /** * Get app PkgInfo path. * * @returns File path. */ get appPathPkgInfo(): string; /** * Get app Frameworks path. * * @returns File path. */ get appPathFrameworks(): string; /** * Get app Xtras path. * * @returns Directory path. */ get appPathXtras(): string; /** * Get app binary path, default. * * @returns File path. */ get appPathBinaryDefault(): string; /** * Get app binary path, custom. * * @returns File path. */ get appPathBinaryCustom(): string | null; /** * Get app binary path. * * @returns File path. */ get appPathBinary(): string; /** * Get app icon path, default. * * @returns File path. */ get appPathIconDefault(): string; /** * Get app icon path, custom. * * @returns File path. */ get appPathIconCustom(): string | null; /** * Get app icon path. * * @returns File path. */ get appPathIcon(): string; /** * Get app rsrc path, default. * * @returns File path. */ get appPathRsrcDefault(): string; /** * Get app rsrc path, custom. * * @returns File path. */ get appPathRsrcCustom(): string | null; /** * Get app rsrc path. * * @returns File path. */ get appPathRsrc(): string; /** * Get the icon path. * * @returns Icon path. */ get iconPath(): string; /** * Get the Info.plist path. * * @returns Info.plist path. */ get infoPlistPath(): string; /** * Get the PkgInfo path. * * @returns PkgInfo path. */ get pkgInfoPath(): string; /** * Get the binary path. * * @returns Binary path. */ get binaryPath(): string; /** * Get outout Xtras path. * * @returns Output path. */ get xtrasPath(): string; /** * Get icon data if any specified, from data or file. * * @returns Icon data or null. */ getIconData(): Promise<Buffer | Readonly<Buffer> | null>; /** * Get Info.plist data if any specified, document, data, or file. * * @returns Info.plist data or null. */ getInfoPlistDocument(): Promise<Plist | null>; /** * Get PkgInfo data if any specified, from data or file. * * @returns PkgInfo data or null. */ getPkgInfoData(): Promise<Readonly<Buffer> | null>; /** * Get configured bundle name, or null to remove. * * @returns New name or null. */ getBundleName(): string | false | null; /** * Write the projector skeleton from archive. * * @param skeleton Skeleton path. */ protected _writeSkeleton(skeleton: string): Promise<void>; /** * Modify the projector skeleton. */ protected _modifySkeleton(): Promise<void>; /** * Write out the projector icon file. */ protected _writeIcon(): Promise<void>; /** * Write out the projector PkgInfo file. */ protected _writePkgInfo(): Promise<void>; /** * Update the projector Info.plist if needed. */ protected _updateInfoPlist(): Promise<void>; /** * Read the projector Info.plist file. * * @returns Plist document. */ protected _readInfoPlist(): Promise<Plist>; /** * Write the projector Info.plist file. * * @param plist Plist document. */ protected _writeInfoPlist(plist: Plist): Promise<void>; }