From abd81d4a3cf08ffaa1e5265d204cdd80c8c0583b Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Fri, 24 Feb 2017 18:02:28 +0100 Subject: Add Sparkle license to about dialog COPYING file on demand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If scons detects a Sparkle release in the 3rdParty folder, it will add the containing LICENSE file at the end of the dynamically generated COPYING file. Test-Information: Tested that the contents of Sparkle’s LICENSE file are at the end of the text in the license window of the about dialog, if the Sparkle folder, with a Sparkle release inside, is present in 3rdParty. Tested that Swift builds fine, if the Sparkle folder is missing in 3rdParty. Change-Id: I89db155b5bb3eef4d632997fd99ff270b4720a16 diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index c084cff..a7e2bed 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -299,6 +299,7 @@ if env["PLATFORM"] == "darwin" : env["HAVE_SPARKLE"] = 1 env["SPARKLE_FLAGS"] = sparkle_flags env["SPARKLE_FRAMEWORK"] = Dir("../../3rdParty/Sparkle/Sparkle-1.14.0/Sparkle.framework") + env["SPARKLE_COPYING"] = File("../../3rdParty/Sparkle/Sparkle-1.14.0/LICENSE") conf.Finish() if env.get("sparkle_public_dsa_key", None) != None : diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 8a39063..3512120 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -326,8 +326,14 @@ commonResources = { "": ["#/Swift/resources/sounds"] } + +## COPYING file generation myenv["TEXTFILESUFFIX"] = "" -myenv.MyTextfile(target = "COPYING", source = [myenv.File("../../COPYING.gpl"), myenv.File("../../COPYING.thirdparty"), myenv.File("../../COPYING.dependencies")], LINESEPARATOR = "\n\n========\n\n\n") + +copying_files = [myenv.File("../../COPYING.gpl"), myenv.File("../../COPYING.thirdparty"), myenv.File("../../COPYING.dependencies")] +if env["PLATFORM"] == "darwin" and env["HAVE_SPARKLE"] : + copying_files.append(env["SPARKLE_COPYING"]) +myenv.MyTextfile(target = "COPYING", source = copying_files, LINESEPARATOR = "\n\n========\n\n\n") ################################################################################ # Translation -- cgit v0.10.2-6-g49f6