forked from mia/Aegisub
Produce a default config_windows.h file if one doesn't already exist.
Allow setting the BUILD_CREDIT define through a property page. Originally committed to SVN as r5224.
This commit is contained in:
parent
652a8c7806
commit
7713ea20e0
3 changed files with 80 additions and 20 deletions
|
@ -63,12 +63,44 @@
|
|||
/>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="CreateDefaultConfigurationHeader"
|
||||
BeforeTargets="PrepareForBuild"
|
||||
Condition="'@(CreateDefaultConfigurationHeader)' != ''"
|
||||
>
|
||||
<PropertyGroup>
|
||||
<AegisubMustCreateConfigurationHeader Condition="!Exists('%(CreateDefaultConfigurationHeader.TargetFile)')">true</AegisubMustCreateConfigurationHeader>
|
||||
</PropertyGroup>
|
||||
<Warning
|
||||
Condition="'$(AegisubMustCreateConfigurationHeader)'=='true'"
|
||||
Text="Creating default configuration file. You should edit this file to customise the build."
|
||||
/>
|
||||
<Error
|
||||
Condition="!Exists('%(CreateDefaultConfigurationHeader.TemplateFile)') and '$(AegisubMustCreateConfigurationHeader)'=='true'"
|
||||
Text="The configuration file template was not found."
|
||||
/>
|
||||
<Copy
|
||||
Condition="'$(AegisubMustCreateConfigurationHeader)'=='true'"
|
||||
SourceFiles="%(CreateDefaultConfigurationHeader.TemplateFile)"
|
||||
DestinationFiles="%(CreateDefaultConfigurationHeader.TargetFile)"
|
||||
/>
|
||||
<Message
|
||||
Condition="'$(AegisubMustCreateConfigurationHeader)'=='true'"
|
||||
Text="Created %(CreateDefaultConfigurationHeader.TargetFile)"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
|
||||
<ItemDefinitionGroup Condition="'$(AegisubBuildCredit)'!=''">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>BUILD_CREDIT="$(AegisubBuildCredit)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Aegisub.xml" />
|
||||
<ProjectTools Include="SubWCRev" />
|
||||
<AvailableItemName Include="SubWCRev">
|
||||
<Targets>SubWCRev</Targets>
|
||||
</AvailableItemName>
|
||||
<ProjectTools Include="SubWCRev;CreateDefaultConfigurationHeader" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -82,10 +82,15 @@
|
|||
<OutputFile>$(AegisubSourceBase)build\svn-revision.h</OutputFile>
|
||||
<Repository>$(AegisubSourceBase)\.</Repository>
|
||||
</SubWCRev>
|
||||
<CreateDefaultConfigurationHeader>
|
||||
<TemplateFile>$(AegisubSourceBase)src\config\config_windows0.h</TemplateFile>
|
||||
<TargetFile>$(AegisubSourceBase)src\config\config_windows.h</TargetFile>
|
||||
</CreateDefaultConfigurationHeader>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Source files -->
|
||||
<ItemGroup>
|
||||
<SubWCRev Include="$(AegisubSourceBase)build\svn-revision-base.h" />
|
||||
<CreateDefaultConfigurationHeader Include="$(AegisubSourceBase)src\config\config_windows.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(SrcDir)aegisublocale.h" />
|
||||
|
|
|
@ -32,24 +32,32 @@
|
|||
$Id$
|
||||
-->
|
||||
<Rule Name="SubWCRev"
|
||||
DisplayName="TortoiseSVN SubWCRev"
|
||||
DisplayName="Aegisub"
|
||||
Order="110"
|
||||
PageTemplate="tool"
|
||||
xmlns="http://schemas.microsoft.com/build/2009/properties">
|
||||
|
||||
|
||||
<Rule.Categories>
|
||||
<Category Name="General" DisplayName="General" Description="General" />
|
||||
<Category Name="BuildInfo" DisplayName="Build information" Description="Embed build information" />
|
||||
</Rule.Categories>
|
||||
|
||||
<Rule.DataSource>
|
||||
<DataSource Persistence="ProjectFile" ItemType="SubWCRev" HasConfigurationCondition="false" />
|
||||
</Rule.DataSource>
|
||||
<StringProperty
|
||||
Name="AegisubBuildCredit"
|
||||
Category="BuildInfo"
|
||||
DisplayName="Build credit"
|
||||
Description="Name the build should be credited to. Appears in the about box, and in the title bar of development builds."
|
||||
Default="Anonymous"
|
||||
>
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="UserFile" ItemType="" HasConfigurationCondition="false" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty
|
||||
Name="SubWCRevExe"
|
||||
Subtype="file"
|
||||
Category="General"
|
||||
Subtype="file"
|
||||
Category="BuildInfo"
|
||||
DisplayName="SubWCRev.exe"
|
||||
Description="Location of the SubWCRev.exe file used to process SVN working copies. Changes to this setting are stored in user settings, not in the main project file."
|
||||
Default="SubWCRev.exe"
|
||||
|
@ -61,25 +69,40 @@
|
|||
|
||||
<StringProperty
|
||||
Name="InputFile"
|
||||
Subtype="file"
|
||||
Category="General"
|
||||
Subtype="file"
|
||||
Category="BuildInfo"
|
||||
DisplayName="Input file"
|
||||
Description="Template file to insert data to."
|
||||
/>
|
||||
ReadOnly="true"
|
||||
>
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="ProjectFile" ItemType="SubWCRev" HasConfigurationCondition="false" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
<StringProperty
|
||||
Name="OutputFile"
|
||||
Subtype="file"
|
||||
Category="General"
|
||||
Subtype="file"
|
||||
Category="BuildInfo"
|
||||
DisplayName="Output file"
|
||||
Description="File to generate from the template file."
|
||||
/>
|
||||
ReadOnly="true"
|
||||
>
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="ProjectFile" ItemType="SubWCRev" HasConfigurationCondition="false" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
<StringProperty
|
||||
Name="Repository"
|
||||
Subtype="folder"
|
||||
Category="General"
|
||||
Subtype="folder"
|
||||
Category="BuildInfo"
|
||||
DisplayName="Working copy location"
|
||||
Description="Location of SVN working copy to extract data from."
|
||||
/>
|
||||
ReadOnly="true"
|
||||
>
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="ProjectFile" ItemType="SubWCRev" HasConfigurationCondition="false" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
|
||||
</Rule>
|
||||
|
|
Loading…
Reference in a new issue