forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.bat
executable file
·126 lines (83 loc) · 2.83 KB
/
setup.bat
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
@if not "%echo%" == "on" echo off
REM
REM copy program and messages to temp directory
REM
setlocal
set OS_ARCH=WINNT
set OS_RELEASE=4.0
set OS_CONFIG=%OS_ARCH%%OS_RELEASE%
if not exist perl\nul mkdir perl
if not exist perl\bin\nul mkdir perl\bin
if exist perl\bin\perl.exe goto PerlExists
if not exist perl\arch\%OS_CONFIG%\perl.exe goto NoPerl
copy perl\arch\%OS_CONFIG%\*.* perl\bin > nul
if not exist perl\bin\perl.exe goto NoPerl
:PerlExists
if not exist gd\nul mkdir gd
if exist gd\gd.html goto GDExists
if not exist bin\%OS_CONFIG%\gd\gd.html goto NoGD
copy bin\%OS_CONFIG%\gd\* gd > nul
if not exist gd\gd.html goto NoGD
:GDExists
if not exist gnuplot\nul mkdir gnuplot
if exist gnuplot\gnuplot.exe goto GnuPlotExists
if not exist bin\%OS_CONFIG%\gnuplot\gnuplot.exe goto NoGnuPlot
copy bin\%OS_CONFIG%\gnuplot\* gnuplot > nul
if not exist gnuplot\gnuplot.exe goto NoGnuPlot
:GnuPlotExists
if not exist bin\nul mkdir bin
if exist bin\mailclient.exe goto MailClientExists
if not exist bin\%OS_CONFIG%\bin\mailclient.exe goto NoMailClient
copy bin\%OS_CONFIG%\bin\mailclient.exe bin > nul
:MailClientExists
REM Mode is our name unless the first word is a known mode
set MODE=%0
REM SetMode will jump back to ModeCheckDone
if "%1" == "setup" goto SetMode
if "%1" == "cleanup" goto SetMode
if "%1" == "config" goto SetMode
if "%1" == "checktime" goto SetMode
:ModeCheckDone
REM All the OS setup is done, now make the copies for test execution
REM While debugging the perl version, just do the copies
copy data\*.msg %TEMP% > nul
copy bin\mailclient.exe %TEMP% > nul
REM Run the perl version of setup to handle license and configuration
perl\bin\perl -Ibin -- bin\setup.pl %MODE% TEMPDIR=%TEMP% -w conf\general.wld -z %1 %2 %3 %4 %5 %6 %7 %8
goto end
:SetMode
REM set the MODE to be the arg1 instead of arg0. shift remaining args
set MODE=%1
shift
goto ModeCheckDone
:NoPerl
echo.
echo ERROR: Cannot find perl\arch\%OS_CONFIG%\perl.exe nor perl\bin\perl.exe
echo.
echo Either your mailstone package is incomplete, or you are
echo attempting to run setup.bat from the wrong location.
goto end
:NoGD
echo.
echo ERROR: Cannot find bin\%OS_CONFIG%\gd\gd.html nor gd\gd.html
echo.
echo Either your mailstone package is incomplete, or you are
echo attempting to run setup.bat from the wrong location.
goto end
:NoGnuPlot
echo.
echo ERROR: Cannot find bin\%OS_CONFIG%\gnuplot\gnuplot.exe nor gnuplot\gnuplot.exe
echo.
echo Either your mailstone package is incomplete, or you are
echo attempting to run setup.bat from the wrong location.
goto end
:NoMailClient
echo.
echo ERROR: Cannot find bin\%OS_CONFIG%\bin\mailclient.exe nor bin\mailclient.exe
echo.
echo Either your mailstone package is incomplete, or you are
echo attempting to run setup.bat from the wrong location.
goto end
:end
echo.
endlocal