source: raptor-distribution/MSIs/raptor-mua/tags/v1.0.1/source/mua/bin/mua.bat @ 1725

Revision 1725, 2.7 KB checked in by rhyssmith, 5 years ago (diff)

Tagging raptor-mua v1.0.1-1 release of Raptor MUA MSI

  • Property svn:executable set to *
Line 
1@REM
2@REM Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk>
3@REM
4@REM Licensed under the Apache License, Version 2.0 (the "License");
5@REM you may not use this file except in compliance with the License.
6@REM You may obtain a copy of the License at
7@REM
8@REM         http://www.apache.org/licenses/LICENSE-2.0
9@REM
10@REM Unless required by applicable law or agreed to in writing, software
11@REM distributed under the License is distributed on an "AS IS" BASIS,
12@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13@REM See the License for the specific language governing permissions and
14@REM limitations under the License.
15@REM
16@echo off
17setlocal
18
19rem Copyright (c) 1999, 2006 Tanuki Software Inc.
20rem
21rem Java Service Wrapper command based script
22rem
23
24if "%OS%"=="Windows_NT" goto nt
25echo This script only works with NT-based versions of Windows.
26goto :eof
27
28:nt
29rem
30rem Find the application home.
31rem
32rem %~dp0 is location of current script under NT
33set _REALPATH=%~dp0
34
35rem Decide on the wrapper binary.
36set _WRAPPER_BASE=wrapper
37set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
38if exist "%_WRAPPER_EXE%" goto validate
39set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
40if exist "%_WRAPPER_EXE%" goto validate
41set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
42if exist "%_WRAPPER_EXE%" goto validate
43echo Unable to locate a Wrapper executable using any of the following names:
44echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
45echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
46echo %_REALPATH%%_WRAPPER_BASE%.exe
47pause
48goto :eof
49
50:validate
51rem Find the requested command.
52for /F %%v in ('echo %1^|findstr "^console$ ^start$ ^pause$ ^resume$ ^stop$ ^restart$ ^install$ ^remove"') do call :exec set COMMAND=%%v
53
54if "%COMMAND%" == "" (
55    echo Usage: %0 { console : start : pause : resume : stop : restart : install : remove }
56    pause
57    goto :eof
58) else (
59    shift
60)
61
62rem
63rem Find the wrapper.conf
64rem
65:conf
66set _WRAPPER_CONF="%_REALPATH%wrapper.conf"
67
68rem
69rem Run the application.
70rem At runtime, the current directory will be that of wrapper.exe
71rem
72call :%COMMAND%
73if errorlevel 1 pause
74goto :eof
75
76:console
77"%_WRAPPER_EXE%" -c %_WRAPPER_CONF%
78goto :eof
79
80:start
81"%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
82goto :eof
83
84:pause
85"%_WRAPPER_EXE%" -a %_WRAPPER_CONF%
86goto :eof
87
88:resume
89"%_WRAPPER_EXE%" -e %_WRAPPER_CONF%
90goto :eof
91
92:stop
93"%_WRAPPER_EXE%" -p %_WRAPPER_CONF%
94goto :eof
95
96:install
97"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
98goto :eof
99
100:remove
101"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
102goto :eof
103
104:restart
105call :stop
106call :start
107goto :eof
108
109:exec
110%*
111goto :eof
Note: See TracBrowser for help on using the repository browser.