wz_mini_hacks icon indicating copy to clipboard operation
wz_mini_hacks copied to clipboard

Editing wz_mini.conf on Microsoft Windows breaks the configuration entirely

Open KevinKadow opened this issue 3 years ago • 3 comments

It isn't currently possible to create/modify a working SD card from a Windows host, due to artifacts from editing "wz_mini.conf".

The errors after editing the configuration from Windows are due to DOS linefeeds added to the end of each line in wz_mini.conf when modified using common Windows apps (notepad, etc).

One way to prevent this would be to modify the scripts which "source" the conf file (especially etc/rc.common) to instead use dos2unix to create a clean copy of the configuration file in a temporary location at first use, and then source that cleaned copy instead of the original.

KevinKadow avatar Aug 31 '22 00:08 KevinKadow

I do it on a win11 machine without any problems. Just use Notepadd++ to edit the files.

MomosX avatar Aug 31 '22 06:08 MomosX

it is currently possible if you use a text editor that doesnt save encoding info. notepad++ or sublime are great options

maxfield-allison avatar Sep 08 '22 21:09 maxfield-allison

Notepad works just fine for text files originally composed with the Unix LF convention and has since 2018. It simply recognizes the characteristic of the document and conforms to it for any subsequent editing. An indicator at the bottom of the page will show 'Unix (LF)' when applicable. 'Windows (CRLF)' would typically be displayed otherwise.

Bob-AOL avatar Oct 16 '22 00:10 Bob-AOL

support for line endings from editing in windows has been added: https://github.com/gtxaspec/wz_mini_hacks/commit/930cbe2e9d78379f5baaf193f96118d29c3a723f

gtxaspec avatar Sep 26 '23 00:09 gtxaspec