2 ::used to preprocess source.f files, from PreprocessSourceFile.bat or scite editor Tools menu
7 ::echo %~dp1..\inc\%~n2.pat
10 echo no file to be preprocessed!
14 IF NOT EXIST %~dpn1.f (
15 echo %~dpn1.f not found!
19 IF NOT EXIST %~dp0..\inc\%~n2.pat (
20 echo %~dp0..\inc\%~n2.pat not found!
24 IF "%3" == "" GOTO preprocess
26 echo unexpected third parameter!
34 %~dp0..\prog\gema.exe -nobackup -line -t '-\r\n=\r\n' -f %~dp0..\inc\%~n2.pat %~dpn1.f %~dp1LAST.4TH
36 call %~dp0Select.bat SelectDevice %%target%%
37 if not exist %~dp1SD_%device:~3% MD %~dp1SD_%device:~3% > NUL
38 COPY /y %~dp1LAST.4TH %~dp1SD_%device:~3%\%~n1.4TH > NUL
42 :: %~dp0 is the path of this file.bat
43 :: %~dpn1.f is the symbolic source file
44 :: %~dp0..\inc\%~n2.pat is the pattern file for preprocessor gema.exe
45 :: %~dp1LAST.4TH is the output source file (ready to send to the target)
46 :: %~d1 is the drive of arg %1
47 :: %~n2 is your selected template by SelectTarget.bat or your scite $(1)
49 rem your git copy must be the root of a virtual drive