diff --git a/.gitmodules b/.gitmodules index b515851c819..dfd89cdb3cc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ -[submodule "vendor/powershell/BurntToast"] - path = vendor/powershell/BurntToast +[submodule "tools/modules/powershell/BurntToast"] + path = tools/modules/powershell/BurntToast url = https://github.com/Windos/BurntToast.git -[submodule "vendor/powershell/PSWriteColor"] - path = vendor/powershell/PSWriteColor +[submodule "tools/modules/powershell/PSWriteColor"] + path = tools/modules/powershell/PSWriteColor url = https://github.com/EvotecIT/PSWriteColor.git diff --git a/tools/build.ps1 b/tools/build.ps1 index efb41e6c1b8..195b2dc75e4 100644 --- a/tools/build.ps1 +++ b/tools/build.ps1 @@ -33,7 +33,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" function Start-Progress { param([ScriptBlock]$code) @@ -189,6 +189,8 @@ Write-Color -Text ">>> ", "Restoring current directory" -Color Green, Gray Set-Location -Path $current_dir $endTime = [int][double]::Parse((Get-Date -UFormat %s)) -New-BurntToastNotification -AppLogo "$openpype_root/openpype/resources/icons/openpype_icon.png" -Text "OpenPype build complete!", "All done in $($endTime - $startTime) secs. You will find OpenPype and build log in build directory." - +try +{ + New-BurntToastNotification -AppLogo "$openpype_root/openpype/resources/icons/openpype_icon.png" -Text "OpenPype build complete!", "All done in $( $endTime - $startTime ) secs. You will find OpenPype and build log in build directory." +} catch {} Write-Color -Text "*** ", "All done in ", $($endTime - $startTime), " secs. You will find OpenPype and build log in ", "'.\build'", " directory." -Color Green, Gray, White, Gray, White, Gray diff --git a/tools/build_win_installer.ps1 b/tools/build_win_installer.ps1 index 8024a5a3b2a..b9d1ca2d3f5 100644 --- a/tools/build_win_installer.ps1 +++ b/tools/build_win_installer.ps1 @@ -16,7 +16,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" function Start-Progress { param([ScriptBlock]$code) @@ -171,7 +171,7 @@ if ($LASTEXITCODE -ne 0) { Write-Color -Text ">>> ", "Restoring current directory" -Color Green, Gray Set-Location -Path $current_dir - -New-BurntToastNotification -AppLogo "$openpype_root/openpype/resources/icons/openpype_icon.png" -Text "OpenPype build complete!", "All done. You will find You will find OpenPype installer in '.\build' directory." - +try { + New-BurntToastNotification -AppLogo "$openpype_root/openpype/resources/icons/openpype_icon.png" -Text "OpenPype build complete!", "All done. You will find You will find OpenPype installer in '.\build' directory." +} catch {} Write-Color -Text "*** ", "All done. You will find OpenPype installer in ", "'.\build'", " directory." -Color Green, Gray, White, Gray diff --git a/tools/create_env.ps1 b/tools/create_env.ps1 index c0cbe9775b1..3f956e5c6a1 100644 --- a/tools/create_env.ps1 +++ b/tools/create_env.ps1 @@ -30,7 +30,7 @@ $openpype_root = (Get-Item $script_dir).parent.FullName & git submodule update --init --recursive # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" function Exit-WithCode($exitcode) { @@ -180,7 +180,8 @@ if ($LASTEXITCODE -ne 0) { } $endTime = [int][double]::Parse((Get-Date -UFormat %s)) Set-Location -Path $current_dir - -New-BurntToastNotification -AppLogo "$openpype_root/openpype/resources/icons/openpype_icon.png" -Text "OpenPype", "Virtual environment created.", "All done in $($endTime - $startTime) secs." - +try +{ + New-BurntToastNotification -AppLogo "$openpype_root/openpype/resources/icons/openpype_icon.png" -Text "OpenPype", "Virtual environment created.", "All done in $( $endTime - $startTime ) secs." +} catch {} Write-Color -Text ">>> ", "Virtual environment created." -Color Green, White diff --git a/tools/create_zip.ps1 b/tools/create_zip.ps1 index b4b66424caa..7b852b7c549 100644 --- a/tools/create_zip.ps1 +++ b/tools/create_zip.ps1 @@ -24,7 +24,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" function Exit-WithCode($exitcode) { # Only exit this host process if it's a child of another PowerShell parent process... diff --git a/tools/fetch_thirdparty_libs.ps1 b/tools/fetch_thirdparty_libs.ps1 index 41a3585ff9b..4df007ad675 100644 --- a/tools/fetch_thirdparty_libs.ps1 +++ b/tools/fetch_thirdparty_libs.ps1 @@ -16,7 +16,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" $env:_INSIDE_OPENPYPE_TOOL = "1" @@ -38,4 +38,7 @@ $startTime = [int][double]::Parse((Get-Date -UFormat %s)) & "$($env:POETRY_HOME)\bin\poetry" run python "$($openpype_root)\tools\fetch_thirdparty_libs.py" $endTime = [int][double]::Parse((Get-Date -UFormat %s)) Set-Location -Path $current_dir -New-BurntToastNotification -AppLogo "$openpype_root/openpype/resources/icons/openpype_icon.png" -Text "OpenPype", "Dependencies downloaded", "All done in $($endTime - $startTime) secs." +try +{ + New-BurntToastNotification -AppLogo "$openpype_root/openpype/resources/icons/openpype_icon.png" -Text "OpenPype", "Dependencies downloaded", "All done in $( $endTime - $startTime ) secs." +} catch {} \ No newline at end of file diff --git a/tools/make_docs.ps1 b/tools/make_docs.ps1 index d356f081deb..43ecd0c09c5 100644 --- a/tools/make_docs.ps1 +++ b/tools/make_docs.ps1 @@ -49,7 +49,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" Write-Host $art -ForegroundColor DarkGreen diff --git a/tools/modules/powershell/BurntToast b/tools/modules/powershell/BurntToast new file mode 160000 index 00000000000..f58c9a26d6e --- /dev/null +++ b/tools/modules/powershell/BurntToast @@ -0,0 +1 @@ +Subproject commit f58c9a26d6ede30ecc7998e92b26974887e945fe diff --git a/vendor/powershell/PSWriteColor b/tools/modules/powershell/PSWriteColor similarity index 100% rename from vendor/powershell/PSWriteColor rename to tools/modules/powershell/PSWriteColor diff --git a/tools/run_mongo.ps1 b/tools/run_mongo.ps1 index 934ce671811..c64ff75969d 100644 --- a/tools/run_mongo.ps1 +++ b/tools/run_mongo.ps1 @@ -16,7 +16,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" $art = @" @@ -50,7 +50,7 @@ function Exit-WithCode($exitcode) { function Find-Mongo ($preferred_version) { $defaultPath = "C:\Program Files\MongoDB\Server" - Write-Color -Text ">>> ", "Detecting MongoDB ... " -Color Geen, Gray -NoNewline + Write-Color -Text ">>> ", "Detecting MongoDB ... " -Color Green, Gray -NoNewline if (-not (Get-Command "mongod" -ErrorAction SilentlyContinue)) { if(Test-Path "$($defaultPath)\*\bin\mongod.exe" -PathType Leaf) { # we have mongo server installed on standard Windows location @@ -61,7 +61,7 @@ function Find-Mongo ($preferred_version) { Write-Color -Text "OK" -Color Green $use_version = $mongoVersions[-1] foreach ($v in $mongoVersions) { - Write-Color -Text " - found [ ", $v, " ]" - Color Cyan, White, Cyan -NoNewLine + Write-Color -Text " - found [ ", $v, " ]" -Color Cyan, White, Cyan -NoNewLine $version = Split-Path $v -Leaf if ($preferred_version -eq $version) { @@ -110,6 +110,6 @@ $preferred_version = "5.0" $mongoPath = Find-Mongo $preferred_version Write-Color -Text ">>> ", "Using DB path: ", "[ ", "$($dbpath)", " ]" -Color Green, Gray, Cyan, White, Cyan -Write-Color -Text ">>> ", "Port: ", "[ ", "$($port)", " ]", -Color Green, Gray, Cyan, White, Cyan +Write-Color -Text ">>> ", "Port: ", "[ ", "$($port)", " ]" -Color Green, Gray, Cyan, White, Cyan Start-Process -FilePath $mongopath "--dbpath $($dbpath) --port $($port)" -PassThru | Out-Null diff --git a/tools/run_project_manager.ps1 b/tools/run_project_manager.ps1 index 2932358c2a1..c1813e4ed98 100644 --- a/tools/run_project_manager.ps1 +++ b/tools/run_project_manager.ps1 @@ -36,7 +36,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" $env:_INSIDE_OPENPYPE_TOOL = "1" diff --git a/tools/run_settings.ps1 b/tools/run_settings.ps1 index 918ea367aba..c74ae1ea3a4 100644 --- a/tools/run_settings.ps1 +++ b/tools/run_settings.ps1 @@ -16,7 +16,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" $env:_INSIDE_OPENPYPE_TOOL = "1" diff --git a/tools/run_tests.ps1 b/tools/run_tests.ps1 index 7995c6a8e93..4fa598c4135 100644 --- a/tools/run_tests.ps1 +++ b/tools/run_tests.ps1 @@ -16,7 +16,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" function Exit-WithCode($exitcode) { # Only exit this host process if it's a child of another PowerShell parent process... diff --git a/tools/run_tray.ps1 b/tools/run_tray.ps1 index 7dee3d00646..40157c4e819 100644 --- a/tools/run_tray.ps1 +++ b/tools/run_tray.ps1 @@ -15,7 +15,7 @@ $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName # Install PSWriteColor to support colorized output to terminal -$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\vendor\powershell" +$env:PSModulePath = $env:PSModulePath + ";$($openpype_root)\tools\modules\powershell" $env:_INSIDE_OPENPYPE_TOOL = "1" diff --git a/vendor/powershell/BurntToast b/vendor/powershell/BurntToast deleted file mode 160000 index ae0acdd870a..00000000000 --- a/vendor/powershell/BurntToast +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae0acdd870a2fd8d9f0d147de22dc36d6c5e399e diff --git a/vendor/powershell/README.md b/vendor/powershell/README.md deleted file mode 100644 index e69de29bb2d..00000000000