Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/framework/sample/Windows/unittest/src/nacl_test/nacl_test.bat

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download) (as text)
Tue Jul 10 09:41:50 2012 UTC (11 years, 10 months ago) by shirayanagi
File MIME type: application/x-msdos-program
File size: 1262 byte(s)
バグ修正
1 @echo off
2
3 SET PATH=c:\cygwin\bin;%PATH%
4
5 pushd "%~dp0"
6
7 SET HOME=%HOMEDRIVE%\%HOMEPATH%
8 @echo %HOME%
9
10 rem python があるかどうか
11 SET PYTHON=python
12 %PYTHON% -h > NUL
13 if errorlevel 1 (
14 bash -c "%PYTHON% -h" > NUL
15 if errorlevel 1 (
16 goto py_err
17 )
18 SET CYGPYTHON=yes
19 )
20
21 rem SET CHROME_OPTION=--enable-nacl --new-window
22 SET CHROME_OPTION=--enable-nacl
23 rem 標準出力 & 標準エラー の出力パスを設定
24 SET NACL_EXE_STDOUT=%~dp0\stdout.txt
25 SET NACL_EXE_STDERR=%~dp0\stderr.txt
26 rem SET CHROME_OPTION=%CHROME_OPTION% --no-sandbox
27
28 if not exist "%HOME%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" (
29 @echo Google Chrome not found...
30 goto http_only
31 )
32 SET CHROMEDIR=%HOME%\Local Settings\Application Data\Google\Chrome\Application
33 SET CHROME=%CHROMEDIR%\chrome.exe
34
35 SET PORT=5103
36 start cmd /c "httpd.bat" %PORT%
37 if errorlevel 1 goto error
38
39 rem Chrome 起動
40 call "%CHROME%" "http://localhost:%PORT%" %CHROME_OPTION%
41
42 goto end
43
44 :http_only
45 if "%CYGPYTHON%" == "yes" (
46 bash -c "%PYTHON% -m SimpleHTTPServer %PORT%"
47 ) else (
48 %PYTHON% -m SimpleHTTPServer %PORT%
49 )
50
51 goto end
52
53 :py_err
54 @echo python が見つかりませんでした
55
56 :error
57 pause
58
59 :end
60 taskkill /fi "windowtitle eq %HTTPSERVER_NAME%" /f
61
62

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26