Revert a bunch of inadvertent formatting changes
This commit is contained in:
Родитель
df861c4f0c
Коммит
07fd0d1e74
|
@ -1,139 +1,159 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
#
|
||||
# Module manifest for module 'UnitySetup'
|
||||
# Module manifest for module 'PSGet_UnitySetup'
|
||||
#
|
||||
# Generated by: Josh Wittner
|
||||
#
|
||||
# Generated on: 6/24/2024
|
||||
# Generated on: 2018-01-31
|
||||
#
|
||||
|
||||
@{
|
||||
|
||||
# Script module or binary module file associated with this manifest.
|
||||
RootModule = 'UnitySetup'
|
||||
# Script module or binary module file associated with this manifest.
|
||||
RootModule = 'UnitySetup'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '5.6.0'
|
||||
# Version number of this module.
|
||||
ModuleVersion = '5.6'
|
||||
|
||||
# Supported PSEditions
|
||||
# CompatiblePSEditions = @()
|
||||
# Supported PSEditions
|
||||
# CompatiblePSEditions = @()
|
||||
|
||||
# ID used to uniquely identify this module
|
||||
GUID = '6dc524ef-5f56-4bc3-b04d-3c2906898f40'
|
||||
# ID used to uniquely identify this module
|
||||
GUID = '6dc524ef-5f56-4bc3-b04d-3c2906898f40'
|
||||
|
||||
# Author of this module
|
||||
Author = 'Josh Wittner'
|
||||
# Author of this module
|
||||
Author = 'Josh Wittner'
|
||||
|
||||
# Company or vendor of this module
|
||||
CompanyName = 'Microsoft'
|
||||
# Company or vendor of this module
|
||||
CompanyName = 'Microsoft'
|
||||
|
||||
# Copyright statement for this module
|
||||
Copyright = 'Copyright (c) Microsoft Corporation. All rights reserved.'
|
||||
# Copyright statement for this module
|
||||
Copyright = 'Copyright (c) Microsoft Corporation. All rights reserved.'
|
||||
|
||||
# Description of the functionality provided by this module
|
||||
Description = 'Tools for managing and automating your Unity installs and projects.'
|
||||
# Description of the functionality provided by this module
|
||||
Description = 'Tools for managing and automating your Unity installs and projects.'
|
||||
|
||||
# Minimum version of the PowerShell engine required by this module
|
||||
# PowerShellVersion = ''
|
||||
# Minimum version of the Windows PowerShell engine required by this module
|
||||
# PowerShellVersion = ''
|
||||
|
||||
# Name of the PowerShell host required by this module
|
||||
# PowerShellHostName = ''
|
||||
# Name of the Windows PowerShell host required by this module
|
||||
# PowerShellHostName = ''
|
||||
|
||||
# Minimum version of the PowerShell host required by this module
|
||||
# PowerShellHostVersion = ''
|
||||
# Minimum version of the Windows PowerShell host required by this module
|
||||
# PowerShellHostVersion = ''
|
||||
|
||||
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
|
||||
# DotNetFrameworkVersion = ''
|
||||
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
|
||||
# DotNetFrameworkVersion = ''
|
||||
|
||||
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
|
||||
# ClrVersion = ''
|
||||
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
|
||||
# CLRVersion = ''
|
||||
|
||||
# Processor architecture (None, X86, Amd64) required by this module
|
||||
# ProcessorArchitecture = ''
|
||||
# Processor architecture (None, X86, Amd64) required by this module
|
||||
# ProcessorArchitecture = ''
|
||||
|
||||
# Modules that must be imported into the global environment prior to importing this module
|
||||
RequiredModules = @(@{ModuleName = 'powershell-yaml'; GUID = '6a75a662-7f53-425a-9777-ee61284407da'; ModuleVersion = '0.3'; })
|
||||
# Modules that must be imported into the global environment prior to importing this module
|
||||
RequiredModules = @(
|
||||
@{ModuleName = "powershell-yaml"; ModuleVersion = "0.3"; Guid = "6a75a662-7f53-425a-9777-ee61284407da" }
|
||||
)
|
||||
|
||||
# Assemblies that must be loaded prior to importing this module
|
||||
# RequiredAssemblies = @()
|
||||
# Assemblies that must be loaded prior to importing this module
|
||||
# RequiredAssemblies = @()
|
||||
|
||||
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
|
||||
# ScriptsToProcess = @()
|
||||
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
|
||||
ScriptsToProcess = @()
|
||||
|
||||
# Type files (.ps1xml) to be loaded when importing this module
|
||||
# TypesToProcess = @()
|
||||
# Type files (.ps1xml) to be loaded when importing this module
|
||||
# TypesToProcess = @()
|
||||
|
||||
# Format files (.ps1xml) to be loaded when importing this module
|
||||
# FormatsToProcess = @()
|
||||
# Format files (.ps1xml) to be loaded when importing this module
|
||||
# FormatsToProcess = @()
|
||||
|
||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
||||
# NestedModules = @()
|
||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
||||
# NestedModules = @()
|
||||
|
||||
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
||||
FunctionsToExport = 'Find-UnitySetupInstaller', 'Select-UnitySetupInstaller',
|
||||
'Test-UnitySetupInstance', 'Get-UnityProjectInstance',
|
||||
'Test-UnityProjectInstanceMetaFileIntegrity',
|
||||
'Get-UnitySetupInstance', 'Request-UnitySetupInstaller',
|
||||
'Install-UnitySetupInstance', 'Select-UnitySetupInstance',
|
||||
'Uninstall-UnitySetupInstance', 'Get-UnityEditor',
|
||||
'Start-UnityEditor', 'ConvertTo-UnitySetupComponent',
|
||||
'Get-UnityLicense', 'Update-UPMConfig'
|
||||
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
||||
|
||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||
CmdletsToExport = @()
|
||||
FunctionsToExport = @(
|
||||
'Find-UnitySetupInstaller',
|
||||
'Select-UnitySetupInstaller',
|
||||
'Test-UnitySetupInstance',
|
||||
'Get-UnityProjectInstance',
|
||||
'Test-UnityProjectInstanceMetaFileIntegrity',
|
||||
'Get-UnitySetupInstance',
|
||||
'Request-UnitySetupInstaller',
|
||||
'Install-UnitySetupInstance',
|
||||
'Select-UnitySetupInstance',
|
||||
'Uninstall-UnitySetupInstance',
|
||||
'Get-UnityEditor',
|
||||
'Start-UnityEditor',
|
||||
'ConvertTo-UnitySetupComponent',
|
||||
'Get-UnityLicense',
|
||||
'Update-UPMConfig'
|
||||
)
|
||||
|
||||
# Variables to export from this module
|
||||
# VariablesToExport = @()
|
||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||
CmdletsToExport = @()
|
||||
|
||||
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
|
||||
AliasesToExport = 'gusi', 'gupi', 'susi', 'gue', 'sue'
|
||||
# Variables to export from this module
|
||||
VariablesToExport = @()
|
||||
|
||||
# DSC resources to export from this module
|
||||
# DscResourcesToExport = @()
|
||||
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
|
||||
AliasesToExport = @(
|
||||
'gusi',
|
||||
'gupi',
|
||||
'susi',
|
||||
'gue',
|
||||
'sue'
|
||||
)
|
||||
|
||||
# List of all modules packaged with this module
|
||||
# ModuleList = @()
|
||||
# DSC resources to export from this module
|
||||
# DscResourcesToExport = @()
|
||||
|
||||
# List of all files packaged with this module
|
||||
# FileList = @()
|
||||
# List of all modules packaged with this module
|
||||
# ModuleList = @()
|
||||
|
||||
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
|
||||
PrivateData = @{
|
||||
# List of all files packaged with this module
|
||||
# FileList = @()
|
||||
|
||||
PSData = @{
|
||||
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
|
||||
PrivateData = @{
|
||||
|
||||
# Tags applied to this module. These help with module discovery in online galleries.
|
||||
Tags = 'Unity'
|
||||
PSData = @{
|
||||
|
||||
# A URL to the license for this module.
|
||||
LicenseUri = 'https://github.com/Microsoft/unitysetup.powershell/blob/master/LICENSE'
|
||||
# Tags applied to this module. These help with module discovery in online galleries.
|
||||
Tags = 'Unity'
|
||||
|
||||
# A URL to the main website for this project.
|
||||
ProjectUri = 'https://github.com/Microsoft/unitysetup.powershell'
|
||||
# A URL to the license for this module.
|
||||
LicenseUri = 'https://github.com/Microsoft/unitysetup.powershell/blob/master/LICENSE'
|
||||
|
||||
# A URL to an icon representing this module.
|
||||
# IconUri = ''
|
||||
# A URL to the main website for this project.
|
||||
ProjectUri = 'https://github.com/Microsoft/unitysetup.powershell'
|
||||
|
||||
# ReleaseNotes of this module
|
||||
# ReleaseNotes = ''
|
||||
# A URL to an icon representing this module.
|
||||
# IconUri = ''
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
# ReleaseNotes of this module
|
||||
# ReleaseNotes = ''
|
||||
|
||||
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
|
||||
# RequireLicenseAcceptance = $false
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
||||
# External dependent modules of this module
|
||||
# ExternalModuleDependencies = @()
|
||||
# Flag to indicate whether the module requires explicit user acceptance for install/update
|
||||
# RequireLicenseAcceptance = $false
|
||||
|
||||
} # End of PSData hashtable
|
||||
# External dependent modules of this module
|
||||
# ExternalModuleDependencies = @()
|
||||
|
||||
} # End of PrivateData hashtable
|
||||
} # End of PSData hashtable
|
||||
|
||||
} # End of PrivateData hashtable
|
||||
|
||||
# HelpInfo URI of this module
|
||||
HelpInfoURI = 'https://github.com/Microsoft/unitysetup.powershell/blob/master/README.md'
|
||||
# HelpInfo URI of this module
|
||||
HelpInfoURI = 'https://github.com/Microsoft/unitysetup.powershell/blob/master/README.md'
|
||||
|
||||
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
|
||||
# DefaultCommandPrefix = ''
|
||||
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
|
||||
# DefaultCommandPrefix = ''
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -67,19 +67,19 @@ class UnitySetupInstance {
|
|||
[UnitySetupComponent]::Documentation = , [io.path]::Combine("$Path", "Editor\Data\Documentation");
|
||||
[UnitySetupComponent]::StandardAssets = , [io.path]::Combine("$Path", "Editor\Standard Assets");
|
||||
[UnitySetupComponent]::Windows_IL2CPP = , [io.path]::Combine("$playbackEnginePath", "windowsstandalonesupport\Variations\win32_development_il2cpp"),
|
||||
[io.path]::Combine("$playbackEnginePath", "windowsstandalonesupport\Variations\win32_player_development_il2cpp");
|
||||
[UnitySetupComponent]::UWP = [io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_.NET_D3D"),
|
||||
[io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_D3D");
|
||||
[io.path]::Combine("$playbackEnginePath", "windowsstandalonesupport\Variations\win32_player_development_il2cpp");
|
||||
[UnitySetupComponent]::UWP = [io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_.NET_D3D"),
|
||||
[io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_D3D");
|
||||
[UnitySetupComponent]::UWP_IL2CPP = , [io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_IL2CPP_D3D");
|
||||
[UnitySetupComponent]::Linux = , [io.path]::Combine("$playbackEnginePath", "LinuxStandaloneSupport\Variations\linux64_headless_development_mono");
|
||||
[UnitySetupComponent]::Linux_IL2CPP = , [io.path]::Combine("$playbackEnginePath", "LinuxStandaloneSupport\Variations\linux64_headless_development_il2cpp");
|
||||
[UnitySetupComponent]::Mac = , [io.path]::Combine("$playbackEnginePath", "MacStandaloneSupport");
|
||||
[UnitySetupComponent]::Windows_Server = , [io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win32_player_development_mono"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win32_server_development_il2cpp"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win32_server_development_mono"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win64_player_development_mono"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win64_server_development_il2cpp"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win64_server_development_mono");
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win32_server_development_il2cpp"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win32_server_development_mono"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win64_player_development_mono"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win64_server_development_il2cpp"),
|
||||
[io.path]::Combine("$playbackEnginePath", "WindowsStandaloneSupport\Variations\win64_server_development_mono");
|
||||
}
|
||||
}
|
||||
([OperatingSystem]::Linux) {
|
||||
|
@ -102,13 +102,13 @@ class UnitySetupInstance {
|
|||
}
|
||||
|
||||
# Common playback engines:
|
||||
$componentTests[[UnitySetupComponent]::Lumin] = , [io.path]::Combine("$playbackEnginePath", "LuminSupport");
|
||||
$componentTests[[UnitySetupComponent]::Android] = , [io.path]::Combine("$playbackEnginePath", "AndroidPlayer");
|
||||
$componentTests[[UnitySetupComponent]::iOS] = , [io.path]::Combine("$playbackEnginePath", "iOSSupport");
|
||||
$componentTests[[UnitySetupComponent]::AppleTV] = , [io.path]::Combine("$playbackEnginePath", "AppleTVSupport");
|
||||
$componentTests[[UnitySetupComponent]::Lumin] = , [io.path]::Combine("$playbackEnginePath", "LuminSupport");
|
||||
$componentTests[[UnitySetupComponent]::Android] = , [io.path]::Combine("$playbackEnginePath", "AndroidPlayer");
|
||||
$componentTests[[UnitySetupComponent]::iOS] = , [io.path]::Combine("$playbackEnginePath", "iOSSupport");
|
||||
$componentTests[[UnitySetupComponent]::AppleTV] = , [io.path]::Combine("$playbackEnginePath", "AppleTVSupport");
|
||||
$componentTests[[UnitySetupComponent]::Facebook] = , [io.path]::Combine("$playbackEnginePath", "Facebook");
|
||||
$componentTests[[UnitySetupComponent]::Vuforia] = , [io.path]::Combine("$playbackEnginePath", "VuforiaSupport");
|
||||
$componentTests[[UnitySetupComponent]::WebGL] = , [io.path]::Combine("$playbackEnginePath", "WebGLSupport");
|
||||
$componentTests[[UnitySetupComponent]::Vuforia] = , [io.path]::Combine("$playbackEnginePath", "VuforiaSupport");
|
||||
$componentTests[[UnitySetupComponent]::WebGL] = , [io.path]::Combine("$playbackEnginePath", "WebGLSupport");
|
||||
|
||||
$componentTests.Keys | ForEach-Object {
|
||||
foreach ( $test in $componentTests[$_] ) {
|
||||
|
@ -403,18 +403,18 @@ function Find-UnitySetupInstaller {
|
|||
)
|
||||
|
||||
$installerTemplates = @{
|
||||
[UnitySetupComponent]::UWP = "$targetSupport/UnitySetup-UWP-.NET-Support-for-Editor-$Version.$installerExtension",
|
||||
"$targetSupport/UnitySetup-Metro-Support-for-Editor-$Version.$installerExtension",
|
||||
"$targetSupport/UnitySetup-Universal-Windows-Platform-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::UWP = "$targetSupport/UnitySetup-UWP-.NET-Support-for-Editor-$Version.$installerExtension",
|
||||
"$targetSupport/UnitySetup-Metro-Support-for-Editor-$Version.$installerExtension",
|
||||
"$targetSupport/UnitySetup-Universal-Windows-Platform-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::UWP_IL2CPP = , "$targetSupport/UnitySetup-UWP-IL2CPP-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::Android = , "$targetSupport/UnitySetup-Android-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::iOS = , "$targetSupport/UnitySetup-iOS-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::AppleTV = , "$targetSupport/UnitySetup-AppleTV-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::Facebook = , "$targetSupport/UnitySetup-Facebook-Games-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::Linux = "$targetSupport/UnitySetup-Linux-Support-for-Editor-$Version.$installerExtension",
|
||||
"$targetSupport/UnitySetup-Linux-Mono-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::Mac = "$targetSupport/UnitySetup-Mac-Support-for-Editor-$Version.$installerExtension",
|
||||
"$targetSupport/UnitySetup-Mac-Mono-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::Linux = "$targetSupport/UnitySetup-Linux-Support-for-Editor-$Version.$installerExtension",
|
||||
"$targetSupport/UnitySetup-Linux-Mono-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::Mac = "$targetSupport/UnitySetup-Mac-Support-for-Editor-$Version.$installerExtension",
|
||||
"$targetSupport/UnitySetup-Mac-Mono-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::Mac_IL2CPP = , "$targetSupport/UnitySetup-Mac-IL2CPP-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::Vuforia = , "$targetSupport/UnitySetup-Vuforia-AR-Support-for-Editor-$Version.$installerExtension";
|
||||
[UnitySetupComponent]::WebGL = , "$targetSupport/UnitySetup-WebGL-Support-for-Editor-$Version.$installerExtension";
|
||||
|
@ -488,12 +488,12 @@ function Find-UnitySetupInstaller {
|
|||
|
||||
$webResult = Invoke-WebRequest $patchPage -UseBasicParsing
|
||||
$searchPages += $webResult.Links |
|
||||
Where-Object { $_.href -match "\/unity\/qa\/patch-releases\?version=$($Version.Major)\.$($Version.Minor)&page=(\d+)" -and $Matches[1] -gt 1 } |
|
||||
ForEach-Object { "https://unity3d.com$($_.href)" }
|
||||
Where-Object { $_.href -match "\/unity\/qa\/patch-releases\?version=$($Version.Major)\.$($Version.Minor)&page=(\d+)" -and $Matches[1] -gt 1 } |
|
||||
ForEach-Object { "https://unity3d.com$($_.href)" }
|
||||
}
|
||||
}
|
||||
|
||||
if ($Hash -ne "") {
|
||||
if($Hash -ne ""){
|
||||
$searchPages += "http://beta.unity3d.com/download/$Hash/download.html"
|
||||
}
|
||||
|
||||
|
@ -502,23 +502,24 @@ function Find-UnitySetupInstaller {
|
|||
Write-Verbose "Searching page - $page"
|
||||
$webResult = Invoke-WebRequest $page -UseBasicParsing
|
||||
$prototypeLink = $webResult.Links |
|
||||
Select-Object -ExpandProperty href -ErrorAction SilentlyContinue |
|
||||
Where-Object {
|
||||
$link = $_
|
||||
Select-Object -ExpandProperty href -ErrorAction SilentlyContinue |
|
||||
Where-Object {
|
||||
$link = $_
|
||||
|
||||
foreach ( $installer in $installerTemplates.Keys ) {
|
||||
foreach ( $template in $installerTemplates[$installer] ) {
|
||||
if ( $link -like "*$template*" ) { return $true }
|
||||
foreach ( $installer in $installerTemplates.Keys ) {
|
||||
foreach ( $template in $installerTemplates[$installer] ) {
|
||||
if ( $link -like "*$template*" ) { return $true }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $false
|
||||
} |
|
||||
Select-Object -First 1
|
||||
return $false
|
||||
} |
|
||||
Select-Object -First 1
|
||||
|
||||
if ($null -ne $prototypeLink) {
|
||||
if ($null -ne $prototypeLink)
|
||||
{
|
||||
# Ensure prototype link is absolute uri
|
||||
if (-not [system.uri]::IsWellFormedUriString($_, [System.UriKind]::Absolute)) {
|
||||
if(-not [system.uri]::IsWellFormedUriString($_,[System.UriKind]::Absolute)) {
|
||||
$prototypeLink = "$([system.uri]::new([system.uri]$page, [system.uri]$prototypeLink))"
|
||||
}
|
||||
|
||||
|
@ -1168,7 +1169,7 @@ function Uninstall-UnitySetupInstance {
|
|||
process {
|
||||
foreach ( $setupInstance in $Instances ) {
|
||||
$uninstaller = Get-ChildItem "$($setupInstance.Path)" -Filter 'Uninstall.exe' -Recurse |
|
||||
Select-Object -First 1 -ExpandProperty FullName
|
||||
Select-Object -First 1 -ExpandProperty FullName
|
||||
|
||||
if ($null -eq $uninstaller) {
|
||||
Write-Error "Could not find Uninstaller.exe under $($setupInstance.Path)"
|
||||
|
@ -1212,7 +1213,7 @@ function Get-UnitySetupInstance {
|
|||
[string[]] $BasePath
|
||||
)
|
||||
|
||||
if ((-not $BasePath) -and $env:UNITY_SETUP_INSTANCE_BASEPATH_DEFAULT) {
|
||||
if((-not $BasePath) -and $env:UNITY_SETUP_INSTANCE_BASEPATH_DEFAULT){
|
||||
$BasePath = ($env:UNITY_SETUP_INSTANCE_BASEPATH_DEFAULT -split ',') | ForEach-Object {
|
||||
$_.trim()
|
||||
}
|
||||
|
@ -1237,17 +1238,17 @@ function Get-UnitySetupInstance {
|
|||
|
||||
Write-Verbose "Searching `"$BasePath`" for UnitySetup instances..."
|
||||
Get-ChildItem -Path $BasePath -Directory -ErrorAction Ignore |
|
||||
Where-Object { (Get-UnityEditor $_.FullName).Count -gt 0 } |
|
||||
ForEach-Object {
|
||||
$path = $_.FullName
|
||||
try {
|
||||
Write-Verbose "Creating UnitySetupInstance for $path"
|
||||
[UnitySetupInstance]::new($path)
|
||||
Where-Object { (Get-UnityEditor $_.FullName).Count -gt 0 } |
|
||||
ForEach-Object {
|
||||
$path = $_.FullName
|
||||
try {
|
||||
Write-Verbose "Creating UnitySetupInstance for $path"
|
||||
[UnitySetupInstance]::new($path)
|
||||
}
|
||||
catch {
|
||||
Write-Warning "$_"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Warning "$_"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
|
@ -1322,7 +1323,8 @@ function Get-UnitySetupInstanceVersion {
|
|||
Write-Verbose "Looking for UNITY_VERSION defined in $file"
|
||||
if (Test-Path -PathType Leaf -Path $file) {
|
||||
$fileMatchInfo = Select-String -Path $file -Pattern "UNITY_VERSION.+`"(\d+\.\d+\.\d+[fpba]\d+).*`""
|
||||
if ($null -ne $fileMatchInfo) {
|
||||
if($null -ne $fileMatchInfo)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1331,9 +1333,9 @@ function Get-UnitySetupInstanceVersion {
|
|||
if ($null -eq $fileMatchInfo) {
|
||||
Write-Verbose "Looking for source files with UNITY_VERSION defined under $path\Editor\ "
|
||||
$fileMatchInfo = do {
|
||||
Get-ChildItem -Path "$path\Editor" -Include '*.cpp', '*.h' -Recurse -ErrorAction Ignore -Force -File |
|
||||
Select-String -Pattern "UNITY_VERSION.+`"(\d+\.\d+\.\d+[fpba]\d+).*`"" |
|
||||
ForEach-Object { $_; break; } # Stop the pipeline after the first result
|
||||
Get-ChildItem -Path "$path\Editor" -Include '*.cpp','*.h' -Recurse -ErrorAction Ignore -Force -File |
|
||||
Select-String -Pattern "UNITY_VERSION.+`"(\d+\.\d+\.\d+[fpba]\d+).*`"" |
|
||||
ForEach-Object { $_; break; } # Stop the pipeline after the first result
|
||||
} while ($false);
|
||||
}
|
||||
|
||||
|
@ -1446,12 +1448,12 @@ function Get-UnityProjectInstance {
|
|||
}
|
||||
|
||||
Get-ChildItem @args |
|
||||
ForEach-Object {
|
||||
$path = [io.path]::Combine($_.FullName, "ProjectVersion.txt")
|
||||
if ( Test-Path $path ) {
|
||||
[UnityProjectInstance]::new((Join-Path $_.FullName "..\" | Convert-Path))
|
||||
ForEach-Object {
|
||||
$path = [io.path]::Combine($_.FullName, "ProjectVersion.txt")
|
||||
if ( Test-Path $path ) {
|
||||
[UnityProjectInstance]::new((Join-Path $_.FullName "..\" | Convert-Path))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
|
@ -1510,7 +1512,7 @@ function Test-UnityProjectInstanceMetaFileIntegrity {
|
|||
|
||||
# get all the directories under assets
|
||||
[System.IO.DirectoryInfo[]]$dirs =
|
||||
Get-ChildItem -Path "$assetDir/*" -Recurse -Directory -Exclude $unityAssetExcludes
|
||||
Get-ChildItem -Path "$assetDir/*" -Recurse -Directory -Exclude $unityAssetExcludes
|
||||
|
||||
Write-Verbose "Testing asset directories for missing meta files..."
|
||||
[float]$progressCounter = 0
|
||||
|
@ -1929,9 +1931,9 @@ function Start-UnityEditor {
|
|||
$sharedArgs += "-cacheServerEndpoint", $CacheServerEndpoint
|
||||
$sharedArgs += "-adb2"
|
||||
$sharedArgs += "-enableCacheServer"
|
||||
if ( $CacheServerNamespacePrefix) { $sharedArgs += "-cacheServerNamespacePrefix", $CacheServerNamespacePrefix }
|
||||
$sharedArgs += "-cacheServerEnableDownload", $(If ($CacheServerDisableDownload) { "false" } Else { "true" })
|
||||
$sharedArgs += "-cacheServerEnableUpload", $(If ($CacheServerDisableUpload) { "false" } Else { "true" })
|
||||
if ( $CacheServerNamespacePrefix) { $sharedArgs += "-cacheServerNamespacePrefix", $CacheServerNamespacePrefix}
|
||||
$sharedArgs += "-cacheServerEnableDownload", $(If ($CacheServerDisableDownload) {"false"} Else {"true"})
|
||||
$sharedArgs += "-cacheServerEnableUpload", $(If ($CacheServerDisableUpload) {"false"} Else {"true"})
|
||||
}
|
||||
|
||||
[string[][]]$instanceArgs = @()
|
||||
|
|
Загрузка…
Ссылка в новой задаче