# Imports
# ==============================
import os
+import os.path
import sys
+import commands
# ==============================
# Constants
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():
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,