Files
WT-Offline/apps/launcher/src/shared/ipc/channels.ts
T
N0VAN0M4LY c3cf4e3707 feat(launcher): auto-detect decal cache from selected or recorded game folder
Extend resolvePlayerDecalCacheFolder to resolve <game>/cache/content when the player picks a game root folder directly. Add read-only decals:detectSource IPC so the install wizard auto-fills a detected decal cache from the chosen source (with one-click reset to placeholders) and the client details view offers one-click import from the recorded online sourcePath.
2026-12-04 21:09:57 +08:00

39 lines
1.3 KiB
TypeScript

/**
* Prefixes of the IPC channels the window may use. The preload forwards only these.
*
* Dependency-free: the preload runs sandboxed and cannot load packages.
*/
/** Prefixes of renderer → main invoke channels. */
export const IPC_CHANNEL_PREFIXES = [
/** The launcher itself: version, folders. */
'app:',
/** System dialogs (folder pickers). */
'dialog:',
/** Installing the offline version: looking at the chosen folders, copying, patching. */
'install:',
/** Listing and managing installed copies. */
'copies:',
/** Read-only detection of decal cache folders in player-selected or registered sources. */
'decals:',
/** Settings shared by the saves of a game copy. */
'tuning:',
/** Additive mods repository, per-copy ordering/toggles, and presets. */
'mods:',
/** Local account and save management. */
'saves:',
/** Starting and stopping the active copy. */
'launch:',
/** The launcher's own settings. */
'settings:',
/** Adaptation packs: the active patch set, update checks, installing a newer pack. */
'patches:',
/** Checking, downloading and installing a launcher release. */
'updates:',
/** The launcher window itself (it draws its own title bar). */
'window:',
] as const;
/** Prefix of main → renderer event channels. */
export const IPC_EVENT_PREFIX = 'event:';