summaryrefslogtreecommitdiff
path: root/NetWare/bat/MPKBuild.bat
blob: 0740906d1a45bf29a6dc42c202f1f23dabe17f40 (plain)
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
@echo off
@rem AUTHOR: sgp
@rem CREATED: 22nd May 2000
@rem LAST REVISED: 6th April 2001
@rem Batch file to set MPK/Non-MPK builds and toggle XDC flag setting
@rem This file calls ToggleXDC.bat

if "%1" == "" goto Usage

if "%1" == "/now" goto now
if "%1" == "on" goto yes
if "%1" == "off" goto no
if "%1" == "/?" goto usage
goto dontknow

:now
if "%USE_MPK%" == "" echo USE_MPK is removed, doesn't use MPK APIs
if not "%USE_MPK%"  == "" echo USE_MPK is set, uses MPK APIs, MPKBASE set to %MPKBASE%
call ToggleXDC %1
goto exit

:yes
Set USE_MPK=1
echo ....USE_MPK is set, uses MPK APIs
if "%2" == "" goto setdef
if "%2" == "default" goto setdef
SET MPKBASE=%2
:yescon1
call ToggleXDC on %3 %4
echo ....MPKBASE set to %MPKBASE%
goto exit

:no
Set USE_MPK=
SET MPKBASE=
if not "%2" == "" goto xdc_u
call ToggleXDC off
:nocon1
echo ....USE_MPK is removed. doesn't use MPK APIs
goto exit

:dontknow
goto Usage

:setdef
SET MPKBASE=p:\apps\mpk
goto yescon1

:xdc_u
call ToggleXDC on %2 %3
goto nocon1

:Usage
 @echo on
 @echo "Usage: MPKBuild [on][off] [[path][default]] [[flag1] [flag2]]"
 @echo "Usage: MPKBuild /now"  - To display current setting
 @echo Scenarios...
 @echo ...Use MPK, path set to default and XDC set to -u     :MPKBuild on
 @echo ...Use MPK, path set to default and XDC set to -u     :MPKBuild on default -n
 @echo ...Use MPK, path set to "path" and XDC set to -n      :MPKBuild on "path" -n
 @echo ...Use MPK, path set to default and XDC set to -n, -u :MPKBuild on default -n -u
 @echo ...No MPK, No XDC                                     :MPKBuild off
 @echo ...No MPK, Use XDC with -u flag                       :MPKBuild off -u
:exit