]> granicus.if.org Git - yasm/commitdiff
Make a further attempt to use the Windows registry to find Python
authorBrian Gladman <brg@gladman.plus.com>
Wed, 24 Feb 2010 11:26:40 +0000 (11:26 -0000)
committerBrian Gladman <brg@gladman.plus.com>
Wed, 24 Feb 2010 11:26:40 +0000 (11:26 -0000)
svn path=/trunk/yasm/; revision=2294

Mkfiles/vc10/genperf/run.bat
Mkfiles/vc9/genperf/run.bat

index dc39a5705a2ae8e084621ee21a21dac1fa3da995..b2aed9ededfb79960ed05b1aa546bb02a390ce6f 100644 (file)
@@ -1,33 +1,18 @@
 cd ..\..\..\r
 @echo off\r
-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)\r
-goto ftry%errorlevel%\r
-\r
-:ftry0\r
-goto pyfound\r
-:ftry1\r
-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) \r
-goto stry%errorlevel%\r
-\r
-:stry0\r
-goto pyfound\r
-:stry1\r
-goto pynotfound\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
 \r
 :pyfound\r
-if not exist run_py.bat goto pynotfound\r
 echo ... building with Python ...\r
-@echo on\r
 call run_py.bat modules\arch\x86\gen_x86_insn.py\r
 del run_py.bat\r
-@echo off\r
-goto end\r
-\r
-:pynotfound\r
-echo ... building without Python ...\r
 \r
 :end\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
index dc39a5705a2ae8e084621ee21a21dac1fa3da995..b2aed9ededfb79960ed05b1aa546bb02a390ce6f 100644 (file)
@@ -1,33 +1,18 @@
 cd ..\..\..\r
 @echo off\r
-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)\r
-goto ftry%errorlevel%\r
-\r
-:ftry0\r
-goto pyfound\r
-:ftry1\r
-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) \r
-goto stry%errorlevel%\r
-\r
-:stry0\r
-goto pyfound\r
-:stry1\r
-goto pynotfound\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
 \r
 :pyfound\r
-if not exist run_py.bat goto pynotfound\r
 echo ... building with Python ...\r
-@echo on\r
 call run_py.bat modules\arch\x86\gen_x86_insn.py\r
 del run_py.bat\r
-@echo off\r
-goto end\r
-\r
-:pynotfound\r
-echo ... building without Python ...\r
 \r
 :end\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