Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hacker <dd0t@users.sourceforge.net>2012-12-29 05:15:57 +0400
committerStefan Hacker <dd0t@users.sourceforge.net>2013-01-04 16:50:07 +0400
commite87028aea99fcbaed0e4cc004050dee83bafb47b (patch)
tree27e46e7ff5c7b54cfce918b96ed0e8d940835ce1 /scripts
parenta691c40d1c14cacd28c0c71f5dcfc97cf82213e8 (diff)
Integrate MIT licensed 3rd party Qt translations for missing locales.
* Added locales not shipped with Qt (qt_it.ts, qt_nl.ts, qt_tr.ts) taken from the VirtualBox (https://www.virtualbox.org/ticket/2018) * Extended mklic.pl to be able to add guards to only include certain 3rd party licenses if a define is set during build. * Made mach_override specific to OSX * Integrated new translations into the bundled qt translations build. * A new define USING_BUNDLED_QT_TRANSLATIONS is now set when building with bundled translations. It is used to guard the 3rd party license entry for the new translations. * See mumble/qttranslations/LICENSE for more information on the licensing of the new translations.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mklic.pl59
1 files changed, 38 insertions, 21 deletions
diff --git a/scripts/mklic.pl b/scripts/mklic.pl
index 29dd3c1e7..f959907ee 100644
--- a/scripts/mklic.pl
+++ b/scripts/mklic.pl
@@ -21,14 +21,29 @@ sub licenseFileToVar($$) {
return qq!static const char *${var} = \n\t\"! . $l . "\";\n\n\n";
}
-open(F, "> ../src/mumble/licenses.h");
+sub printGuarded($$$) {
+ my ($F, $S, $Guard)=@_;
+
+ if ($Guard) {
+ print $F "#ifdef " . $Guard . "\n";
+ }
+ print $F $S;
+
+ if ($Guard) {
+ print $F "#endif\n";
+ }
+}
+
+
+open(my $F, "> ../src/mumble/licenses.h");
-print F "/*\n";
-print F " * This file was auto-generated by scripts/mklic.pl\n";
-print F " * DO NOT EDIT IT MANUALLY\n";
-print F " */\n\n\n";
+print $F "/*\n";
+print $F " * This file was auto-generated by scripts/mklic.pl\n";
+print $F " * DO NOT EDIT IT MANUALLY\n";
+print $F " */\n";
+print $F "#include <QtGlobal>\n\n";
-print F licenseFileToVar("licenseMumble", "../LICENSE");
+print $F licenseFileToVar("licenseMumble", "../LICENSE");
# List of 3rd party licenses [<variableName>, <pathToLicenseFile>, <DisplayName>, <URL>]
my @thirdPartyLicenses = (
@@ -40,38 +55,40 @@ my @thirdPartyLicenses = (
["licenseOgg", "../3rdPartyLicenses/libogg_license.txt", "libogg", "http://www.xiph.org/"],
["licenseVorbis", "../3rdPartyLicenses/libvorbis_license.txt", "libvorbis", "http://www.xiph.org/"],
["licenseFLAC", "../3rdPartyLicenses/libflac_license.txt", "libFLAC", "http://flac.sourceforge.net/"],
- ["licenseMachOverride", "../3rdPartyLicenses/mach_override_license.txt", "mach_override", "https://github.com/rentzsch/mach_star"]);
+ ["licenseMachOverride", "../3rdPartyLicenses/mach_override_license.txt", "mach_override", "https://github.com/rentzsch/mach_star", "Q_OS_MAC"],
+ ["licenseQtTranslations", "../src/Mumble/qttranslations/LICENSE",
+ "Additional Qt translations", "https://www.virtualbox.org/ticket/2018", "USING_BUNDLED_QT_TRANSLATIONS"]);
# Print 3rd party licenses
foreach (@thirdPartyLicenses) {
- print F licenseFileToVar(@$_[0], @$_[1]);
+ printGuarded($F, licenseFileToVar(@$_[0], @$_[1]), @$_[4]);
}
# Print list of 3rd party license references
-print F "static const char *licenses3rdParty[" . ($#thirdPartyLicenses + 2) . "] = {\n";
+print $F "static const char *licenses3rdParty[] = {\n";
foreach (@thirdPartyLicenses) {
- print F "\t" . @$_[0] . ", \n";
+ printGuarded($F, "\t" . @$_[0] . ", \n", @$_[4]);
}
-print F "\t0\n";
-print F "};\n\n\n";
+print $F "\t0\n";
+print $F "};\n\n\n";
# Print list of 3rd party names
-print F "static const char *licenses3rdPartyNames[" . ($#thirdPartyLicenses + 2) . "] = {\n";
+print $F "static const char *licenses3rdPartyNames[] = {\n";
foreach (@thirdPartyLicenses) {
- print F "\t\"" . @$_[2] . "\",\n";
+ printGuarded($F, "\t\"" . @$_[2] . "\",\n", @$_[4]);
}
-print F "\t0\n";
-print F "};\n\n\n";
+print $F "\t0\n";
+print $F "};\n\n\n";
# Print list of 3rd party urls
-print F "static const char *licenses3rdPartyURLs[" . ($#thirdPartyLicenses + 2) . "] = {\n";
+print $F "static const char *licenses3rdPartyURLs[] = {\n";
foreach (@thirdPartyLicenses) {
- print F "\t\"" . @$_[3] . "\",\n";
+ printGuarded($F, "\t\"" . @$_[3] . "\",\n", @$_[4]);
}
-print F "\t0\n";
-print F "};\n\n\n";
+print $F "\t0\n";
+print $F "};\n\n\n";
-close(F);
+close($F);