summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py2
-rw-r--r--BuildTools/SCons/SConscript.boot7
-rw-r--r--BuildTools/SCons/SConstruct8
-rw-r--r--BuildTools/SCons/Tools/wix.py3
-rw-r--r--BuildTools/TranslationCoverage.xslt50
5 files changed, 63 insertions, 7 deletions
diff --git a/BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py b/BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py
index dada920..de0633d 100644
--- a/BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py
+++ b/BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py
@@ -3,7 +3,7 @@
# ----
# This script requires:
# - cdb, the Windows command line debugger installed and available in PATH.
-# - the SWIFT_DIST environment variable set to a locatioon that contains msi and pdb.gz files.
+# - the SWIFT_DIST environment variable set to a location that contains msi and pdb.gz files.
import sys
from subprocess import call
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 3b21dde..40f2425 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -37,7 +37,8 @@ if os.name == "mac" or (os.name == "posix" and os.uname()[0] == "Darwin"):
vars.Add(BoolVariable("mac105", "Link against the 10.5 frameworks", "no"))
vars.Add(BoolVariable("mac106", "Link against the 10.6 frameworks", "no"))
if os.name == "nt" :
- vars.Add(PathVariable("vcredist", "MSVC redistributable dir", None, PathVariable.PathAccept))
+ vars.Add(PathVariable("vcredist", "MSVC redistributable path", None, PathVariable.PathAccept))
+ vars.Add(PathVariable("vcredistdir", "MSVC redistributable dir", None, PathVariable.PathAccept))
if os.name == "nt" :
vars.Add(PathVariable("wix_bindir", "Path to WiX binaries", "", PathVariable.PathAccept))
if os.name == "nt" :
@@ -249,6 +250,9 @@ for flags_type in ["ccflags", "cxxflags", "linkflags"] :
# where you need it
env["OBJCCFLAGS"] = []
+if env["PLATFORM"] != "win32" :
+ env.AppendUnique(CCFLAGS=['-isystem', Dir('#').abspath + '/Backport/'])
+
# Compile code as C++11
if env["PLATFORM"] != "win32" :
env.Append(CXXFLAGS = ["-std=c++11"])
@@ -363,7 +367,6 @@ else :
"-Wno-direct-ivar-access", # Obj-C code warning
"-Wno-potentially-evaluated-expression", # Caused due to calling shared_ptr::get() inside typeid()
- "-Wno-inconsistent-missing-destructor-override", # FIXME: fix source code issues regarding this warning later
"-Wno-shadow-field", # FIXME: fix source code issues regarding this warning later
"-Wno-unused-template", # FIXME: fix source code issues regarding this warning later
])
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 6d63d5b..70bffbc 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -554,6 +554,10 @@ conf.Finish()
if env["qt"] :
env["QTDIR"] = env["qt"]
+if env["PLATFORM"] == "win32" :
+ systemIncludeFlag = "/I"
+else:
+ systemIncludeFlag = "-isystem"
################################################################################
# TLS backend selection
@@ -583,9 +587,9 @@ elif env.get("tls_backend") == "openssl" :
openssl_include = env.get("openssl_include")
openssl_libdir = env.get("openssl_libdir")
if openssl_include:
- openssl_flags = {"CPPPATH":[openssl_include]}
+ openssl_flags = { "CPPFLAGS": [systemIncludeFlag + openssl_include]}
else:
- openssl_flags = { "CPPPATH": [os.path.join(openssl_prefix, "include")] }
+ openssl_flags = { "CPPFLAGS": [systemIncludeFlag + os.path.join(openssl_prefix, "include")] }
if openssl_libdir:
openssl_flags["LIBPATH"] = [openssl_libdir]
env["OPENSSL_DIR"] = openssl_prefix
diff --git a/BuildTools/SCons/Tools/wix.py b/BuildTools/SCons/Tools/wix.py
index 907b6d9..889afe4 100644
--- a/BuildTools/SCons/Tools/wix.py
+++ b/BuildTools/SCons/Tools/wix.py
@@ -38,7 +38,7 @@ def generate(env) :
light_builder = SCons.Builder.Builder(
- action = '"$WIX_LIGHT" $WIX_LIGHT_OPTIONS -b "$WIX_SOURCE_OBJECT_DIR" ${SOURCES} -o ${TARGET}',
+ action = '"$WIX_LIGHT" $WIX_LIGHT_OPTIONS -b "$WIX_SOURCE_OBJECT_DIR" ${SOURCES} -loc Swift\\Packaging\\WiX\\Swift_en-us.wxl -o ${TARGET}',
src_suffix = '.wixobj',
src_builder = candle_builder)
@@ -48,4 +48,3 @@ def generate(env) :
def exists(env) :
return True
-
diff --git a/BuildTools/TranslationCoverage.xslt b/BuildTools/TranslationCoverage.xslt
new file mode 100644
index 0000000..4329174
--- /dev/null
+++ b/BuildTools/TranslationCoverage.xslt
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!--
+
+To use this XSLT, run it with xsltproc:
+
+ xsltproc BuildTools/TranslationCoverage.xslt Swift/Translations/swift_nl.ts
+
+Supported parameters:
+
+ full if set to 1 or true, generate a full report instead of the default oneliner.
+
+-->
+
+<xsl:param name="full" select="'0'" />
+<xsl:param name="filename" />
+<xsl:output method="text" />
+
+<xsl:variable name="contexts" select="count(TS/context)"/>
+<xsl:variable name="vanished" select="count(TS/context/message/translation[@type = 'vanished'])"/>
+<xsl:variable name="obsolete" select="count(TS/context/message/translation[@type = 'obsolete'])"/>
+<xsl:variable name="strings" select="count(TS/context/message/source) - $vanished - $obsolete"/>
+<xsl:variable name="translations" select="count(TS/context/message/translation[not(@type) and text()])"/>
+<xsl:variable name="missing" select="$strings - $translations"/>
+<xsl:variable name="percent_done" select="floor($translations div $strings * 100)"/>
+
+<xsl:template match="/TS">
+ <xsl:choose>
+ <xsl:when test="$full != '0' and $full != 'false'"><xsl:call-template name="full" /></xsl:when>
+ <xsl:otherwise><xsl:call-template name="terse" /></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="terse"><xsl:value-of select="$percent_done"/>% complete, <xsl:value-of select="$vanished"/> vanished, <xsl:value-of select="$obsolete"/> obsolete, <xsl:value-of select="$missing"/> missing
+</xsl:template>
+
+<xsl:template name="full"><xsl:if test="$filename">Report for <xsl:value-of select="$filename" />:
+
+</xsl:if>Contexts: <xsl:value-of select="$contexts"/>
+Active Strings: <xsl:value-of select="$strings"/>
+Translations: <xsl:value-of select="$translations"/>, <xsl:value-of select="$percent_done"/>% complete
+Missing: <xsl:value-of select="$missing"/>
+Vanished: <xsl:value-of select="$vanished"/>
+Obsolete: <xsl:value-of select="$obsolete"/>
+
+Note: Strings and Translations do not include vanished or obsolete messages.
+</xsl:template>
+
+</xsl:stylesheet>