cd ..\..\..\r
@echo off\r
-del run_py.bat\r
-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) \r
-@echo on\r
-if exist run_py.bat goto pyfound\r
-echo ... building without Python ...\r
-goto end\r
+for /f "usebackq tokens=1*" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (set _my_=%%f %%g)\r
+goto next%errorlevel%\r
+\r
+:next1\r
+echo Building without Python ...\r
+goto therest\r
\r
-:pyfound\r
-echo ... building with Python ...\r
-call run_py.bat modules\arch\x86\gen_x86_insn.py\r
-del run_py.bat\r
+:next0\r
+echo Building with Python ...\r
+set _res_=%_my_:*REG_SZ=%\r
+set _end_=%_res_:*exe"=%\r
+call set _python_=%%res:%_end_%=%%\r
+call %_python_% modules\arch\x86\gen_x86_insn.py\r
\r
-:end\r
+:therest\r
+@echo on\r
%1 x86insn_nasm.gperf x86insn_nasm.c\r
%1 x86insn_gas.gperf x86insn_gas.c\r
%1 modules\arch\x86\x86cpu.gperf x86cpu.c\r
cd ..\..\..\r
@echo off\r
-del run_py.bat\r
-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) \r
-@echo on\r
-if exist run_py.bat goto pyfound\r
-echo ... building without Python ...\r
-goto end\r
+for /f "usebackq tokens=1*" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (set _my_=%%f %%g)\r
+goto next%errorlevel%\r
+\r
+:next1\r
+echo Building without Python ...\r
+goto therest\r
\r
-:pyfound\r
-echo ... building with Python ...\r
-call run_py.bat modules\arch\x86\gen_x86_insn.py\r
-del run_py.bat\r
+:next0\r
+echo Building with Python ...\r
+set _res_=%_my_:*REG_SZ=%\r
+set _end_=%_res_:*exe"=%\r
+call set _python_=%%res:%_end_%=%%\r
+call %_python_% modules\arch\x86\gen_x86_insn.py\r
\r
-:end\r
+:therest\r
+@echo on\r
%1 x86insn_nasm.gperf x86insn_nasm.c\r
%1 x86insn_gas.gperf x86insn_gas.c\r
%1 modules\arch\x86\x86cpu.gperf x86cpu.c\r