install.py

branch
5_1_x
changeset 1489
e647aa92e0ea
parent 1483
d608d2d4086f
child 1496
34d7a44e4c09
equal deleted inserted replaced
1487:000d35ce20b6 1489:e647aa92e0ea
545 "icns": "/Developer/Applications/Eric5/eric5.app/Contents/Resources"} 545 "icns": "/Developer/Applications/Eric5/eric5.app/Contents/Resources"}
546 os.makedirs(dirs["contents"]) 546 os.makedirs(dirs["contents"])
547 os.mkdir(dirs["exe"]) 547 os.mkdir(dirs["exe"])
548 os.mkdir(dirs["icns"]) 548 os.mkdir(dirs["icns"])
549 549
550 starter = os.path.join(dirs["exe"], "eric")
551 os.symlink(
552 "{0}/Resources/Python.app/Contents/MacOS/Python".format(sys.exec_prefix),
553 starter)
554
550 wname = os.path.join(dirs["exe"], "eric5") 555 wname = os.path.join(dirs["exe"], "eric5")
551 path = os.getenv("PATH", "") 556 path = os.getenv("PATH", "")
552 if path: 557 if path:
553 pybin = os.path.join(sys.exec_prefix, "bin") 558 pybin = os.path.join(sys.exec_prefix, "bin")
554 pathlist = path.split(os.pathsep) 559 pathlist = path.split(os.pathsep)
557 path = os.pathsep.join(pathlist) 562 path = os.pathsep.join(pathlist)
558 wrapper = \ 563 wrapper = \
559 '''#!/bin/sh 564 '''#!/bin/sh
560 565
561 PATH={0} 566 PATH={0}
562 exec "{1}/bin/pythonw3" "{2}/{3}.py" "$@" 567 exec "{1}" "{2}/{3}.py" "$@"
563 '''.format(path, sys.exec_prefix, pydir, "eric5") 568 '''.format(path, starter, pydir, "eric5")
564 else: 569 else:
565 wrapper = \ 570 wrapper = \
566 '''#!/bin/sh 571 '''#!/bin/sh
567 572
568 exec "{0}/bin/pythonw3" "{1}/{2}.py" "$@" 573 exec "{0}" "{1}/{2}.py" "$@"
569 '''.format(sys.exec_prefix, pydir, "eric5") 574 '''.format(starter, pydir, "eric5")
570 copyToFile(wname, wrapper) 575 copyToFile(wname, wrapper)
571 os.chmod(wname, 0o755) 576 os.chmod(wname, 0o755)
572 577
573 shutil.copy(os.path.join(sourceDir, "pixmaps", "eric_2.icns"), 578 shutil.copy(os.path.join(sourceDir, "pixmaps", "eric_2.icns"),
574 os.path.join(dirs["icns"], "eric.icns")) 579 os.path.join(dirs["icns"], "eric.icns"))

eric ide

mercurial