lvgl / lv_img_conv

Image converter for LVGL, written in JS
https://lvgl.github.io/lv_img_conv/
Other
94 stars 42 forks source link

Windows error when running #13

Open maBarabas opened 2 years ago

maBarabas commented 2 years ago

When running the script from Windows I get the following error:

C:\>%appdata%\npm\lv_img_conv
The system cannot find the path specified.

I've installed from the npm registry. How can I use this script in Windows cmd.exe?

embeddedt commented 2 years ago

I hadn't tested the script on Windows. I expect it to work properly in Cygwin/MSYS2/Git Bash, but it indeed has problems when running in cmd.exe.

embeddedt commented 2 years ago

@gokhannsahin just contributed instructions to get this working in Windows if you clone it using Git.

billybednar commented 1 year ago

The error is because of this line: https://github.com/lvgl/lv_img_conv/blob/114a34f7a63efbb37b9af745b9f77a174c248d69/lv_img_conv.js#L1

Because of that the generated command file node_modules\.bin\lv_font_conv.cmd expects to find Perl in \usr\bin on the current drive. You can test by copying a random program there (installing Perl there will likely not fix it since Perl will then try to run /usr/bin/env):

>mkdir \usr\bin
>copy %WINDIR%\System32\calc.exe \usr\bin\perl.exe
        1 file(s) copied.
>npm exec --no -- lv_img_conv
(calculator opens)
>