mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Created a VS2012 project and solution for GoldenDict
It uses excellent Visual Studio extensions for Qt, written by Adam Badura (@adambadura). Many thanks! The project file is fully functional in Release-Qt4 configuration, for both x32 and x64 architectures. I decided not to use the official Qt Plugin, since it generates HUGE and broken project files which is painful to maintain. Here we have a pure visual studio solution with proper Visual Studio extensions to support Qt-based development. These extensions cover RCC, Lrelease, MOC and UIC, automagically invoking them when needed, with basically no need for manual steps to maintain. Also, GoldenDict can be built from the command line as well, no Visual Studio is required: For Win32: MSBuild /m goldendict.sln /v:m /nologo /p:Configuration=Release-Qt4 /p:Platform=win32 For x64: MSBuild /m goldendict.sln /v:m /nologo /p:Configuration=Release-Qt4 /p:Platform=x64
This commit is contained in:
parent
323ddaa34e
commit
ba94dd1314
18
MSBuild/QtExtensions/lrelease.props
Normal file
18
MSBuild/QtExtensions/lrelease.props
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura and Tvangeste.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<QtTranslate>
|
||||
<OutputFile Condition="'%(QtLrelease.OutputFile)' == ''">%(Filename).qm</OutputFile>
|
||||
<Compress Condition="'%(QtLrelease.Compress)' == ''">false</Compress>
|
||||
<LRELEASE Condition="'%(QtLrelease.LRELEASE)' == ''">$(QTDIR)\bin\lrelease.exe</LRELEASE>
|
||||
<CommandLineTemplate>%(LRELEASE) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
|
||||
</QtTranslate>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup>
|
||||
<BuildGenerateSourcesTargets>$(BuildGenerateSourcesTargets);_QtTranslate</BuildGenerateSourcesTargets>
|
||||
</PropertyGroup>
|
||||
</Project>
|
92
MSBuild/QtExtensions/lrelease.targets
Normal file
92
MSBuild/QtExtensions/lrelease.targets
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura and Tvangeste.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
||||
<AvailableItemName Include="QtTranslate">
|
||||
<Targets>QtTranslate</Targets>
|
||||
</AvailableItemName>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask
|
||||
TaskName="QtLrelease"
|
||||
TaskFactory="XamlTaskFactory"
|
||||
AssemblyName="Microsoft.Build.Tasks.v4.0">
|
||||
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
|
||||
</UsingTask>
|
||||
|
||||
<Target
|
||||
Name="SelectQtTranslate"
|
||||
DependsOnTargets="_SelectedFiles;SelectCustomBuild"
|
||||
>
|
||||
<ItemGroup Condition="'@(SelectedFiles)' != ''">
|
||||
<QtTranslate
|
||||
Remove="@(QtTranslate)"
|
||||
Condition="'%(Identity)' != '@(SelectedFiles)'"
|
||||
/>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="QtTranslate"
|
||||
Condition="'@(QtTranslate)' != ''"
|
||||
DependsOnTargets="SelectQtTranslate"
|
||||
Inputs="@(QtTranslate)"
|
||||
Outputs="%(OutputFile)"
|
||||
>
|
||||
<Message Text="LRELEASE %(QtTranslate.Identity) -> $([System.IO.Path]::GetFileName('%(QtTranslate.OutputFile)'))"
|
||||
Importance="high"/>
|
||||
<ItemGroup>
|
||||
<QtTranslate_tlog
|
||||
Include="%(QtTranslate.OutputFile)"
|
||||
Condition="'%(QtTranslate.OutputFile)' != '' and '%(QtTranslate.ExcludedFromBuild)' != 'true'"
|
||||
>
|
||||
<Source>@(QtTranslate, '|')</Source>
|
||||
</QtTranslate_tlog>
|
||||
</ItemGroup>
|
||||
<WriteLinesToFile
|
||||
Condition="'@(QtTranslate_tlog)' != '' and '%(QtTranslate_tlog.ExcludedFromBuild)' != 'true'"
|
||||
File="$(IntDir)$(ProjectName).write.1.tlog"
|
||||
Lines="^%(QtTranslate_tlog.Source);@(QtTranslate_tlog->'%(Fullpath)')"
|
||||
/>
|
||||
<MakeDir
|
||||
Directories="$([System.IO.Path]::GetDirectoryName('%(QtTranslate.OutputFile)'))"
|
||||
/>
|
||||
<QtLrelease
|
||||
Condition="'%(QtTranslate.ExcludedFromBuild)' != 'true'"
|
||||
OutputFile="%(QtTranslate.OutputFile)"
|
||||
Inputs="%(QtTranslate.Identity)"
|
||||
AdditionalOptions="%(QtTranslate.AdditionalOptions)"
|
||||
CommandLineTemplate="%(QtTranslate.CommandLineTemplate)"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="QtTranslateAndInclude"
|
||||
Condition="'@(QtTranslate)' != ''"
|
||||
DependsOnTargets="SelectQtTranslate;QtTranslate"
|
||||
>
|
||||
<ItemGroup>
|
||||
<ClInclude
|
||||
Include="%(QtTranslate.OutputFile)"
|
||||
Condition="'%(QtTranslate.ExcludedFromBuild)' != 'true'"
|
||||
>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>%(QtTranslate.Identity)</DependentUpon>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="_QtTranslate"
|
||||
BeforeTargets="ClCompile"
|
||||
DependsOnTargets="$(BeforeQtTranslateTargets);QtTranslateAndInclude;$(AfterQtTranslateTargets)"
|
||||
/>
|
||||
</Project>
|
89
MSBuild/QtExtensions/lrelease.xml
Normal file
89
MSBuild/QtExtensions/lrelease.xml
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura and Tvangeste.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<ProjectSchemaDefinitions
|
||||
xmlns="http://schemas.microsoft.com/build/2009/properties"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
>
|
||||
<Rule
|
||||
Name="QtLrelease"
|
||||
DisplayName="Qt Lrelease Tool"
|
||||
PageTemplate="tool"
|
||||
SwitchPrefix="-"
|
||||
Order="220"
|
||||
>
|
||||
<Rule.DataSource>
|
||||
<DataSource
|
||||
Persistence="ProjectFile"
|
||||
ItemType="QtTranslate"
|
||||
HasConfigurationCondition="true"
|
||||
/>
|
||||
</Rule.DataSource>
|
||||
<Rule.Categories>
|
||||
<Category
|
||||
Name="General"
|
||||
DisplayName="General"
|
||||
/>
|
||||
<Category
|
||||
Name="Command Line"
|
||||
DisplayName="Command Line"
|
||||
Subtype="CommandLine"
|
||||
/>
|
||||
</Rule.Categories>
|
||||
<StringProperty
|
||||
Name="OutputFile"
|
||||
Subtype="file"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtlinguist/linguist-manager.html#using-lrelease"
|
||||
DisplayName="Output File"
|
||||
Description="Write output to <file>. (-qm <file>)"
|
||||
Switch="qm "[value]""
|
||||
/>
|
||||
<BoolProperty
|
||||
Name="Compress"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtlinguist/linguist-manager.html#using-lrelease"
|
||||
DisplayName="Compress the QM files"
|
||||
Description="Compress the QM files. (-compress)"
|
||||
Switch="compress"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="Inputs"
|
||||
Category="Command Line"
|
||||
IsRequired="true"
|
||||
>
|
||||
<StringProperty.DataSource>
|
||||
<DataSource
|
||||
Persistence="ProjectFile"
|
||||
ItemType="QtTranslate"
|
||||
SourceType="Item"
|
||||
/>
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
<StringProperty
|
||||
Subtype="AdditionalOptions"
|
||||
Name="AdditionalOptions"
|
||||
Category="Command Line"
|
||||
DisplayName="Additional Options"
|
||||
F1Keyword="vc.project.AdditionalOptionsPage"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="LRELEASE"
|
||||
Subtype="file"
|
||||
DisplayName="LRELEASE"
|
||||
Description="Path to lrelease.exe"
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="CommandLineTemplate"
|
||||
Category="Command Line"
|
||||
DisplayName="Command Line"
|
||||
Visible="False"
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
</Rule>
|
||||
<ItemType Name="QtTranslate" DisplayName="Qt Translation" />
|
||||
<FileExtension Name="*.ts" ContentType="QtTranslate" />
|
||||
<ContentType Name="QtTranslate" DisplayName="Qt Translation" ItemType="QtTranslate" />
|
||||
</ProjectSchemaDefinitions>
|
30
MSBuild/QtExtensions/moc.props
Normal file
30
MSBuild/QtExtensions/moc.props
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<QtMOCCompile>
|
||||
<OutputFile Condition="'%(QtMOCCompile.OutputFile)' == ''">%(Filename)%(Extension).$(Platform).$(Configuration).cpp</OutputFile>
|
||||
<DoNotGenerateInclude Condition="'%(QtMOCCompile.DoNotGenerateInclude)' == ''">false</DoNotGenerateInclude>
|
||||
<NoWarnings Condition="'%(QtMOCCompile.NoWarnings)' == ''">false</NoWarnings>
|
||||
<BaseIncludePath Condition="'%(QtMOCCompile.BaseIncludePath)' == ''"></BaseIncludePath>
|
||||
<DefaultIncludeDirectories Condition="'%(QtMOCCompile.DefaultIncludeDirectories)' == ''"></DefaultIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'%(QtMOCCompile.AdditionalIncludeDirectories)' == ''"></AdditionalIncludeDirectories>
|
||||
<PreprocessOnly Condition="'%(QtMOCCompile.PreprocessOnly)' == ''">false</PreprocessOnly>
|
||||
<DefaultPreprocessorDefinitions Condition="'%(QtMOCCompile.DefaultPreprocessorDefinitions)' == ''"></DefaultPreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'%(QtMOCCompile.PreprocessorDefinitions)' == ''"></PreprocessorDefinitions>
|
||||
<DefaultUndefinePreprocessorDefinitions Condition="'%(QtMOCCompile.DefaultUndefinePreprocessorDefinitions)' == ''"></DefaultUndefinePreprocessorDefinitions>
|
||||
<UndefinePreprocessorDefinitions Condition="'%(QtMOCCompile.PreprocessorDefinitions)' == ''"></UndefinePreprocessorDefinitions>
|
||||
<MOC Condition="'%(QtMOCCompile.MOC)' == ''">$(QTDIR)\bin\moc.exe</MOC>
|
||||
<ClCompileAssemblerListingLocation Condition="'%(QtMOCCompile.ClCompileAssemblerListingLocation)' == ''"></ClCompileAssemblerListingLocation>
|
||||
<ClCompileObjectFileName Condition="'%(QtMOCCompile.ClCompileObjectFileName)' == ''"></ClCompileObjectFileName>
|
||||
<ClCompileXMLDocumentationFileName Condition="'%(QtMOCCompile.ClCompileXMLDocumentationFileName)' == ''"></ClCompileXMLDocumentationFileName>
|
||||
<CommandLineTemplate>%(MOC) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
|
||||
</QtMOCCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup>
|
||||
<BuildGenerateSourcesTargets>$(BuildGenerateSourcesTargets);_QtMOCCompile</BuildGenerateSourcesTargets>
|
||||
</PropertyGroup>
|
||||
</Project>
|
137
MSBuild/QtExtensions/moc.targets
Normal file
137
MSBuild/QtExtensions/moc.targets
Normal file
|
@ -0,0 +1,137 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
||||
<AvailableItemName Include="QtMOCCompile">
|
||||
<Targets>QtMOCCompile</Targets>
|
||||
</AvailableItemName>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask
|
||||
TaskName="QtMOC"
|
||||
TaskFactory="XamlTaskFactory"
|
||||
AssemblyName="Microsoft.Build.Tasks.v4.0">
|
||||
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
|
||||
</UsingTask>
|
||||
|
||||
<Target
|
||||
Name="SelectQtMOCCompile"
|
||||
DependsOnTargets="_SelectedFiles;SelectCustomBuild"
|
||||
>
|
||||
<ItemGroup Condition="'@(SelectedFiles)' != ''">
|
||||
<QtMOCCompile
|
||||
Remove="@(QtMOCCompile)"
|
||||
Condition="'%(Identity)' != '@(SelectedFiles)'"
|
||||
/>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="QtMOCCompile"
|
||||
Condition="'@(QtMOCCompile)' != ''"
|
||||
DependsOnTargets="SelectQtMOCCompile;QtUICCompile"
|
||||
Inputs="@(QtMOCCompile)"
|
||||
Outputs="%(OutputFile)"
|
||||
>
|
||||
<Message Text="MOC %(QtMOCCompile.Identity) -> $([System.IO.Path]::GetFileName('%(QtMOCCompile.OutputFile)'))"
|
||||
Importance="high"/>
|
||||
<!-- Almost for sure this will cause issues when this target is skipped. -->
|
||||
<ItemGroup>
|
||||
<!-- Take care of other common C++ extensions. -->
|
||||
<ClCompile
|
||||
Include="%(QtMOCCompile.RootDir)%(QtMOCCompile.Directory)%(QtMOCCompile.Filename).cpp"
|
||||
Condition="!exists('%(QtMOCCompile.RootDir)%(QtMOCCompile.Directory)%(QtMOCCompile.Filename).cpp')"
|
||||
>
|
||||
<QtMOCCompileFakeItem>true</QtMOCCompileFakeItem>
|
||||
</ClCompile>
|
||||
<QtMOCCompileNoExtension Include="@(QtMOCCompile->'%(RootDir)%(Directory)%(Filename)')" />
|
||||
<ClCompileNoExtension Include="@(ClCompile->'%(RootDir)%(Directory)%(Filename)')" />
|
||||
<BuddyClCompile Include="@(ClCompileNoExtension)" Condition="'%(Identity)' == '@(QtMOCCompileNoExtension)'" />
|
||||
<QtMOCCompile>
|
||||
<DefaultIncludeDirectories Condition="'%(QtMOCCompile.DefaultIncludeDirectories)' == ''">@(BuddyClCompile->'%(AdditionalIncludeDirectories)')</DefaultIncludeDirectories>
|
||||
<DefaultPreprocessorDefinitions Condition="'%(QtMOCCompile.DefaultPreprocessorDefinitions)' == ''">@(BuddyClCompile->'%(PreprocessorDefinitions)')</DefaultPreprocessorDefinitions>
|
||||
<DefaultUndefinePreprocessorDefinitions Condition="'%(QtMOCCompile.DefaultUndefinePreprocessorDefinitions)' == ''">@(BuddyClCompile->'%(UndefinePreprocessorDefinitions)')</DefaultUndefinePreprocessorDefinitions>
|
||||
</QtMOCCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMOCCompile_tlog
|
||||
Include="%(QtMOCCompile.OutputFile)"
|
||||
Condition="'%(QtMOCCompile.OutputFile)' != '' and '%(QtMOCCompile.ExcludedFromBuild)' != 'true'"
|
||||
>
|
||||
<Source>@(QtMOCCompile, '|')</Source>
|
||||
</QtMOCCompile_tlog>
|
||||
</ItemGroup>
|
||||
<WriteLinesToFile
|
||||
Condition="'@(QtMOCCompile_tlog)' != '' and '%(QtMOCCompile_tlog.ExcludedFromBuild)' != 'true'"
|
||||
File="$(IntDir)$(ProjectName).write.1.tlog"
|
||||
Lines="^%(QtMOCCompile_tlog.Source);@(QtMOCCompile_tlog->'%(Fullpath)')"
|
||||
/>
|
||||
<MakeDir
|
||||
Directories="$([System.IO.Path]::GetDirectoryName('%(QtMOCCompile.OutputFile)'))"
|
||||
/>
|
||||
<QtMOC
|
||||
Condition="'%(QtMOCCompile.ExcludedFromBuild)' != 'true'"
|
||||
OutputFile="%(QtMOCCompile.OutputFile)"
|
||||
DoNotGenerateInclude="%(QtMOCCompile.DoNotGenerateInclude)"
|
||||
NoWarnings="%(QtMOCCompile.NoWarnings)"
|
||||
BaseIncludePath="%(QtMOCCompile.BaseIncludePath)"
|
||||
DefaultIncludeDirectories="%(QtMOCCompile.DefaultIncludeDirectories)"
|
||||
AdditionalIncludeDirectories="%(QtMOCCompile.AdditionalIncludeDirectories)"
|
||||
PreprocessOnly="%(QtMOCCompile.PreprocessOnly)"
|
||||
DefaultPreprocessorDefinitions="%(QtMOCCompile.DefaultPreprocessorDefinitions)"
|
||||
PreprocessorDefinitions="%(QtMOCCompile.PreprocessorDefinitions)"
|
||||
DefaultUndefinePreprocessorDefinitions="%(QtMOCCompile.DefaultUndefinePreprocessorDefinitions)"
|
||||
UndefinePreprocessorDefinitions="%(QtMOCCompile.UndefinePreprocessorDefinitions)"
|
||||
Inputs="%(QtMOCCompile.Identity)"
|
||||
AdditionalOptions="%(QtMOCCompile.AdditionalOptions)"
|
||||
CommandLineTemplate="%(QtMOCCompile.CommandLineTemplate)"
|
||||
/>
|
||||
<ItemGroup>
|
||||
<ClCompile
|
||||
Remove="@(ClCompile)"
|
||||
Condition="'%(ClCompile.QtMOCCompileFakeItem)' == 'true'"
|
||||
/>
|
||||
<QtMOCCompileNoExtension Remove="*" />
|
||||
<ClCompileNoExtension Remove="*" />
|
||||
<BuddyClCompile Remove="*" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="QtMOCCompileAndInclude"
|
||||
Condition="'@(QtMOCCompile)' != ''"
|
||||
DependsOnTargets="SelectQtMOCCompile;QtMOCCompile"
|
||||
>
|
||||
<ItemGroup>
|
||||
<ClCompile
|
||||
Include="%(QtMOCCompile.OutputFile)"
|
||||
Condition="'%(QtMOCCompile.ExcludedFromBuild)' != 'true'"
|
||||
>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>%(QtMOCCompile.Identity)</DependentUpon>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>%(QtMOCCompile.AdditionalIncludeDirectories);%(QtMOCCompile.DefaultIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>%(QtMOCCompile.DefaultPreprocessorDefinitions);%(QtMOCCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<UndefinePreprocessorDefinitions>%(QtMOCCompile.DefaultUndefinePreprocessorDefinitions);%(QtMOCCompile.UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
|
||||
<AssemblerListingLocation Condition="'%(QtMOCCompile.ClCompileAssemblerListingLocation)' != ''">%(QtMOCCompile.ClCompileAssemblerListingLocation)</AssemblerListingLocation>
|
||||
<ObjectFileName Condition="'%(QtMOCCompile.ClCompileObjectFileName)' != ''">%(QtMOCCompile.ClCompileObjectFileName)</ObjectFileName>
|
||||
<XMLDocumentationFileName Condition="'%(QtMOCCompile.ClCompileXMLDocumentationFileName)' != ''">%(QtMOCCompile.ClCompileXMLDocumentationFileName)</XMLDocumentationFileName>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="_QtMOCCompile"
|
||||
BeforeTargets="ClCompile"
|
||||
DependsOnTargets="$(BeforeQtMOCCompileTargets);QtMOCCompileAndInclude;$(AfterQtMOCCompileTargets)"
|
||||
/>
|
||||
</Project>
|
147
MSBuild/QtExtensions/moc.xml
Normal file
147
MSBuild/QtExtensions/moc.xml
Normal file
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<ProjectSchemaDefinitions
|
||||
xmlns="http://schemas.microsoft.com/build/2009/properties"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
>
|
||||
<Rule
|
||||
Name="QtMOC"
|
||||
DisplayName="Qt Meta Object Compiler"
|
||||
PageTemplate="tool"
|
||||
SwitchPrefix="-"
|
||||
Order="222"
|
||||
>
|
||||
<Rule.DataSource>
|
||||
<DataSource
|
||||
Persistence="ProjectFile"
|
||||
ItemType="QtMOCCompile"
|
||||
HasConfigurationCondition="true"
|
||||
/>
|
||||
</Rule.DataSource>
|
||||
<Rule.Categories>
|
||||
<Category
|
||||
Name="General"
|
||||
DisplayName="General"
|
||||
/>
|
||||
<Category
|
||||
Name="Command Line"
|
||||
DisplayName="Command Line"
|
||||
Subtype="CommandLine"
|
||||
/>
|
||||
</Rule.Categories>
|
||||
<StringProperty
|
||||
Name="OutputFile"
|
||||
Subtype="file"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/moc.html#command-line-options"
|
||||
DisplayName="Output File"
|
||||
Description="Write output to <file> rather than to standard output. (-o <file>)"
|
||||
Switch="o "[value]""
|
||||
/>
|
||||
<!-- -f -->
|
||||
<BoolProperty
|
||||
Name="DoNotGenerateInclude"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/moc.html#command-line-options"
|
||||
DisplayName="Do Not Generate Include"
|
||||
Description="Do not generate an #include statement in the output. This may be used to run the moc on on a C++ file containing one or more class declarations. You should then #include the meta-object code in the .cpp file. (-i)"
|
||||
Switch="i"
|
||||
/>
|
||||
<BoolProperty
|
||||
Name="NoWarnings"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/moc.html#command-line-options"
|
||||
DisplayName="No Warnings"
|
||||
Description="Do not generate any warnings. (Not recommended.) (-nw)"
|
||||
Switch="nw"
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="BaseIncludePath"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/moc.html#command-line-options"
|
||||
DisplayName="Base Include Path"
|
||||
Description="Makes the moc prepend <path>/ to the file name in the generated #include statement. (-p<path>)"
|
||||
Switch="p "[value]""
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="DefaultIncludeDirectories"
|
||||
Switch="I "[value]""
|
||||
Visible="false"
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="AdditionalIncludeDirectories"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/moc.html#command-line-options"
|
||||
DisplayName="Additional Include Directories"
|
||||
Description="Add dir to the include path for header files. (-I <dir>)"
|
||||
Switch="I "[value]""
|
||||
/>
|
||||
<BoolProperty
|
||||
Name="PreprocessOnly"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/moc.html#command-line-options"
|
||||
DisplayName="Preprocess Only"
|
||||
Description="Preprocess only; do not generate meta-object code. (-E)"
|
||||
Switch="E"
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="DefaultPreprocessorDefinitions"
|
||||
Switch="D "[value]""
|
||||
Visible="false"
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="PreprocessorDefinitions"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/moc.html#command-line-options"
|
||||
DisplayName="Preprocessor Definitions"
|
||||
Description="Define macro, with optional definition. (-D <macro>[=<def>])"
|
||||
Switch="D "[value]""
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="DefaultUndefinePreprocessorDefinitions"
|
||||
Switch="U "[value]""
|
||||
Visible="false"
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="UndefinePreprocessorDefinitions"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/moc.html#command-line-options"
|
||||
DisplayName="Undefine Preprocessor Definitions"
|
||||
Description="Undefine macro. (-U <macro>)"
|
||||
Switch="U "[value]""
|
||||
/>
|
||||
<StringProperty
|
||||
Name="Inputs"
|
||||
Category="Command Line"
|
||||
IsRequired="true"
|
||||
>
|
||||
<StringProperty.DataSource>
|
||||
<DataSource
|
||||
Persistence="ProjectFile"
|
||||
ItemType="QtMOCCompile"
|
||||
SourceType="Item"
|
||||
/>
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
<StringProperty
|
||||
Subtype="AdditionalOptions"
|
||||
Name="AdditionalOptions"
|
||||
Category="Command Line"
|
||||
DisplayName="Additional Options"
|
||||
F1Keyword="vc.project.AdditionalOptionsPage"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="MOC"
|
||||
Subtype="file"
|
||||
DisplayName="MOC"
|
||||
Description="Path to moc.exe"
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="CommandLineTemplate"
|
||||
Category="Command Line"
|
||||
DisplayName="Command Line"
|
||||
Visible="False"
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
</Rule>
|
||||
<ItemType Name="QtMOCCompile" DisplayName="Qt MOC Compile" />
|
||||
<FileExtension Name="*.h;*.hpp;*.hxx;*.hh" ContentType="QtMOCCompile" />
|
||||
<ContentType Name="QtMOCCompile" DisplayName="Qt MOC Compile" ItemType="QtMOCCompile" />
|
||||
</ProjectSchemaDefinitions>
|
27
MSBuild/QtExtensions/rcc.props
Normal file
27
MSBuild/QtExtensions/rcc.props
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<QtRCCCompile>
|
||||
<OutputFile Condition="'%(QtRCCCompile.OutputFile)' == ''">%(Filename)%(Extension).cpp</OutputFile>
|
||||
<ExternalInitializationFunction Condition="'%(QtRCCCompile.ExternalInitializationFunction)' == ''">%(Filename)</ExternalInitializationFunction>
|
||||
<Threshold Condition="'%(QtRCCCompile.Threshold)' == ''"></Threshold>
|
||||
<CompressLevel Condition="'%(QtRCCCompile.CompressLevel)' == ''">-1</CompressLevel>
|
||||
<Root Condition="'%(QtRCCCompile.Root)' == ''"></Root>
|
||||
<DisableCompression Condition="'%(QtRCCCompile.DisableCompression)' == ''">true</DisableCompression>
|
||||
<Binary Condition="'%(QtRCCCompile.Binary)' == ''">false</Binary>
|
||||
<RCC Condition="'%(QtRCCCompile.RCC)' == ''">$(QTDIR)\bin\rcc.exe</RCC>
|
||||
<AdditionalDependencies Condition="'%(QtRCCCompile.AdditionalDependencies)' == ''">$(QTDIR)\bin\rcc.exe;$(MSBuildProjectFile)</AdditionalDependencies>
|
||||
<ClCompileAssemblerListingLocation Condition="'%(QtMOCCompile.ClCompileAssemblerListingLocation)' == ''"></ClCompileAssemblerListingLocation>
|
||||
<ClCompileObjectFileName Condition="'%(QtMOCCompile.ClCompileObjectFileName)' == ''"></ClCompileObjectFileName>
|
||||
<ClCompileXMLDocumentationFileName Condition="'%(QtMOCCompile.ClCompileXMLDocumentationFileName)' == ''"></ClCompileXMLDocumentationFileName>
|
||||
<CommandLineTemplate>%(RCC) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
|
||||
</QtRCCCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup>
|
||||
<BuildGenerateSourcesTargets>$(BuildGenerateSourcesTargets);_QtRCCCompile</BuildGenerateSourcesTargets>
|
||||
</PropertyGroup>
|
||||
</Project>
|
124
MSBuild/QtExtensions/rcc.targets
Normal file
124
MSBuild/QtExtensions/rcc.targets
Normal file
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
||||
<AvailableItemName Include="QtRCCCompile">
|
||||
<Targets>QtRCCCompile</Targets>
|
||||
</AvailableItemName>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask
|
||||
TaskName="QtRCC"
|
||||
TaskFactory="XamlTaskFactory"
|
||||
AssemblyName="Microsoft.Build.Tasks.v4.0">
|
||||
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
|
||||
</UsingTask>
|
||||
|
||||
<Target
|
||||
Name="SelectQtRCCCompile"
|
||||
DependsOnTargets="_SelectedFiles;SelectCustomBuild"
|
||||
>
|
||||
<ItemGroup Condition="'@(SelectedFiles)' != ''">
|
||||
<QtRCCCompile
|
||||
Remove="@(QtRCCCompile)"
|
||||
Condition="'%(Identity)' != '@(SelectedFiles)'"
|
||||
/>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CalculateQtRCCDeps"
|
||||
DependsOnTargets="SelectQtRCCCompile"
|
||||
Outputs="%(QtRCCCompile.Identity)">
|
||||
<Message Text="Calculating dependencies for %(QtRCCCompile.Identity)" />
|
||||
|
||||
<!-- Look into the qrc file and fetch all the referenced files -->
|
||||
<XmlPeek XmlInputPath="%(QtRCCCompile.FullPath)"
|
||||
Query="//file/text()">
|
||||
<Output TaskParameter="Result" ItemName="QtRCCDeps" />
|
||||
</XmlPeek>
|
||||
|
||||
<!-- Add the calculated dependencies to the AdditionalDependencies -->
|
||||
<ItemGroup>
|
||||
<QtRCCCompile>
|
||||
<AdditionalDependencies>@(QtRCCDeps);%(QtRCCCompile.AdditionalDependencies)</AdditionalDependencies>
|
||||
</QtRCCCompile>
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="Actual Dependencies: @(QtRCCCompile->'%(AdditionalDependencies)')" />
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="QtRCCCompile"
|
||||
Condition="'@(QtRCCCompile)' != ''"
|
||||
DependsOnTargets="SelectQtRCCCompile;CalculateQtRCCDeps"
|
||||
Inputs="@(QtRCCCompile);%(QtRCCCompile.AdditionalDependencies);"
|
||||
Outputs="%(OutputFile)"
|
||||
>
|
||||
<Message Text="RCC %(QtRCCCompile.Identity) -> $([System.IO.Path]::GetFileName('%(QtRCCCompile.OutputFile)'))"
|
||||
Importance="high"/>
|
||||
<ItemGroup>
|
||||
<QtRCCCompile_tlog
|
||||
Include="%(QtRCCCompile.OutputFile)"
|
||||
Condition="'%(QtRCCCompile.OutputFile)' != '' and '%(QtRCCCompile.ExcludedFromBuild)' != 'true'"
|
||||
>
|
||||
<Source>@(QtRCCCompile, '|')</Source>
|
||||
</QtRCCCompile_tlog>
|
||||
</ItemGroup>
|
||||
<WriteLinesToFile
|
||||
Condition="'@(QtRCCCompile_tlog)' != '' and '%(QtRCCCompile_tlog.ExcludedFromBuild)' != 'true'"
|
||||
File="$(IntDir)$(ProjectName).write.1.tlog"
|
||||
Lines="^%(QtRCCCompile_tlog.Source);@(QtRCCCompile_tlog->'%(Fullpath)')"
|
||||
/>
|
||||
<MakeDir
|
||||
Directories="$([System.IO.Path]::GetDirectoryName('%(QtRCCCompile.OutputFile)'))"
|
||||
/>
|
||||
<QtRCC
|
||||
Condition="'%(QtRCCCompile.ExcludedFromBuild)' != 'true'"
|
||||
OutputFile="%(QtRCCCompile.OutputFile)"
|
||||
ExternalInitializationFunction="%(QtRCCCompile.ExternalInitializationFunction)"
|
||||
Threshold="%(QtRCCCompile.Threshold)"
|
||||
CompressLevel="%(QtRCCCompile.CompressLevel)"
|
||||
Root="%(QtRCCCompile.Root)"
|
||||
DisableCompression="%(QtRCCCompile.DisableCompression)"
|
||||
Binary="%(QtRCCCompile.Binary)"
|
||||
Inputs="%(QtRCCCompile.Identity)"
|
||||
AdditionalOptions="%(QtRCCCompile.AdditionalOptions)"
|
||||
CommandLineTemplate="%(QtRCCCompile.CommandLineTemplate)"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="QtRCCCompileAndInclude"
|
||||
Condition="'@(QtRCCCompile)' != ''"
|
||||
DependsOnTargets="SelectQtRCCCompile;QtRCCCompile"
|
||||
>
|
||||
<ItemGroup>
|
||||
<ClCompile
|
||||
Include="%(QtRCCCompile.OutputFile)"
|
||||
Condition="'%(QtRCCCompile.ExcludedFromBuild)' != 'true'"
|
||||
>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>%(QtRCCCompile.Identity)</DependentUpon>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AssemblerListingLocation Condition="'%(QtRCCCompile.ClCompileAssemblerListingLocation)' != ''">%(QtRCCCompile.ClCompileAssemblerListingLocation)</AssemblerListingLocation>
|
||||
<ObjectFileName Condition="'%(QtRCCCompile.ClCompileObjectFileName)' != ''">%(QtRCCCompile.ClCompileObjectFileName)</ObjectFileName>
|
||||
<XMLDocumentationFileName Condition="'%(QtRCCCompile.ClCompileXMLDocumentationFileName)' != ''">%(QtRCCCompile.ClCompileXMLDocumentationFileName)</XMLDocumentationFileName>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="_QtRCCCompile"
|
||||
BeforeTargets="ClCompile"
|
||||
DependsOnTargets="$(BeforeQtRCCCompileTargets);QtRCCCompileAndInclude;$(AfterQtRCCCompileTargets)"
|
||||
/>
|
||||
</Project>
|
173
MSBuild/QtExtensions/rcc.xml
Normal file
173
MSBuild/QtExtensions/rcc.xml
Normal file
|
@ -0,0 +1,173 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<ProjectSchemaDefinitions
|
||||
xmlns="http://schemas.microsoft.com/build/2009/properties"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
>
|
||||
<Rule
|
||||
Name="QtRCC"
|
||||
DisplayName="Qt Resource Compiler"
|
||||
PageTemplate="tool"
|
||||
SwitchPrefix="-"
|
||||
Order="223"
|
||||
>
|
||||
<Rule.DataSource>
|
||||
<DataSource
|
||||
Persistence="ProjectFile"
|
||||
ItemType="QtRCCCompile"
|
||||
HasConfigurationCondition="true"
|
||||
/>
|
||||
</Rule.DataSource>
|
||||
<Rule.Categories>
|
||||
<Category
|
||||
Name="General"
|
||||
DisplayName="General"
|
||||
/>
|
||||
<Category
|
||||
Name="Command Line"
|
||||
DisplayName="Command Line"
|
||||
Subtype="CommandLine"
|
||||
/>
|
||||
</Rule.Categories>
|
||||
<StringProperty
|
||||
Name="OutputFile"
|
||||
Subtype="file"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/rcc.html"
|
||||
DisplayName="Output File"
|
||||
Description="Write output to file rather than to stdout. (-o <file>)"
|
||||
Switch="o "[value]""
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="ExternalInitializationFunction"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/rcc.html"
|
||||
DisplayName="External Initialization Function"
|
||||
Description="Create an external initialization function with name. (-name <name>)"
|
||||
Switch="name "[value]""
|
||||
/>
|
||||
<IntProperty
|
||||
Name="Threshold"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/rcc.html"
|
||||
DisplayName="Threshold"
|
||||
Description="Specifies a threshold level (as a percentage) to use when deciding whether to compress a file. If the reduction in the file size is greater than the threshold level, it is compressed; otherwise, the uncompressed data is stored instead. The default threshold level is 70%, meaning that compressed files which are 30% or less of their original size are stored as compressed data. (-threshold <level>)"
|
||||
Switch="threshold [value]"
|
||||
MinValue="0"
|
||||
MaxValue="100"
|
||||
/>
|
||||
<EnumProperty
|
||||
Name="CompressLevel"
|
||||
DisplayName="Compress Level"
|
||||
Description="Compress input files to the given compression level, which is an integer in the range 1 to 9. Level 1 does the least compression but is fastest. Level 9 does the most compression but is slowest. To turn off compression, use -no-compress. The default value for level is -1, which means use zlib's default compression level. (-compress <level>)"
|
||||
Switch="compress [value]"
|
||||
>
|
||||
<EnumValue
|
||||
Name="-1"
|
||||
DisplayName="-1 (zlib's default)"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="1"
|
||||
DisplayName="1 (least)"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="2"
|
||||
DisplayName="2"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="3"
|
||||
DisplayName="3"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="4"
|
||||
DisplayName="4"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="5"
|
||||
DisplayName="5"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="6"
|
||||
DisplayName="6"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="7"
|
||||
DisplayName="7"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="8"
|
||||
DisplayName="8"
|
||||
/>
|
||||
<EnumValue
|
||||
Name="9"
|
||||
DisplayName="9 (most)"
|
||||
/>
|
||||
</EnumProperty>
|
||||
<StringListProperty
|
||||
Name="Root"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/rcc.html"
|
||||
DisplayName="Root"
|
||||
Description="Prefix the resource access path with path. The default is no prefix. (-root <path>)"
|
||||
Switch="root "[value]""
|
||||
/>
|
||||
<BoolProperty
|
||||
Name="DisableCompression"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/rcc.html"
|
||||
DisplayName="Disable Compression"
|
||||
Description="Disable compression. (-no-compress)"
|
||||
Switch="no-compress"
|
||||
/>
|
||||
<BoolProperty
|
||||
Name="Binary"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/rcc.html"
|
||||
DisplayName="Binary"
|
||||
Description="Output a binary file for use as a dynamic resource. (-binary)"
|
||||
Switch="binary"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="Inputs"
|
||||
Category="Command Line"
|
||||
IsRequired="true"
|
||||
>
|
||||
<StringProperty.DataSource>
|
||||
<DataSource
|
||||
Persistence="ProjectFile"
|
||||
ItemType="QtRCCCompile"
|
||||
SourceType="Item"
|
||||
/>
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
<StringProperty
|
||||
Subtype="AdditionalOptions"
|
||||
Name="AdditionalOptions"
|
||||
Category="Command Line"
|
||||
DisplayName="Additional Options"
|
||||
F1Keyword="vc.project.AdditionalOptionsPage"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="RCC"
|
||||
Subtype="file"
|
||||
DisplayName="RCC"
|
||||
Description="Path to rcc.exe"
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="AdditionalDependencies"
|
||||
Subtype="file"
|
||||
DisplayName="Additional Dependencies"
|
||||
Description="Provide additional dependencies that affect the end result. Note: files, listed inside the QRC are determined automatically and should not be added manually."
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="CommandLineTemplate"
|
||||
Category="Command Line"
|
||||
DisplayName="Command Line"
|
||||
Visible="False"
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
</Rule>
|
||||
<ItemType Name="QtRCCCompile" DisplayName="Qt RRC Compile" />
|
||||
<FileExtension Name="*.qrc" ContentType="QtRCCCompile" />
|
||||
<ContentType Name="QtRCCCompile" DisplayName="Qt RRC Compile" ItemType="QtRCCCompile" />
|
||||
</ProjectSchemaDefinitions>
|
19
MSBuild/QtExtensions/uic.props
Normal file
19
MSBuild/QtExtensions/uic.props
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<QtUICCompile>
|
||||
<OutputFile Condition="'%(QtUICCompile.OutputFile)' == ''">%(Filename)%(Extension).h</OutputFile>
|
||||
<TranslationFunction Condition="'%(QtUICCompile.TranslationFunction)' == ''"></TranslationFunction>
|
||||
<DontGenerateHeaderGuards Condition="'%(QtUICCompile.DontGenerateHeaderGuards)' == ''">false</DontGenerateHeaderGuards>
|
||||
<UIC Condition="'%(QtUICCompile.UIC)' == ''">$(QTDIR)\bin\uic.exe</UIC>
|
||||
<CommandLineTemplate>%(UIC) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
|
||||
</QtUICCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup>
|
||||
<BuildGenerateSourcesTargets>$(BuildGenerateSourcesTargets);_QtUICCompile</BuildGenerateSourcesTargets>
|
||||
</PropertyGroup>
|
||||
</Project>
|
94
MSBuild/QtExtensions/uic.targets
Normal file
94
MSBuild/QtExtensions/uic.targets
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
||||
<AvailableItemName Include="QtUICCompile">
|
||||
<Targets>QtUICCompile</Targets>
|
||||
</AvailableItemName>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask
|
||||
TaskName="QtUIC"
|
||||
TaskFactory="XamlTaskFactory"
|
||||
AssemblyName="Microsoft.Build.Tasks.v4.0">
|
||||
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
|
||||
</UsingTask>
|
||||
|
||||
<Target
|
||||
Name="SelectQtUICCompile"
|
||||
DependsOnTargets="_SelectedFiles;SelectCustomBuild"
|
||||
>
|
||||
<ItemGroup Condition="'@(SelectedFiles)' != ''">
|
||||
<QtUICCompile
|
||||
Remove="@(QtUICCompile)"
|
||||
Condition="'%(Identity)' != '@(SelectedFiles)'"
|
||||
/>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="QtUICCompile"
|
||||
Condition="'@(QtUICCompile)' != ''"
|
||||
DependsOnTargets="SelectQtUICCompile"
|
||||
Inputs="@(QtUICCompile)"
|
||||
Outputs="%(OutputFile)"
|
||||
>
|
||||
<Message Text="UIC %(QtUICCompile.Identity) -> $([System.IO.Path]::GetFileName('%(QtUICCompile.OutputFile)'))"
|
||||
Importance="high"/>
|
||||
<ItemGroup>
|
||||
<QtUICCompile_tlog
|
||||
Include="%(QtUICCompile.OutputFile)"
|
||||
Condition="'%(QtUICCompile.OutputFile)' != '' and '%(QtUICCompile.ExcludedFromBuild)' != 'true'"
|
||||
>
|
||||
<Source>@(QtUICCompile, '|')</Source>
|
||||
</QtUICCompile_tlog>
|
||||
</ItemGroup>
|
||||
<WriteLinesToFile
|
||||
Condition="'@(QtUICCompile_tlog)' != '' and '%(QtUICCompile_tlog.ExcludedFromBuild)' != 'true'"
|
||||
File="$(IntDir)$(ProjectName).write.1.tlog"
|
||||
Lines="^%(QtUICCompile_tlog.Source);@(QtUICCompile_tlog->'%(Fullpath)')"
|
||||
/>
|
||||
<MakeDir
|
||||
Directories="$([System.IO.Path]::GetDirectoryName('%(QtUICCompile.OutputFile)'))"
|
||||
/>
|
||||
<QtUIC
|
||||
Condition="'%(QtUICCompile.ExcludedFromBuild)' != 'true'"
|
||||
OutputFile="%(QtUICCompile.OutputFile)"
|
||||
TranslationFunction="%(QtUICCompile.TranslationFunction)"
|
||||
DontGenerateHeaderGuards="%(QtUICCompile.DontGenerateHeaderGuards)"
|
||||
Inputs="%(QtUICCompile.Identity)"
|
||||
AdditionalOptions="%(QtUICCompile.AdditionalOptions)"
|
||||
CommandLineTemplate="%(QtUICCompile.CommandLineTemplate)"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="QtUICCompileAndInclude"
|
||||
Condition="'@(QtUICCompile)' != ''"
|
||||
DependsOnTargets="SelectQtUICCompile;QtUICCompile"
|
||||
>
|
||||
<ItemGroup>
|
||||
<ClInclude
|
||||
Include="%(QtUICCompile.OutputFile)"
|
||||
Condition="'%(QtUICCompile.ExcludedFromBuild)' != 'true'"
|
||||
>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>%(QtUICCompile.Identity)</DependentUpon>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="_QtUICCompile"
|
||||
BeforeTargets="ClCompile"
|
||||
DependsOnTargets="$(BeforeQtUICCompileTargets);QtUICCompileAndInclude;$(AfterQtUICCompileTargets)"
|
||||
/>
|
||||
</Project>
|
96
MSBuild/QtExtensions/uic.xml
Normal file
96
MSBuild/QtExtensions/uic.xml
Normal file
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is (c) 2013 Adam Badura.
|
||||
Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file.
|
||||
-->
|
||||
<ProjectSchemaDefinitions
|
||||
xmlns="http://schemas.microsoft.com/build/2009/properties"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
>
|
||||
<Rule
|
||||
Name="QtUIC"
|
||||
DisplayName="Qt User Interface Compiler"
|
||||
PageTemplate="tool"
|
||||
SwitchPrefix="-"
|
||||
Order="221"
|
||||
>
|
||||
<Rule.DataSource>
|
||||
<DataSource
|
||||
Persistence="ProjectFile"
|
||||
ItemType="QtUICCompile"
|
||||
HasConfigurationCondition="true"
|
||||
/>
|
||||
</Rule.DataSource>
|
||||
<Rule.Categories>
|
||||
<Category
|
||||
Name="General"
|
||||
DisplayName="General"
|
||||
/>
|
||||
<Category
|
||||
Name="Command Line"
|
||||
DisplayName="Command Line"
|
||||
Subtype="CommandLine"
|
||||
/>
|
||||
</Rule.Categories>
|
||||
<StringProperty
|
||||
Name="OutputFile"
|
||||
Subtype="file"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/uic.html"
|
||||
DisplayName="Output File"
|
||||
Description="Write output to <file> instead of to standard output. (-o <file>)"
|
||||
Switch="o "[value]""
|
||||
/>
|
||||
<StringListProperty
|
||||
Name="TranslationFunction"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/uic.html"
|
||||
DisplayName="Translation Function"
|
||||
Description="Use <func> for translating strings instead of tr(). (-tr <func>)"
|
||||
Switch="tr "[value]""
|
||||
/>
|
||||
<BoolProperty
|
||||
Name="DontGenerateHeaderGuards"
|
||||
HelpUrl="http://qt-project.org/doc/qt-5.0/qtdoc/uic.html"
|
||||
DisplayName="Don't Generate Header Guards"
|
||||
Description="Don't generate guards against multiple inclusion (#ifndef FOO_H …). (-p)"
|
||||
Switch="p"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="Inputs"
|
||||
Category="Command Line"
|
||||
IsRequired="true"
|
||||
>
|
||||
<StringProperty.DataSource>
|
||||
<DataSource
|
||||
Persistence="ProjectFile"
|
||||
ItemType="QtUICCompile"
|
||||
SourceType="Item"
|
||||
/>
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
<StringProperty
|
||||
Subtype="AdditionalOptions"
|
||||
Name="AdditionalOptions"
|
||||
Category="Command Line"
|
||||
DisplayName="Additional Options"
|
||||
F1Keyword="vc.project.AdditionalOptionsPage"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="UIC"
|
||||
Subtype="file"
|
||||
DisplayName="UIC"
|
||||
Description="Path to uic.exe"
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="CommandLineTemplate"
|
||||
Category="Command Line"
|
||||
DisplayName="Command Line"
|
||||
Visible="False"
|
||||
IncludeInCommandLine="False"
|
||||
/>
|
||||
</Rule>
|
||||
<ItemType Name="QtUICCompile" DisplayName="Qt UIC Compile" />
|
||||
<FileExtension Name="*.ui" ContentType="QtUICCompile" />
|
||||
<ContentType Name="QtUICCompile" DisplayName="Qt UIC Compile" ItemType="QtUICCompile" />
|
||||
</ProjectSchemaDefinitions>
|
|
@ -5,7 +5,9 @@ IDI_ICON2 ICON DISCARDABLE "icons/programicon_old.ico"
|
|||
#define GOLDENDICT_VER 1,5,0,0
|
||||
#define GOLDENDICT_VER_STR "1.5.0"
|
||||
|
||||
#ifndef _MSC_VER // Visual Studio embeds the manifest automatically
|
||||
1 RT_MANIFEST GoldenDict.exe.manifest
|
||||
#endif
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION GOLDENDICT_VER
|
||||
|
|
38
goldendict.sln
Normal file
38
goldendict.sln
Normal file
|
@ -0,0 +1,38 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "goldendict", "goldendict.vcxproj", "{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Debug-Qt4|Win32 = Debug-Qt4|Win32
|
||||
Debug-Qt4|x64 = Debug-Qt4|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Release-Qt4|Win32 = Release-Qt4|Win32
|
||||
Release-Qt4|x64 = Release-Qt4|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Debug|x64.Build.0 = Debug|x64
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Debug-Qt4|Win32.ActiveCfg = Debug-Qt4|Win32
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Debug-Qt4|Win32.Build.0 = Debug-Qt4|Win32
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Debug-Qt4|x64.ActiveCfg = Debug-Qt4|x64
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Debug-Qt4|x64.Build.0 = Debug-Qt4|x64
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Release|Win32.Build.0 = Release|Win32
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Release|x64.ActiveCfg = Release|x64
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Release|x64.Build.0 = Release|x64
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Release-Qt4|Win32.ActiveCfg = Release-Qt4|Win32
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Release-Qt4|Win32.Build.0 = Release-Qt4|Win32
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Release-Qt4|x64.ActiveCfg = Release-Qt4|x64
|
||||
{C3D65E5B-B7EE-3F85-B73F-6D65D9C501A8}.Release-Qt4|x64.Build.0 = Release-Qt4|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
1382
goldendict.vcxproj
Normal file
1382
goldendict.vcxproj
Normal file
File diff suppressed because it is too large
Load diff
1932
goldendict.vcxproj.filters
Normal file
1932
goldendict.vcxproj.filters
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue