mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
40 lines
No EOL
1.1 KiB
PowerShell
40 lines
No EOL
1.1 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Helper script to OpenPype Settings UI
|
|
|
|
.DESCRIPTION
|
|
This script will run OpenPype and open Settings UI.
|
|
|
|
.EXAMPLE
|
|
|
|
PS> .\run_settings.ps1
|
|
|
|
#>
|
|
|
|
$current_dir = Get-Location
|
|
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
|
|
$openpype_root = (Get-Item $script_dir).parent.FullName
|
|
|
|
$env:_INSIDE_OPENPYPE_TOOL = "1"
|
|
|
|
# make sure Poetry is in PATH
|
|
if (-not (Test-Path 'env:POETRY_HOME')) {
|
|
$env:POETRY_HOME = "$openpype_root\.poetry"
|
|
}
|
|
$env:PATH = "$($env:PATH);$($env:POETRY_HOME)\bin"
|
|
|
|
Set-Location -Path $openpype_root
|
|
|
|
Write-Host ">>> " -NoNewline -ForegroundColor Green
|
|
Write-Host "Reading Poetry ... " -NoNewline
|
|
if (-not (Test-Path -PathType Container -Path "$openpype_root\.poetry\bin")) {
|
|
Write-Host "NOT FOUND" -ForegroundColor Yellow
|
|
Write-Host "*** " -NoNewline -ForegroundColor Yellow
|
|
Write-Host "We need to install Poetry create virtual env first ..."
|
|
& "$openpype_root\tools\create_env.ps1"
|
|
} else {
|
|
Write-Host "OK" -ForegroundColor Green
|
|
}
|
|
|
|
& poetry run python "$($openpype_root)\start.py" settings --dev
|
|
Set-Location -Path $current_dir |