Skip to content

Instantly share code, notes, and snippets.

@alfredodeza
Created September 5, 2011 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredodeza/1195540 to your computer and use it in GitHub Desktop.
Save alfredodeza/1195540 to your computer and use it in GitHub Desktop.
Trying to get a konira executable for MS win
@echo off
rem Windows Driver script for Konira
setlocal
rem Use a full path to Python (relative to this script) as the standard Python
rem install does not put python.exe on the PATH...
rem %~dp0 is the directory of this script
python "%~dp0konira" %*
endlocal
@rudylattae
Copy link

This concept works with the following caveats:

  1. Going up a level to call python (at least on Windows) only works with the global install of Python. In a virtualenv, the python.exe sits in the same directory as the konira.bat script so the the call to python fails.

WRT 1 above, I'd just call python and leave it at that. I think mercurial had to do that since they expect it (hg) to be installed globally and without necessarily having the python exe on the PATH.

So the line becomes

python "%~dp0konira" %*
  1. That set of the HG variable is not needed.

@alfredodeza
Copy link
Author

I've updated the gist with your comments and I am ready to make a release, can you confirm this updated version is OK?

@rudylattae
Copy link

Tested and workd as expected. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment