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

Commit 7a576ca

Browse files
committed
Try to find a Unity installation to reference DLLs from
1 parent 9730432 commit 7a576ca

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

appveyor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ install:
3131
Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
3232
} else {
3333
git submodule deinit script
34+
$destination = Join-Path $env:appveyor_build_folder 'lib\deps.zip'
35+
Invoke-WebRequest "https://ghfvs-installer.github.com/dependencies/deps.zip" -OutFile $destination
36+
&'7z' x $destination
3437
}
3538
3639
git submodule update

common/unitylocation.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<UnityDir Condition="$(UnityDir) == '' and Exists('C:\Program Files (x86)\Unity\Editor\Data\Managed\UnityEditor.dll')">C:\Program Files (x86)\Unity\Editor\Data\Managed\</UnityDir>
5+
<UnityDir Condition="$(UnityDir) == '' and Exists('\Applications\Unity\Unity.app\Contents\Managed\UnityEditor.dll')">\Applications\Unity\Unity.app\Contents\Managed\</UnityDir>
6+
<UnityDir Condition="$(UnityDir) == '' and Exists('$(SolutionDir)\script\lib\UnityEditor.dll')">$(SolutionDir)\script\lib\</UnityDir>
7+
<UnityDir Condition="$(UnityDir) == '' and Exists('$(SolutionDir)\lib\UnityEditor.dll')">$(SolutionDir)\lib\</UnityDir>
8+
</PropertyGroup>
9+
</Project>

script

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<Import Project="..\..\..\..\..\common\unitylocation.props" />
45
<PropertyGroup>
56
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
67
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -68,11 +69,11 @@
6869
<Reference Include="System.Data" />
6970
<Reference Include="System.Xml" />
7071
<Reference Include="UnityEditor">
71-
<HintPath>$(SolutionDir)lib\UnityEditor.dll</HintPath>
72+
<HintPath>$(UnityDir)UnityEditor.dll</HintPath>
7273
<Private>False</Private>
7374
</Reference>
7475
<Reference Include="UnityEngine">
75-
<HintPath>$(SolutionDir)lib\UnityEngine.dll</HintPath>
76+
<HintPath>$(UnityDir)UnityEngine.dll</HintPath>
7677
<Private>False</Private>
7778
</Reference>
7879
</ItemGroup>

src/tests/UnitTests/UnitTests.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<Import Project="..\..\..\common\unitylocation.props" />
45
<PropertyGroup>
56
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
67
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -73,10 +74,10 @@
7374
<Reference Include="System.Data" />
7475
<Reference Include="System.Xml" />
7576
<Reference Include="UnityEditor">
76-
<HintPath>$(SolutionDir)lib\UnityEditor.dll</HintPath>
77+
<HintPath>$(UnityDir)UnityEditor.dll</HintPath>
7778
</Reference>
7879
<Reference Include="UnityEngine">
79-
<HintPath>$(SolutionDir)lib\UnityEngine.dll</HintPath>
80+
<HintPath>$(UnityDir)UnityEngine.dll</HintPath>
8081
</Reference>
8182
</ItemGroup>
8283
<ItemGroup>

0 commit comments

Comments
 (0)