Fix modules install path #119
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I realized that some of the installpath and install_location returns were incorrect when compared to the offical
modules.json
files coming from Unity.Example:
macOS android-sdk-build-tools
windows android-sdk-build-tools
The difference is marginal and yields a similar installation path. But I made a mistake coping the macOS values over to windows and adjusted some values based on the expected windows output path. Classic problem. Never trust your own fixtures.
Since I want to produce the same
modules.json
files as Unity Hub and the modules in questions are not part of the olderini
manifest files I had to fix this.I also took this chance of adjusting the
install_location
return types slightly. In most cases the install path andinstall_location
is the same and or unique enough to just probe for the existence of the directory to determine if something is installed or not. In case ofandroid
it is not. Thedestination
field points in some cases to a shared location (PlaybackEngines/AndroidPlayer/SDK
) even though the final resources are located in a subdirectory. This was never a problembecause modules always had a unique install path. I took the liberty to manually adjust this path for installation checks for now.
Means:
macOS android-sdk-build-tools:
->
{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK
->
{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK/build-tools
I hope this solution works until I have time to implement a check to ask the
modules.json
if a given module is installed or not.Changes
install_location
path