本文整理汇总了TypeScript中builder-util.executeAppBuilder函数的典型用法代码示例。如果您正苦于以下问题:TypeScript executeAppBuilder函数的具体用法?TypeScript executeAppBuilder怎么用?TypeScript executeAppBuilder使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了executeAppBuilder函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: download
export function download(url: string, output: string, checksum?: string | null): Promise<void> {
const args = ["download", "--url", url, "--output", output]
if (checksum != null) {
args.push("--sha512", checksum)
}
return executeAppBuilder(args) as Promise<any>
}
开发者ID:electron-userland,项目名称:electron-builder,代码行数:7,代码来源:binDownload.ts
示例2: download
download(url: string, destination: string, options: DownloadOptions): Promise<string> {
const args = ["download", "--url", url, "--output", destination]
if (options != null && options.sha512) {
args.push("--sha512", options.sha512)
}
return executeAppBuilder(args)
.then(() => destination)
}
开发者ID:electron-userland,项目名称:electron-builder,代码行数:8,代码来源:updaterTestUtil.ts
示例3: doGetBin
function doGetBin(name: string, url: string | undefined | null, checksum: string | null | undefined): Promise<string> {
const args = ["download-artifact", "--name", name]
if (url != null) {
args.push("--url", url)
}
if (checksum != null) {
args.push("--sha512", checksum)
}
return executeAppBuilder(args)
}
开发者ID:electron-userland,项目名称:electron-builder,代码行数:10,代码来源:binDownload.ts
示例4: executeAppBuilder
export function executeAppBuilderAsJson<T>(args: Array<string>): Promise<T> {
return executeAppBuilder(args)
.then(rawResult => {
try {
return JSON.parse(rawResult) as T
}
catch (e) {
throw new Error(`Cannot parse result: ${e.message}: "${rawResult}"`)
}
})
}
开发者ID:electron-userland,项目名称:electron-builder,代码行数:11,代码来源:appBuilder.ts
示例5: executeAppBuilder
return await cancellationToken.createPromise((resolve, reject, onCancel) => {
executeAppBuilder(args, process => {
onCancel(() => {
process.kill("SIGINT")
})
})
.then(() => {
try {
log.debug({provider: this.providerName, file: fileName, bucket: this.getBucketName()}, "uploaded")
}
finally {
resolve()
}
})
.catch(reject)
})
开发者ID:electron-userland,项目名称:electron-builder,代码行数:16,代码来源:BaseS3Publisher.ts
示例6: execWine
export function execWine(file: string, file64: string | null = null, appArgs: Array<string> = [], options: ExecFileOptions = {}): Promise<string> {
if (process.platform === "win32") {
if (options.timeout == null) {
// 2 minutes
options.timeout = 120 * 1000
}
return exec(file, appArgs, options)
}
const commandArgs = [
"wine",
"--ia32", file,
]
if (file64 != null) {
commandArgs.push("--x64", file64)
}
if (appArgs.length > 0) {
commandArgs.push("--args", JSON.stringify(appArgs))
}
return executeAppBuilder(commandArgs, undefined, options)
}
开发者ID:electron-userland,项目名称:electron-builder,代码行数:21,代码来源:wine.ts
注:本文中的builder-util.executeAppBuilder函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论