From c85781d095dc47a812bf68d3fd22c84408d534cf Mon Sep 17 00:00:00 2001 From: Brian Gladman Date: Tue, 23 Feb 2010 08:15:43 +0000 Subject: Hopefully remove python discovery issue in Windows build svn path=/trunk/yasm/; revision=2292 --- Mkfiles/vc10/genperf/run.bat | 23 ++++++++++++++++++----- Mkfiles/vc9/genperf/run.bat | 23 ++++++++++++++++++----- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/Mkfiles/vc10/genperf/run.bat b/Mkfiles/vc10/genperf/run.bat index 4582e28e..f2295c5d 100644 --- a/Mkfiles/vc10/genperf/run.bat +++ b/Mkfiles/vc10/genperf/run.bat @@ -1,18 +1,31 @@ cd ..\..\.. @echo off for /f "usebackq tokens=2,3,4,5,6" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (if %%f==REG_SZ echo %%g %%h %%i %%j >run_py.bat) -goto answer%errorlevel% -:answer0 -if not exist run_py.bat goto answer1 +goto ftry%errorlevel% + +:ftry0 +goto pyfound +:ftry1 +for /f "usebackq tokens=2,3,4" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (if %%f==REG_SZ echo %%g %%h >run_py.bat) +goto stry%errorlevel% + +:stry0 +goto pyfound +:stry1 +goto pynotfound + +:pyfound +if not exist run_py.bat goto notfound echo ... building with Python ... @echo on call run_py.bat modules\arch\x86\gen_x86_insn.py del run_py.bat @echo off goto end -:answer1 + +:pynotfound echo ... building without Python ... -goto end + :end @echo on %1 x86insn_nasm.gperf x86insn_nasm.c diff --git a/Mkfiles/vc9/genperf/run.bat b/Mkfiles/vc9/genperf/run.bat index 4582e28e..f2295c5d 100644 --- a/Mkfiles/vc9/genperf/run.bat +++ b/Mkfiles/vc9/genperf/run.bat @@ -1,18 +1,31 @@ cd ..\..\.. @echo off for /f "usebackq tokens=2,3,4,5,6" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (if %%f==REG_SZ echo %%g %%h %%i %%j >run_py.bat) -goto answer%errorlevel% -:answer0 -if not exist run_py.bat goto answer1 +goto ftry%errorlevel% + +:ftry0 +goto pyfound +:ftry1 +for /f "usebackq tokens=2,3,4" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (if %%f==REG_SZ echo %%g %%h >run_py.bat) +goto stry%errorlevel% + +:stry0 +goto pyfound +:stry1 +goto pynotfound + +:pyfound +if not exist run_py.bat goto notfound echo ... building with Python ... @echo on call run_py.bat modules\arch\x86\gen_x86_insn.py del run_py.bat @echo off goto end -:answer1 + +:pynotfound echo ... building without Python ... -goto end + :end @echo on %1 x86insn_nasm.gperf x86insn_nasm.c -- cgit v1.2.1