當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。