本文整理汇总了TypeScript中electron-builder-util.prepareArgs函数的典型用法代码示例。如果您正苦于以下问题:TypeScript prepareArgs函数的具体用法?TypeScript prepareArgs怎么用?TypeScript prepareArgs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了prepareArgs函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: syncReleases
function syncReleases(outputDirectory: string, options: SquirrelOptions) {
log("Sync releases to build delta package")
const args = prepareArgs(["-u", options.remoteReleases!, "-r", outputDirectory], path.join(options.vendorPath, "SyncReleases.exe"))
if (options.remoteToken) {
args.push("-t", options.remoteToken)
}
return spawn(process.platform === "win32" ? path.join(options.vendorPath, "SyncReleases.exe") : "mono", args)
}
示例2: msi
async function msi(options: SquirrelOptions, nupkgPath: string, setupPath: string, outputDirectory: string, outFile: string) {
const args = [
"--createMsi", nupkgPath,
"--bootstrapperExe", setupPath
]
await exec(process.platform === "win32" ? path.join(options.vendorPath, "Update.com") : "mono", prepareArgs(args, path.join(options.vendorPath, "Update-Mono.exe")))
//noinspection SpellCheckingInspection
await exec(path.join(options.vendorPath, "candle.exe"), ["-nologo", "-ext", "WixNetFxExtension", "-out", "Setup.wixobj", "Setup.wxs"], {
cwd: outputDirectory,
})
//noinspection SpellCheckingInspection
await exec(path.join(options.vendorPath, "light.exe"), ["-ext", "WixNetFxExtension", "-sval", "-out", outFile, "Setup.wixobj"], {
cwd: outputDirectory,
})
//noinspection SpellCheckingInspection
await BluebirdPromise.all([
unlink(path.join(outputDirectory, "Setup.wxs")),
unlink(path.join(outputDirectory, "Setup.wixobj")),
unlink(path.join(outputDirectory, outFile.replace(".msi", ".wixpdb"))).catch(e => debug(e.toString())),
])
}
示例3: releasify
async function releasify(options: SquirrelOptions, nupkgPath: string, outputDirectory: string, packageName: string) {
const args = [
"--releasify", nupkgPath,
"--releaseDir", outputDirectory
]
const out = (await exec(process.platform === "win32" ? path.join(options.vendorPath, "Update.com") : "mono", prepareArgs(args, path.join(options.vendorPath, "Update-Mono.exe")), {
maxBuffer: 4 * 1024000,
})).trim()
if (debug.enabled) {
debug(`Squirrel output: ${out}`)
}
const lines = out.split("\n")
for (let i = lines.length - 1; i > -1; i--) {
const line = lines[i]
if (line.includes(packageName)) {
return line.trim()
}
}
throw new Error(`Invalid output, cannot find last release entry, output: ${out}`)
}