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


TypeScript binDownload.getBinFromGithub函数代码示例

本文整理汇总了TypeScript中builder-util/out/binDownload.getBinFromGithub函数的典型用法代码示例。如果您正苦于以下问题:TypeScript getBinFromGithub函数的具体用法?TypeScript getBinFromGithub怎么用?TypeScript getBinFromGithub使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getBinFromGithub函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: Lazy

export const fpmPath = new Lazy(() => {
  if (process.platform === "win32" || process.env.USE_SYSTEM_FPM === "true") {
    return BluebirdPromise.resolve("fpm")
  }

  const osAndArch = process.platform === "darwin" ? "mac" : `linux-x86${process.arch === "ia32" ? "" : "_64"}`

  if (process.platform === "darwin") {
    //noinspection SpellCheckingInspection
    return getBinFromGithub("fpm", "1.9.2.1-20150715-2.2.2-mac", "6sZZoRKkxdmv3a6E5dnZgVl23apGnImhDtGHKhgCE1WOtXBUJnx+w0WvB2HD2/sitz4f93Mf7+QqDCIbfP7LOw==")
      .then(it => path.join(it, "fpm"))
  }

  //noinspection SpellCheckingInspection
  const checksum = process.arch === "ia32" ? "cTT/HdjrQ6qTJQhTZaZC3lyDkRCyNFtNBZ0F7n6mh5B3YmD5ttJZ0xn65pQS03dhEi67A8K1xXNO+tyEEviiIg==" : "0zKxWlHuQEUsXJpWll5Bc4OTI8d0jcMVlme9OeHI+Y+s3sv1S4KyGLOEVEkNw6pRU8F+A1Dj5IR95/+U8YzB0A=="
  return getBinFromGithub("fpm", `1.9.2-2.3.1-${osAndArch}`, checksum)
    .then(it => path.join(it, "fpm"))
})
开发者ID:ledinhphuong,项目名称:electron-builder,代码行数:18,代码来源:tools.ts

示例2: testBlockMap

async function testBlockMap(oldDir: string, newDir: string, updaterClass: any) {
  const port = 8000 + updaterClass.name.charCodeAt(0)

  // noinspection SpellCheckingInspection
  const httpServerProcess = doSpawn(path.join(await getBinFromGithub("ran", "0.1.3", "imfA3LtT6umMM0BuQ29MgO3CJ9uleN5zRBi3sXzcTbMOeYZ6SQeN7eKr3kXZikKnVOIwbH+DDO43wkiR/qTdkg=="), process.platform, "ran"), [`-root=${newDir}`, `-port=${port}`])
  {
    (process as any).resourcesPath = path.join(oldDir, "win-unpacked", "resources")
  }

  const mockNativeUpdater = new TestNativeUpdater()
  const mockApp = createTestApp("0.0.1")
  jest.mock("electron", () => {
    return {
      app: mockApp,
      autoUpdater: mockNativeUpdater,
    }
  }, {virtual: true})

  return await new BluebirdPromise((resolve, reject) => {
    httpServerProcess.on("error", reject)

    const updater = new updaterClass()
    tuneNsisUpdater(updater)
    updater.logger = console
    const doTest = async () => {
      updater.updateConfigPath = await writeUpdateConfig<GenericServerOptions | S3Options>({
        provider: "generic",
        url: `http://127.0.0.1:${port}`,
      })

      // updater.updateConfigPath = await writeUpdateConfig<S3Options | GenericServerOptions>({
      //   provider: "s3",
      //   endpoint: "http://192.168.178.34:9000",
      //   bucket: "develar",
      //   path: "onshape-test",
      // })

      await checkResult(updater)
    }

    doTest()
      .then(() => resolve())
      .catch(reject)
  })
    .finally(() => {
      httpServerProcess.kill()
    })
}
开发者ID:ledinhphuong,项目名称:electron-builder,代码行数:48,代码来源:differentialUpdateTest.ts

示例3: getAria

export function getAria() {
  const platform = Platform.current()
  const archQualifier = platform === Platform.MAC ? "" : `-${process.arch}`

  let checksum = ""
  if (platform === Platform.MAC) {
    // noinspection SpellCheckingInspection
    checksum = "UjstpQUAtoP/sZ9SNuWwIN1WyDfvr1V3bzLGzTZCt1IqQsf9YwBSo0jrXMMRZOqv1sy5EOvp5nyC4VvJZCRVuQ=="
  }
  else if (platform === Platform.WINDOWS) {
    // noinspection SpellCheckingInspection
    checksum = process.arch === "ia32" ?
      "aulZig14OCHqj5qUWDvIAacibzW9k+gfDGDeECzWDrF7FPYzI+Vn7Q7QnW/FXNyNnbe8PeYawTlGzD3vJxLQWg==" :
      "zksKH0Uazwtc/vfGSVy+tzsNou+thSamAGTKt8P1DLoNkdSz9ueaIFoJ7jt8jlDds8Z6Rrxls6IFkZRBDxiyfg=="
  }

  //noinspection SpellCheckingInspection
  return getBinFromGithub(`aria2-${platform.buildConfigurationKey}${archQualifier}`, "1.33.1", checksum)
    .then(it => path.join(it, `aria2c${platform === Platform.WINDOWS ? ".exe" : ""}`))
}
开发者ID:ledinhphuong,项目名称:electron-builder,代码行数:20,代码来源:tools.ts

示例4: getSignVendorPath

export function getSignVendorPath() {
  //noinspection SpellCheckingInspection
  return getBinFromGithub("winCodeSign", "1.9.0", "cyhO9Mv5MTP2o9dwk/+qs0KvuO9CbDhjEJXA2ujpvhcsk5zmc+zY9iqiWXVzOuibTLYNC3qZiuFlJrrCT2kldw==")
}
开发者ID:jwheare,项目名称:electron-builder,代码行数:4,代码来源:windowsCodeSign.ts

示例5: getLinuxToolsPath

export function getLinuxToolsPath() {
  //noinspection SpellCheckingInspection
  return getBinFromGithub("linux-tools", "mac-10.12.3", "SQ8fqIRVXuQVWnVgaMTDWyf2TLAJjJYw3tRSqQJECmgF6qdM7Kogfa6KD49RbGzzMYIFca9Uw3MdsxzOPRWcYw==")
}
开发者ID:ledinhphuong,项目名称:electron-builder,代码行数:4,代码来源:tools.ts

示例6: getAppImage

export function getAppImage() {
  //noinspection SpellCheckingInspection
  return getBinFromGithub("appimage", "9.0.3", "jaOGGGXLKjJV4SXajFOoIb7vCq4GbN0ggy5eosd8F0GAh0ythYfZSq9Lj/+uymmw2h3kKf9W8Y2KBnWxIjU0aw==")
}
开发者ID:ledinhphuong,项目名称:electron-builder,代码行数:4,代码来源:tools.ts


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