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

Offline Building #159

Closed
D3vil0p3r opened this issue Jan 29, 2024 · 4 comments
Closed

Offline Building #159

D3vil0p3r opened this issue Jan 29, 2024 · 4 comments

Comments

@D3vil0p3r
Copy link

I am a NixOS user and I would like to package more customized bibata cursors.

NixOS packaging works only offline. The problem is that, when:

npx cbmp -d 'svg/original' -o 'bitmaps/Bibata-Gruvbox' -bc '#282828' -oc '#EBDBB2' -wc '#000000'

is run, npx cbpm command tries to connect to Internet, so the package build fails with the following error:

npm ERR! code EAI_AGAIN
npm ERR! syscall getaddrinfo
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/cbmp failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

npm ERR! Log files were not written due to an error writing to the directory: /homeless-shelter/.npm/_logs
npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal

error: builder for '/nix/store/dgvk6qx6npd73cjx9z3b5awgi80lp94l-bibata-cursors-2.0.3.drv' failed with exit code 1;
       last 10 log lines:
       > no configure script, doing nothing
       > Running phase: buildPhase
       > npm ERR! code EAI_AGAIN
       > npm ERR! syscall getaddrinfo
       > npm ERR! errno EAI_AGAIN
       > npm ERR! request to https://registry.npmjs.org/cbmp failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org
       > 
       > npm ERR! Log files were not written due to an error writing to the directory: /homeless-shelter/.npm/_logs
       > npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
       > 
       For full logs, run 'nix log /nix/store/dgvk6qx6npd73cjx9z3b5awgi80lp94l-bibata-cursors-2.0.3.drv'.

Is there a way to make cbmp working for offline build?

If it is not possible, could you please add in this repository also all those Bibata Cursors of your Extra repository? Because by ctgen build.toml I can get them offline and delivering them in Nix repository.

Thank you in advance.

@ful1e5
Copy link
Owner

ful1e5 commented Feb 8, 2024

@D3vil0p3r No, currently it's not supported for offline builds because it relies on puppeteer internally.

However, I'm exploring the integration of another static SVG renderer for converting static SVG files. This approach will improve render performance, especially considering the breakdown of animation frames in previous versions of Bibata.

I'm actively working on this enhancement and plan to include it in the next release of cbmp. Thank you for your patience and understanding.

@D3vil0p3r
Copy link
Author

This last approach could be used for building offline or it needs an Internet access?

@ful1e5
Copy link
Owner

ful1e5 commented Feb 8, 2024

@D3vil0p3r Offline.

@D3vil0p3r
Copy link
Author

D3vil0p3r commented Feb 8, 2024

Thanks. I will wait for this update. Is there an ETA for it?

ful1e5 added a commit to ful1e5/cbmp that referenced this issue Feb 21, 2024
The default renderer is now resvg-js. To use Puppeteer, either assign
the `--puppeteer` option in the command line or set `"use": "puppeteer"`
in the JSON config.

Example in CLI Argument:

```bash
npx cbmp -d svg -o out --puppeteer
```

**In config files:**

```json
{
    "use": "puppeteer",
    "Sample 1": {
        "dir": "svg",
        "out": "out/sample1"
    },

    "Sample 2": {
        "dir": "svg",
        "out": "out/sample2",
        "fps": 10
    }
}
```

Related to ful1e5/Bibata_Cursor#159
ful1e5 added a commit to ful1e5/cbmp that referenced this issue Feb 25, 2024
@ful1e5 ful1e5 closed this as completed in 407f929 Feb 25, 2024
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

2 participants