forked from mia/Aegisub
Obey the platform/configuration set in the UI for ffmpeg and fribidi
This commit is contained in:
parent
eaf66ea329
commit
0be698965a
7 changed files with 95 additions and 82 deletions
|
@ -45,9 +45,12 @@
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<!-- Update git_version.h -->
|
<!-- Update git_version.h -->
|
||||||
<UsingTask TaskName="ExecShellScript" AssemblyFile="$(AegisubBinaryDir)\BuildTasks.dll" />
|
|
||||||
<Target Name="UpdateVersion" BeforeTargets="ClCompile">
|
<Target Name="UpdateVersion" BeforeTargets="ClCompile">
|
||||||
<ExecShellScript Script="../../build/version.sh" Arguments=".." />
|
<ExecShellScript
|
||||||
|
Command="$(MSBuildThisFileDirectory)..\version.sh"
|
||||||
|
WorkingDirectory="$(AegisubSourceBase)"
|
||||||
|
Configuration="@(ExecShellScript)"
|
||||||
|
Arguments=".." />
|
||||||
</Target>
|
</Target>
|
||||||
<!-- Project References -->
|
<!-- Project References -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -34,36 +34,26 @@ let propertyMap (be : IBuildEngine) =
|
||||||
|> Seq.map (fun x -> (x.Name, x.EvaluatedValue))
|
|> Seq.map (fun x -> (x.Name, x.EvaluatedValue))
|
||||||
|> Map.ofSeq
|
|> Map.ofSeq
|
||||||
|
|
||||||
/// Convert a windows path possibly relative to the Aegisub project file to an
|
/// Convert an absolute windows path to an msys path
|
||||||
/// absolute msys path
|
let mungePath path =
|
||||||
let mungePath projectDir path =
|
|
||||||
let matchre pat str =
|
let matchre pat str =
|
||||||
let m = System.Text.RegularExpressions.Regex.Match(str, pat)
|
let m = System.Text.RegularExpressions.Regex.Match(str, pat)
|
||||||
if m.Success
|
if m.Success
|
||||||
then List.tail [ for g in m.Groups -> g.Value ]
|
then List.tail [ for g in m.Groups -> g.Value ]
|
||||||
else []
|
else []
|
||||||
match IO.Path.Combine(projectDir, path) |> matchre "([A-Za-z]):\\\\(.*)" with
|
match matchre "([A-Za-z]):\\\\(.*)" path with
|
||||||
| drive :: path :: [] -> sprintf "/%s/%s" drive (path.Replace('\\', '/'))
|
| drive :: path :: [] -> sprintf "/%s/%s" drive (path.Replace('\\', '/'))
|
||||||
| _ -> failwith <| sprintf "Bad path: '%s' '%s'" projectDir path
|
| _ -> path
|
||||||
|
|
||||||
type ShellWrapper(props : Map<String, String>) =
|
type ShellWrapper(conf : ITaskItem) =
|
||||||
inherit ToolTask()
|
inherit ToolTask()
|
||||||
|
|
||||||
let cwd = function
|
|
||||||
| null | "" -> props.["AegisubSourceBase"]
|
|
||||||
| x -> if not <| IO.Directory.Exists x then ignore <| IO.Directory.CreateDirectory(x)
|
|
||||||
x
|
|
||||||
|
|
||||||
member val Arguments = "" with get, set
|
member val Arguments = "" with get, set
|
||||||
member val WorkingDirectory = "" with get, set
|
member val WorkingDirectory = "" with get, set
|
||||||
|
|
||||||
member this.callScript scriptName args =
|
|
||||||
this.Arguments <- sprintf "%s %s" (mungePath props.["ProjectDir"] scriptName) args
|
|
||||||
this.Execute()
|
|
||||||
|
|
||||||
// ToolTask overrides
|
// ToolTask overrides
|
||||||
override val ToolName = "sh.exe" with get
|
override val ToolName = "sh.exe" with get
|
||||||
override this.GenerateFullPathToTool() = sprintf "%s\\bin\\sh.exe" props.["MsysBasePath"]
|
override this.GenerateFullPathToTool() = conf.GetMetadata "Sh"
|
||||||
override this.GenerateCommandLineCommands() = this.Arguments
|
override this.GenerateCommandLineCommands() = this.Arguments
|
||||||
override this.GetWorkingDirectory() = this.WorkingDirectory
|
override this.GetWorkingDirectory() = this.WorkingDirectory
|
||||||
|
|
||||||
|
@ -71,43 +61,33 @@ type ShellWrapper(props : Map<String, String>) =
|
||||||
if this.GenerateFullPathToTool() |> IO.File.Exists |> not then
|
if this.GenerateFullPathToTool() |> IO.File.Exists |> not then
|
||||||
failwith "sh.exe not found. Make sure the MSYS root is set to a correct location."
|
failwith "sh.exe not found. Make sure the MSYS root is set to a correct location."
|
||||||
|
|
||||||
this.WorkingDirectory <- cwd this.WorkingDirectory
|
if not <| IO.Directory.Exists this.WorkingDirectory then ignore <| IO.Directory.CreateDirectory this.WorkingDirectory
|
||||||
|
|
||||||
this.UseCommandProcessor <- false
|
this.UseCommandProcessor <- false
|
||||||
this.StandardOutputImportance <- "High"
|
this.StandardOutputImportance <- "High"
|
||||||
this.EnvironmentVariables <- [|
|
this.EnvironmentVariables <- [| for x in ["CC"; "CPP"; "CFLAGS"; "PATH"; "INCLUDE"; "LIB"]
|
||||||
"CC=cl";
|
-> sprintf "%s=%s" <| x <| conf.GetMetadata x |]
|
||||||
"CPP=cl -E";
|
|
||||||
"CFLAGS=-nologo"
|
|
||||||
"PATH=" + props.["MsysBasePath"] + "\\bin;" + props.["NativeExecutablePath"];
|
|
||||||
"INCLUDE=" + props.["AegisubSourceBase"] + "//include;" + props.["IncludePath"];
|
|
||||||
"LIB=" + props.["AegisubLibraryDir"] + ";" + props.["LibraryPath"];
|
|
||||||
"PKG_CONFIG_PATH=" + (mungePath props.["ProjectDir"] props.["AegisubLibraryDir"]) + "/pkgconfig"
|
|
||||||
|]
|
|
||||||
|
|
||||||
base.Execute()
|
base.Execute()
|
||||||
|
|
||||||
type ExecShellScript() =
|
type ExecShellScript() =
|
||||||
inherit Task()
|
inherit Task()
|
||||||
|
|
||||||
// Task arguments
|
// Task arguments
|
||||||
member val WorkingDirectory = "" with get, set
|
[<Required>] member val WorkingDirectory = "" with get, set
|
||||||
member val Command = "" with get, set
|
[<Required>] member val Command = "" with get, set
|
||||||
member val Script = "" with get, set
|
[<Required>] member val Configuration : ITaskItem = null with get, set
|
||||||
member val Arguments = "" with get, set
|
member val Arguments = "" with get, set
|
||||||
|
|
||||||
member private this.realArgs (props : Map<String, String>) =
|
member private this.realArgs () =
|
||||||
let cleanArgs = this.Arguments.Replace("\r", "").Replace('\n', ' ')
|
let cleanArgs = this.Arguments.Replace("\r", "").Replace('\n', ' ')
|
||||||
if this.Script.Length > 0
|
sprintf "-c '%s %s'" (mungePath this.Command) cleanArgs
|
||||||
then sprintf "%s %s" (mungePath props.["ProjectDir"] this.Script) cleanArgs
|
|
||||||
else sprintf "-c '%s %s'" this.Command cleanArgs
|
|
||||||
|
|
||||||
override this.Execute() =
|
override this.Execute() =
|
||||||
try
|
try
|
||||||
let props = propertyMap this.BuildEngine
|
let sw = ShellWrapper(this.Configuration,
|
||||||
let sw = ShellWrapper(props,
|
|
||||||
BuildEngine = this.BuildEngine,
|
BuildEngine = this.BuildEngine,
|
||||||
HostObject = this.HostObject,
|
HostObject = this.HostObject,
|
||||||
Arguments = this.realArgs props,
|
Arguments = this.realArgs(),
|
||||||
WorkingDirectory = this.WorkingDirectory)
|
WorkingDirectory = this.WorkingDirectory)
|
||||||
|
|
||||||
sw.Execute()
|
sw.Execute()
|
||||||
|
@ -118,15 +98,12 @@ type ExecShellScript() =
|
||||||
type MsysPath() =
|
type MsysPath() =
|
||||||
inherit Task()
|
inherit Task()
|
||||||
|
|
||||||
member val ProjectDir = "" with get, set
|
|
||||||
member val Path = "" with get, set
|
member val Path = "" with get, set
|
||||||
|
[<Output>] member val Result = "" with get, set
|
||||||
[<Output>]
|
|
||||||
member val Result = "" with get, set
|
|
||||||
|
|
||||||
override this.Execute() =
|
override this.Execute() =
|
||||||
try
|
try
|
||||||
this.Result <- mungePath this.ProjectDir this.Path
|
this.Result <- mungePath this.Path
|
||||||
true
|
true
|
||||||
with Failure(e) ->
|
with Failure(e) ->
|
||||||
this.Log.LogError(e)
|
this.Log.LogError(e)
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
<Import Project="$(MSBuildThisFileDirectory)Aegisub\standard-libraries.props" />
|
<Import Project="$(MSBuildThisFileDirectory)Aegisub\standard-libraries.props" />
|
||||||
<Import Project="$(MSBuildThisFileDirectory)standard-settings.props" />
|
<Import Project="$(MSBuildThisFileDirectory)standard-settings.props" />
|
||||||
<Import Project="$(MSBuildThisFileDirectory)standard-outdirs.props" />
|
<Import Project="$(MSBuildThisFileDirectory)standard-outdirs.props" />
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)tasks.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|
||||||
<!-- The standard targets need to go last for all paths to be proper -->
|
<!-- The standard targets need to go last for all paths to be proper -->
|
||||||
|
|
|
@ -31,10 +31,6 @@
|
||||||
<Import Project="$(MSBuildThisFileDirectory)..\aegisub.props" />
|
<Import Project="$(MSBuildThisFileDirectory)..\aegisub.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|
||||||
<UsingTask TaskName="ExecShellScript" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
|
||||||
<UsingTask TaskName="MsysPath" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
|
||||||
<UsingTask TaskName="UpdateFile" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
|
||||||
|
|
||||||
<PropertyGroup Label="ConfigArgs">
|
<PropertyGroup Label="ConfigArgs">
|
||||||
<CfgDebug Condition="'$(Configuration)' == 'Debug'">--enable-debug --disable-stripping --extra-cflags=-MDd</CfgDebug>
|
<CfgDebug Condition="'$(Configuration)' == 'Debug'">--enable-debug --disable-stripping --extra-cflags=-MDd</CfgDebug>
|
||||||
<CfgDebug Condition="'$(Configuration)' == 'Release'">--disable-debug --extra-cflags=-MD</CfgDebug>
|
<CfgDebug Condition="'$(Configuration)' == 'Release'">--disable-debug --extra-cflags=-MD</CfgDebug>
|
||||||
|
@ -63,23 +59,24 @@
|
||||||
--extra-cflags=-D_SYSCRT
|
--extra-cflags=-D_SYSCRT
|
||||||
--extra-cflags=-wd4005
|
--extra-cflags=-wd4005
|
||||||
--extra-cflags=-wd4189
|
--extra-cflags=-wd4189
|
||||||
--extra-cflags=-FI$(MSBuildThisFileDirectory)dynamic_msvcrt.h
|
--extra-cflags=-FIdynamic_msvcrt.h
|
||||||
--toolchain=msvc
|
--toolchain=msvc
|
||||||
$(CfgEnableDebug)
|
$(CfgDebug)
|
||||||
</CfgArgs>
|
</CfgArgs>
|
||||||
|
<AbsSrcDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)$(FfmpegSrcDir)'))</AbsSrcDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ConfigureInput Include="$(FfmpegSrcDir)\configure" />
|
<ConfigureInput Include="$(AbsSrcDir)\configure" />
|
||||||
|
|
||||||
<ConfigureOutput Include="$(AegisubObjectDir)config.*" />
|
<ConfigureOutput Include="$(AegisubObjectDir)config.*" />
|
||||||
<ConfigureOutput Include="$(AegisubObjectDir)Makefile" />
|
<ConfigureOutput Include="$(AegisubObjectDir)Makefile" />
|
||||||
<ConfigureOutput Include="$(AegisubObjectDir)libavutil\avconfig.h" />
|
<ConfigureOutput Include="$(AegisubObjectDir)libavutil\avconfig.h" />
|
||||||
|
|
||||||
<CompileInput Include="$(FfmpegSrcDir)\*.mak" />
|
<CompileInput Include="$(AbsSrcDir)\*.mak" />
|
||||||
<CompileInput Include="$(FfmpegSrcDir)\**\*.c" />
|
<CompileInput Include="$(AbsSrcDir)\**\*.c" />
|
||||||
<CompileInput Include="$(FfmpegSrcDir)\**\*.asm" />
|
<CompileInput Include="$(AbsSrcDir)\**\*.asm" />
|
||||||
<CompileInput Include="$(FfmpegSrcDir)\**\Makefile" />
|
<CompileInput Include="$(AbsSrcDir)\**\Makefile" />
|
||||||
|
|
||||||
<CompileOutput Include="$(AegisubObjectDir)libavcodec\libavcodec.a" />
|
<CompileOutput Include="$(AegisubObjectDir)libavcodec\libavcodec.a" />
|
||||||
<CompileOutput Include="$(AegisubObjectDir)libavformat\libavformat.a" />
|
<CompileOutput Include="$(AegisubObjectDir)libavformat\libavformat.a" />
|
||||||
|
@ -96,22 +93,23 @@
|
||||||
Inputs="@(ConfigureInput)"
|
Inputs="@(ConfigureInput)"
|
||||||
Outputs="@(ConfigureOutput)"
|
Outputs="@(ConfigureOutput)"
|
||||||
>
|
>
|
||||||
<MsysPath ProjectDir="$(MSBuildThisFileDirectory)" Path="$(AegisubObjectDir)\temp">
|
<MsysPath Path="$(AegisubObjectDir)\temp">
|
||||||
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
|
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
|
||||||
</MsysPath>
|
</MsysPath>
|
||||||
|
|
||||||
<MsysPath ProjectDir="$(MSBuildThisFileDirectory)" Path="../../include">
|
<MsysPath Path="$(MSBuildThisFileDirectory)../../include">
|
||||||
<Output TaskParameter="Result" PropertyName="CfgIncludePrefix" />
|
<Output TaskParameter="Result" PropertyName="CfgIncludePrefix" />
|
||||||
</MsysPath>
|
</MsysPath>
|
||||||
|
|
||||||
<MsysPath ProjectDir="$(MSBuildThisFileDirectory)" Path="../../lib/$(Platform)/$(Configuration)">
|
<MsysPath Path="$(AegisubLibraryDir)">
|
||||||
<Output TaskParameter="Result" PropertyName="CfgLibPrefix" />
|
<Output TaskParameter="Result" PropertyName="CfgLibPrefix" />
|
||||||
</MsysPath>
|
</MsysPath>
|
||||||
|
|
||||||
<ExecShellScript
|
<ExecShellScript
|
||||||
Script="$(FfmpegSrcDir)\configure"
|
Command="$(AbsSrcDir)\configure"
|
||||||
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --incdir=$(CfgIncludePrefix)"
|
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --incdir=$(CfgIncludePrefix)"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
|
Configuration="@(ExecShellScript)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Ensure that Makefile has a recent modified time to avoid
|
<!-- Ensure that Makefile has a recent modified time to avoid
|
||||||
|
@ -127,6 +125,7 @@
|
||||||
Command="make"
|
Command="make"
|
||||||
Arguments="-j$(NUMBER_OF_PROCESSORS)"
|
Arguments="-j$(NUMBER_OF_PROCESSORS)"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
|
Configuration="@(ExecShellScript)"
|
||||||
/>
|
/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
@ -137,11 +136,12 @@
|
||||||
<ExecShellScript
|
<ExecShellScript
|
||||||
Command="make install"
|
Command="make install"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
|
Configuration="@(ExecShellScript)"
|
||||||
/>
|
/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
<Error Condition="!Exists('$(FfmpegSrcDir)')" Text="FFmpeg source not found at '$(FfmpegSrcDir)'" />
|
<Error Condition="!Exists('$(AbsSrcDir)')" Text="FFmpeg source not found at '$(AbsSrcDir)'" />
|
||||||
|
|
||||||
<CallTarget Targets="Configure" />
|
<CallTarget Targets="Configure" />
|
||||||
<CallTarget Targets="Compile" />
|
<CallTarget Targets="Compile" />
|
||||||
|
|
|
@ -31,51 +31,56 @@
|
||||||
<Import Project="$(MSBuildThisFileDirectory)..\aegisub.props" />
|
<Import Project="$(MSBuildThisFileDirectory)..\aegisub.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|
||||||
<UsingTask TaskName="ExecShellScript" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
|
||||||
<UsingTask TaskName="MsysPath" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
|
||||||
<UsingTask TaskName="UpdateFile" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
|
||||||
|
|
||||||
<PropertyGroup Label="ConfigArgs">
|
<PropertyGroup Label="ConfigArgs">
|
||||||
<CfgEnableDebug Condition="'$(Configuration)' == 'Debug'">--enable-debug</CfgEnableDebug>
|
<CfgDebug Condition="'$(Configuration)' == 'Debug'">--enable-debug CFLAGS=-MDd</CfgDebug>
|
||||||
<CfgEnableDebug Condition="'$(Configuration)' == 'Release'">--disable-debug</CfgEnableDebug>
|
<CfgDebug Condition="'$(Configuration)' == 'Release'">--disable-debug CFLAGS=-MD</CfgDebug>
|
||||||
<CfgArgs>--enable-static --disable-shared --disable-dependency-tracking --without-glib $(CfgEnableDebug)</CfgArgs>
|
<CfgArgs>
|
||||||
|
--enable-static
|
||||||
|
--disable-shared
|
||||||
|
--disable-dependency-tracking
|
||||||
|
--without-glib
|
||||||
|
$(CfgEnableDebug)
|
||||||
|
</CfgArgs>
|
||||||
|
<AbsSrcDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)$(FribidiSrcDir)'))</AbsSrcDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AutomakeFiles Include="$(FribidiSrcDir)\**\*.am" />
|
<AutomakeFiles Include="$(AbsSrcDir)\**\*.am" />
|
||||||
<SourceFiles Include="$(FribidiSrcDir)\**\*.c" />
|
<SourceFiles Include="$(AbsSrcDir)\**\*.c" />
|
||||||
<SourceFiles Include="$(FribidiSrcDir)\**\*.h" />
|
<SourceFiles Include="$(AbsSrcDir)\**\*.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Target Name="Bootstrap"
|
<Target Name="Bootstrap"
|
||||||
Inputs="$(FribidiSrcDir)\configure.ac;@(AutomakeFiles)"
|
Inputs="$(AbsSrcDir)\configure.ac;@(AutomakeFiles)"
|
||||||
Outputs="$(FribidiSrcDir)\configure"
|
Outputs="$(AbsSrcDir)\configure"
|
||||||
>
|
>
|
||||||
<ExecShellScript
|
<ExecShellScript
|
||||||
Script="$(FribidiSrcDir)\bootstrap"
|
Command="$(AbsSrcDir)\bootstrap"
|
||||||
WorkingDirectory="$(FribidiSrcDir)"
|
WorkingDirectory="$(AbsSrcDir)"
|
||||||
|
Configuration="@(ExecShellScript)"
|
||||||
/>
|
/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="Configure"
|
<Target Name="Configure"
|
||||||
Inputs="$(FribidiSrcDir)\configure"
|
Inputs="$(AbsSrcDir)\configure"
|
||||||
Outputs="$(AegisubObjectDir)Makefile"
|
Outputs="$(AegisubObjectDir)Makefile"
|
||||||
>
|
>
|
||||||
<MsysPath ProjectDir="$(MSBuildThisFileDirectory)" Path="$(AegisubObjectDir)\temp">
|
<MsysPath Path="$(AegisubObjectDir)\temp">
|
||||||
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
|
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
|
||||||
</MsysPath>
|
</MsysPath>
|
||||||
|
|
||||||
<MsysPath ProjectDir="$(MSBuildThisFileDirectory)" Path="../../include">
|
<MsysPath Path="$(MSBuildThisFileDirectory)../../include">
|
||||||
<Output TaskParameter="Result" PropertyName="CfgIncludePrefix" />
|
<Output TaskParameter="Result" PropertyName="CfgIncludePrefix" />
|
||||||
</MsysPath>
|
</MsysPath>
|
||||||
|
|
||||||
<MsysPath ProjectDir="$(MSBuildThisFileDirectory)" Path="../../lib/$(Platform)/$(Configuration)">
|
<MsysPath Path="$(AegisubLibraryDir)">
|
||||||
<Output TaskParameter="Result" PropertyName="CfgLibPrefix" />
|
<Output TaskParameter="Result" PropertyName="CfgLibPrefix" />
|
||||||
</MsysPath>
|
</MsysPath>
|
||||||
|
|
||||||
<ExecShellScript
|
<ExecShellScript
|
||||||
Script="$(FribidiSrcDir)\configure"
|
Command="$(AbsSrcDir)\configure"
|
||||||
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --includedir=$(CfgIncludePrefix)"
|
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --includedir=$(CfgIncludePrefix)"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
|
Configuration="@(ExecShellScript)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- fribidi defines the symbols to export twice, which causes errors -->
|
<!-- fribidi defines the symbols to export twice, which causes errors -->
|
||||||
|
@ -93,6 +98,7 @@
|
||||||
Command="make"
|
Command="make"
|
||||||
Arguments="-j$(NUMBER_OF_PROCESSORS)"
|
Arguments="-j$(NUMBER_OF_PROCESSORS)"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
|
Configuration="@(ExecShellScript)"
|
||||||
/>
|
/>
|
||||||
<Touch Files="$(AegisubObjectDir)lib\.libs\fribidi.lib" />
|
<Touch Files="$(AegisubObjectDir)lib\.libs\fribidi.lib" />
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -104,11 +110,12 @@
|
||||||
<ExecShellScript
|
<ExecShellScript
|
||||||
Command="make install"
|
Command="make install"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
|
Configuration="@(ExecShellScript)"
|
||||||
/>
|
/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
<Error Condition="!Exists('$(FribidiSrcDir)')" Text="Fribidi source not found at '$(FribidiSrcDir)'" />
|
<Error Condition="!Exists('$(AbsSrcDir)')" Text="Fribidi source not found at '$(AbsSrcDir)'" />
|
||||||
<CallTarget Targets="Bootstrap;Configure;Compile;Install" />
|
<CallTarget Targets="Bootstrap;Configure;Compile;Install" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Base for Aegisub source code -->
|
<!-- Base for Aegisub source code -->
|
||||||
<AegisubSourceBase Condition="'$(AegisubSourceBase)'==''">$(MSBuildThisFileDirectory)..\</AegisubSourceBase>
|
<AegisubSourceBase Condition="'$(AegisubSourceBase)'==''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\'))</AegisubSourceBase>
|
||||||
<!-- Base for contrib libraries source code -->
|
<!-- Base for contrib libraries source code -->
|
||||||
<AegisubContribBase Condition="'$(AegisubContribBase)'==''">$(AegisubSourceBase)..\contrib\</AegisubContribBase>
|
<AegisubContribBase Condition="'$(AegisubContribBase)'==''">$(AegisubSourceBase)..\contrib\</AegisubContribBase>
|
||||||
<!-- Base for built files -->
|
<!-- Base for built files -->
|
||||||
|
|
25
aegisub/build/tasks.props
Normal file
25
aegisub/build/tasks.props
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<_PropertySheetDisplayName>Custom Tasks</_PropertySheetDisplayName>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ExecShellScript Include=".">
|
||||||
|
<CC>cl</CC>
|
||||||
|
<CPP>cl -E</CPP>
|
||||||
|
<CFLAGS>-nologo</CFLAGS>
|
||||||
|
<PATH>$(MsysBasePath)\bin;$(NativeExecutablePath)</PATH>
|
||||||
|
<INCLUDE>$(MSBuildProjectDirectory);$(AegisubSourceBase)\include;$(IncludePath)</INCLUDE>
|
||||||
|
<LIB>$(AegisubLibraryDir);$(LibraryPath)</LIB>
|
||||||
|
<Configuration>$(Configuration)</Configuration>
|
||||||
|
<Platform>$(Platform)</Platform>
|
||||||
|
<Sh>$(MsysBasePath)\bin\sh.exe</Sh>
|
||||||
|
</ExecShellScript>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<UsingTask TaskName="ExecShellScript" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
||||||
|
<UsingTask TaskName="MsysPath" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
||||||
|
<UsingTask TaskName="UpdateFile" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
||||||
|
</Project>
|
||||||
|
|
Loading…
Reference in a new issue