@set MYTEXMF=\texmf
@set MYVTEXMF=\texmf-var
@set MYLTEXMF=\texmf-local
@set MYLBIN=\bin
@if "%1%"=="DOS" goto DOS
@echo L'installation de eFrench " a la unix "  peut etre
@echo realisee directement en ligne (qq minutes sur internet pour le
@echo transfert des executables, puis qq dizaines de minutes ensuite).
@echo Ok pour continuer ? (sinon Ctrl-C et "install DOS" ou "mikinstall")
@pause
@call bin\setupunx.bat
@exit

:DOS
@if NOT "%SOURCE%"=="" cd %SOURCE%
@copy pwd source.bat
@cd >>source.bat
@call source
@del source.bat
@if "%SOURCE%"=="" set SOURCE="%ORIGIN%"

@rem if EXIST %SOURCE%\inputs\frlicense.dat goto EXISTS
@rem echo Le fichier source %%SOURCE%%\inputs\frlicense.dat n'est pas trouve !
@rem set SOURCE=
@rem set ROOT=
@rem goto FIN

rem :EXISTS
@cd ..
@cd ..
@cd ..
@if NOT "%ROOT%"=="" cd %ROOT%
@copy %SOURCE%\target %SOURCE%\root.bat
@cd >>%SOURCE%\root.bat
@call %SOURCE%\root
@del %SOURCE%\root.bat
@if NOT "%ROOT%"=="" goto OKROOT
@if "%ROOT%"=="" set ROOT="%ORIGOUT%"
@echo Cette procedure automatique d'installation ne fonctionnera pas
@echo si les commandes (et formats) frtex et frlatex n'existent pas ;
@echo voir a ce sujet engines\tetex.pdf.
@echo
@echo Vous devez eventuellement preciser (variable %%ROOT%%) ou se trouve 
@echo votre repertoire cible TEXMF-LOCAL pour l'installation de eFrench ;
@echo peut-etre s'agit-il de :
@echo %ROOT%

:OKROOT
@cd %SOURCE%
@copy pwd root.bat
@cd %ROOT%
@cd >>%SOURCE%\root.bat
@cd %SOURCE%
@echo . 
@echo      B I E N V E N U E pour l'installation de eFrench 
@echo .
@echo Installation de eFrench depuis le repertoire 
@echo source %SOURCE% (variable %%SOURCE)
@echo et selon l'architecture TDS (texmf-local sauf 
@echo pour les formats qui iront dans texmf-var) qui
@echo a pour racine %ROOT% (variable %%ROOT).
@echo Ok pour continuer ? (sinon Ctrl-C)
@pause

@cd %ROOT%
mkdir %ROOT%%MYTEXMF%\tex 
mkdir %ROOT%%MYTEXMF%\tex\generic 
mkdir %ROOT%%MYTEXMF%\tex\generic\hyphen 

mkdir %ROOT%%MYLTEXMF%\doc 
mkdir %ROOT%%MYLTEXMF%\doc\french 

cd %SOURCE%\inputs
copy keyboard.dat french.keyboard.dat
mkdir %SOURCE%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\formatsfp.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\formatsfp.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\frtex.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\frlatex.ini %ROOT%%MYLTEXMF%\miktex\config
cd %SOURCE%\inputs
rem latex -no-mktex=FMT frlicense.dat
rem del frlicense.log
cd %SOURCE%
mkdir %SOURCE%\bin
mkdir %SOURCE%\bin
mkdir %ROOT%%MYLTEXMF%%MYLBIN%
mkdir %ROOT%%MYLTEXMF%\tex
mkdir %ROOT%%MYLTEXMF%\tex\french
mkdir %ROOT%%MYLTEXMF%%MYLBIN%
mkdir %ROOT%%MYTEXMF%\tex\generic\hyphen
cd %SOURCE%\initex
copy frhyph.tex %ROOT%%MYTEXMF%\tex\generic\hyphen
copy frhyph1.tex %ROOT%%MYTEXMF%\tex\generic\hyphen
copy zerohyph.tex %ROOT%%MYTEXMF%\tex\generic\hyphen
copy hypht1.tex %ROOT%%MYTEXMF%\tex\generic\hyphen
mkdir %ROOT%%MYLTEXMF%\tex\french\base
copy ecplain.tex %ROOT%%MYLTEXMF%\tex\french\base
copy frpdftexconfig.tex %ROOT%%MYLTEXMF%\tex\french\base
copy hyconfig.tex %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%\inputs
mkdir %ROOT%%MYLTEXMF%\tex\french\config
cd %SOURCE%\inputs
rem copy frlicense.dat %ROOT%%MYLTEXMF%\tex\french\config
copy language.dat %ROOT%%MYLTEXMF%\tex\french\config
cd %SOURCE%\inputs
copy english.keyboard.dat %ROOT%%MYLTEXMF%\tex\french\config
copy french.keyboard.dat %ROOT%%MYLTEXMF%\tex\french\config
copy keyboard.dat %ROOT%%MYLTEXMF%\tex\french\config
cd %SOURCE%\initex
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frelatex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\fretex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frlatex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frpdflatex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frpdftex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frtex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frtexcm.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frtexec.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frxelatex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\frxetex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\tex.fpi
copy iniproto %ROOT%%MYLTEXMF%\tex\french\config\mltex.fpi
copy hyphen.cfg %ROOT%%MYLTEXMF%\tex\french\config
copy plaintex.cfg %ROOT%%MYLTEXMF%\tex\french\config
copy frelatex.fr %ROOT%%MYLTEXMF%\tex\french\config
copy fretex.fr %ROOT%%MYLTEXMF%\tex\french\config
copy frlatex.fr %ROOT%%MYLTEXMF%\tex\french\config
copy frpdflatex.fr %ROOT%%MYLTEXMF%\tex\french\config
copy frpdftex.fr %ROOT%%MYLTEXMF%\tex\french\config
copy frtex.fr %ROOT%%MYLTEXMF%\tex\french\config
copy frtexcm.fr %ROOT%%MYLTEXMF%\tex\french\config
copy frtexec.fr %ROOT%%MYLTEXMF%\tex\french\config
copy frxelatex.fr %ROOT%%MYLTEXMF%\tex\french\config
copy frxetex.fr %ROOT%%MYLTEXMF%\tex\french\config
copy mltex.fr %ROOT%%MYLTEXMF%\tex\french\config
mkdir %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%
copy %SOURCE%\bin\kb7to8.exe %ROOT%%MYLTEXMF%%MYLBIN%
copy %SOURCE%\bin\kb8to7.exe %ROOT%%MYLTEXMF%%MYLBIN%
cd %SOURCE%
mkdir %ROOT%%MYLTEXMF%\doc\french\base
mkdir %ROOT%%MYLTEXMF%\doc\french\base
rem copy ALIRE.pdf frenchpro.pdf
copy frnotes.pdf %ROOT%%MYLTEXMF%\doc\french\base\frnotes.pdf
del frenchpro.pdf
copy %SOURCE%\doc\frguide.pdf %ROOT%%MYLTEXMF%\doc\french\base\frguide.pdf
copy %SOURCE%\doc\frenchle.pdf %ROOT%%MYLTEXMF%\doc\french\base\frenchle.pdf
mkdir %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%
mkdir %ROOT%%MYTEXMF%\tex\latex\frenchle
cd %SOURCE%\inputs
copy french.ldf %ROOT%%MYTEXMF%\tex\latex\frenchle
copy frenchle.ldf %ROOT%%MYTEXMF%\tex\latex\frenchle
copy frenchle.sty %ROOT%%MYTEXMF%\tex\latex\frenchle
copy frenchle.cfg %ROOT%%MYTEXMF%\tex\latex\frenchle
cd %SOURCE%\inputs
copy copyrigh.tex %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%\inputs
copy frabbrev.tex %ROOT%%MYLTEXMF%\tex\french\base
copy french-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy french_french-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy frhyphex.tex %ROOT%%MYLTEXMF%\tex\french\base
copy fxabbrev.tex %ROOT%%MYLTEXMF%\tex\french\base
copy german_french-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy fenglish.sty %ROOT%%MYLTEXMF%\tex\french\base
copy frbabel.sty %ROOT%%MYLTEXMF%\tex\french\base
copy french.sty %ROOT%%MYLTEXMF%\tex\french\base
copy frenchle.sty %ROOT%%MYLTEXMF%\tex\french\base
copy frenchpro.sty %ROOT%%MYLTEXMF%\tex\french\base
copy pmfrench.sty %ROOT%%MYLTEXMF%\tex\french\base
copy french.all %ROOT%%MYLTEXMF%\tex\french\base
copy french.chk %ROOT%%MYLTEXMF%\tex\french\base
copy french.cmd %ROOT%%MYLTEXMF%\tex\french\base
copy enbib.ldf %ROOT%%MYLTEXMF%\tex\french\base
copy frbib.ldf %ROOT%%MYLTEXMF%\tex\french\base
copy french.ldf %ROOT%%MYLTEXMF%\tex\french\base
copy frenchle.ldf %ROOT%%MYLTEXMF%\tex\french\base
copy frenchpro.ldf %ROOT%%MYLTEXMF%\tex\french\base
copy french.dmy %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%\inputs
copy frbabel.sty %ROOT%%MYLTEXMF%\tex\french\base\babel.sty
cd %SOURCE%\inputs
copy french_keyboard-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy frenchfc.tex %ROOT%%MYLTEXMF%\tex\french\base
copy german_keyboard-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy kbconfig.tex %ROOT%%MYLTEXMF%\tex\french\base
copy keyboard-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy keyboard.tex %ROOT%%MYLTEXMF%\tex\french\base
copy keyboard.sty %ROOT%%MYLTEXMF%\tex\french\base
copy TeX.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy ansinew.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy applemac.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy ascii.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy cp850.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy decmulti.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy latin1.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy latin9.kbc %ROOT%%MYLTEXMF%\tex\french\base

copy next.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy utf8.kbc %ROOT%%MYLTEXMF%\tex\french\base
copy TeX.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.TeX.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.TeX.kbc
copy ansinew.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.ansinew.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.ansinew.kbc
copy applemac.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.applemac.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.applemac.kbc
copy ascii.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.ascii.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.ascii.kbc
copy cp850.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.cp850.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.cp850.kbc
copy decmulti.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.decmulti.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.decmulti.kbc
copy latin1.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.latin1.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.latin1.kbc
copy latin9.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.latin9.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.latin9.kbc
copy next.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.next.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.next.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.qwerty.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.qwerty.kbc
copy utf8.kbc %ROOT%%MYLTEXMF%\tex\french\base\french.utf8.kbc
copy qwerty.kbc %ROOT%%MYLTEXMF%\tex\french\base\english.utf8.kbc
cd %SOURCE%\inputs
copy msg.sty %ROOT%%MYLTEXMF%\tex\french\base
copy french_msg-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy german_msg-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy msg-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
copy norsk_msg-msg.tex %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%\inputs
copy mlp-01.sty %ROOT%%MYLTEXMF%\tex\french\base
copy mlp-31.sty %ROOT%%MYLTEXMF%\tex\french\base
copy mlp-33.sty %ROOT%%MYLTEXMF%\tex\french\base
copy mlp-49.sty %ROOT%%MYLTEXMF%\tex\french\base
copy mlp-49n.sty %ROOT%%MYLTEXMF%\tex\french\base
copy mlp-opts.sty %ROOT%%MYLTEXMF%\tex\french\base
copy mlp.sty %ROOT%%MYLTEXMF%\tex\french\base
copy deutschx.mlp %ROOT%%MYLTEXMF%\tex\french\base
copy francais.mlp %ROOT%%MYLTEXMF%\tex\french\base
copy internat.mlp %ROOT%%MYLTEXMF%\tex\french\base
copy ndeutsch.mlp %ROOT%%MYLTEXMF%\tex\french\base
copy noesterr.mlp %ROOT%%MYLTEXMF%\tex\french\base
copy oesterre.mlp %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%\inputs
copy epreuve.sty %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%
mkdir %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%\inputs
copy fridx1.ist %ROOT%%MYLTEXMF%\tex\french\base
cd %SOURCE%
cd %SOURCE%\inputs
copy keyboard.dat french.keyboard.dat
mkdir %SOURCE%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\formatsfp.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\formatsfp.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\frpdftex.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\frpdflatex.ini %ROOT%%MYLTEXMF%\miktex\config
cd %SOURCE%\inputs
copy keyboard.dat french.keyboard.dat
mkdir %SOURCE%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\formatsfp.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\formatsfp.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\fretex.ini %ROOT%%MYLTEXMF%\miktex\config
mkdir %ROOT%%MYLTEXMF%\miktex\config
copy %SOURCE%\miktex\config\frelatex.ini %ROOT%%MYLTEXMF%\miktex\config
@echo LICENCE D'UTILISATION VALABLE 1 MOIS, A L'ESSAI.


@echo Fin de la procedure d'installation

:FIN
@pause 
