fixing mac os build and deploy scripts
[quassel.git] / scripts / build / macosx_makebundle.py
index 821ce74..8ac4396 100755 (executable)
@@ -1,10 +1,20 @@
 #!/usr/bin/python
 # -*- coding: iso-8859-1 -*-
 
+################################################################################
+#                                                                              #
+# 2008 June 27th by Marcus 'EgS' Eggenberger <egs@quassel-irc.org>             #
+#                                                                              #
+# The author disclaims copyright to this source code.                          #
+# This Python Script is in the PUBLIC DOMAIN.                                  #
+#                                                                              #
+################################################################################
+
 # ==============================
 #  Imports
 # ==============================
 import os
+import os.path
 import sys
 
 # ==============================
@@ -19,12 +29,16 @@ 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.2.0-pre"
-ICON_FILE = "src/icons/quassel/quassel.icns"
+BUNDLE_VERSION = "0.3.0"
+ICON_FILE = "pics/quassel.icns"
 
 def createBundle():
     try:
@@ -41,7 +55,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,