Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put windows poppler binaries in a separate package #383

Open
3 tasks done
dumbasPL opened this issue Feb 9, 2022 · 6 comments
Open
3 tasks done

Put windows poppler binaries in a separate package #383

dumbasPL opened this issue Feb 9, 2022 · 6 comments

Comments

@dumbasPL
Copy link

dumbasPL commented Feb 9, 2022

Prerequisites

  • I have written a descriptive title
  • I have searched existing feature requests to ensure it has not already been proposed
  • I agree to follow the Code of Conduct that this project adheres to

Description

Hello, I've noticed that this package bundles all the windows binaries regardless of what platform it's being installed on.

I suggest putting all the windows binaries into a separate package and adding

  "os": [
    "win32"
  ]

to that packages package.json.

You can then include that package using optionalDependencies which will only install the package if we are on windows and ignore it on any other platform.

Doing this will remove over 99% of the unpacked package size.

Having to include almost 50MB of unused files in a docker image is not great (especially since you need to install the Linux binaries on top of that anyway).

Also might as well include

  "cpu": [
    "x64",
  ]

while you're at it since the binaries won't work on x86 or arm builds of windows.

@Fdawgs
Copy link
Owner

Fdawgs commented Feb 9, 2022

Thanks @dumbasPL, I had considered just having a duplicate separate package without the windows binaries, however had never thought about using an optionalDependency!

I'll take a look (though I won't be able to until next week).

@dumbasPL
Copy link
Author

Any progress on this?

@Fdawgs
Copy link
Owner

Fdawgs commented Apr 3, 2022

Hiya, unfortunately not, been a bit swamped with other projects.

@Fdawgs Fdawgs added the help wanted Extra attention is needed label Oct 27, 2022
@dumbasPL
Copy link
Author

Hi, I've noticed you added the help wanted label. What kind of help is needed?

Essentially things that need to be done are:

  • Create a new npm package with "os":["win32"] and "cpu":["x64"] that only contains the windows binaries
  • (optional) create any additional packages with binaries for other operating systems/architectures
  • Remove binaries from this package
  • add the new package(s) as optionalDependencies in the current package
  • Update paths to search for binaries in the new location

@Fdawgs
Copy link
Owner

Fdawgs commented Jan 31, 2023

Thanks @dumbasPL, yes I put the tag on because I was struggling to find the time to sort this.

Should hopefully be able to sort it some time this year!

@Fdawgs Fdawgs removed the help wanted Extra attention is needed label Feb 3, 2023
@GitHubRulesOK
Copy link

GitHubRulesOK commented Feb 18, 2024

Hmm I see you built poppler 24-02 as a 64bit binary artifact and am unable to run on Enterprise 32bit (yes like NHS I use old reliable kit so stuck at 2022-02 x32 build or use Xpdf 2024-4.0.5) I also note your NPM version here implies a 32 bit build of binaries but cannot find where they may be downloaded without an NPM install
so hijacking this thread to ask
a) do you have recent 32bit binaries and if so b) how are they accessed as this VScoded machine seems not able to build anything or I dont have access to suitable dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants