Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 66eb21e

Browse files
committed
Fix build and add dependencies of the tool
1 parent bae9cfd commit 66eb21e

File tree

6 files changed

+26
-7
lines changed

6 files changed

+26
-7
lines changed

src/GitHub.Api/Authentication/LoginManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ private async Task<ApplicationAuthorization> TryLogin(
257257
string password
258258
)
259259
{
260-
logger.Info("Login Username:{0}", username);
260+
logger.Info("Login Username:{0} {1}", username, loginTool);
261261

262262
ApplicationAuthorization auth = null;
263263
var loginTask = new SimpleListProcessTask(taskManager.Token, loginTool, $"login --host={host}");

src/OctoRun/OctoRun.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
<Private>True</Private>
4040
</Reference>
4141
<Reference Include="Octokit, Version=0.29.0.0, Culture=neutral, processorArchitecture=MSIL">
42-
<SpecificVersion>False</SpecificVersion>
43-
<HintPath>..\..\..\octokit.net\Octokit\bin\Debug\net45\Octokit.dll</HintPath>
42+
<HintPath>..\..\packages\Octokit.0.29.0\lib\net45\Octokit.dll</HintPath>
43+
<Private>True</Private>
4444
</Reference>
4545
<Reference Include="System" />
4646
<Reference Include="System.Core" />

src/OctoRun/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Program
9292
{
9393
static void Main(string[] args)
9494
{
95-
Logging.LogAdapter = new ConsoleLogAdapter();
95+
//Logging.LogAdapter = new ConsoleLogAdapter();
9696

9797
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
9898

src/OctoRun/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Mono.Options" version="5.3.0.1" targetFramework="net452" />
4+
<package id="Octokit" version="0.29.0" targetFramework="net452" />
45
</packages>

src/UnityExtension/Assets/Editor/GitHub.Unity/GitHub.Unity.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,15 @@
198198
<EmbeddedResource Include="..\..\..\..\OctoRun\bin\$(BuildConfig)\octorun.exe">
199199
<Link>Tools\octorun.exe</Link>
200200
</EmbeddedResource>
201+
<EmbeddedResource Include="..\..\..\..\OctoRun\bin\$(BuildConfig)\GitHub.Logging.dll">
202+
<Link>Tools\GitHub.Logging.dll</Link>
203+
</EmbeddedResource>
204+
<EmbeddedResource Include="..\..\..\..\OctoRun\bin\$(BuildConfig)\Mono.Options.dll">
205+
<Link>Tools\Mono.Options.dll</Link>
206+
</EmbeddedResource>
207+
<EmbeddedResource Include="..\..\..\..\OctoRun\bin\$(BuildConfig)\Octokit.dll">
208+
<Link>Tools\Octokit.dll</Link>
209+
</EmbeddedResource>
201210
</ItemGroup>
202211
<ItemGroup>
203212
<None Include="$(SolutionDir)EULA.txt">

src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Utility.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,21 @@ public static Texture2D GetTextureFromColor(Color color)
5050
return result;
5151
}
5252

53-
public static NPath GetTool(string filename, string filename2x = "")
53+
public static NPath GetTool(string tool)
5454
{
55-
var outfile = Application.temporaryCachePath.ToNPath().Combine(filename);
55+
var outfile = Application.temporaryCachePath.ToNPath().Combine(tool);
56+
57+
if (tool == "octorun.exe")
58+
{
59+
GetTool("Mono.Options.dll");
60+
GetTool("GitHub.Logging.dll");
61+
GetTool("Octokit.dll");
62+
}
63+
5664
if (outfile.Exists())
5765
return outfile;
5866

59-
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("GitHub.Unity.Tools." + filename);
67+
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("GitHub.Unity.Tools." + tool);
6068
if (stream != null)
6169
{
6270
var targetFile = new FileInfo(outfile);
@@ -65,6 +73,7 @@ public static NPath GetTool(string filename, string filename2x = "")
6573
ZipHelper.Copy(stream, outstream, 8192, stream.Length, null, 0);
6674
}
6775
}
76+
Logging.GetLogger<Utility>().Debug(outfile);
6877
return outfile;
6978
}
7079
}

0 commit comments

Comments
 (0)