blob: 98a9bfc4fbe4544a66a04db6c39ee28a8cb2a6c5 (
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
|
@echo off
setlocal
:: NARWHAL_HOME is the parent the bin directory
set NARWHAL_HOME=%~dp0..
:: use Rhino as the default if none is specified in narwhal.conf
set NARWHAL_DEFAULT_PLATFORM=rhino
:: TODO: load narwhal.conf if it exists
:: if NARWHAL_PLATFORM isn't yet set, set it to the default platform, and export it
if "%NARWHAL_PLATFORM%" == "" (
set NARWHAL_PLATFORM=%NARWHAL_DEFAULT_PLATFORM%
)
:: build the executable name for the platform
set EXECUTABLE_NAME=narwhal-%NARWHAL_PLATFORM%.cmd
:: search for the platform home directory
:: TODO: look for more, including ".exe"?
if exist %NARWHAL_HOME%\platforms\%NARWHAL_PLATFORM%. (
set NARWHAL_PLATFORM_HOME=%NARWHAL_HOME%\platforms\%NARWHAL_PLATFORM%
) else (
echo "Can't find executable for $NARWHAL_PLATFORM"
exit
)
call %NARWHAL_PLATFORM_HOME%\bin\%EXECUTABLE_NAME% %*
|