当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript electron-builder-util.prepareArgs函数代码示例

本文整理汇总了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)
}
开发者ID:djpereira,项目名称:electron-builder,代码行数:8,代码来源:squirrelPack.ts

示例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())),
  ])
}
开发者ID:djpereira,项目名称:electron-builder,代码行数:22,代码来源:squirrelPack.ts

示例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}`)
}
开发者ID:djpereira,项目名称:electron-builder,代码行数:22,代码来源:squirrelPack.ts


注:本文中的electron-builder-util.prepareArgs函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。