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