mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 19:44:06 +00:00
ba94dd1314
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
95 lines
3.1 KiB
XML
95 lines
3.1 KiB
XML
<?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>
|