Commits

Steve Borho  committed e14511a Merge

Merge with stable

  • Participants
  • Parent commits fa9cf56, cea2125

Comments (0)

Files changed (2)

 
 if hasattr(sys, "frozen"):
     from tortoisehg.util import paths
-    import win32api
     gtkpath = os.path.join(paths.bin_path, 'gtk')
-    win32api.SetDllDirectory(gtkpath)
+    try:
+        # may fail on Windows XP without SP1
+        import win32api
+        win32api.SetDllDirectory(gtkpath)
+    except:
+        # fallback to prepending gtk/ folder at start of %PATH%
+        os.environ['PATH'] = os.pathsep.join([gtkpath, os.environ['PATH']])
 else:
     # if hgtk is a symlink, insert symlink target directory in sys.path
     thgpath = os.path.dirname(os.path.realpath(__file__))

File win32/shellext/CShellExtCMenu.cpp

         if (Thgstatus::remove(cwd) != 0)
         {
             std::string p = dir + "\\TortoiseHgOverlayServer.exe";
-            LaunchCommand(Quote(p), cwd);
+            LaunchCommand(Quote(p), dir);
         }
         InitStatus::check();
         return;