1@echo off
2:: Copyright (c) 2012 The Native Client Authors. All rights reserved.
3:: Use of this source code is governed by a BSD-style license that can be
4:: found in the LICENSE file.
5
6:: This file is installed for each driver file so that the driver can
7:: be run from outside Cygwin. This file will be installed as bin/pnacl-*.bat
8:: inside the PNaCl directory. For example, if you invoke:
9::
10::  C:\> path\to\pnacl\bin\pnacl-gcc hello.c -o hello.pexe
11::
12:: inside the Windows command prompt, then Windows runs pnacl-gcc.bat.
13:: This script will in turn run:
14:: "python path\to\pnacl\bin\pydir/loader.py pnacl-gcc hello.c -o hello.pexe"
15
16setlocal
17
18:: Stop incessant CYGWIN complains about "MS-DOS style path"
19set CYGWIN=nodosfilewarning %CYGWIN%
20
21:: Run the driver
22:: For now, assume "python" is in the PATH.
23python -OO "%~dp0\pydir\loader.py" "%~n0" %*
24
25:end
26