Non-Windows line endings for Windows builds?

Post Reply
User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Non-Windows line endings for Windows builds?

by Wuzzy » Post

Hi!
I have heard from an user (see here: viewtopic.php?f=3&t=15694#p236652) who was confused by opening a text file from one of the Windows builds. Apparently all text files were in “UNIX line ending mode” instead of “Windows line ending mode” which is probably by mistake.
Packagers, can you please check this and fix this by transforming the text files in the release packages (!) to “Windows line ending mode”?
As far I know, Git itself has simple tools to achieve this job, so I hope it shouldn't be too hard.
Note: I am only asking you to change the line endings in the release packages, not in the Minetest repository itself!

Or does Minetest rely on “UNIX line endings” for its config files? That would be bad.

I am not a Windows user myself, so I can't test.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Non-Windows line endings for Windows builds?

by Krock » Post

Yes, this is a common problem. I'm a long time Windows user but still keep the UNIX line endings - for two reasons:

1) It would be nonsense to convert the files when they will run into that problem later with modding. Almost all Lua scripts, might it be in mods or in builtin - are formatted in UNIX line endings.

and thus:

2) Force users to use a good editor, like Notepad++ (alternatively Wordpad, if installing isn't a thing)

Minetest itself does not care about the line endings, so it is not a problem when lines contain an additional carriage return character at the line end.
Probably I would change my opinion if there were a lot posts about the same issue - but really, how difficult is it to not use the plain Notepad?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
addi
Member
Posts: 666
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

Re: Non-Windows line endings for Windows builds?

by addi » Post

Krock wrote:1) It would be nonsense to convert the files when they will run into that problem later with modding. Almost all Lua scripts, might it be in mods or in builtin - are formatted in UNIX line endings.
Thats not True. If you are using git with default configuration, all Text like files you get with git Clone become Windows line endings. I do this for minetest, minetest game and all mods an never had trouble the last 4 years. :-D
Krock wrote:2) Force users to use a good editor, like Notepad++ (alternatively Wordpad, if installing isn't a thing)
the "eat or die" prinziple is definitly the wrong way. No Software schoud force the User to use something that he does not like. This can do big mighty companies like Googl€ or Fac€boot that dont care if they loose a few thousand customers. But a small project like minetest schould make each User happy and schoud not annoy them by forcing them tu use special Software. In my opinion its not so much important which line endings the config file is using, because you can also change it ingame. You only have to look into it if someone is asking you for it because of a bugreport. More important is the debug.txt file. The Extension .txt makes it default open in notepad, but has wrong line endings, so the User cannot read it. :-/
On some other place there was discussion about not using 7z archives for mods because there is nö defalt program to open it on some OS. ;-)

I hope i could open your eyes about this, and you does not longer following the "eat or die" prinziple
Btw: wordpad is neither a Text Editor nor is it good ;-)

Back to topic: In my packages all static files schould have Windows line endings. If not please Report it!
But sadly all files that mintest writes have Unix line endings. I cannot change it, because this is a bad behaviour of minetest itself. :-(


Sorry for typos, this was written on mobile Phone.

sfan5
Moderator
Posts: 4094
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: Non-Windows line endings for Windows builds?

by sfan5 » Post

It's definitely possible to make Minetest use "Windows line endings" when writing config files by default. Allowing config files with those to be read is not a problem either.

Generally probably nobody has thought about this yet, should be easy to fix though.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests