[gtk-mac-bundler: 1/2] If available, use CFBundleName instead of CFBundleExecutable for the bundle name.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-bundler: 1/2] If available, use CFBundleName instead of CFBundleExecutable for the bundle name.
- Date: Mon, 3 Sep 2012 21:21:13 +0000 (UTC)
commit 4f23007fdc93139f151a0e161c40e6e5c9c7d902
Author: Julien Woillez <jwoillez gmail com>
Date: Fri Aug 24 11:40:51 2012 -1000
If available, use CFBundleName instead of CFBundleExecutable for the bundle name.
bundler/bundler.py | 4 ++--
bundler/project.py | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/bundler/bundler.py b/bundler/bundler.py
index e273c2a..15ce54a 100644
--- a/bundler/bundler.py
+++ b/bundler/bundler.py
@@ -27,7 +27,7 @@ class Bundler:
# Create the bundle in a temporary location first and move it
# to the final destination when done.
self.meta = project.get_meta()
- self.bundle_path = os.path.join(self.meta.dest, "." + project.get_name() + ".app")
+ self.bundle_path = os.path.join(self.meta.dest, "." + project.get_bundle_name() + ".app")
def recursive_rm(self, dirname):
# Extra safety ;)
@@ -541,7 +541,7 @@ class Bundler:
path = self.project.evaluate_path(self.bundle_path)
self.recursive_rm(path)
- final_path = os.path.join(self.meta.dest, self.project.get_name() + ".app")
+ final_path = os.path.join(self.meta.dest, self.project.get_bundle_name() + ".app")
final_path = self.project.evaluate_path(final_path)
if not self.meta.overwrite and os.path.exists(final_path):
diff --git a/bundler/project.py b/bundler/project.py
index 3353826..a88535d 100644
--- a/bundler/project.py
+++ b/bundler/project.py
@@ -239,6 +239,10 @@ class Project:
else:
raise
self.name = plist.CFBundleExecutable
+ if plist.has_key("CFBundleName"):
+ self.bundle_name = plist.CFBundleName
+ else:
+ self.bundle_name = plist.CFBundleExecutable
"""
Replace ${env:?}, ${prefix}, ${prefix:?}, ${project}, ${gtk}, ${gtkdir},
@@ -286,6 +290,9 @@ class Project:
def get_name(self):
return self.name
+ def get_bundle_name(self):
+ return self.bundle_name
+
def get_prefix(self, name="default"):
meta = self.get_meta()
return meta.prefixes[name]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]