scripts/install.py

branch
eric7
changeset 9402
f5d9aa5c62db
parent 9401
38514063ecee
child 9420
92810aebc909
equal deleted inserted replaced
9401:38514063ecee 9402:f5d9aa5c62db
1213 wrapper = ( 1213 wrapper = (
1214 """#!/bin/sh\n""" 1214 """#!/bin/sh\n"""
1215 """\n""" 1215 """\n"""
1216 """{0}""" 1216 """{0}"""
1217 """{1}""" 1217 """{1}"""
1218 """exec "{2}" "-m" "eric7" "$@"\n""".format( 1218 """exec "{2}" "-m" "eric7" "$@"\n""".format(pathLine, dyldLine, starter)
1219 pathLine, dyldLine, starter
1220 )
1221 ) 1219 )
1222 copyToFile(wname, wrapper) 1220 copyToFile(wname, wrapper)
1223 os.chmod(wname, 0o755) # secok 1221 os.chmod(wname, 0o755) # secok
1224 1222
1225 shutilCopy( 1223 shutilCopy(
2051 "eric7 Browser (Python {0}.{1}).lnk", 2049 "eric7 Browser (Python {0}.{1}).lnk",
2052 os.path.join(cfg["bindir"], "eric7_browser.cmd"), 2050 os.path.join(cfg["bindir"], "eric7_browser.cmd"),
2053 os.path.join(cfg["ericPixDir"], "ericWeb48.ico"), 2051 os.path.join(cfg["ericPixDir"], "ericWeb48.ico"),
2054 ), 2052 ),
2055 ] 2053 ]
2056 2054
2057 if clean: 2055 if clean:
2058 # clean obsolete entries as well 2056 # clean obsolete entries as well
2059 entriesTemplates.extend([ 2057 entriesTemplates.extend(
2060 ( 2058 [
2061 "eric7 (Python {0}.{1}).lnk", 2059 (
2062 os.path.join(cfg["bindir"], "eric7_ide.cmd"), 2060 "eric7 (Python {0}.{1}).lnk",
2063 os.path.join(cfg["ericPixDir"], "eric7.ico"), 2061 os.path.join(cfg["bindir"], "eric7_ide.cmd"),
2064 ), 2062 os.path.join(cfg["ericPixDir"], "eric7.ico"),
2065 ]) 2063 ),
2064 ]
2065 )
2066 2066
2067 return [ 2067 return [
2068 (e[0].format(majorVersion, minorVersion), e[1], e[2]) for e in entriesTemplates 2068 (e[0].format(majorVersion, minorVersion), e[1], e[2]) for e in entriesTemplates
2069 ] 2069 ]
2070 2070
2114 try: 2114 try:
2115 if sys.platform.startswith(("win", "cygwin")): 2115 if sys.platform.startswith(("win", "cygwin")):
2116 optlist, args = getopt.getopt( 2116 optlist, args = getopt.getopt(
2117 argv[1:], 2117 argv[1:],
2118 "chvxza:b:d:f:", 2118 "chvxza:b:d:f:",
2119 ["clean-desktop", "help", "no-apis", "no-info", "verbose", "with-tools", 2119 [
2120 "yes"], 2120 "clean-desktop",
2121 "help",
2122 "no-apis",
2123 "no-info",
2124 "verbose",
2125 "with-tools",
2126 "yes",
2127 ],
2121 ) 2128 )
2122 elif sys.platform == "darwin": 2129 elif sys.platform == "darwin":
2123 optlist, args = getopt.getopt( 2130 optlist, args = getopt.getopt(
2124 argv[1:], 2131 argv[1:],
2125 "chvxza:b:d:f:i:m:n:p:", 2132 "chvxza:b:d:f:i:m:n:p:",

eric ide

mercurial