FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ssb22/gradint
  • st822/gradint
2 results
Show changes
Showing with 57 additions and 5 deletions
@echo off
rem This is Gradint's setup file for Windows.
rem If you are seeing this, when you expected
rem the Gradint installer to be running, then
rem it probably means your copy of Windows has
rem an incorrect file association. That will
rem affect other programs, not just Gradint.
rem To fix the incorrect association, try
rem running regedit and deleting the key:
rem Hkey_Current_User\Software\Microsoft\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat
rem then restart your system and the Gradint
rem installer should work normally.
rem This problem has been reported on some
rem (but not all) Windows 7 setups.
rem --------------------------------------------
rem Find a good place to put Gradint. On Windows 9x this can be C:\Program Files. On XP/NT/etc we'd better check for different home directories. Also check where the profile is.
if not exist "%HOMEDRIVE%%HOMEPATH%" set HOMEDRIVE=C:
......@@ -21,7 +37,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,
......@@ -36,6 +58,9 @@ rem copy all program files, even the ones that have never been changed, in case
tskill gradint-wrapper 2>nul
taskkill /f /im gradint-wrapper.exe 2>nul >nul
cd gradint
rem clean up after old versions
if exist background1.txt del background1.txt
if exist background2.txt del background2.txt
rem support bundles
for /D %%g in (*_disabled) do xcopy /I %%g "%HOMEDRIVE%%HOMEPATH%\gradint\%%g" /S
rem support users who install yali BEFORE gradint
......@@ -50,6 +75,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"
......@@ -108,6 +138,7 @@ rem (deliberately saying "press any key" ourselves not from 'pause', otherwise t
mkdir "%USERPROFILE%\Desktop\gradint"
copy /Y shortcuts\*.* "%USERPROFILE%\Desktop\gradint"
if exist "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup" goto win8
mkdir "%USERPROFILE%\Start Menu\Programs\gradint"
copy /Y shortcuts\*.* "%USERPROFILE%\Start Menu\Programs\gradint"
......@@ -115,10 +146,18 @@ rem Install startup once-per-day thing
mkdir "%USERPROFILE%\Start Menu\Programs\Startup"
copy /Y startup\*.* "%USERPROFILE%\Start Menu\Programs\Startup"
goto win8skip
:win8
copy /Y startup\*.* "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup"
mkdir "%AppData%\Microsoft\Windows\Start Menu\Programs\gradint"
copy /Y shortcuts\*.* "%AppData%\Microsoft\Windows\Start Menu\Programs\gradint"
:win8skip
cd /D "%USERPROFILE%\Desktop"
goto end
:PRC
rem This is a special case for Chinese (Simplified) Windows, configured to use the "Chinese (PRC)" locale for legacy apps (which means these strings should be gb2312 coded).
rem This is a special case for Chinese (Simplified) Windows (XP etc), configured to use the "Chinese (PRC)" locale for legacy apps (which means these strings should be gb2312 coded).
rem (You can get the names of Start Menu etc folders coded in the current locale by doing dir > file.txt at a command prompt and inspecting file.txt)
mkdir "%USERPROFILE%\戮충\gradint"
ren shortcuts\uninstall.bat "shortcuts\탤뇜.bat"
......@@ -136,4 +175,4 @@ rem start explorer gradint
rem (actually, since there's only 1 shortcut now,
rem we might as well just launch it directly)
cd /D "%HOMEDRIVE%%HOMEPATH%\gradint"
start gradint-wrapper.exe once_per_day=2
start gradint-wrapper.exe once_per_day=disable_once_per_day=2
......@@ -32,6 +32,19 @@ taskkill /f /im gradint-wrapper.exe 2>nul >nul
cd /D "%HOMEDRIVE%%HOMEPATH%"
rmdir /S /Q gradint
cd /D "%USERPROFILE%"
rmdir /S /Q "Desktop\gradint"
if exist "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup" goto win8
del "Start Menu\Programs\Startup\Run gradint once per day.bat"
rmdir /S /Q "Start Menu\Programs\gradint" "Desktop\gradint"
rem (TODO - Chinese Windows shortcuts also - see setup.bat)
rmdir /S /Q "Start Menu\Programs\gradint"
rem This is a special case for Chinese (Simplified) Windows (XP etc), configured to use the "Chinese (PRC)" locale for legacy apps (which means these strings should be gb2312 coded).
if not exist "%USERPROFILE%\「역迦」꽉데" goto end
rmdir /S /Q "%USERPROFILE%\戮충\gradint" "%USERPROFILE%\「역迦」꽉데\넋埼\gradint"
del "%USERPROFILE%\「역迦」꽉데\넋埼\폘땡\Run gradint once per day.bat"
goto end
:win8
del "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\Run gradint once per day.bat"
rmdir /S /Q "%AppData%\Microsoft\Windows\Start Menu\Programs\gradint"
:end
File added
File moved
File moved
File moved