0

Is it possible to incude the icudtl.dat file into the resulting binary when embedding v8?

The documentation hints at this beeing possible with sentences such as "If V8 was compiled with the ICU data in an external file...", but I cannot find any information as to how to do it.

Ensuring this data file would be in a known location on every computer would be a pain. Is it possible to do this without converting the file to a c++ array, saving that to a 50 MB c++ file and extracting it to a random path inside /tmp/?

1 Answers1

0

Adding icu_use_data_file = false to your GN args (using the command gn args out/your-output-directory) should do the trick.

The way to find information about GN args is gn args --list out/your-output-directory. (Though, a word of caution: I'd recommend to stick with the defaults where possible, and only set custom options when you know that you need them. I've seen folks post lists with dozens of custom build flags and then asking why something wasn't working -- probably because that particular combination is too exotic and hence insufficiently tested.)

Aside from that, using an external ICU data file should not be much of a problem either, as it doesn't need to be in a particular known location: it simply needs to be in the same directory as your binary. So whatever installer/packaging mechanism you use, just include the data file there along with the binary.

jmrk
  • 34,271
  • 7
  • 59
  • 74