Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7005067

Browse files
Merged revisions 80653 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r80653 | ronald.oussoren | 2010-04-30 16:58:39 +0200 (Fri, 30 Apr 2010) | 2 lines Fix for issue 8476 ........
1 parent 86b33c8 commit 7005067

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Mac/BuildScript/build-installer.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,13 +1111,14 @@ def setIcon(filePath, icnsPath):
11111111
Set the custom icon for the specified file or directory.
11121112
"""
11131113

1114-
toolPath = os.path.join(os.path.dirname(__file__), "seticon.app/Contents/MacOS/seticon")
1115-
dirPath = os.path.dirname(__file__)
1114+
dirPath = os.path.normpath(os.path.dirname(__file__))
1115+
toolPath = os.path.join(dirPath, "seticon.app/Contents/MacOS/seticon")
11161116
if not os.path.exists(toolPath) or os.stat(toolPath).st_mtime < os.stat(dirPath + '/seticon.m').st_mtime:
11171117
# NOTE: The tool is created inside an .app bundle, otherwise it won't work due
11181118
# to connections to the window server.
1119-
if not os.path.exists('seticon.app/Contents/MacOS'):
1120-
os.makedirs('seticon.app/Contents/MacOS')
1119+
appPath = os.path.join(dirPath, "seticon.app/Contents/MacOS")
1120+
if not os.path.exists(appPath):
1121+
os.makedirs(appPath)
11211122
runCommand("cc -o %s %s/seticon.m -framework Cocoa"%(
11221123
shellQuote(toolPath), shellQuote(dirPath)))
11231124

0 commit comments

Comments
 (0)