Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
data += "};\n\n"
// noinspection SpellCheckingInspection
data += `data 'styl' (${counter}, "${item.langName} SLA") {
$"0003 0000 0000 000C 0009 0014 0000 0000"
$"0000 0000 0000 0000 0027 000C 0009 0014"
$"0100 0000 0000 0000 0000 0000 002A 000C"
$"0009 0014 0000 0000 0000 0000 0000"
};`
counter++
}
const tempFile = await packager.getTempFile(".r")
await writeFile(tempFile, data)
await exec("hdiutil", ["unflatten", dmgPath])
await exec("Rez", ["-a", tempFile, "-o", dmgPath])
await exec("hdiutil", ["flatten", dmgPath])
}
async function main() {
const projectDir = process.cwd()
const config = await loadConfig(projectDir)
log(`Execute node-gyp rebuild for ${args.platform}:${args.arch}`)
// this script must be used only for electron
await exec(process.platform === "win32" ? "node-gyp.cmd" : "node-gyp", ["rebuild"], {
env: getGypEnv({version: await getElectronVersion(config, projectDir), useCustomDist: true}, args.platform, args.arch, true),
})
}
// noinspection SpellCheckingInspection
data += `data 'styl' (${counter}, "${item.langName} SLA") {
$"0003 0000 0000 000C 0009 0014 0000 0000"
$"0000 0000 0000 0000 0027 000C 0009 0014"
$"0100 0000 0000 0000 0000 0000 002A 000C"
$"0009 0014 0000 0000 0000 0000 0000"
};`
counter++
}
const tempFile = await packager.getTempFile(".r")
await writeFile(tempFile, data)
await exec("hdiutil", ["unflatten", dmgPath])
await exec("Rez", ["-a", tempFile, "-o", dmgPath])
await exec("hdiutil", ["flatten", dmgPath])
}