<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (c) 2011 Niels Martin Hansen
  All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.
    * Neither the name of the Aegisub Group nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.

  Aegisub Project http://www.aegisub.org/
-->
<Rule Name="AegisubConfig"
    DisplayName="Aegisub"
    Order="1"
    PageTemplate="tool"
    xmlns="http://schemas.microsoft.com/build/2009/properties">

  <Rule.DataSource>
    <DataSource Persistence="UserFile" ItemType="" HasConfigurationCondition="true" />
  </Rule.DataSource>

  <Rule.Categories>
    <Category Name="Config" DisplayName="Configuration" Description="General build configuration" />
    <Category Name="Features" DisplayName="External libraries" Description="Control which optional external libraries to use" />
    <Category Name="Paths" DisplayName="Library paths" Description="Configure third-party library paths" />
  </Rule.Categories>

  <!-- Config -->
  <BoolProperty
    Name="StartupLog"
    DisplayName="Start-up logging"
    Description="Enable verbose startup logging to help figuration out where an error occurs"
    Category="Config"
    />

  <StringProperty
    Name="AegisubBuildCredit"
    Category="Config"
    DisplayName="Build credit"
    Description="Name the build should be credited to. Appears in the about box, and in the title bar of development builds."
    />

    <BoolProperty
     Name="AegisubUseUpdateChecker"
     Category="Config"
     DisplayName="Enable Update Checker"
     Description="Specify whether to enable the update checker. Should be disabled if you will be distributing builds via something that has its own update checking functionality."
     />
   <StringProperty
     Name="UpdateCheckerServer"
     Category="Config"
     DisplayName="Update Checker Server"
     Description="Server name to connect to for updates."
     />
   <StringProperty
     Name="UpdateCheckerURL"
     Category="Config"
     DisplayName="Update Checker URL"
     Description="URL to get for updates."
     />
   <StringProperty
     Name="MsgFmtPath"
     Category="Config"
     DisplayName="msgfmt.exe location"
     Description="Location of msgfmt.exe, for compiling translations"
     />

   <!-- External Libraries -->
  <BoolProperty
    Name="AegisubUseAvisynth"
    Category="Features"
    DisplayName="Avisynth"
    Description="Enable the Avisynth audio and video providers. This is experimental on x64. This has no external build dependencies."
    />

  <EnumProperty
    Name="AegisubUseCsri"
    DisplayName="Use CSRI subtitle renderer"
    Description="Specify whether to include support for CSRI subtitle rendering. The included helper library dynamically loads CSRI renderers, while linking another library allows you to e.g. link VSFilter.dll directly."
    Category="Features"
    >
    <EnumValue Name="HelperLibrary" DisplayName="Use included helper library" Description="Use the included helper library to dynamically load CSRI renderers." />
    <EnumValue Name="External" DisplayName="Link other library" Description="Use another CSRI renderer" />
    <EnumValue Name="false" DisplayName="No CSRI support" Description="Do not use CSRI" />
  </EnumProperty>

  <BoolProperty
    Name="AegisubUseDSound"
    Category="Features"
    DisplayName="DirectSound"
    Description="Enable the DirectSound-based audio player"
    />

  <BoolProperty
    Name="AegisubUseFfms"
    Category="Features"
    DisplayName="FFMS2"
    Description="Enable the FFMS2 audio and video providers. Requires copies of the FFMS2 and FFmpeg/libav source"
    />

  <BoolProperty
    Name="AegisubUseFftw"
    Category="Features"
    DisplayName="FFTW"
    Description="A high-speed fourier transformation library which improves the spectograph speed and quality. Requires a copy of the FFTW 3.2 source."
    />

  <BoolProperty
    Name="AegisubUseOpenAl"
    Category="Features"
    DisplayName="OpenAL"
    Description="OpenAL audio player. Requires a copy of the OpenAL SDK."
    />

  <!-- Library Paths -->
  <StringProperty
    Subtype="folder"
    Name="WinRarPath"
    Category="Paths"
    DisplayName="WinRAR.exe location"
    Description="Location of a copy of WinRAR.exe. Required to build the portable installer."
    />

  <StringProperty
    Subtype="folder"
    Name="BoostPath"
    Category="Paths"
    DisplayName="Boost root path"
    Description="Location of a copy of boost."
    />

  <StringProperty
    Subtype="folder"
    Name="CsriLibraryPath"
    Category="Paths"
    DisplayName="External CSRI library path"
    Description="Location of external CSRI library files, for when not using the CSRI helper library."
    />
  <StringProperty
    Subtype="file"
    Name="CsriLibraryName"
    Category="Paths"
    DisplayName="External CSRI library name"
    Description="Name of external CSRI library, for when not using the CSRI helper library"
    />

  <StringProperty
    Subtype="folder"
    Name="FfmsSrcDir"
    Category="Paths"
    DisplayName="FFMS2 source path"
    Description="Location of FFMS2 source code."
    />

  <StringProperty
    Subtype="folder"
    Name="FfmpegSrcDir"
    Category="Paths"
    DisplayName="FFmpeg/libav source path"
    Description="Location of FFmpeg or libav source code. Required for FFMS2."
    />

  <StringProperty
    Subtype="folder"
    Name="FftwSrcDir"
    Category="Paths"
    DisplayName="FFTW 3 source path"
    Description="Location of FFTW 3 source code."
    />

  <StringProperty
    Subtype="folder"
    Name="Freetype2SrcDir"
    Category="Paths"
    DisplayName="Freetype 2 source path"
    Description="Location of Freetype 2 source code. Required for libass and fontconfig."
    />

  <StringProperty
    Subtype="folder"
    Name="FribidiSrcDir"
    Category="Paths"
    DisplayName="Fribidi source path"
    Description="Location of Fribidi source code. Required for libass."
    />

  <StringProperty
    Subtype="folder"
    Name="FontconfigSrcDir"
    Category="Paths"
    DisplayName="Fontconfig source path"
    Description="Location of Fontconfig source code."
    />

  <StringProperty
    Subtype="folder"
    Name="IcuSrcDir"
    Category="Paths"
    DisplayName="ICU source path"
    Description="Location of ICU source code."
    />

  <StringProperty
    Subtype="folder"
    Name="GtestSrcDir"
    Category="Paths"
    DisplayName="googletest source path"
    Description="Location of googletest source code."
    />

  <StringProperty
    Subtype="folder"
    Name="LibassSrcDir"
    Category="Paths"
    DisplayName="libass source path"
    Description="Location of libass source code."
    />

  <StringProperty
    Subtype="folder"
    Name="WxSrcDir"
    Category="Paths"
    DisplayName="wxWidgets source path"
    Description="Location of wxWidgets source code."
    />

  <StringProperty
    Subtype="folder"
    Name="ZlibSrcDir"
    Category="Paths"
    DisplayName="zlib source path"
    Description="Location of zlib source code. Required for FFMS2."
    />
</Rule>
