Commits

Anonymous committed 0b0e24b

setup: fix installation path

Comments (0)

Files changed (1)

 from tortoise.contextmenu import ContextMenuExtension
 from tortoise.iconoverlay import ChangedOverlay, AddedOverlay, UnchangedOverlay
 
+bin_path = os.path.dirname(os.path.join(os.getcwd(), sys.argv[0]))
+print "bin path = ", bin_path
+
 # TortoiseHg registry setup
 def register_tortoise_path(unregister=False):
     key = r"Software\TortoiseHg"
         _winreg.DeleteKey(cat, key)
         print "TortoiseHg unregistered"
     else:
-        _winreg.SetValue(cat, key, _winreg.REG_SZ, os.getcwd())
+        _winreg.SetValue(cat, key, _winreg.REG_SZ, bin_path)
         print "TortoiseHg registered"
 
 # for COM registration via py2exe