376 |
376 |
377 if sys.platform == "darwin": |
377 if sys.platform == "darwin": |
378 # delete the Mac app bundle |
378 # delete the Mac app bundle |
379 if os.path.exists("/Developer/Applications/Eric5"): |
379 if os.path.exists("/Developer/Applications/Eric5"): |
380 shutil.rmtree("/Developer/Applications/Eric5") |
380 shutil.rmtree("/Developer/Applications/Eric5") |
381 if os.path.exists("/Applications/Eric5"): |
381 if os.path.exists("/Applications/eric5.app"): |
382 shutil.rmtree("/Applications/Eric5") |
382 shutil.rmtree("/Applications/eric5.app") |
383 |
383 |
384 except IOError as msg: |
384 except IOError as msg: |
385 sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) |
385 sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) |
386 exit(7) |
386 exit(7) |
387 |
387 |
569 @param pydir the name of the directory where the Python script will eventually |
569 @param pydir the name of the directory where the Python script will eventually |
570 be installed (string) |
570 be installed (string) |
571 """ |
571 """ |
572 global cfg, sourceDir |
572 global cfg, sourceDir |
573 |
573 |
574 dirs = {"contents": "/Applications/Eric5/eric5.app/Contents/", |
574 dirs = {"contents": "/Applications/eric5.app/Contents/", |
575 "exe": "/Applications/Eric5/eric5.app/Contents/MacOS", |
575 "exe": "/Applications/eric5.app/Contents/MacOS", |
576 "icns": "/Applications/Eric5/eric5.app/Contents/Resources"} |
576 "icns": "/Applications/eric5.app/Contents/Resources"} |
577 os.makedirs(dirs["contents"]) |
577 os.makedirs(dirs["contents"]) |
578 os.mkdir(dirs["exe"]) |
578 os.mkdir(dirs["exe"]) |
579 os.mkdir(dirs["icns"]) |
579 os.mkdir(dirs["icns"]) |
580 |
580 |
581 starter = os.path.join(dirs["exe"], "eric") |
581 starter = os.path.join(dirs["exe"], "eric") |