Generalize the application bundle copy workaround to simplify later reuse.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27377 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2010-07-10 21:22:22 +00:00
parent d298fa857e
commit a6df932003

View file

@ -109,6 +109,12 @@ svnpaths = [ "rbutil/",
# only used on w32. # only used on w32.
useupx = False useupx = False
# OS X: files to copy into the bundle. Workaround for out-of-tree builds.
bundlecopy = {
"icons/rbutilqt.icns" : "Contents/Resources/",
"Info.plist" : "Contents/"
}
# == Functions == # == Functions ==
def usage(myself): def usage(myself):
print "Usage: %s [options]" % myself print "Usage: %s [options]" % myself
@ -316,10 +322,10 @@ def macdeploy(versionstring, buildfolder):
dmgfile = program + "-" + versionstring + ".dmg" dmgfile = program + "-" + versionstring + ".dmg"
appbundle = buildfolder + "/" + progexe appbundle = buildfolder + "/" + progexe
# workaround to Qt issues when building out-of-tree. Hardcoded for simplicity. # workaround to Qt issues when building out-of-tree. Copy files into bundle.
sourcebase = buildfolder + re.sub('rbutilqt.pro$', '', project) sourcebase = buildfolder + re.sub('rbutilqt.pro$', '', project)
shutil.copy(sourcebase + "icons/rbutilqt.icns", appbundle + "/Contents/Resources/") for src in bundlecopy:
shutil.copy(sourcebase + "Info.plist", appbundle + "/Contents/") shutil.copy(sourcebase + src, appbundle + bundlecopy[src])
# end of Qt workaround # end of Qt workaround
output = subprocess.Popen(["macdeployqt", progexe, "-dmg"], stdout=subprocess.PIPE, cwd=buildfolder) output = subprocess.Popen(["macdeployqt", progexe, "-dmg"], stdout=subprocess.PIPE, cwd=buildfolder)