dos2unix.exe needed?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Bryy
Veteran
Posts: 280
Joined: Thu Dec 20, 2012 10:12 pm
Completed: Army of Tentacles 1 & 2, The Ghost of Joe Papp, Paper Shakespeare: To Date or Not To Date?
Projects: Inexplicable Geeks: Dawn of Just Us
Organization: Stegalosaurus Game Development
Location: Bay Area, CA
Contact:

dos2unix.exe needed?

#1 Post by Bryy » Fri Jan 05, 2018 7:06 pm

So, apparently some of my users can't play the Linux versions of my games, saying that I need to run dos2unix to convert files.

Anyone else have this problem with Linux users?

Apa
Regular
Posts: 103
Joined: Fri Dec 23, 2016 2:26 am
Location: NYC
Contact:

Re: dos2unix.exe needed?

#2 Post by Apa » Fri Jan 05, 2018 10:38 pm

Android is a Linux variant and dos2unix is not needed definitely.

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1559
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: dos2unix.exe needed?

#3 Post by Imperf3kt » Sun Jan 07, 2018 8:04 pm

Why would Linux users require a Windows executable?

This sounds fishy
Image

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

User avatar
Bryy
Veteran
Posts: 280
Joined: Thu Dec 20, 2012 10:12 pm
Completed: Army of Tentacles 1 & 2, The Ghost of Joe Papp, Paper Shakespeare: To Date or Not To Date?
Projects: Inexplicable Geeks: Dawn of Just Us
Organization: Stegalosaurus Game Development
Location: Bay Area, CA
Contact:

Re: dos2unix.exe needed?

#4 Post by Bryy » Sun Jan 07, 2018 8:41 pm

Yeah, I've been trying to get more information. Now they tell me they can run it fine but they still need this?

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1559
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: dos2unix.exe needed?

#5 Post by Imperf3kt » Sun Jan 07, 2018 10:37 pm

A quick Googling gives me https://en.wikipedia.org/wiki/Unix2dos

It states that it is a CLI tool which converts *nix line endings, to Windows format line endings.
Using some simple logic, dos2unix is the reverse.

What editor do you use when scripting your game files?
From the sounds of it, it is using MLE (Mixed Line Endings), in other words the following:

Hello world.
My name is Imperf3kt

Is appearing to them, as the following instead

Hello world.\nMy name is Imperf3kt.


Some additional info:
https://en.wikipedia.org/wiki/Newline
Image

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

User avatar
Bryy
Veteran
Posts: 280
Joined: Thu Dec 20, 2012 10:12 pm
Completed: Army of Tentacles 1 & 2, The Ghost of Joe Papp, Paper Shakespeare: To Date or Not To Date?
Projects: Inexplicable Geeks: Dawn of Just Us
Organization: Stegalosaurus Game Development
Location: Bay Area, CA
Contact:

Re: dos2unix.exe needed?

#6 Post by Bryy » Mon Jan 08, 2018 1:27 am

I'm using JEditor.

EDIT (1/20/2018):

Now someone else is telling me that I need to put:

Code: Select all

sed -i 's/\r//' SUPERARMY3.sh
In my code somewhere.

I've researched this and it seems like I need to put it in my .sh files, but nothing tells me WHERE in the file to put it.

I don't want to screw up and make something worse.

ThrashNeon
Newbie
Posts: 12
Joined: Thu Dec 28, 2017 8:21 am
Contact:

Re: dos2unix.exe needed?

#7 Post by ThrashNeon » Fri Jan 26, 2018 12:48 pm

Bryy wrote:
Mon Jan 08, 2018 1:27 am
I'm using JEditor.

EDIT (1/20/2018):

Now someone else is telling me that I need to put:

Code: Select all

sed -i 's/\r//' SUPERARMY3.sh
In my code somewhere.

I've researched this and it seems like I need to put it in my .sh files, but nothing tells me WHERE in the file to put it.

I don't want to screw up and make something worse.
They weren't telling you to put that into your code..

They said that THEY ran that command on your SUPERARMY3.sh file to fix the line endings in that file. They used sed (a *nix utility) to replace the line endings.

You need to make sure the SUPERARMY3.sh file is saved with the correct line endings for linux. I suspect that you created this file in JEditor, and it saved the file with Windows line endings by default.

I would expect there is somewhere in Jeditor for you to check/change line endings in the file.

User avatar
Bryy
Veteran
Posts: 280
Joined: Thu Dec 20, 2012 10:12 pm
Completed: Army of Tentacles 1 & 2, The Ghost of Joe Papp, Paper Shakespeare: To Date or Not To Date?
Projects: Inexplicable Geeks: Dawn of Just Us
Organization: Stegalosaurus Game Development
Location: Bay Area, CA
Contact:

Re: dos2unix.exe needed?

#8 Post by Bryy » Fri Jan 26, 2018 2:01 pm

I fixed it, thanks.

Post Reply

Who is online

Users browsing this forum: xavimat