@Stefan Adelsberger : I would call this an unfortunate design. Mac but I don’t think that Windows would be different. I had half a dozen file type icons and the app icon. My main project ballooned to 160-170 MB. After removing the icons I now have a 3 MB project where everything is external. The speed up when loading/saving easily is a couple of seconds each time.
@Richard Duke: there is an app called IconComposer that you can use to make an icns file. But you can also copy the file when you build your app. The script allows me to install the icons for the different versions of my app:
[code]'get paths
dim appPath as string = currentBuildLocation + “/” + shellEncode(currentBuildAppName)
if right(AppPath, 4) <> “.app” then appPath = appPath + “.app”
dim resourcesFolder as string = appPath + “/Contents/Resources/”
dim plistFile as string = appPath + “/Contents/Info.plist”
dim CountSlashes as Integer = CountFields(ProjectShellPath, “/”)
dim ProjectName as string = NthField(ProjectShellPath, “/”, CountSlashes)
dim ProjectPath as String = Left(ProjectShellPath, Len(ProjectShellPath) - Len(ProjectName))
'get name of icon
Dim iconFileName as string = readValue(plistFile, “CFBundleIconFile”)
If trim(iconFileName) = “” then
msgbox(“There was an issue reading the apps plist file, the icon cannot be correctly installed.”)
Return
end if
'try to copy icon to correct place
dim IconPath as String
if ConstantValue(“App.kMaxVersion”) = “1” then
iconPath = ProjectPath + “…/Icons/app\ icns/app_pro.icns”
end if
call copyFile(IconPath, resourcesFolder + shellEncode(iconFileName) + “.icns”, “Installing custom icon”)
// Helper functions for this script
Function shellEncode(inValue as string) as string
Dim rvalue as string = replaceAll(inValue, " ", "\ ")
rvalue = replaceAll(rvalue, “&”, “\&”)
rvalue = replaceAll(rvalue, “-”, “\-”)
rvalue = replaceAll(rvalue, “(”, “\(”)
rvalue = replaceAll(rvalue, “)”, “\)”)
return rvalue
End Function
Function copyFile(inSource as string, inTarget as string, inMethodName as string) as boolean
return execute("/bin/cp -fR " + inSource + " " + inTarget, inMethodName)
End Function
Function readValue(plistFile as string, key as string) as string
return trim(DoShellCommand( "/usr/bin/defaults read " + plistfile + " " + key))
End Function
Sub msgBox(inMessage as string, inSecondLine as string = “”)
call showDialog(inMessage, inSecondLine, “OK”, “”, “”, 0)
End Sub
Function execute(inCommand as string, inMethodName as string) as boolean
Dim result as string = DoShellCommand(inCommand)
if result <> “” then
msgbox("An error occurred while "+ inMethodName, "Message: " + result)
return false
else
return true
end if
End Function[/code]