FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 47332c50 authored by Silas S. Brown's avatar Silas S. Brown
Browse files

Gradint update

git-svn-id: http://svn.code.sf.net/p/e-guidedog/code/ssb22/gradint@824 29193198-4895-4776-b068-10539e920549
parent 7ee8f9e4
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,6 @@
# installer for giving to someone.
Extra_Data=partials *_disabled [^g]*.exe
#Unix_To_Dos=flip -m
# Unix_To_Dos=unix2dos -k -o -q # (keep date, run quietly)
Unix_To_Dos=unix2dos # (-k -o -q are not recognised on all systems)
All_Versions=gradint-build.7z gradint.exe gradint.tbz gradint.bgz gradint.zip gradintcab.zip gradint-S60.zip
# dropping gradint-noGUI.exe and GUI.exe for now - probably don't need that separation anymore
......@@ -62,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)
$(Unix_To_Dos) windows0/gradint/*.txt windows0/gradint/*/*.txt windows0/gradint/*/*.txt windows0/*.bat windows0/*/*.bat windows0/7zip.conf
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
# 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
......@@ -93,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
$(Unix_To_Dos) windows0/recorder/*.bat windows0/recorder/*.txt
for N in windows0/recorder/*.bat windows0/recorder/*.txt; do tr -d $$'\r' < $$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
......@@ -108,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?
$(Unix_To_Dos) PocketPC0/gradint/*.txt
for N in PocketPC0/gradint/*.txt; do tr -d $$'\r' < $$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
......@@ -143,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)
$(Unix_To_Dos) windows0/gradint/*.txt windows0/gradint/*/*.txt windows0/gradint/*/*.txt windows0/*.bat windows0/*/*.bat windows0/7zip.conf
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
# 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)
......@@ -156,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 ..
$(Unix_To_Dos) windows0/7zip.conf
for N in windows0/7zip.conf; do tr -d $$'\r' < $$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
......@@ -232,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)
$(Unix_To_Dos) CD/gradint/*.txt CD/gradint/*/*.txt CD/gradint/*/*/*.txt CD/setup.bat CD/gradint/*.bat CD/gradint/*/*.bat
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
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment