update install scripts
This commit is contained in:
parent
b9f736a49d
commit
185b9cbfb1
|
@ -72,6 +72,7 @@ class InstallerAppDelegate(NSObject):
|
||||||
|
|
||||||
packagePath = NSBundle.mainBundle().pathForResource_ofType_("McBopomofo", "app")
|
packagePath = NSBundle.mainBundle().pathForResource_ofType_("McBopomofo", "app")
|
||||||
McBopomofoPath = os.path.join(inputMethodDir, "McBopomofo.app")
|
McBopomofoPath = os.path.join(inputMethodDir, "McBopomofo.app")
|
||||||
|
|
||||||
WrongPath = os.path.join(McBopomofoPath, "McBopomofo.app")
|
WrongPath = os.path.join(McBopomofoPath, "McBopomofo.app")
|
||||||
if os.path.exists(WrongPath) is True:
|
if os.path.exists(WrongPath) is True:
|
||||||
try:
|
try:
|
||||||
|
@ -80,6 +81,11 @@ class InstallerAppDelegate(NSObject):
|
||||||
"""do nothing"""
|
"""do nothing"""
|
||||||
|
|
||||||
if os.path.exists(McBopomofoPath) is True:
|
if os.path.exists(McBopomofoPath) is True:
|
||||||
|
if os.path.isfile(McBopomofoPath) is True:
|
||||||
|
try:
|
||||||
|
call(["/bin/rm","-f",McBopomofoPath])
|
||||||
|
except:
|
||||||
|
"""do nothing"""
|
||||||
try:
|
try:
|
||||||
call(["/bin/cp", "-R", packagePath, inputMethodDir])
|
call(["/bin/cp", "-R", packagePath, inputMethodDir])
|
||||||
except:
|
except:
|
||||||
|
@ -95,7 +101,6 @@ class InstallerAppDelegate(NSObject):
|
||||||
NSLocalizedString("OK", ""), None, None)
|
NSLocalizedString("OK", ""), None, None)
|
||||||
NSApp.terminate_(self)
|
NSApp.terminate_(self)
|
||||||
|
|
||||||
print McBopomofoPath
|
|
||||||
try:
|
try:
|
||||||
call([os.path.join(McBopomofoPath, "Contents/MacOS/McBopomofo"), "install"])
|
call([os.path.join(McBopomofoPath, "Contents/MacOS/McBopomofo"), "install"])
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue