1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-16 04:32:57 +08:00

Merge branch 'master' into beatmap_parsing

This commit is contained in:
Dean Herbert 2017-03-15 11:26:47 +09:00 committed by GitHub
commit 2e71869951
4 changed files with 13 additions and 9 deletions

@ -1 +1 @@
Subproject commit 4834d27107198b9dc2f0e073be484cf0b92e0416
Subproject commit 8c79c94aa71711cf9c8bb169f684df2e35596f9d

View File

@ -198,7 +198,7 @@ namespace osu.Desktop.Deploy
write($"- Creating release {version}...", ConsoleColor.Yellow);
var req = new JsonWebRequest<GitHubRelease>($"{GitHubApiEndpoint}")
{
Method = HttpMethod.POST
Method = HttpMethod.POST,
};
req.AddRaw(JsonConvert.SerializeObject(new GitHubRelease
{
@ -215,6 +215,7 @@ namespace osu.Desktop.Deploy
var upload = new WebRequest(assetUploadUrl, Path.GetFileName(a))
{
Method = HttpMethod.POST,
Timeout = 240000,
ContentType = "application/octet-stream",
};
@ -261,7 +262,7 @@ namespace osu.Desktop.Deploy
if (!File.Exists(Path.Combine(ReleasesFolder, nupkgDistroFilename(lastRelease.Name))))
{
write("Last verion's package not found locally.", ConsoleColor.Red);
write("Last version's package not found locally.", ConsoleColor.Red);
requireDownload = true;
}
else
@ -282,6 +283,8 @@ namespace osu.Desktop.Deploy
foreach (var a in assets)
{
if (a.Name.EndsWith(".exe")) continue;
write($"- Downloading {a.Name}...", ConsoleColor.Yellow);
new FileWebRequest(Path.Combine(ReleasesFolder, a.Name), $"{GitHubApiEndpoint}/assets/{a.Id}").AuthenticatedBlockingPerform();
}
@ -337,6 +340,7 @@ namespace osu.Desktop.Deploy
WorkingDirectory = solutionPath,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Hidden
};
@ -345,6 +349,7 @@ namespace osu.Desktop.Deploy
if (p == null) return false;
string output = p.StandardOutput.ReadToEnd();
output += p.StandardError.ReadToEnd();
if (p.ExitCode == 0) return true;

View File

@ -104,7 +104,9 @@
<None Include="..\osu.licenseheader">
<Link>osu.licenseheader</Link>
</None>
<None Include="App.config" />
<None Include="App.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>

View File

@ -1,8 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics.Transforms;
using osu.Framework.Graphics.UserInterface;
using OpenTK;
@ -15,9 +13,6 @@ namespace osu.Game.Graphics.UserInterface
{
protected override DropDownHeader CreateHeader() => new OsuDropDownHeader();
protected override IEnumerable<DropDownMenuItem<U>> GetDropDownItems(IEnumerable<KeyValuePair<string, U>> values)
=> values.Select(v => new OsuDropDownMenuItem<U>(v.Key, v.Value));
public OsuDropDownMenu()
{
ContentContainer.CornerRadius = 4;
@ -38,5 +33,7 @@ namespace osu.Game.Graphics.UserInterface
{
ContentContainer.ResizeTo(State == DropDownMenuState.Opened ? new Vector2(1, ContentHeight) : new Vector2(1, 0), 300, EasingTypes.OutQuint);
}
protected override DropDownMenuItem<U> CreateDropDownItem(string key, U value) => new OsuDropDownMenuItem<U>(key, value);
}
}