-
Notifications
You must be signed in to change notification settings - Fork 10
/
_dnc.cmd
143 lines (123 loc) · 4 KB
/
_dnc.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
@set pause=rem
@Echo off
if [%1]==[P] goto plugin
if [%1]==[p] goto plugin
if not [%1]==[] goto help
goto end_plugin
:plugin
set plugin=/dPLUGIN
set rplugin=PLUGIN
:end_plugin
set H=O:OLF:OS2;LargeFileSupport
if [%Host%]==[OLF] goto end_host
set H=W:WLF:Win32;LargeFileSupport
if [%Host%]==[WLF] goto end_host
goto Help
:end_host
if [%target%]==[] set target=%Host%
set T=O:OLF:OS2;LargeFileSupport
if [%Target%]==[OLF] goto end_Target
set T=W:WLF:Win32;LargeFileSupport
if [%Target%]==[WLF] goto end_Target
set T=D
if [%Target%]==[D32] goto end_Target
goto Help
:end_Target
echo Host="%Host%" Target="%Target%" %rplugin%
%pause%
if not exist EXE.%Target% md EXE.%Target%
Echo Compiling VERSION.EXE for %Host%
if exist EXE.%Host%\version.exe goto dover
vpc version /b /q /c%H%
@if errorlevel 1 goto Error
if exist EXE.%Host%\tvhc.exe del EXE.%Host%\thvc.exe
:dover
EXE.%Host%\version.exe EXE.%Target%\version.inc %Target% %rplugin%
%pause%
if exist EXE.%Host%\tvhc.exe goto comphelp
Echo Compiling TVHC.EXE for %Host%
vpc tvhc /b /q /c%H%
@if errorlevel 1 goto Error
:comphelp
Echo Compiling help files for %Target%
EXE.%Host%\tvhc resource\english\dnhelp.htx EXE.%Target%\english.hlp EXE.%Target%\dnhelp.pas /4DN_OSP
EXE.%Host%\tvhc resource\russian\dnhelp.htx EXE.%Target%\russian.hlp EXE.%Target%\dnhelp.pas /4DN_OSP
EXE.%Host%\tvhc resource\ukrain\dnhelp.htx EXE.%Target%\ukrain.hlp EXE.%Target%\dnhelp.pas /4DN_OSP
rem EXE.%Target%\tvhc resource\hungary\dnhelp.htx EXE.%Target%\hungary.hlp EXE.%Target%\dnhelp.pas /4DN_OSP
%pause%
if exist EXE.%Host%\rcp.exe goto dores
Echo Compiling RCP.EXE for %Host%
vpc rcp /b /dRCP /q %plugin% /c%H%
@if errorlevel 1 goto Error
:dores
Echo Compiling resource files for %Target% %rplugin%
set RCP_Target=%Target%
if [%Target%]==[OLF] set RCP_P=O OS2
if [%Target%]==[WLF] set RCP_P=W Win32
if [%Target%]==[D32] set RCP_P=D DPMI32
rem EXE.%Host%\rcp %T% %RCP_P% %rplugin%
EXE.%Host%\rcp %RCP_P% %rplugin%
:endres
%pause%
Echo Compiling DN.EXE for %Target% %rplugin%
if not [%Target%]==[D32] goto OS2W32
vpc dn /dDN /dDNPRG -b -q -CW:d32:DPMI32
@if not errorlevel 1 goto pe2LE
@echo â® çâ®-â® ¯¥à¥¯®«ï¥âáï ¢ VP, á® ¢â®à®£® à § ¯®«ãç¨âáï.
vpc dn /dDN /dDNPRG -m -q -CW:d32:DPMI32
@if errorlevel 1 goto Error
:pe2LE
PE2LE.EXE EXE.D32\DN.EXE EXE.D32\DN.PRG /S:LIB.D32\dos32a.exe /Q
@if errorlevel 1 goto Error
del EXE.D32\dn.exe
goto end_dn
:OS2W32
if [%Target%]==[WLF] goto W32
Echo Compiling dnpmapil.dll
vpc dnpmapil -c%T% /q /b %plugin%
@if errorlevel 1 goto Error
%pause%
vpc dn -c%T% /b /dDN /dDNPRG /q %plugin%
if not errorlevel 1 goto end_dn
@echo â® çâ®-â® ¯¥à¥¯®«ï¥âáï ¢ VP, á® ¢â®à®£® à § ¯®«ãç¨âáï.
vpc dn -c%T% /m /dDN /dDNPRG /q %plugin%
@if errorlevel 1 goto Error
if [%Host%]==[OLF] rc -p -x2 EXE.OLF\dn.res EXE.OLF\dn.exe
goto end_dn
:W32
LIB.W32\vpkbdw32.pas /m /dDN /dDNPRG /q %plugin% /c%T%
vpc dn -c%T% /b /dDN /dDNPRG /q %plugin%
if not errorlevel 1 goto end_dn
@echo â® çâ®-â® ¯¥à¥¯®«ï¥âáï ¢ VP, á® ¢â®à®£® à § ¯®«ãç¨âáï.
vpc dn -c%T% /m /dDN /dDNPRG /q %plugin%
@if errorlevel 1 goto Error
:end_dn
%pause%
if [%plugin%]==[] goto end_plgman
Echo Compiling plugman.dll for %Target%
vpc plugman /m /q /c%T%
if not errorlevel 1 goto end_plgman
@echo â® çâ®-â® ¯¥à¥¯®«ï¥âáï ¢ VP, á® ¢â®à®£® à § ¯®«ãç¨âáï.
vpc plugman /m /q /c%T%
@if errorlevel 1 goto Error
:end_plgman
%pause%
rem lxlite exe.os2\dn.exe
%pause% ”¨ «ì®¥ 㤠«¥¨¥ vpi ¨.â.¯.
del EXE.%Target%\*.vpi
del EXE.%Target%\*.lib
del EXE.%Target%\*.map
del EXE.%Target%\*.bak
del EXE.%Target%\*.lnk
del EXE.%Target%\*.obj
goto ret
:Help
@echo ¥à¥¬¥ ï Host ¤®«¦ 㪠§ë¢ âì ⥪ãéãî ¯« âä®à¬ã (OLF, WLF);
@echo ¥à¥¬¥ ï Target ¤®«¦ 㪠§ë¢ âì 楫¥¢ãî ¯« âä®à¬ã (OLF, WLF, D32),
@echo ¥á«¨ ® ®â«¨ç ®â ⥪ã饩.
@echo à ¬¥âà ¤®«¦¥ ®âáãâá⢮¢ âì ¨«¨ ¨¬¥âì § 票¥ P
@echo (¤«ï ª®¬¯¨«ï樨 ¯« £¨®© ¢¥àᨨ).
@goto ret
:Error
echo Error
:ret