FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 1e31624b 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@917 29193198-4895-4776-b068-10539e920549
parent 84a92866
No related branches found
No related tags found
No related merge requests found
......@@ -367,7 +367,14 @@ if winsound or winCEsound or mingw32 or riscos_sound or not hasattr(os,"tempnam"
if once_per_day&2 and not hasattr(sys,"_gradint_innerImport"): # run every day
currentDay = None
while True:
# markerFile logic to avoid 2 background copies etc (can't rely on taskkill beyond WinXP)
# (however this doesn't protect against uninstall + immediate reinstall)
markerFile,toDel="background1"+dottxt,"background2"+dottxt
if fileExists(markerFile): markerFile,toDel=toDel,markerFile
try: os.remove(toDel)
except OSError: pass
open(markerFile,"w").write("(delete this file to make the background process quit on next check)")
while fileExists(markerFile):
need1adayMessage = (currentDay == time.localtime()[:3]) # (not 1st run of day, so if the run goes ahead then they quit earlier and we'd better explain why we came back)
currentDay = time.localtime()[:3]
if __name__=="__main__": # can do it by importing gradint
......
......@@ -21,7 +21,13 @@ echo secondLanguage="en" >> "%HOMEDRIVE%%HOMEPATH%\gradint\settings.txt"
goto nextBit
:doneAlready
if not exist "%HOMEDRIVE%%HOMEPATH%\gradint\gradint-wrapper.exe" goto silentRepair
if exist "%HOMEDRIVE%%HOMEPATH%\gradint\vocab.txt" goto needWarning
if exist "%HOMEDRIVE%%HOMEPATH%\gradint\settings.txt" goto needWarning
if exist "%HOMEDRIVE%%HOMEPATH%\gradint\advanced.txt" goto needWarning
if exist "%HOMEDRIVE%%HOMEPATH%\gradint\samples" goto needWarning
rem is almost certainly a failed uninstall
goto silentRepair
:needWarning
echo It seems that gradint was already installed on your system.
echo The installer will replace the program files but not the data.
echo Your vocab.txt and recorded words will not be changed,
......@@ -50,6 +56,11 @@ goto afterGotSamples
rem Update the previously-buggy whatSay_zh.txt prompt
if exist "%HOMEDRIVE%%HOMEPATH%\gradint\samples\prompts\whatSay_zh.txt" copy /Y samples\prompts\whatSay_zh.txt "%HOMEDRIVE%%HOMEPATH%\gradint\samples\prompts"
:afterGotSamples
rem also support partials in bundle
if not exist partials goto skipPartials
if exist "%HOMEDRIVE%%HOMEPATH%\gradint\partials" goto skipPartials
xcopy /I partials "%HOMEDRIVE%%HOMEPATH%\gradint\partials" /S
:skipPartials
xcopy /I /D /Y /S tcl "%HOMEDRIVE%%HOMEPATH%\gradint\tcl"
copy /Y library.zip "%HOMEDRIVE%%HOMEPATH%\gradint"
copy /Y datetime.pyd "%HOMEDRIVE%%HOMEPATH%\gradint"
......
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