Ensure Python is available before trying to run gen_x86_insn.py.

Use registry key search to avoid version/location dependency.

Noticed by: Brian Gladman  <brg@gladman.plus.com>

svn path=/trunk/yasm/; revision=1957
multiarch^2
Peter Johnson 17 years ago
parent 779b7dd67e
commit 75a28312f3
  1. 13
      Mkfiles/vc/genperf/run.bat
  2. 13
      Mkfiles/vc8/genperf/run.bat

@ -1,5 +1,18 @@
cd ..\..\..
@echo off
reg query HKCR\Python.File\shell\open\command >nul: 2>&1
goto answer%errorlevel%
:answer0
echo Python found!
@echo on
modules\arch\x86\gen_x86_insn.py
@echo off
goto end
:answer1
echo Python not found!
goto end
:end
@echo on
%1 x86insn_nasm.gperf x86insn_nasm.c
%1 x86insn_gas.gperf x86insn_gas.c
%1 modules\arch\x86\x86cpu.gperf x86cpu.c

@ -1,5 +1,18 @@
cd ..\..\..
@echo off
reg query HKCR\Python.File\shell\open\command >nul: 2>&1
goto answer%errorlevel%
:answer0
echo Python found!
@echo on
modules\arch\x86\gen_x86_insn.py
@echo off
goto end
:answer1
echo Python not found!
goto end
:end
@echo on
%1 x86insn_nasm.gperf x86insn_nasm.c
%1 x86insn_gas.gperf x86insn_gas.c
%1 modules\arch\x86\x86cpu.gperf x86cpu.c

Loading…
Cancel
Save