diff options
author | Brian Gladman <brg@gladman.plus.com> | 2010-02-25 10:57:07 +0000 |
---|---|---|
committer | Brian Gladman <brg@gladman.plus.com> | 2010-02-25 10:57:07 +0000 |
commit | e062b3c45682b59b25440f2afa311773b0562028 (patch) | |
tree | f2564a949340a6a9a1df113af5ca701b325ad5b0 | |
parent | 40ab77b4d03c079010f66ce37355ec7e6ae253c1 (diff) | |
download | yasm-e062b3c45682b59b25440f2afa311773b0562028.tar.gz |
Yet one more attempt to find Python in Windows
svn path=/trunk/yasm/; revision=2295
-rw-r--r-- | Mkfiles/vc10/genperf/run.bat | 25 | ||||
-rw-r--r-- | Mkfiles/vc9/genperf/run.bat | 25 |
2 files changed, 28 insertions, 22 deletions
diff --git a/Mkfiles/vc10/genperf/run.bat b/Mkfiles/vc10/genperf/run.bat index b2aed9ed..1811dd6e 100644 --- a/Mkfiles/vc10/genperf/run.bat +++ b/Mkfiles/vc10/genperf/run.bat @@ -1,18 +1,21 @@ cd ..\..\..
@echo off
-del run_py.bat
-for /f "usebackq tokens=2*" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (if %%f==REG_SZ echo %%g >run_py.bat)
-@echo on
-if exist run_py.bat goto pyfound
-echo ... building without Python ...
-goto end
+for /f "usebackq tokens=1*" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (set _my_=%%f %%g)
+goto next%errorlevel%
+
+:next1
+echo Building without Python ...
+goto therest
-:pyfound
-echo ... building with Python ...
-call run_py.bat modules\arch\x86\gen_x86_insn.py
-del run_py.bat
+:next0
+echo Building with Python ...
+set _res_=%_my_:*REG_SZ=%
+set _end_=%_res_:*exe"=%
+call set _python_=%%res:%_end_%=%%
+call %_python_% modules\arch\x86\gen_x86_insn.py
-:end
+:therest
+@echo on
%1 x86insn_nasm.gperf x86insn_nasm.c
%1 x86insn_gas.gperf x86insn_gas.c
%1 modules\arch\x86\x86cpu.gperf x86cpu.c
diff --git a/Mkfiles/vc9/genperf/run.bat b/Mkfiles/vc9/genperf/run.bat index b2aed9ed..1811dd6e 100644 --- a/Mkfiles/vc9/genperf/run.bat +++ b/Mkfiles/vc9/genperf/run.bat @@ -1,18 +1,21 @@ cd ..\..\..
@echo off
-del run_py.bat
-for /f "usebackq tokens=2*" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (if %%f==REG_SZ echo %%g >run_py.bat)
-@echo on
-if exist run_py.bat goto pyfound
-echo ... building without Python ...
-goto end
+for /f "usebackq tokens=1*" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (set _my_=%%f %%g)
+goto next%errorlevel%
+
+:next1
+echo Building without Python ...
+goto therest
-:pyfound
-echo ... building with Python ...
-call run_py.bat modules\arch\x86\gen_x86_insn.py
-del run_py.bat
+:next0
+echo Building with Python ...
+set _res_=%_my_:*REG_SZ=%
+set _end_=%_res_:*exe"=%
+call set _python_=%%res:%_end_%=%%
+call %_python_% modules\arch\x86\gen_x86_insn.py
-:end
+:therest
+@echo on
%1 x86insn_nasm.gperf x86insn_nasm.c
%1 x86insn_gas.gperf x86insn_gas.c
%1 modules\arch\x86\x86cpu.gperf x86cpu.c
|