How does the Arduino IDE download board package files

Ultimately the issue I am having is that the json package being downloaded from the additional boards manager URL is being downloaded incorrectly. The file is just "raw" whereas the same url used with variety of different download approaches always results in the correct "packag_myBoard_index.json"

So I'd like to understand better how exactly the Arduino IDE 2.x (2.3.2) takes the provided URL and fetches the file it points to.

Thanks

Hi @jfrankl8.

What do you mean by "raw"?

Please tell us the URL. I think the situation will be more clear then.

Hello, and thanks for asking.

When I say "raw" I mean that the file is literally named "raw.json" but is still the valid board package json file.

I am trying to download it from a private gitlab repo (it's mine and private for testing). The URL is effectively
https://gitlab.com/api/v4/projects/[project_id]/repository/files/package_myBoard_index.json/raw?ref=main&private_token=[my_token]
Sanitized slightly for privacy.

Perhaps more accurately, is there a way to specify the name of the downloaded file that Arduino IDE gets?

Arduino IDE doesn't actually perform the download. It is done by a helper tool named Arduino CLI.

Here is the code used by Arduino CLI to determine the filename to use for the downloaded package index:

So I don't think there is any way you can use GitLab raw file API request URLs as a package index URL.

You can definitely use a standard raw file URL like this one:

https://gitlab.com/riscv-vega/vega-arduino/-/raw/main/package_vega_index.json

However, I'm not sure whether you can make that work for a private repository.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.