heroic-wine-downloader
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

heroic-wine-downloader

This library is a helper to fetch and download available wine binaries (e.g. Wine-GE, Proton-GE, Wine-Lutris, ...).

Following tools should be installed on the system, to make the package fully functional:

  • curl: needed to download the binary archive
  • tar: needed to unpack the binary archive
  • du (optional): needed to get the unpacked binary size on the disk

Install

$ npm install heroic-wine-downloader

or

$ yarn add heroic-wine-downloader

Usage

import {
  getAvailableVersions,
  Repository,
  VersionInfo,
  State,
  ProgressInfo
} from 'heroic-wine-downloader'

// get binaries of Wine GE
getAvailableVersions({ repositorys: [Repository.WINEGE] })
  .then((versions: VersionInfo[]) => {
    // install newest
    installVersion({
      versionInfo: versions[0],
      installDir: '<valid-path>',
      onProgress: (state: State, progress: ProgressInfo => {
        console.log(
          `onProgress: state = ${state}, progress = ${progress.percentage}`
        )
      })
      .then((response: {version: VersionInfo, installDir: string}) => console.log(response.installDir))
      .catch((error: Error) => console.log(error.message))
  })
  .catch((error: Error) => {
    console.error(error.message)
  })

Readme

Keywords

none

Package Sidebar

Install

npm i heroic-wine-downloader

Weekly Downloads

1

Version

1.2.3

License

MIT

Unpacked Size

40.2 kB

Total Files

20

Last publish

Collaborators

  • nocccer