ASAR完整性
如果你使用 或 >= @electron-forge/core@6.0.0-beta.61
那么将满足所有需求, 你可以直接跳到 章节
其他构建系统
Your must then populate a valid ElectronAsarIntegrity
dictionary block in your packaged apps Info.plist
. An example is included below.
ASAR integrity checking is currently disabled by default and can be enabled by toggling a fuse. See Electron Fuses for more information on what Electron Fuses are and how they work. When enabling this fuse you typically also want to enable the onlyLoadAppFromAsar
fuse otherwise the validity checking can be bypassed via the Electron app code search path.
require('@electron/fuses').flipFuses(
pathToPackagedApp,
{
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true
}