Patch to make aap.bat find the right directory
Cory Dodt <corydodt-wgPraSjSqjuEakHPNWoOSQC/[email protected]> Fri, 08 Oct 2004 11:48:01 -0700
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
aap.bat, included in the windows .zip, is not very smart. It basically only works if you are already in the aap directory, so it's good enough for installing aap, but it's not good enough to add it to the PATH and have A-A-P Just Work. The following patch uses a batch file shell scripting trick to find Main.py in the same dir that aap.bat is installed into. C --- aap.bat 2003-09-09 14:26:48.000000000 -0700 +++ aap.bat.patched 2004-10-08 11:44:45.745907000 -0700 @@ -4,6 +4,7 @@ if NOT .%PYTHON%==. goto havepython set PYTHON=python :havepython +set AAPDIR=%~dp0 if .%OS%==.Windows_NT goto ntaction @@ -16,12 +17,12 @@ goto loopstart :loopend -%PYTHON% Main.py %AAPARGS% +%PYTHON% "%AAPDIR%\Main.py" %AAPARGS% goto eof :ntaction rem for WinNT we can use %* -%PYTHON% Main.py %* +%PYTHON% "%AAPDIR%\Main.py" %* :eof set AAPARGS= ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl