Entry
TSE: Macro: How to recompile your .s macros automatic for other TSE versions (2.5<->2.8<->3<->4)?
Jul 3rd, 2003 10:00
Knud van Eeden,
-----------------------------------------------------------------------
--- Knud van Eeden - 29 June 2003 - 23:33 pm --------------------------
For example, you have been using or developing macros for TSE v2.5 for
DOS, and you want to quickly and automatically recompile this macros
for
TSE v2.8 and or v3.0 and or v4.0.
---
Method 1:
The shortest and quickest is just to type:
If you use TSE v2.5 or lower, type:
c:\tse\sc.exe *.s
If you use TSE v2.8, v3.0, v4.0, type:
c:\tse\sc32.exe *.s
this will compile ALL macros ending on .s in the current directory.
(you might have to adapt the filepath to your sc.exe and or sc32.exe)
---
Method 2:
Another more general idea is to create a batch file, containing the
FOR DO command, and
to use the TSE command line compiler (sc.exe for TSE v2.x for DOS and
sc32.exe for TSE v2.8, v3.0, v4.0)
---
Steps: Overview:
Open an MSDOS box:
1. -Create a separate directory for your destination .s macros in each
of this TSE versions:
---
e.g. for TSE v2.8, type:
md c:\wordproc\tse28\mymacros
---
e.g. for TSE v3.0, type:
md c:\wordproc\tse30\mymacros
---
e.g. for TSE v4.0, type:
md c:\wordproc\tse40\mymacros
2. -Goto the directory where your have your original .s macros
e.g. if they are stored in the below directory, type:
cd c:\wordproc\tse25\mymacros
3. -Recompile them automatically, e.g. by creating an MSDOS batch
file (e.g. open TSE, copy this text below, and save it
as 'yourfilename.bat'), containing this text:
Note: you will have to adapt the filepath to
the situation on your computer, e.g. the
path to each of the versions sc.exe and
or sc32.exe files (usually in the original
TSE installation directory, where also e.exe,
e32.exe, g32.exe are installed)
3.1 The general format of this file is:
--- cut here ------------------------------------------
<change to the destination drive>
cd <your destination directory>
copy <the macro .s files in your source directory>
for %file in (*.s) do <run TSE sc.exe or sc32.exe> %file%
--- cut here -------------------------------------------
3.2 if you are using Microsoft MSDOS as a command processor:
--- cut here ------------------------------------------
@REM --- from TSE v2.5 to TSE v2.8
c:
cd \wordproc\tse28\mymacros
copy \wordproc\tse25\mymacros\*.s
for %%f in (*.s) do ( c:\wordproc\tse32_v28\sc32.exe %%f )
@REM --- from TSE v2.5 to TSE v3.0
c:
cd \wordproc\tse30\mymacros
copy \wordproc\tse25\mymacros\*.s
for %%f in (*.s) do ( c:\wordproc\tse32_v28\sc32.exe %%f )
@REM --- from TSE v2.5 to TSE v4.0
c:
cd \wordproc\tse40\mymacros
copy \wordproc\tse25\mymacros\*.s
for %%f in (*.s) do ( c:\wordproc\tse32_v28\sc32.exe %%f )
--- cut here -------------------------------------------
3.3 If you are using 4NT / 4DOS, http://www.jpsoft.com
--- cut here -------------------------------------------
@REM --- from TSE v2.5 to TSE v2.8
pushd
c:
cdd \wordproc\tse28\mymacros
copy \wordproc\tse25\mymacros\*.s /u
for %file in (*.s) do c:\wordproc\tse28\sc32.exe %file%
@REM use this if you want to only recompile some files changed
@REM in the last (for example 3) days
@REM this has been tested in 4NT v5.00
@REM for /[d-3] %file in (*.s) do c:\wordproc\tse28\sc32.exe %file%
popd
@REM --- from TSE v2.5 to TSE v3.0
pushd
c:
cdd \wordproc\tse30\mymacros
copy \wordproc\tse25\mymacros\*.s /u
for %file in (*.s) do c:\wordproc\tse30\sc32.exe %file%
@REM use this if you want to only recompile some files changed
@REM in the last (for example 3) days
@REM this has been tested in 4NT v5.00
@REM for /[d-3] %file in (*.s) do c:\wordproc\tse30\sc32.exe %file%
popd
@REM --- from TSE v2.5 to TSE v4.0
pushd
c:
cdd \wordproc\tse40\mymacros
copy \wordproc\tse25\mymacros\*.s /u
for %file in (*.s) do c:\wordproc\tse40\sc32.exe %file%
@REM use this if you want to only recompile some files changed
@REM in the last (for example 3) days
@REM this has been tested in 4NT v5.00
@REM for /[d-3] %file in (*.s) do c:\wordproc\tse40\sc32.exe %file%
popd
--- cut here -------------------------------------------
4. Possibly add this .s macro directory to that version of TSE
4.1 in the menu choose
'Other'->'Full configuration'->'System/File Options'
->'Path(s) for Supplemental Files'
and add the path to this macro destination directory
(e.g.
---
in TSE v2.8 add or append:
; c:wordproc\tse28\mymacros
---
in TSE v3.0 add or append:
; c:wordproc\tse30\mymacros
---
in TSE v4.0 add or append:
; c:wordproc\tse40\mymacros
4.2 then press <ENTER>, <ESCAPE>, and
select 'Save Current Settings'
to save this results
4.3 If you then run macros in that version of TSE, it will start
looking for that macros in the order given by the list
of files in this 'System/File option'
5. If you then run this batch file, by typing its filename on the
MSDOS command line
e.g. if you saved the batch file as 'yourfilename.bat', type:
yourfilename.bat
followed by <ENTER>
it will automatically start compiling that .s macros
---
That will typically recompile thousands of .s files in
a matter of minutes, for that other TSE version.
-----------------------------------------------------------------------