waf extension: there is a need to copy custom framework to ChronoShare.app/Content/Framework/ directory
Somehow, mac's linker adds @loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle
instead of a reasonable absolute or relative path. The supplied "patch"
forces Sparkle.framework be automatically copied to the right place if
necessary.
Change-Id: Id756ec2d75c7ac50b981d4cbe895c4a3388e606f
diff --git a/waf b/waf
index 4ae5a18..b780e61 100755
--- a/waf
+++ b/waf
Binary files differ
diff --git a/wscript b/wscript
index 3204199..2ce1461 100644
--- a/wscript
+++ b/wscript
@@ -53,8 +53,9 @@
try:
# Try local path
Logs.info ("Check local version of Sparkle framework")
- check_sparkle(cxxflags="-F%s/osx/Frameworks" % conf.path.abspath(),
- linkflags="-F%s/osx/Frameworks" % conf.path.abspath())
+ check_sparkle(cxxflags="-F%s/osx/Frameworks/" % conf.path.abspath(),
+ linkflags="-F%s/osx/Frameworks/" % conf.path.abspath())
+ conf.env.HAVE_LOCAL_SPARKLE = 1
except:
# Download to local path and retry
Logs.info ("Sparkle framework not found, trying to download it to 'build/'")
@@ -70,8 +71,9 @@
os.rename ("build/Sparkle/Sparkle.framework", "osx/Frameworks/Sparkle.framework")
shutil.rmtree("build/Sparkle", ignore_errors=True)
- check_sparkle(cxxflags="-F%s/osx/Frameworks" % conf.path.abspath(),
- linkflags="-F%s/osx/Frameworks" % conf.path.abspath())
+ check_sparkle(cxxflags="-F%s/osx/Frameworks/" % conf.path.abspath(),
+ linkflags="-F%s/osx/Frameworks/" % conf.path.abspath())
+ conf.env.HAVE_LOCAL_SPARKLE = 1
except subprocess.CalledProcessError as e:
conf.fatal("Cannot find Sparkle framework. Auto download failed: '%s' returned %s" % (' '.join(e.cmd), e.returncode))
except:
@@ -238,6 +240,8 @@
qt.use += " OSX_SPARKLE"
qt.source += ["osx/auto-update/sparkle-auto-update.mm"]
qt.includes += " osx/auto-update"
+ if bld.env['HAVE_LOCAL_SPARKLE']:
+ qt.mac_frameworks = "osx/Frameworks/Sparkle.framework"
cmdline = bld (
target = "csd",