Commit 4447e7f3 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Merge pull request #47 from albert-github/feature/build_language

Patch regarding generating the rules file for the windows build regardin...
parents f18d76b3 0be7e28b
......@@ -52,7 +52,6 @@ f_libclangstatic=NO
# list will be in case as specified (f_langs) and in uppercase (f_ulangs) as used in the internal perl script
#
f_langs=`ls -1 src/translator_??.h | sed -e 's%src/translator_%%g' | sed -e 's/\.h//' | tr '\012' ',' | sed -e 's/,$//'`
f_ulangs=`echo $f_langs | tr '[a-z]' '[A-Z]'`
while test -n "$1"; do
case $1 in
......@@ -800,12 +799,6 @@ TMAKE_MOC = $QTDIR/bin/moc
EOF
fi
if test "$f_english" = YES; then
cat >> .tmakeconfig <<EOF
TMAKE_CXXFLAGS += -DENGLISH_ONLY
EOF
fi
if test "$f_search" = YES; then
cat >> .tmakeconfig <<EOF
LIBS += -L$XAPIAN/lib
......@@ -900,23 +893,18 @@ EOF
done
# - generating src/lang_cfg.h
# use consistent method on Linux and Windows
if test -f "src/lang_cfg.h"; then
chmod u+w src/lang_cfg.h # make sure file can be overwritten
fi
echo " Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
chomp @l;
@allowed=(split(/,/,"'$f_ulangs'"));
foreach my $elem (@l){
$elem =~ tr/a-z/A-Z/;
$r=0;
foreach my $tst (@allowed){
if ($tst eq $elem) { $r=1; last; }
}
if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; }
print "#define LANG_$elem\n";
};' > ./src/lang_cfg.h
if test "$f_english" = YES; then
$f_python src/lang_cfg.py ENONLY > src/lang_cfg.h
else
f_ulangs=`echo $f_langs | tr '[a-z,]' '[A-Z ]'`
$f_python src/lang_cfg.py $f_ulangs > src/lang_cfg.h
fi
if test -f "src/config.h"; then
chmod u+w src/config.h
......
......@@ -134,7 +134,7 @@ Alexandr Chelpanov: cav at cryptopro dot ru
TranslatorSerbian
Dejan Milosavljevic: [unreachable] dmilos at email dot com
TranslatorSerbianCyrilic
TranslatorSerbianCyrillic
Nedeljko Stefanovic: stenedjo at yahoo dot com
TranslatorSlovak
......
......@@ -289,6 +289,7 @@ Go to the <a href="commands.html">next</a> section or return to the
</docs>
<value name='Afrikaans'/>
<value name='Arabic'/>
<value name='Armenian'/>
<value name='Brazilian'/>
<value name='Catalan'/>
<value name='Chinese'/>
......@@ -297,28 +298,31 @@ Go to the <a href="commands.html">next</a> section or return to the
<value name='Czech'/>
<value name='Danish'/>
<value name='Dutch'/>
<value name='English'/>
<value name='English' desc='(United States)'/>
<value name='Esperanto'/>
<value name='Farsi'/>
<value name='Farsi' desc='(Persian)'/>
<value name='Finnish'/>
<value name='French'/>
<value name='German'/>
<value name='Greek'/>
<value name='Hungarian'/>
<value name='Indonesian'/>
<value name='Italian'/>
<value name='Japanese'/>
<value name='Japanese-en'/>
<value name='Japanese-en' desc='(Japanese with English messages)'/>
<value name='Korean'/>
<value name='Korean-en'/>
<value name='Korean-en' desc='(Korean with English messages)'/>
<value name='Latvian'/>
<value name='Norwegian'/>
<value name='Lithuanian'/>
<value name='Macedonian'/>
<value name='Persian'/>
<value name='Norwegian'/>
<value name='Persian' desc='(Farsi)'/>
<value name='Polish'/>
<value name='Portuguese'/>
<value name='Romanian'/>
<value name='Russian'/>
<value name='Serbian'/>
<value name='Serbian-Cyrillic'/>
<value name='Slovak'/>
<value name='Slovene'/>
<value name='Spanish'/>
......
......@@ -406,7 +406,7 @@ void HtmlHelp::initialize()
s_languageDict.insert("norwegian", new QCString("0x814 Norwegian"));
s_languageDict.insert("polish", new QCString("0x415 Polish"));
s_languageDict.insert("portuguese", new QCString("0x816 Portuguese(Portugal)"));
s_languageDict.insert("brazil", new QCString("0x416 Portuguese(Brazil)"));
s_languageDict.insert("brazilian", new QCString("0x416 Portuguese(Brazil)"));
s_languageDict.insert("russian", new QCString("0x419 Russian"));
s_languageDict.insert("spanish", new QCString("0x40A Spanish(Traditional Sort)"));
s_languageDict.insert("swedish", new QCString("0x41D Swedish"));
......@@ -433,6 +433,10 @@ void HtmlHelp::initialize()
s_languageDict.insert("persian", new QCString("0x429 Persian (Iran)"));
s_languageDict.insert("arabic", new QCString("0xC01 Arabic (Egypt)"));
s_languageDict.insert("latvian", new QCString("0x426 Latvian"));
s_languageDict.insert("macedonian", new QCString("0x042f Macedonian (Former Yugoslav Republic of Macedonia)"));
s_languageDict.insert("armenian", new QCString("0x42b Armenian"));
s_languageDict.insert("esperanto", new QCString("0x48f Esperanto"));
s_languageDict.insert("serbian-cyrillic", new QCString("0xC1A Serbian (Serbia, Cyrillic)"));
}
......
import sys
if (len(sys.argv) > 0):
if (sys.argv[1] == "ENONLY"):
print "#define ENGLISH_ONLY"
else:
for x in xrange(1, len(sys.argv)):
print "#define LANG_%s"%(sys.argv[x])
......@@ -354,9 +354,9 @@ bool setTranslator(const char *langName)
}
#endif
#ifdef LANG_SC
else if (L_EQUAL("serbian-cyrilic"))
else if (L_EQUAL("serbian-cyrillic") || L_EQUAL("serbiancyr")) /* serbiancyr for consistency with older versions */
{
theTranslator=new TranslatorSerbian;
theTranslator=new TranslatorSerbianCyrillic;
}
#endif
#ifdef LANG_CA
......
#
# This file is an aid to generated the Languages rules file.
# usage:
# python languages.py > ..\winbuild\Languages.rules
#
import os
import re
files = [f for f in os.listdir('.') if re.match(r'translator_[a-z][a-z]\.h', f)]
new_list = []
for f in files:
new_list.append([f,(os.path.splitext(f)[0]).replace("translator_","").upper()])
#
# generating file is lang_cfg.py
# the rules file has to output lang_cfg.h
#
print """\
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioToolFile
Name="languages"
Version="8.00"
>
<Rules>
<CustomBuildRule
Name="Languages"
DisplayName="Settings"
CommandLine="python $(InputPath) [AllOptions] [AdditionalOptions] &gt; $(InputDir)../src/$(InputName).h"
Outputs="$(InputDir)../src/$(InputName).h"
FileExtensions="*.py"
AdditionalDependencies=""
ExecutionDescription="Executing languages ..."
ShowOnlyRuleProperties="false"
>
<Properties>
<EnumProperty
Name="EnglishOnly"
DisplayName="Use English Only"
Description="Use English Only"
DefaultValue="0"
>
<Values>
<EnumValue
Value="0"
Switch=""
DisplayName="Don't use English Only"
/>
<EnumValue
Value="1"
Switch="ENONLY"
DisplayName="Use English Only"
/>
</Values>
</EnumProperty>
"""
#
# generate loop, English is mandatory (so cannot be chosen)
#
for f in new_list:
if (f[1] != "EN"):
# search for the language description
fil = open(f[0], 'r')
tmp = ""
for line in fil:
if "idLanguage" in line:
tmp = line
if "}" in line:
break
elif (tmp != ""):
tmp += line
if "}" in line:
break
tmp = tmp.replace("\n","")
l = re.sub('[^"]*"([^"]*)".*','\\1',tmp)
l1 = l.replace("-","")
# capatalize first letter
l = l.title()
print """\
<EnumProperty
Name="%s"
DisplayName="Use %s"
Description="Use %s"
DefaultValue="1"
>
<Values>
<EnumValue
Value="0"
Switch=""
DisplayName="Don't use %s"
/>
<EnumValue
Value="1"
Switch="%s"
DisplayName="Use %s"
/>
</Values>
</EnumProperty>
""" % (l1, l, l, l, f[1], l)
print """\
</Properties>
</CustomBuildRule>
</Rules>
</VisualStudioToolFile>
"""
......@@ -49,7 +49,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_8_0
*/
virtual QCString idLanguage()
{
return "brazil";
return "brazilian";
}
/*! Used to get the command(s) for the language support. This method
......
......@@ -35,7 +35,7 @@
#define TRANSLATOR_FA_H
#define HtmlRightToLeft QCString("<div dir=\"rtl\">")
#define HtmlLeftToRight QCString("<div dir=\"rtl\">")
#define HtmlLeftToRight QCString("<div dir=\"ltr\">")
#define HtmlDivEnd QCString("</div>")
......
......@@ -16,7 +16,7 @@
*/
// Тranslated by Slave Jovanovski <slavejovanovski@yahoo.com>
//
// The cyrilic strings were entered using Macedonian language support in
// The cyrillic strings were entered using Macedonian language support in
// Windows. The editor used was Eclipse 3.2. The file was saved in UTF-8.
//
// Updates:
......
......@@ -40,7 +40,7 @@
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
*/
class TranslatorSerbianCyrilic : public TranslatorAdapter_1_6_0
class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
{
public:
......@@ -53,7 +53,7 @@ class TranslatorSerbianCyrilic : public TranslatorAdapter_1_6_0
* the identification used in language.cpp.
*/
virtual QCString idLanguage()
{ return "serbiancyr"; }
{ return "serbian-cyrillic"; }
/*! Used to get the LaTeX command(s) for the language support.
* This method should return string with commands that switch
......

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Doxygen", "Doxygen.vcproj", "{309C9A4A-94D2-4837-9A11-45B0A6CF35C3}"
ProjectSection(ProjectDependencies) = postProject
{B6BB4771-8A4E-4656-AC08-1EF8AC182F64} = {B6BB4771-8A4E-4656-AC08-1EF8AC182F64}
......@@ -9,6 +9,9 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qtools", "qtools.vcproj", "{B6BB4771-8A4E-4656-AC08-1EF8AC182F64}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doxywizard", "Doxywizard.vcproj", "{77C9C2D3-EA3F-3D59-8B4C-0ED852890172}"
ProjectSection(ProjectDependencies) = postProject
{309C9A4A-94D2-4837-9A11-45B0A6CF35C3} = {309C9A4A-94D2-4837-9A11-45B0A6CF35C3}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doxysearch", "doxysearch.vcproj", "{F3F3408F-F6F7-46C7-BF1E-1FA056E0AE20}"
EndProject
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -10,7 +10,7 @@
CommandLine="python $(InputPath) [AllOptions] [AdditionalOptions] [inputs]"
Outputs="$(InputDir)../src/$(InputName).h"
FileExtensions="*.py"
AdditionalDependencies="$(ProjectDir)..\src\configure"
AdditionalDependencies="$(ProjectDir)..\configure"
ExecutionDescription="Executing Settings ..."
ShowOnlyRuleProperties="false"
>
......
......@@ -8,9 +8,9 @@
Name="Version"
DisplayName="Version"
CommandLine="python $(InputPath) [AllOptions] [AdditionalOptions] [inputs]"
Outputs="$(InputDir)../src/$(InputName).cpp"
Outputs="$(InputDir)..\src\$(InputName).cpp"
FileExtensions="*.py"
AdditionalDependencies="$(ProjectDir)..\src\configure"
AdditionalDependencies="$(ProjectDir)..\configure"
ExecutionDescription="Executing Version ..."
ShowOnlyRuleProperties="false"
>
......
......@@ -25,6 +25,7 @@
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -52,6 +53,7 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
ProgramDatabaseFileName=".\Debug\$(TargetName).pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......@@ -65,7 +67,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib"
OutputFile="..\bin\doxyindexer.exe"
OutputFile="..\bin\Debug\doxyindexer.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(XAPIAN_DIR)\Debug&quot;;Debug"
GenerateManifest="false"
......@@ -104,6 +106,7 @@
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -132,6 +135,7 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
ProgramDatabaseFileName=".\Debug64\$(TargetName).pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......@@ -145,7 +149,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib"
OutputFile="..\bin\doxyindexer.exe"
OutputFile="..\bin\Debug64\doxyindexer.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(XAPIAN_DIR)\Debug64&quot;;Debug64"
GenerateDebugInformation="true"
......@@ -181,6 +185,7 @@
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
WholeProgramOptimization="1"
>
<Tool
......@@ -209,6 +214,7 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
ProgramDatabaseFileName=".\Release\$(TargetName).pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......@@ -261,6 +267,7 @@
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
WholeProgramOptimization="1"
>
<Tool
......@@ -290,6 +297,7 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
ProgramDatabaseFileName=".\Relase64\$(TargetName).pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......
......@@ -25,6 +25,7 @@
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -52,6 +53,7 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
ProgramDatabaseFileName=".\Debug\$(TargetName).pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......@@ -65,8 +67,8 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="xapian.lib uuid.lib rpcrt4.lib ws2_32.lib"
OutputFile="..\bin\doxysearch.cgi"
LinkIncremental="2"
OutputFile="..\bin\Debug\doxysearch.cgi"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(XAPIAN_DIR)\Debug&quot;"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug\$(TargetName).pdb"
......@@ -101,6 +103,7 @@
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -129,6 +132,7 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
ProgramDatabaseFileName=".\Debug64\$(TargetName).pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......@@ -142,7 +146,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="xapian.lib uuid.lib rpcrt4.lib ws2_32.lib"
OutputFile="..\bin\doxysearch.cgi"
OutputFile="..\bin\Debug64\doxysearch.cgi"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(XAPIAN_DIR)\Debug64&quot;"
GenerateDebugInformation="true"
......@@ -178,6 +182,7 @@
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
WholeProgramOptimization="1"
>
<Tool
......@@ -206,6 +211,7 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
ProgramDatabaseFileName=".\Release\$(TargetName).pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......@@ -257,6 +263,7 @@
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
WholeProgramOptimization="1"
>
<Tool
......@@ -286,6 +293,7 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
ProgramDatabaseFileName=".\Release64\$(TargetName).pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......
......@@ -25,6 +25,7 @@
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -103,6 +104,7 @@
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -257,6 +259,7 @@
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -335,6 +338,7 @@
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......
......@@ -26,6 +26,7 @@
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -56,7 +57,7 @@
PrecompiledHeaderFile=".\Release/qtools.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
ProgramDatabaseFileName=".\Release\$(TargetName).pdb"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
......@@ -104,6 +105,7 @@
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -135,7 +137,7 @@
PrecompiledHeaderFile=".\Release64/qtools.pch"
AssemblerListingLocation=".\Release64/"
ObjectFile=".\Release64/"
ProgramDataBaseFileName=".\Release64/"
ProgramDatabaseFileName=".\Release64\$(TargetName).pdb"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
......@@ -183,6 +185,7 @@
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -211,7 +214,7 @@
PrecompiledHeaderFile=".\Debug/qtools.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
ProgramDatabaseFileName=".\Debug\$(TargetName).pdb"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
......@@ -259,6 +262,7 @@
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
BuildLogFile="$(IntDir)\$(TargetName)BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
......@@ -288,7 +292,7 @@
PrecompiledHeaderFile=".\Debug64/qtools.pch"
AssemblerListingLocation=".\Debug64/"
ObjectFile=".\Debug64/"
ProgramDataBaseFileName=".\Debug64/"
ProgramDatabaseFileName=".\Debug64\$(TargetName).pdb"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment