Skip to content

Commit 0267204

Browse files
jonathanpeppersjonpryor
authored andcommitted
[build] Properly set $(HOME) on Windows (#879)
Commit 6fd330d tried to provide a reasonable default for `$(HOME)` when building on Windows (...years before we could do that): > I've arbitrary decided to download the files into > $(HOME)\android-archives and install them into > $(HOME)\android-toolchain. On windows, this is > %HOMEDRIVE%%HOMEPATH%\android-archives and > %HOMEDRIVE%%HOMEPATH%\android-toolchain. Where did `%HOMEDRIVE%` and `%HOMEPATH%` come from? They came from an available Windows machine, and otherwise looked sane and useful. Unfortunately, [when building in the VSTS build agent][0], neither `%HOMEDRIVE%` nor `%HOMEPATH%` are set, resulting in `$(HOME)` not being set at all! [0]: https://devdiv.visualstudio.com/DevDiv/_build/index?buildId=1004861 Instead of setting `$(HOME)` to `%HOMEDRIVE%%HOMEPATH%` on Windows, set it to `%USERPROFILE`, which appears to be a more useful environment variable.
1 parent 15f8793 commit 0267204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Configuration.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<ManagedRuntime Condition=" '$(ManagedRuntime)' == '' And '$(OS)' != 'Windows_NT' ">mono</ManagedRuntime>
3939
<ManagedRuntimeArgs Condition=" '$(ManagedRuntimeArgs)' == '' And '$(ManagedRuntime)' == 'mono' ">--debug=casts</ManagedRuntimeArgs>
4040
<MonoSgenBridgeVersion Condition=" '$(MonoSgenBridgeVersion)' == '' ">5</MonoSgenBridgeVersion>
41-
<HOME Condition=" '$(HOME)' == '' ">$(HOMEDRIVE)$(HOMEPATH)</HOME>
41+
<HOME Condition=" '$(HOME)' == '' ">$(USERPROFILE)</HOME>
4242
<AndroidPlatformId Condition=" '$(AndroidPlatformId)' == '' ">$(AndroidApiLevel)</AndroidPlatformId>
4343
<AndroidPreviousFrameworkVersion Condition=" '$(AndroidPreviousFrameworkVersion)' == '' ">v1.0</AndroidPreviousFrameworkVersion>
4444
<AndroidToolchainCacheDirectory Condition=" '$(AndroidToolchainCacheDirectory)' == '' ">$(HOME)\android-archives</AndroidToolchainCacheDirectory>

0 commit comments

Comments
 (0)