Remove most of the fetched dependencies since they're now submodules
This commit is contained in:
parent
9667a7b21f
commit
90b35efa75
2 changed files with 0 additions and 110 deletions
|
@ -23,78 +23,6 @@ open Microsoft.Build.Evaluation
|
||||||
open Microsoft.Build.Framework
|
open Microsoft.Build.Framework
|
||||||
open Microsoft.Build.Utilities
|
open Microsoft.Build.Utilities
|
||||||
|
|
||||||
type GitWrapper(path : String) =
|
|
||||||
inherit ToolTask()
|
|
||||||
|
|
||||||
member val Arguments = "" with get, set
|
|
||||||
member val WorkingDirectory = "" with get, set
|
|
||||||
|
|
||||||
// ToolTask overrides
|
|
||||||
override val ToolName = "git.exe" with get
|
|
||||||
override this.GenerateFullPathToTool() = path
|
|
||||||
override this.GenerateCommandLineCommands() = this.Arguments
|
|
||||||
override this.GetWorkingDirectory() = this.WorkingDirectory
|
|
||||||
|
|
||||||
override this.Execute() =
|
|
||||||
if this.GenerateFullPathToTool() |> IO.File.Exists |> not then
|
|
||||||
failwith "git.exe not found. Make sure the MSYS root is set to a correct location."
|
|
||||||
|
|
||||||
this.UseCommandProcessor <- false
|
|
||||||
this.StandardOutputImportance <- "High"
|
|
||||||
base.Execute()
|
|
||||||
|
|
||||||
type GitProject() =
|
|
||||||
inherit Task()
|
|
||||||
|
|
||||||
member val Projects : ITaskItem[] = null with get, set
|
|
||||||
member val Root = "" with get, set
|
|
||||||
member val GitPath = "" with get, set
|
|
||||||
|
|
||||||
override this.Execute() =
|
|
||||||
let callGit dir args =
|
|
||||||
let gw = GitWrapper(this.GitPath,
|
|
||||||
BuildEngine = this.BuildEngine,
|
|
||||||
HostObject = this.HostObject,
|
|
||||||
Arguments = args,
|
|
||||||
WorkingDirectory = dir)
|
|
||||||
if not <| gw.Execute() then failwith "git failed"
|
|
||||||
|
|
||||||
let update (projectName : String) directory url =
|
|
||||||
this.Log.LogMessage ("Updating {0}", projectName)
|
|
||||||
callGit directory "pull --rebase"
|
|
||||||
callGit directory "clean -xfd"
|
|
||||||
|
|
||||||
let fetch (projectName : String) root (url : ITaskItem) =
|
|
||||||
this.Log.LogMessage ("Fetching {0}", projectName)
|
|
||||||
ignore <| IO.Directory.CreateDirectory root
|
|
||||||
|
|
||||||
callGit root (sprintf "clone %s --no-checkout" url.ItemSpec)
|
|
||||||
|
|
||||||
let dir = (sprintf "%s\\%s" root projectName)
|
|
||||||
|
|
||||||
let autocrlf = url.GetMetadata "AutoCrlf"
|
|
||||||
if autocrlf.Length > 0
|
|
||||||
then callGit dir (sprintf "config --local core.autocrlf %s" autocrlf)
|
|
||||||
|
|
||||||
let branch = match url.GetMetadata("Branch") with "" -> "master" | x -> x
|
|
||||||
callGit dir (sprintf "checkout %s" branch)
|
|
||||||
|
|
||||||
let updateGit (url : ITaskItem) =
|
|
||||||
let projectName = Uri(url.ItemSpec).Segments.Last().Replace(".git", "")
|
|
||||||
let directory = sprintf "%s\\%s" this.Root projectName
|
|
||||||
|
|
||||||
if IO.Directory.Exists directory
|
|
||||||
then update projectName directory url
|
|
||||||
else fetch projectName this.Root url
|
|
||||||
|
|
||||||
this.Log.LogMessage ("Using git at {0}", this.GitPath)
|
|
||||||
try
|
|
||||||
this.Projects |> Array.map updateGit |> ignore
|
|
||||||
true
|
|
||||||
with e ->
|
|
||||||
this.Log.LogErrorFromException e
|
|
||||||
false
|
|
||||||
|
|
||||||
let downloadArchive (url : String) unpackDest =
|
let downloadArchive (url : String) unpackDest =
|
||||||
use wc = new Net.WebClient()
|
use wc = new Net.WebClient()
|
||||||
use downloadStream = wc.OpenRead url
|
use downloadStream = wc.OpenRead url
|
||||||
|
|
|
@ -22,57 +22,19 @@ Aegisub Project http://www.aegisub.org/
|
||||||
<ProjectName>! Update Dependencies</ProjectName>
|
<ProjectName>! Update Dependencies</ProjectName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup Label="git">
|
|
||||||
<GitProject Include="git://anongit.freedesktop.org/fribidi/fribidi" />
|
|
||||||
<GitProject Include="git://git.sv.nongnu.org/freetype/freetype2.git" />
|
|
||||||
<GitProject Include="git://github.com/madler/zlib.git" />
|
|
||||||
<GitProject Include="git://github.com/wxWidgets/wxWidgets.git" />
|
|
||||||
<GitProject Include="git://github.com/svn2github/googletest.git" />
|
|
||||||
<GitProject Include="git://source.ffmpeg.org/ffmpeg.git">
|
|
||||||
<!-- FFmpeg's build system manages to not work with Windows newlines, so
|
|
||||||
disable autocrlf even if the user has it enabled globally -->
|
|
||||||
<AutoCrlf>input</AutoCrlf>
|
|
||||||
</GitProject>
|
|
||||||
<GitProject Include="git://github.com/tgoyne/ffms2.git">
|
|
||||||
<Branch>trunk</Branch>
|
|
||||||
</GitProject>
|
|
||||||
<GitProject Include="git://github.com/tgoyne/fontconfig.git">
|
|
||||||
<Branch>msvc</Branch>
|
|
||||||
</GitProject>
|
|
||||||
<GitProject Include="git://github.com/tgoyne/libass.git">
|
|
||||||
<Branch>msvc</Branch>
|
|
||||||
</GitProject>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Label="tarball">
|
<ItemGroup Label="tarball">
|
||||||
<TarballProject Include="fftw">
|
<TarballProject Include="fftw">
|
||||||
<Version>3.3.2</Version>
|
<Version>3.3.2</Version>
|
||||||
<Url>http://www.fftw.org/fftw-3.3.2.tar.gz</Url>
|
<Url>http://www.fftw.org/fftw-3.3.2.tar.gz</Url>
|
||||||
<DirName>fftw-3.3.2</DirName>
|
<DirName>fftw-3.3.2</DirName>
|
||||||
</TarballProject>
|
</TarballProject>
|
||||||
<TarballProject Include="boost">
|
|
||||||
<Version>1.52.0</Version>
|
|
||||||
<Url>http://downloads.sourceforge.net/project/boost/boost/1.52.0/boost_1_52_0.tar.gz</Url>
|
|
||||||
<DirName>boost_1_52_0</DirName>
|
|
||||||
</TarballProject>
|
|
||||||
<TarballProject Include="icu">
|
|
||||||
<Version>50.1.2</Version>
|
|
||||||
<Url>http://download.icu-project.org/files/icu4c/50.1.2/icu4c-50_1_2-src.tgz</Url>
|
|
||||||
</TarballProject>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="$(MSBuildThisFileDirectory)\..\aegisub.props" />
|
<Import Project="$(MSBuildThisFileDirectory)\..\aegisub.props" />
|
||||||
<UsingTask TaskName="GitProject" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
|
||||||
<UsingTask TaskName="TarballProject" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
<UsingTask TaskName="TarballProject" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
||||||
<UsingTask TaskName="DownloadTgzFile" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
<UsingTask TaskName="DownloadTgzFile" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
|
||||||
|
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
<GitProject
|
|
||||||
Projects="@(GitProject)"
|
|
||||||
Root="$(MSBuildThisFileDirectory)\..\..\..\deps"
|
|
||||||
GitPath="$(MsysBasePath)\bin\git.exe"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TarballProject Projects="@(TarballProject)" Root="$(MSBuildThisFileDirectory)..\..\..\deps" />
|
<TarballProject Projects="@(TarballProject)" Root="$(MSBuildThisFileDirectory)..\..\..\deps" />
|
||||||
|
|
||||||
<!-- Generated with http://apps.icu-project.org/datacustom/ -->
|
<!-- Generated with http://apps.icu-project.org/datacustom/ -->
|
||||||
|
|
Loading…
Reference in a new issue