Commit 3523e319 by Csók Tamás

client: pythonw.exe got running directory prefix at the url handling scheme

parent 55a9b4dd
...@@ -10,6 +10,7 @@ import argparse ...@@ -10,6 +10,7 @@ import argparse
import subprocess import subprocess
import pythoncom import pythoncom
import shutil import shutil
import sys
from win32com.shell import shell, shellcon from win32com.shell import shell, shellcon
import windowsclasses import windowsclasses
try: try:
...@@ -144,8 +145,9 @@ def main(): ...@@ -144,8 +145,9 @@ def main():
('circle\\URL Protocol', ""), ('circle\\URL Protocol', ""),
('circle\\DefaultIcon', args.location+"cloud.ico"), ('circle\\DefaultIcon', args.location+"cloud.ico"),
('circle\\shell', {'open': { ('circle\\shell', {'open': {
'command': "\"pythonw.exe\" \"%s" % args.location 'command': r'"%s\pythonw.exe"' % sys.exec_prefix
+ "cloud.py\" \"%1\""}})]) + r' "%s' % args.location
+ r'\cloud.py" "%1"'}})])
custom_protocol_register(custom_protocol) custom_protocol_register(custom_protocol)
except: except:
print "Error! URL Protocol handler installation aborted!" print "Error! URL Protocol handler installation aborted!"
......
...@@ -10,6 +10,7 @@ import argparse ...@@ -10,6 +10,7 @@ import argparse
import subprocess import subprocess
import pythoncom import pythoncom
import shutil import shutil
import sys
from win32com.shell import shell, shellcon from win32com.shell import shell, shellcon
import windowsclasses import windowsclasses
try: try:
...@@ -144,8 +145,9 @@ def main(): ...@@ -144,8 +145,9 @@ def main():
('circle\\URL Protocol', ""), ('circle\\URL Protocol', ""),
('circle\\DefaultIcon', args.location+"cloud.ico"), ('circle\\DefaultIcon', args.location+"cloud.ico"),
('circle\\shell', {'open': { ('circle\\shell', {'open': {
'command': "\"pythonw.exe\" \"%s" % args.location 'command': r'"%s\pythonw.exe"' % sys.exec_prefix
+ "cloud.py\" \"%1\""}})]) + r' "%s' % args.location
+ r'\cloud.py" "%1"'}})])
custom_protocol_register(custom_protocol) custom_protocol_register(custom_protocol)
except: except:
print "Error! URL Protocol handler installation aborted!" print "Error! URL Protocol handler installation aborted!"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment