X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=scripts%2Fbuild%2Fmacosx_makebundle.py;h=fe1ba87ced2ef532083173dea6bb658e911fec0f;hp=a577fbd9ab4e66427f3914f9d2497c81f69de7f6;hb=694f9bfbf7f1af19108461c7e00d133e55082bce;hpb=907e6c4c2f5e199600b54213f6964d2c50bdc700 diff --git a/scripts/build/macosx_makebundle.py b/scripts/build/macosx_makebundle.py index a577fbd9..fe1ba87c 100755 --- a/scripts/build/macosx_makebundle.py +++ b/scripts/build/macosx_makebundle.py @@ -14,7 +14,9 @@ # Imports # ============================== import os +import os.path import sys +import commands # ============================== # Constants @@ -28,11 +30,15 @@ if len(sys.argv) < 4: BUNDLE_NAME= "Quassel Client" EXE_NAME = "quasselclient" else: - BUNDLE_NAME = sys.argv[2] EXE_NAME = sys.argv[3] -CONTENTS_DIR = BUNDLE_NAME + ".app/Contents/" + BUNDLE_NAME = sys.argv[2] + +# make the dir of the exe the target dir +if(os.path.dirname(EXE_NAME)): + CONTENTS_DIR = os.path.dirname(EXE_NAME) + "/" +CONTENTS_DIR += BUNDLE_NAME + ".app/Contents/" -BUNDLE_VERSION = "0.3.0" +BUNDLE_VERSION = commands.getoutput("git --git-dir="+SOURCE_DIR+"/.git/ describe") ICON_FILE = "pics/quassel.icns" def createBundle(): @@ -50,7 +56,6 @@ def createPlist(bundleName, iconFile, bundleVersion): templateFile = file(SOURCE_DIR + "/scripts/build/Info.plist", 'r') template = templateFile.read() templateFile.close() - print plistFile = file(CONTENTS_DIR + "Info.plist", 'w') plistFile.write(template % {"BUNDLE_NAME" : bundleName,