UNPKG

@shockpkg/dir-projector

Version:

Package for creating Shockwave Director projectors

397 lines (396 loc) 8.54 kB
/// <reference types="node" /> import { IProjectorOptions, Projector } from '../projector'; export interface IProjectorMacAppOptions extends IProjectorOptions { /** * Binary name, also renames rsrc and icns. * * @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?: Buffer | null; /** * Info.plist file. * * @default null */ infoPlistFile?: string | null; /** * Info.plist data. * * @default null */ infoPlistData?: Buffer | null; /** * PkgInfo file. * * @default null */ pkgInfoFile?: string | null; /** * PkgInfo data. * * @default null */ pkgInfoData?: Buffer | null; /** * Nest Xtras at *.app/Contents/xtras. * * @default false */ nestXtrasContents?: boolean; } /** * ProjectorMacApp constructor. * * @param options Options object. */ export declare class ProjectorMacApp extends Projector { /** * 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: Buffer | null; /** * Info.plist file. * * @default null */ infoPlistFile: string | null; /** * Info.plist data. * * @default null */ infoPlistData: string | string[] | Buffer | null; /** * PkgInfo file. * * @default null */ pkgInfoFile: string | null; /** * PkgInfo data. * * @default null */ pkgInfoData: string | Buffer | null; /** * Nest Xtras at *.app/Contents/xtras. * * @default false */ nestXtrasContents: boolean; constructor(options?: IProjectorMacAppOptions); /** * Projector file extension. * * @returns File extension. */ readonly projectorExtension: string; /** * Config file newline characters. * * @returns Newline characters. */ readonly configNewline: string; /** * Config file newline characters. * * @returns Newline characters. */ readonly lingoNewline: string; /** * Splash image file extension. * * @returns File extension. */ readonly splashImageExtension: string; /** * If icon is specified. * * @returns Has icon. */ readonly hasIcon: boolean; /** * If Info.plist is specified. * * @returns Has Info.plist. */ readonly hasInfoPlist: boolean; /** * If PkgInfo is specified. * * @returns Has PkgInfo. */ readonly hasPkgInfo: boolean; /** * Get the Projector Resources directory name. * * @returns Directory name. */ readonly projectorResourcesDirectoryName: "Projector Intel Resources" | "Projector Resources"; /** * Get app binary name. * * @returns File name. */ readonly appBinaryName: string; /** * Get app binary name, default. * * @returns File name. */ readonly appBinaryNameDefault: string; /** * Get app binary name, custom. * * @returns File name. */ readonly appBinaryNameCustom: string | null; /** * Get app icon name. * * @returns File name. */ readonly appIconName: string; /** * Get app icon name, default. * * @returns File name. */ readonly appIconNameDefault: string; /** * Get app icon name, custom. * * @returns File name. */ readonly appIconNameCustom: string | null; /** * Get app rsrc name. * * @returns File name. */ readonly appRsrcName: string; /** * Get app rsrc name, default. * * @returns File name. */ readonly appRsrcNameDefault: string; /** * Get app rsrc name, custom. * * @returns File name. */ readonly appRsrcNameCustom: string | null; /** * Get app Info.plist path. * * @returns File path. */ readonly appPathInfoPlist: string; /** * Get app PkgInfo path. * * @returns File path. */ readonly appPathPkgInfo: string; /** * Get app Frameworks path. * * @returns File path. */ readonly appPathFrameworks: string; /** * Get app Xtras path. * * @returns Directory path. */ readonly appPathXtras: string; /** * Get app binary path. * * @returns File path. */ readonly appPathBinary: string; /** * Get app binary path, default. * * @returns File path. */ readonly appPathBinaryDefault: string; /** * Get app binary path, custom. * * @returns File path. */ readonly appPathBinaryCustom: string | null; /** * Get app icon path. * * @returns File path. */ readonly appPathIcon: string; /** * Get app icon path, default. * * @returns File path. */ readonly appPathIconDefault: string; /** * Get app icon path, custom. * * @returns File path. */ readonly appPathIconCustom: string | null; /** * Get app rsrc path. * * @returns File path. */ readonly appPathRsrc: string; /** * Get app rsrc path, default. * * @returns File path. */ readonly appPathRsrcDefault: string; /** * Get app rsrc path, custom. * * @returns File path. */ readonly appPathRsrcCustom: string | null; /** * Get icon data if any specified, from data or file. * * @returns Icon data or null. */ getIconData(): Promise<Buffer | null>; /** * Get Info.plist data if any specified, from data or file. * * @returns Info.plist data or null. */ getInfoPlistData(): Promise<Buffer | null>; /** * Get PkgInfo data if any specified, from data or file. * * @returns PkgInfo data or null. */ getPkgInfoData(): Promise<Buffer | null>; /** * Get the Xtras path. * * @param name Save name. * @returns Xtras path. */ getXtrasPath(name: string): string; /** * Get the icon path. * * @param name Save name. * @returns Icon path. */ getIconPath(name: string): string; /** * Get the Info.plist path. * * @param name Save name. * @returns Icon path. */ getInfoPlistPath(name: string): string; /** * Get the PkgInfo path. * * @param name Save name. * @returns Icon path. */ getPkgInfoPath(name: string): string; /** * Update XML code with customized variables. * * @param xml Plist code. * @param name Application name. * @returns Updated XML. */ updateInfoPlistCode(xml: string, name: string): string; /** * Write out the projector. * * @param path Save path. * @param name Save name. */ write(path: string, name: string): Promise<void>; /** * Write the projector skeleton from archive. * * @param path Save path. * @param name Save name. */ protected _writeSkeleton(path: string, name: string): Promise<void>; /** * Write out the projector icon file. * * @param path Save path. * @param name Save name. */ protected _writeIcon(path: string, name: string): Promise<void>; /** * Write out the projector PkgInfo file. * * @param path Save path. * @param name Save name. */ protected _writePkgInfo(path: string, name: string): Promise<void>; /** * Write out the projector Info.plist file. * * @param path Save path. * @param name Save name. */ protected _writeInfoPlist(path: string, name: string): Promise<void>; /** * Update the projector Info.plist file fields. * * @param path Save path. * @param name Save name. */ protected _updateInfoPlist(path: string, name: string): Promise<void>; }