diff --git a/gradint-build/Makefile b/gradint-build/Makefile
index fcd8b3ad0be5b104d81cf2299a7572b1a702b710..090a60d548d1fbcbcd7df7d19ea46818af687507 100644
--- a/gradint-build/Makefile
+++ b/gradint-build/Makefile
@@ -58,7 +58,7 @@ gradint.exe: $(Common_Files) gradint.py
 	mv windows0/gradint/samples/utils "windows0/gradint/samples/advanced utilities"
 	for N in hanzi-prompts/*.txt; do python -c "open('windows0/gradint/samples/prompts/$$(echo $$N|sed -e s,.*/,,)','w').write('\\xef\\xbb\\xbf'+open('$$N').read())"; done # overwriting the pinyin ones (as will bundle espeak so can translit.)
 	zip -0 windows0/gradint/library.zip gradint.py # (important to have no compression)
-	for N in windows0/gradint/*.txt windows0/gradint/*/*.txt windows0/gradint/*/*.txt windows0/*.bat windows0/*/*.bat windows0/7zip.conf; do tr -d $$'\r' < $$N > n && mv n $$N; done
+	for N in windows0/gradint/*.txt windows0/gradint/*/*.txt windows0/gradint/*/*.txt windows0/*.bat windows0/*/*.bat windows0/7zip.conf; do python -c "import sys; sys.stdout.write(sys.stdin.read().replace('\r','').replace('\n','\r\n'))" < $$N > n && mv n $$N; done
 	# add a utf-8 BOM to start of vocab.txt, to ensure Notepad saves it in utf-8
 	cd windows0/gradint && python -c 'open("v2","w").write("\xef\xbb\xbf"+open("vocab.txt").read())' && mv v2 vocab.txt && cd ../..
 	# can trim down the shortcuts, as the GUI now gives access to them
@@ -89,7 +89,7 @@ recorder.exe: $(Common_Files) gradint.py
 	# (replace the .exe with a .bat in case they try to open it again from desktop and get confused by unzip's "overwrite" prompt)
 	# (NB must say 'start' below for the above del to work)
 	echo 'firstLanguage="$(RecorderL1)";secondLanguage="$(RecorderL2)"' > windows0/recorder/settings.txt
-	for N in windows0/recorder/*.bat windows0/recorder/*.txt; do tr -d $$'\r' < $$N > n && mv n $$N; done
+	for N in windows0/recorder/*.bat windows0/recorder/*.txt; do python -c "import sys; sys.stdout.write(sys.stdin.read().replace('\r','').replace('\n','\r\n'))" < $$N > n && mv n $$N; done
 	cd windows0; zip -9r recorder.zip recorder/ ; cd ..
 	echo '$$AUTORUN$$>start /min recorder\runme.bat' | zip -z windows0/recorder.zip
 	cat yali-voice/unzipsfx.exe windows0/recorder.zip > recorder.exe
@@ -104,7 +104,7 @@ gradint.cab: $(Common_Files) gradint.py
 	for Dir in PocketPC0/gradint/partials/*/*; do if cd $$Dir; then if wc -c *.raw | grep -v total$$ | sed -e 's/^ *//' > audiodata.dat ; then cat *.raw >> audiodata.dat ; rm *.raw; else rm -f audiodata.dat; fi; cd ../../../../..; else true; fi; done
 	chmod +w PocketPC0/gradint/gradint.py # saves problems with pocketpc-cab
 	rm -rf PocketPC0/gradint/samples/utils # TODO really?
-	for N in PocketPC0/gradint/*.txt; do tr -d $$'\r' < $$N > n && mv n $$N; done
+	for N in PocketPC0/gradint/*.txt; do python -c "import sys; sys.stdout.write(sys.stdin.read().replace('\r','').replace('\n','\r\n'))" < $$N > n && mv n $$N; done
 	cd PocketPC0/gradint && python -c 'open("v2","w").write("\xef\xbb\xbf"+open("vocab.txt").read())' && mv v2 vocab.txt && cd ../..
 	# PocketPC/espeak-data contains the altered phon* files in case the eSpeak version is slightly different, but we should be able to re-use the dictionaries etc
 	$(SevenZip) x windows/espeak-windows.7z && mv PocketPC0/espeak-data/* espeak/espeak-data && rmdir PocketPC0/espeak-data && mv espeak/espeak-data PocketPC0 && rm -rf espeak
@@ -139,7 +139,7 @@ gradint-noGUI.exe: $(Common_Files) gradint.py
 	cp -r $(Common_Files) windows0/gradint/
 	mv windows0/gradint/samples/utils "windows0/gradint/samples/advanced utilities"
 	zip -0 windows0/gradint/library.zip gradint.py # (important to have no compression)
-	for N in windows0/gradint/*.txt windows0/gradint/*/*.txt windows0/gradint/*/*.txt windows0/*.bat windows0/*/*.bat windows0/7zip.conf; do tr -d $$'\r' < $$N > n && mv n $$N; done
+	for N in windows0/gradint/*.txt windows0/gradint/*/*.txt windows0/gradint/*/*.txt windows0/*.bat windows0/*/*.bat windows0/7zip.conf; do python -c "import sys; sys.stdout.write(sys.stdin.read().replace('\r','').replace('\n','\r\n'))" < $$N > n && mv n $$N; done
 	# add a utf-8 BOM to start of vocab.txt, to ensure Notepad saves it in utf-8
 	cd windows0/gradint && python -c 'open("v2","w").write("\xef\xbb\xbf"+open("vocab.txt").read())' && mv v2 vocab.txt && cd ../..
 	# shortcuts: Don't use .lnk files, they are far too horrible (even if you put %HOMEDRIVE%%HOMEPATH% in the shortcut, it still stores the original location, and you can't reliably create them on the client without delving rediculously deep into Windows programming).  Perhaps could use .url files, but we just use small batch files.  Prepend a common header to each one.  (NB it won't work to try to force the sort order by calling things _uninstall, ~uninstall, etc, unless you want Z_uninstall, Z_advanced etc)
@@ -152,7 +152,7 @@ gradint-noGUI.exe: $(Common_Files) gradint.py
 GUI.exe: gradint.py
 	rm -rf windows0 ; cp -r windowsGUI windows0
 	cd windows0 && $(SevenZip) x gradint.bgz && rm gradint.bgz && cd ..
-	for N in windows0/7zip.conf; do tr -d $$'\r' < $$N > n && mv n $$N; done
+	for N in windows0/7zip.conf; do python -c "import sys; sys.stdout.write(sys.stdin.read().replace('\r','').replace('\n','\r\n'))" < $$N > n && mv n $$N; done
 	zip -0 windows0/gradint/library.zip gradint.py # (important to have no compression)
 	cd windows0 ; $(SevenZip) a data.7z setup.bat gradint ; cd ..
 	cat windows/7zS.sfx windows0/7zip.conf windows0/data.7z > GUI.exe
@@ -228,7 +228,7 @@ CD: $(Mac_Files) gradint.zip
 	echo '#!/bin/bash'>CD/gradint/Linux-version.sh; echo python gradint.py>>CD/gradint/Linux-version.sh # don't rename gradint.py because it's used by Mac version also
 	mv gradint.zip CD/gradint/RiscOS-version.zip
 	zip -0 CD/gradint/library.zip gradint.py # (important to have no compression)
-	for N in CD/gradint/*.txt CD/gradint/*/*.txt CD/gradint/*/*/*.txt CD/setup.bat CD/gradint/*.bat CD/gradint/*/*.bat; do tr -d $$'\r' < $$N > n && mv n $$N; done
+	for N in CD/gradint/*.txt CD/gradint/*/*.txt CD/gradint/*/*/*.txt CD/setup.bat CD/gradint/*.bat CD/gradint/*/*.bat; do python -c "import sys; sys.stdout.write(sys.stdin.read().replace('\r','').replace('\n','\r\n'))" < $$N > n && mv n $$N; done
 	cd CD/gradint && python -c 'open("v2","w").write("\xef\xbb\xbf"+open("vocab.txt").read())' && mv v2 vocab.txt && cd ../..
 	echo "<html><body><h1>Gradint Live CD" > CD/Read_Me.html
 	grep ^program_name < src/top.py|head -1|sed -e 's/.*radint v/v/' -e 's/ .*/./' >> CD/Read_Me.html