46 configName = 'eric6config.py' |
46 configName = 'eric6config.py' |
47 defaultMacAppBundleName = "eric6.app" |
47 defaultMacAppBundleName = "eric6.app" |
48 defaultMacAppBundlePath = "/Applications" |
48 defaultMacAppBundlePath = "/Applications" |
49 defaultMacPythonExe = "{0}/Resources/Python.app/Contents/MacOS/Python".format( |
49 defaultMacPythonExe = "{0}/Resources/Python.app/Contents/MacOS/Python".format( |
50 sys.exec_prefix) |
50 sys.exec_prefix) |
|
51 if not os.path.exists(defaultMacPythonExe): |
|
52 defaultMacPythonExe = "" |
51 macAppBundleName = defaultMacAppBundleName |
53 macAppBundleName = defaultMacAppBundleName |
52 macAppBundlePath = defaultMacAppBundlePath |
54 macAppBundlePath = defaultMacAppBundlePath |
53 macPythonExe = defaultMacPythonExe |
55 macPythonExe = defaultMacPythonExe |
54 |
56 |
55 # Define blacklisted versions of the prerequisites |
57 # Define blacklisted versions of the prerequisites |
1025 "\\User Shell Folders" |
1027 "\\User Shell Folders" |
1026 ) |
1028 ) |
1027 |
1029 |
1028 # 1. create desktop shortcuts |
1030 # 1. create desktop shortcuts |
1029 regName = "Desktop" |
1031 regName = "Desktop" |
1030 desktopFolder = os.path.normpath( |
1032 desktopEntry = getWinregEntry(regName, regPath) |
1031 os.path.expandvars(getWinregEntry(regName, regPath))) |
1033 if desktopEntry: |
1032 for linkName, targetPath, iconPath in windowsDesktopEntries(): |
1034 desktopFolder = os.path.normpath(os.path.expandvars(desktopEntry)) |
1033 linkPath = os.path.join(desktopFolder, linkName) |
1035 for linkName, targetPath, iconPath in windowsDesktopEntries(): |
1034 createWindowsShortcut(linkPath, targetPath, iconPath) |
1036 linkPath = os.path.join(desktopFolder, linkName) |
|
1037 createWindowsShortcut(linkPath, targetPath, iconPath) |
1035 |
1038 |
1036 # 2. create start menu entry and shortcuts |
1039 # 2. create start menu entry and shortcuts |
1037 regName = "Programs" |
1040 regName = "Programs" |
1038 programsEntry = getWinregEntry(regName, regPath) |
1041 programsEntry = getWinregEntry(regName, regPath) |
1039 if programsEntry: |
1042 if programsEntry: |
1071 } |
1074 } |
1072 for directory in directories.values(): |
1075 for directory in directories.values(): |
1073 if not os.path.exists(directory): |
1076 if not os.path.exists(directory): |
1074 os.makedirs(directory) |
1077 os.makedirs(directory) |
1075 |
1078 |
1076 if macPythonExe == defaultMacPythonExe: |
1079 if macPythonExe == defaultMacPythonExe and macPythonExe: |
1077 starter = os.path.join(directories["exe"], "eric") |
1080 starter = os.path.join(directories["exe"], "eric") |
1078 os.symlink(macPythonExe, starter) |
1081 os.symlink(macPythonExe, starter) |
1079 else: |
1082 else: |
1080 starter = "python{0}".format(sys.version_info.major) |
1083 starter = "python{0}".format(sys.version_info.major) |
1081 |
1084 |