Compare commits
10 Commits
5fd64ed768
...
7d253caeee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d253caeee | ||
|
|
2819ea6524 | ||
|
|
c0c82520f1 | ||
|
|
712c1215ed | ||
|
|
153c1d4a1e | ||
|
|
07a413e23f | ||
|
|
37bdfcb862 | ||
|
|
cd056df109 | ||
|
|
4070a0adf8 | ||
|
|
753f48e9d0 |
2
.specstory/.gitignore
vendored
2
.specstory/.gitignore
vendored
@@ -1,2 +1,4 @@
|
|||||||
# SpecStory explanation file
|
# SpecStory explanation file
|
||||||
/.what-is-this.md
|
/.what-is-this.md
|
||||||
|
# SpecStory project identity file
|
||||||
|
/.project.json
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
{
|
{
|
||||||
"workspace_id": "32e8-397e-7a7f-56c3",
|
"workspace_id": "32e8-397e-7a7f-56c3",
|
||||||
"workspace_id_at": "2025-04-28T20:11:59.428Z"
|
"workspace_id_at": "2025-04-28T20:11:59.428Z",
|
||||||
|
"project_name": "Flamenco-Management",
|
||||||
|
"cloud_sync": false,
|
||||||
|
"git_id": "23f5-5500-1564-9719",
|
||||||
|
"git_id_at": "2025-11-03T19:27:17.099Z"
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,523 @@
|
|||||||
|
<!-- Generated by SpecStory, Markdown v2.0.0 -->
|
||||||
|
|
||||||
|
<!-- cursor Session 9522a0d8-694a-45d0-a000-ce16feaaf911 (2025-11-19 17:03Z) -->
|
||||||
|
|
||||||
|
# Error initializing SheepIt client (2025-11-19 17:03Z)
|
||||||
|
|
||||||
|
_**User (2025-11-19 17:03Z)**_
|
||||||
|
|
||||||
|
SheepIt client already present at C:\Users\nathan\AppData\Roaming\sheepit\sheepit-client.jar. Skipping download.
|
||||||
|
|
||||||
|
Starting SheepIt client...
|
||||||
|
|
||||||
|
Authenticating as RaincloudTheDragon via render key.
|
||||||
|
|
||||||
|
Error occurred during initialization of VM
|
||||||
|
|
||||||
|
Failed setting boot class path.
|
||||||
|
|
||||||
|
Connection to i9-13ks closed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SSH session ended.
|
||||||
|
|
||||||
|
Press Enter to close:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
_**Agent (model default, mode Agent)**_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
The "Failed setting boot class path" error usually indicates a Java version mismatch or incompatible JVM arguments. Checking the SheepIt launcher script to see how it's launching the client.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="read" data-tool-name="read_file">
|
||||||
|
<details><summary>Tool use: **read_file** • Read file: unified_sheepit_launcher.ps1</summary>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="read" data-tool-name="read_file">
|
||||||
|
<details><summary>Tool use: **read_file** • Read file: unified_sheepit_launcher.bat</summary>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
The error "Failed setting boot class path" usually indicates a Java version mismatch or incompatible JVM arguments. Updating the launch command to be more compatible and add error handling:
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="write" data-tool-name="search_replace">
|
||||||
|
|
||||||
|
<details><summary>Tool use: **code_edit** • Edit file: unified_sheepit_launcher.ps1</summary>
|
||||||
|
|
||||||
|
**Chunk 1**
|
||||||
|
Lines added: 13, lines removed: 2
|
||||||
|
|
||||||
|
```diff
|
||||||
|
@@ -88,6 +88,17 @@
|
||||||
|
|
||||||
|
Write-Host "Starting SheepIt client..." -ForegroundColor Cyan
|
||||||
|
- ${userLine} Set-Location `$sheepDir
|
||||||
|
- & java -jar `$jarPath -ui text --log-stdout --verbose -gpu OPTIX_0 -login '${safeUser}' -password '${safeKey}'
|
||||||
|
+
|
||||||
|
+ # Check Java version
|
||||||
|
+ try {
|
||||||
|
+ `$javaVersion = java -version 2>&1 | Select-Object -First 1
|
||||||
|
+ Write-Host "Java version: `$javaVersion" -ForegroundColor Gray
|
||||||
|
+ }
|
||||||
|
+ catch {
|
||||||
|
+ Write-Host "Warning: Could not determine Java version" -ForegroundColor Yellow
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ Set-Location `$sheepDir
|
||||||
|
+ # Use -XX:+IgnoreUnrecognizedVMOptions to handle any incompatible JVM args
|
||||||
|
+ & java -XX:+IgnoreUnrecognizedVMOptions -jar `$jarPath -ui text --log-stdout --verbose -gpu OPTIX_0 -login '${safeUser}' -password '${safeKey}'
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Improving error handling to capture and display more details about Java errors:
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="write" data-tool-name="search_replace">
|
||||||
|
|
||||||
|
<details><summary>Tool use: **code_edit** • Edit file: unified_sheepit_launcher.ps1</summary>
|
||||||
|
|
||||||
|
**Chunk 1**
|
||||||
|
Lines added: 20, lines removed: 1
|
||||||
|
|
||||||
|
```diff
|
||||||
|
@@ -99,9 +99,28 @@
|
||||||
|
|
||||||
|
Set-Location `$sheepDir
|
||||||
|
+
|
||||||
|
+ # Check for problematic environment variables
|
||||||
|
+ if (`$env:JAVA_TOOL_OPTIONS) {
|
||||||
|
+ Write-Host "Warning: JAVA_TOOL_OPTIONS is set: `$env:JAVA_TOOL_OPTIONS" -ForegroundColor Yellow
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
# Use -XX:+IgnoreUnrecognizedVMOptions to handle any incompatible JVM args
|
||||||
|
- & java -XX:+IgnoreUnrecognizedVMOptions -jar `$jarPath -ui text --log-stdout --verbose -gpu OPTIX_0 -login '${safeUser}' -password '${safeKey}'
|
||||||
|
+ # This flag helps with Java 9+ compatibility issues
|
||||||
|
+ `$javaArgs = @('-XX:+IgnoreUnrecognizedVMOptions', '-jar', `$jarPath,
|
||||||
|
+ '-ui', 'text', '--log-stdout', '--verbose',
|
||||||
|
+ '-gpu', 'OPTIX_0', '-login', '${safeUser}', '-password', '${safeKey}')
|
||||||
|
+
|
||||||
|
+ try {
|
||||||
|
+ & java @javaArgs
|
||||||
|
+ }
|
||||||
|
+ catch {
|
||||||
|
+ Write-Host ('Java execution error: {0}' -f `$_.Exception.Message) -ForegroundColor Red
|
||||||
|
+ Write-Host "If the error persists, try updating Java to a compatible version (Java 8 or Java 11+ recommended)." -ForegroundColor Yellow
|
||||||
|
+ throw
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host ('Error: {0}' -f `$_.Exception.Message) -ForegroundColor Red
|
||||||
|
+ Write-Host ('Stack trace: {0}' -f `$_.ScriptStackTrace) -ForegroundColor DarkRed
|
||||||
|
}
|
||||||
|
"@
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Checking for linting errors:
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="generic" data-tool-name="read_lints">
|
||||||
|
<details>
|
||||||
|
<summary>Tool use: **read_lints** • Read lints for 1 file</summary>
|
||||||
|
|
||||||
|
Lint paths:
|
||||||
|
|
||||||
|
- `unified_sheepit_launcher.ps1`
|
||||||
|
|
||||||
|
Lint results
|
||||||
|
|
||||||
|
|
||||||
|
**No lint errors found**
|
||||||
|
</details>
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Updated the SheepIt launcher to address the "Failed setting boot class path" error. Changes:
|
||||||
|
|
||||||
|
1. **Added `-XX:+IgnoreUnrecognizedVMOptions` flag** — helps with Java 9+ compatibility issues that can cause boot class path errors
|
||||||
|
2. **Added Java version check** — displays the Java version in use for debugging
|
||||||
|
3. **Added environment variable check** — warns if `JAVA_TOOL_OPTIONS` is set (can cause conflicts)
|
||||||
|
4. **Improved error handling** — clearer error messages and diagnostics
|
||||||
|
|
||||||
|
The main fix is the `-XX:+IgnoreUnrecognizedVMOptions` flag, which tells the JVM to ignore unrecognized VM options. This often resolves boot class path errors when the JAR or environment includes incompatible arguments.
|
||||||
|
|
||||||
|
Try running the launcher again. If the error persists, it may indicate:
|
||||||
|
- An incompatible Java version on the remote machine (i9-13ks)
|
||||||
|
- System-level Java configuration issues
|
||||||
|
|
||||||
|
The script will now show the Java version being used, which will help diagnose further if needed.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
_**User (2025-11-19 17:03Z)**_
|
||||||
|
|
||||||
|
I think it's an issue with the system itself. Can you ssh into the system and see if it can reach the internet?
|
||||||
|
|
||||||
|
SheepIt client already present at C:\Users\nathan\AppData\Roaming\sheepit\sheepit-client.jar. Skipping download.
|
||||||
|
|
||||||
|
Starting SheepIt client...
|
||||||
|
|
||||||
|
Java version: Error occurred during initialization of VM
|
||||||
|
|
||||||
|
Error occurred during initialization of VM
|
||||||
|
|
||||||
|
Failed setting boot class path.
|
||||||
|
|
||||||
|
Connection to i9-13ks closed.
|
||||||
|
|
||||||
|
SSH session ended.
|
||||||
|
|
||||||
|
Press Enter to close:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
_**Agent (model default, mode Agent)**_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
SSHing into i9-13ks to check internet connectivity and diagnose the Java issue. Since `java -version` also fails, this likely points to a system-level Java problem.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="bash" data-tool-name="run_terminal_cmd">
|
||||||
|
<details><summary>Tool use: **command** • Run command: ssh -t -p 22146 i9-13ks "powershell -Command \"Write-Host 'Testing internet connectivity...' -ForegroundColor Cyan; Test-NetConnection -ComputerName google.com -Port 80 -InformationLevel Quiet; if ($?) { Write-Host 'Internet connection: OK' -ForegroundColor Green } else { Write-Host 'Internet connection: FAILED' -ForegroundColor Red }; Write-Host ''; Write-Host 'Testing DNS resolution...' -ForegroundColor Cyan; try { $result = Resolve-DnsName -Name google.com -ErrorAction Stop; Write-Host 'DNS resolution: OK' -ForegroundColor Green } catch { Write-Host 'DNS resolution: FAILED' -ForegroundColor Red }; Write-Host ''; Write-Host 'Testing HTTP connectivity...' -ForegroundColor Cyan; try { $response = Invoke-WebRequest -Uri 'https://www.google.com' -TimeoutSec 5 -UseBasicParsing -ErrorAction Stop; Write-Host 'HTTP connectivity: OK' -ForegroundColor Green } catch { Write-Host \"HTTP connectivity: FAILED - $($_.Exception.Message)\" -ForegroundColor Red }\""</summary>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh -t -p 22146 i9-13ks "powershell -Command \"Write-Host 'Testing internet connectivity...' -ForegroundColor Cyan; Test-NetConnection -ComputerName google.com -Port 80 -InformationLevel Quiet; if ($?) { Write-Host 'Internet connection: OK' -ForegroundColor Green } else { Write-Host 'Internet connection: FAILED' -ForegroundColor Red }; Write-Host ''; Write-Host 'Testing DNS resolution...' -ForegroundColor Cyan; try { $result = Resolve-DnsName -Name google.com -ErrorAction Stop; Write-Host 'DNS resolution: OK' -ForegroundColor Green } catch { Write-Host 'DNS resolution: FAILED' -ForegroundColor Red }; Write-Host ''; Write-Host 'Testing HTTP connectivity...' -ForegroundColor Cyan; try { $response = Invoke-WebRequest -Uri 'https://www.google.com' -TimeoutSec 5 -UseBasicParsing -ErrorAction Stop; Write-Host 'HTTP connectivity: OK' -ForegroundColor Green } catch { Write-Host \"HTTP connectivity: FAILED - $($_.Exception.Message)\" -ForegroundColor Red }\""
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
[?9001h[?1004h[?25l[2J[m[H]0;Administrator: C:\WINDOWS\system32\conhost.exe[?25h[38;5;9m\ : The term '\' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the [m[38;5;9m
|
||||||
|
spelling of the name, or if a path was included, verify that the path is correct and try again.
|
||||||
|
At line:1 char:1
|
||||||
|
+ \ Write-Host Testing internet connectivity... -ForegroundColor Cyan
|
||||||
|
+ ~
|
||||||
|
+ CategoryInfo : ObjectNotFound: (\:String) [], CommandNotFoundException
|
||||||
|
+ FullyQualifiedErrorId : CommandNotFoundException
|
||||||
|
|
||||||
|
[?9001l[?1004l[mConnection to i9-13ks closed.
|
||||||
|
True
|
||||||
|
Internet connection: OK
|
||||||
|
|
||||||
|
Testing DNS resolution...
|
||||||
|
DNS resolution: OK
|
||||||
|
|
||||||
|
Testing HTTP connectivity...
|
||||||
|
HTTP connectivity: OK
|
||||||
|
\: C:\Users\Nathan\AppData\Local\Temp\ps-script-f07861ff-1930-4e0c-a126-2a9512cba633.ps1:7
|
||||||
|
Line |
|
||||||
|
7 | . ctivity: FAILED - $($_.Exception.Message)\" -ForegroundColor Red }\""
|
||||||
|
| ~~~
|
||||||
|
| The term '\' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the
|
||||||
|
| spelling of the name, or if a path was included, verify that the path is correct and try again.
|
||||||
|
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Internet connectivity is working. Checking the Java installation:
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="bash" data-tool-name="run_terminal_cmd">
|
||||||
|
<details><summary>Tool use: **command** • Run command: ssh -t -p 22146 i9-13ks "powershell -Command \"Write-Host 'Checking Java installation...' -ForegroundColor Cyan; Write-Host ''; Write-Host 'Java executable path:' -ForegroundColor Yellow; Get-Command java -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source; Write-Host ''; Write-Host 'JAVA_HOME environment variable:' -ForegroundColor Yellow; Write-Host \$env:JAVA_HOME; Write-Host ''; Write-Host 'JAVA_TOOL_OPTIONS:' -ForegroundColor Yellow; Write-Host \$env:JAVA_TOOL_OPTIONS; Write-Host ''; Write-Host 'PATH entries containing java:' -ForegroundColor Yellow; \$env:PATH -split ';' | Where-Object { \$_ -like '*java*' }; Write-Host ''; Write-Host 'Attempting java -version (this may fail):' -ForegroundColor Yellow; java -version 2>&1\""</summary>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh -t -p 22146 i9-13ks "powershell -Command \"Write-Host 'Checking Java installation...' -ForegroundColor Cyan; Write-Host ''; Write-Host 'Java executable path:' -ForegroundColor Yellow; Get-Command java -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source; Write-Host ''; Write-Host 'JAVA_HOME environment variable:' -ForegroundColor Yellow; Write-Host \$env:JAVA_HOME; Write-Host ''; Write-Host 'JAVA_TOOL_OPTIONS:' -ForegroundColor Yellow; Write-Host \$env:JAVA_TOOL_OPTIONS; Write-Host ''; Write-Host 'PATH entries containing java:' -ForegroundColor Yellow; \$env:PATH -split ';' | Where-Object { \$_ -like '*java*' }; Write-Host ''; Write-Host 'Attempting java -version (this may fail):' -ForegroundColor Yellow; java -version 2>&1\""
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
[?9001h[?1004h[?25l[2J[m[H]0;Administrator: C:\WINDOWS\system32\conhost.exe[?25h[38;5;9m\ : The term '\' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the [?9001l[?1004l[m[38;5;9m
|
||||||
|
spelling of the name, or if a path was included, verify that the path is correct and try again.
|
||||||
|
At line:1 char:1
|
||||||
|
+ \ Write-Host Checking Java installation... -ForegroundColor Cyan
|
||||||
|
+ ~
|
||||||
|
+ CategoryInfo : ObjectNotFound: (\:String) [], CommandNotFoundException
|
||||||
|
+ FullyQualifiedErrorId : CommandNotFoundException
|
||||||
|
|
||||||
|
|
||||||
|
Java executable path:
|
||||||
|
C:\Program Files\Eclipse Adoptium\jdk-21.0.9.10-hotspot\bin\java.exe
|
||||||
|
|
||||||
|
JAVA_HOME environment variable:
|
||||||
|
\
|
||||||
|
|
||||||
|
JAVA_TOOL_OPTIONS:
|
||||||
|
\
|
||||||
|
|
||||||
|
PATH entries containing java:
|
||||||
|
Connection to i9-13ks closed.
|
||||||
|
|
||||||
|
Attempting java -version (this may fail):
|
||||||
|
\$env:PATH: C:\Users\Nathan\AppData\Local\Temp\ps-script-2b04d60b-8094-4ccf-b84e-435f31732af2.ps1:118
|
||||||
|
Line |
|
||||||
|
118 | . entries containing java:' -ForegroundColor Yellow; \$env:PATH -split .
|
||||||
|
| ~~~~~~~~~~
|
||||||
|
| The term '\$env:PATH' is not recognized as a name of a cmdlet, function, script file, or executable program.
|
||||||
|
| Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
|
||||||
|
openjdk version "21.0.9" 2025-10-21 LTS
|
||||||
|
OpenJDK Runtime Environment Temurin-21.0.9+10 (build 21.0.9+10-LTS)
|
||||||
|
OpenJDK 64-Bit Server VM Temurin-21.0.9+10 (build 21.0.9+10-LTS, mixed mode, sharing)
|
||||||
|
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Java is installed (Java 21), but `JAVA_HOME` and `JAVA_TOOL_OPTIONS` are set to `\`, which is invalid and likely causing the boot class path error. Checking and fixing these environment variables:
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Cancelled
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
_**User (2025-11-19 17:03Z)**_
|
||||||
|
|
||||||
|
Connecting to i9-13ks...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SheepIt client already present at C:\Users\nathan\AppData\Roaming\sheepit\sheepit-client.jar. Skipping download.
|
||||||
|
|
||||||
|
Starting SheepIt client...
|
||||||
|
|
||||||
|
Warning: Could not determine Java version
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
I had to choco uninstall and reinstall Temurin21. This is the 2nd time I've had to do this on this system.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
_**Agent (model default, mode Agent)**_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Invalid `JAVA_HOME` and `JAVA_TOOL_OPTIONS` (set to `\`) were causing the issue. Updating the script to detect and handle invalid Java environment variables to prevent this from recurring:
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="read" data-tool-name="read_file">
|
||||||
|
<details><summary>Tool use: **read_file** • Read file: unified_sheepit_launcher.ps1</summary>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Updating the script to detect and handle invalid Java environment variables:
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="write" data-tool-name="search_replace">
|
||||||
|
|
||||||
|
<details><summary>Tool use: **code_edit** • Edit file: unified_sheepit_launcher.ps1</summary>
|
||||||
|
|
||||||
|
**Chunk 1**
|
||||||
|
Lines added: 27, lines removed: 1
|
||||||
|
|
||||||
|
```diff
|
||||||
|
@@ -88,8 +88,34 @@
|
||||||
|
|
||||||
|
Write-Host "Starting SheepIt client..." -ForegroundColor Cyan
|
||||||
|
+
|
||||||
|
+ # Check and fix problematic environment variables that can cause boot class path errors
|
||||||
|
+ `$envVarsFixed = `$false
|
||||||
|
+
|
||||||
|
+ # Check JAVA_HOME - invalid values like '\' or empty can cause issues
|
||||||
|
+ if (`$env:JAVA_HOME) {
|
||||||
|
+ if (`$env:JAVA_HOME -eq '\' -or `$env:JAVA_HOME.Trim() -eq '' -or -not (Test-Path `$env:JAVA_HOME)) {
|
||||||
|
+ Write-Host "Warning: Invalid JAVA_HOME detected ('`$env:JAVA_HOME'). Temporarily unsetting..." -ForegroundColor Yellow
|
||||||
|
+ Remove-Item Env:\JAVA_HOME -ErrorAction SilentlyContinue
|
||||||
|
+ `$envVarsFixed = `$true
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ # Check JAVA_TOOL_OPTIONS - invalid values can cause boot class path errors
|
||||||
|
+ if (`$env:JAVA_TOOL_OPTIONS) {
|
||||||
|
+ if (`$env:JAVA_TOOL_OPTIONS -eq '\' -or `$env:JAVA_TOOL_OPTIONS.Trim() -eq '') {
|
||||||
|
+ Write-Host "Warning: Invalid JAVA_TOOL_OPTIONS detected ('`$env:JAVA_TOOL_OPTIONS'). Temporarily unsetting..." -ForegroundColor Yellow
|
||||||
|
+ Remove-Item Env:\JAVA_TOOL_OPTIONS -ErrorAction SilentlyContinue
|
||||||
|
+ `$envVarsFixed = `$true
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (`$envVarsFixed) {
|
||||||
|
+ Write-Host "Environment variables fixed. Proceeding with Java launch..." -ForegroundColor Green
|
||||||
|
+ }
|
||||||
|
|
||||||
|
# Check Java version
|
||||||
|
try {
|
||||||
|
- `$javaVersion = java -version 2>&1 | Select-Object -First 1
|
||||||
|
+ `$javaOutput = java -version 2>&1
|
||||||
|
+ `$javaVersion = `$javaOutput | Select-Object -First 1
|
||||||
|
Write-Host "Java version: `$javaVersion" -ForegroundColor Gray
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Chunk 2**
|
||||||
|
Lines added: undefined, lines removed: 5
|
||||||
|
|
||||||
|
```diff
|
||||||
|
@@ -99,9 +125,4 @@
|
||||||
|
|
||||||
|
Set-Location `$sheepDir
|
||||||
|
-
|
||||||
|
- # Check for problematic environment variables
|
||||||
|
- if (`$env:JAVA_TOOL_OPTIONS) {
|
||||||
|
- Write-Host "Warning: JAVA_TOOL_OPTIONS is set: `$env:JAVA_TOOL_OPTIONS" -ForegroundColor Yellow
|
||||||
|
- }
|
||||||
|
|
||||||
|
# Use -XX:+IgnoreUnrecognizedVMOptions to handle any incompatible JVM args
|
||||||
|
```
|
||||||
|
|
||||||
|
**Chunk 3**
|
||||||
|
Lines added: 1, lines removed: 1
|
||||||
|
|
||||||
|
```diff
|
||||||
|
@@ -116,5 +137,5 @@
|
||||||
|
catch {
|
||||||
|
Write-Host ('Java execution error: {0}' -f `$_.Exception.Message) -ForegroundColor Red
|
||||||
|
- Write-Host "If the error persists, try updating Java to a compatible version (Java 8 or Java 11+ recommended)." -ForegroundColor Yellow
|
||||||
|
+ Write-Host "If the error persists, try reinstalling Java (Temurin 21 recommended)." -ForegroundColor Yellow
|
||||||
|
throw
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<tool-use data-tool-type="generic" data-tool-name="read_lints">
|
||||||
|
<details>
|
||||||
|
<summary>Tool use: **read_lints** • Read lints for 1 file</summary>
|
||||||
|
|
||||||
|
Lint paths:
|
||||||
|
|
||||||
|
- `unified_sheepit_launcher.ps1`
|
||||||
|
|
||||||
|
Lint results
|
||||||
|
|
||||||
|
|
||||||
|
**No lint errors found**
|
||||||
|
</details>
|
||||||
|
</tool-use>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Updated the script to detect and handle invalid Java environment variables. It will:
|
||||||
|
|
||||||
|
1. **Check `JAVA_HOME`** — if it's set to `\`, empty, or an invalid path, it temporarily unsets it
|
||||||
|
2. **Check `JAVA_TOOL_OPTIONS`** — if it's set to `\` or empty, it temporarily unsets it
|
||||||
|
3. **Show warnings** when these are fixed so you know what happened
|
||||||
|
4. **Proceed with Java launch** after cleaning up the environment
|
||||||
|
|
||||||
|
Since this is the second time you've had to reinstall Java on this system, something may be corrupting these environment variables. The script will now automatically fix them when detected, so you shouldn't need to reinstall Java again.
|
||||||
|
|
||||||
|
The script temporarily unsets these variables only for the SheepIt client process, so it won't affect other applications or require system-wide changes. This should prevent the "Failed setting boot class path" error from recurring.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_blender-boss.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to blender-boss..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t blender-boss "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_echo.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to echo..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t echo "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
# Script to handle network drive mapping and file copying
|
|
||||||
# Author: Nathan
|
|
||||||
# Date: 2025-04-23
|
|
||||||
|
|
||||||
# Function to check if a drive is mapped
|
|
||||||
function Test-DriveMapped {
|
|
||||||
param (
|
|
||||||
[string]$DriveLetter
|
|
||||||
)
|
|
||||||
$drive = Get-PSDrive -Name $DriveLetter -ErrorAction SilentlyContinue
|
|
||||||
return $null -ne $drive
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to remove a mapped drive
|
|
||||||
function Remove-MappedDrive {
|
|
||||||
param (
|
|
||||||
[string]$DriveLetter
|
|
||||||
)
|
|
||||||
if (Test-DriveMapped -DriveLetter $DriveLetter) {
|
|
||||||
Write-Host "Removing existing $DriveLetter drive mapping..."
|
|
||||||
Remove-PSDrive -Name $DriveLetter -Force
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to map a network drive
|
|
||||||
function Map-NetworkDrive {
|
|
||||||
param (
|
|
||||||
[string]$DriveLetter,
|
|
||||||
[string]$NetworkPath
|
|
||||||
)
|
|
||||||
Write-Host "Mapping $DriveLetter to $NetworkPath..."
|
|
||||||
New-PSDrive -Name $DriveLetter -PSProvider FileSystem -Root $NetworkPath -Persist
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to copy files using robocopy
|
|
||||||
function Copy-FilesWithRobocopy {
|
|
||||||
param (
|
|
||||||
[string]$SourcePath,
|
|
||||||
[string]$DestinationPath
|
|
||||||
)
|
|
||||||
Write-Host "Copying files from $SourcePath to $DestinationPath..."
|
|
||||||
robocopy $SourcePath $DestinationPath /E /MOVE
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main script execution
|
|
||||||
try {
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Copy-FilesWithRobocopy -SourcePath "C:\nexus\amazon" -DestinationPath "F:\renders"
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Error "An error occurred: $_"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_i9-13ks.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to i9-13ks..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t i9-13ks "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_masterbox.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to masterbox..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t masterbox "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_max.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to max..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t max "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
@echo off
|
|
||||||
title Flamenco CMD Worker Launcher
|
|
||||||
echo Starting Flamenco CMD Worker Launcher...
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0cmd_run_flamenco_workers.ps1"
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
# Unified Flamenco Worker Connection Script (CMD VERSION)
|
|
||||||
Write-Host "====================================" -ForegroundColor Cyan
|
|
||||||
Write-Host " FLAMENCO CMD WORKER LAUNCHER" -ForegroundColor Cyan
|
|
||||||
Write-Host "====================================" -ForegroundColor Cyan
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
# Define available systems
|
|
||||||
$systems = @(
|
|
||||||
@{ ID = 1; Name = "masterbox"; ScriptPath = "run_masterbox_cmd.ps1"; BatchPath = "run_masterbox_cmd.bat" },
|
|
||||||
@{ ID = 2; Name = "i9-13ks"; ScriptPath = "run_i9-13ks_cmd.ps1"; BatchPath = "run_i9-13ks_cmd.bat" },
|
|
||||||
@{ ID = 3; Name = "max"; ScriptPath = "run_max_cmd.ps1"; BatchPath = "run_max_cmd.bat" },
|
|
||||||
@{ ID = 4; Name = "echo"; ScriptPath = "run_echo_cmd.ps1"; BatchPath = "run_echo_cmd.bat" },
|
|
||||||
@{ ID = 5; Name = "blender-boss"; ScriptPath = "run_blender-boss_cmd.ps1"; BatchPath = "run_blender-boss_cmd.bat" }
|
|
||||||
)
|
|
||||||
|
|
||||||
# Print menu options
|
|
||||||
Write-Host "Select a system to connect to (CMD VERSION):" -ForegroundColor Yellow
|
|
||||||
foreach ($system in $systems) {
|
|
||||||
Write-Host "$($system.ID). $($system.Name)" -ForegroundColor Green
|
|
||||||
}
|
|
||||||
Write-Host "0. Connect to ALL systems (separate windows)" -ForegroundColor Magenta
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
# Get user selection
|
|
||||||
$selection = Read-Host "Enter your selection (0-$($systems.Count))"
|
|
||||||
|
|
||||||
# Process selection
|
|
||||||
if ($selection -eq "0") {
|
|
||||||
# Launch all systems in separate windows
|
|
||||||
Write-Host "Launching all worker scripts in separate windows..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
foreach ($system in $systems) {
|
|
||||||
$scriptPath = Join-Path (Get-Location) $system.BatchPath
|
|
||||||
Start-Process "cmd.exe" -ArgumentList "/c $scriptPath" -WindowStyle Normal
|
|
||||||
Write-Host "Started $($system.Name) worker in a new window." -ForegroundColor Green
|
|
||||||
Start-Sleep -Seconds 2 # Add a small delay between launches
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nAll worker scripts have been launched." -ForegroundColor Cyan
|
|
||||||
Write-Host "Each worker is running in its own command window." -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
# Find the selected system
|
|
||||||
$selectedSystem = $systems | Where-Object { $_.ID -eq [int]$selection }
|
|
||||||
|
|
||||||
if ($selectedSystem) {
|
|
||||||
Write-Host "Launching $($selectedSystem.Name) worker script..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
# Execute the PowerShell script directly
|
|
||||||
$scriptPath = Join-Path (Get-Location) $selectedSystem.ScriptPath
|
|
||||||
& $scriptPath
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Host "Invalid selection. Please run the script again." -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
$null = Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_blender-boss_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to blender-boss..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t blender-boss "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_blender-boss_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to blender-boss..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t blender-boss "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_echo_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to echo..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t echo "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_echo_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to echo..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t echo "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
@echo off
|
|
||||||
title Flamenco Worker Launcher
|
|
||||||
echo Starting Flamenco Worker Launcher...
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_flamenco_workers.ps1"
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
# Unified Flamenco Worker Connection Script (STANDARD VERSION)
|
|
||||||
Write-Host "====================================" -ForegroundColor Cyan
|
|
||||||
Write-Host " FLAMENCO WORKER LAUNCHER" -ForegroundColor Cyan
|
|
||||||
Write-Host "====================================" -ForegroundColor Cyan
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
# Define available systems
|
|
||||||
$systems = @(
|
|
||||||
@{ ID = 1; Name = "masterbox"; ScriptPath = "run_masterbox_worker.ps1"; BatchPath = "run_masterbox_worker.bat" },
|
|
||||||
@{ ID = 2; Name = "i9-13ks"; ScriptPath = "run_i9-13ks_worker.ps1"; BatchPath = "run_i9-13ks_worker.bat" },
|
|
||||||
@{ ID = 3; Name = "max"; ScriptPath = "run_max_worker.ps1"; BatchPath = "run_max_worker.bat" },
|
|
||||||
@{ ID = 4; Name = "echo"; ScriptPath = "run_echo_worker.ps1"; BatchPath = "run_echo_worker.bat" },
|
|
||||||
@{ ID = 5; Name = "blender-boss"; ScriptPath = "run_blender-boss_worker.ps1"; BatchPath = "run_blender-boss_worker.bat" }
|
|
||||||
)
|
|
||||||
|
|
||||||
# Print menu options
|
|
||||||
Write-Host "Select a system to connect to:" -ForegroundColor Yellow
|
|
||||||
foreach ($system in $systems) {
|
|
||||||
Write-Host "$($system.ID). $($system.Name)" -ForegroundColor Green
|
|
||||||
}
|
|
||||||
Write-Host "0. Connect to ALL systems (separate windows)" -ForegroundColor Magenta
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
# Get user selection
|
|
||||||
$selection = Read-Host "Enter your selection (0-$($systems.Count))"
|
|
||||||
|
|
||||||
# Process selection
|
|
||||||
if ($selection -eq "0") {
|
|
||||||
# Launch all systems in separate windows
|
|
||||||
Write-Host "Launching all worker scripts in separate windows..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
foreach ($system in $systems) {
|
|
||||||
$scriptPath = Join-Path (Get-Location) $system.BatchPath
|
|
||||||
Start-Process "cmd.exe" -ArgumentList "/c $scriptPath" -WindowStyle Normal
|
|
||||||
Write-Host "Started $($system.Name) worker in a new window." -ForegroundColor Green
|
|
||||||
Start-Sleep -Seconds 2 # Add a small delay between launches
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nAll worker scripts have been launched." -ForegroundColor Cyan
|
|
||||||
Write-Host "Each worker is running in its own command window." -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
# Find the selected system
|
|
||||||
$selectedSystem = $systems | Where-Object { $_.ID -eq [int]$selection }
|
|
||||||
|
|
||||||
if ($selectedSystem) {
|
|
||||||
Write-Host "Launching $($selectedSystem.Name) worker script..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
# Execute the PowerShell script directly
|
|
||||||
$scriptPath = Join-Path (Get-Location) $selectedSystem.ScriptPath
|
|
||||||
& $scriptPath
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Host "Invalid selection. Please run the script again." -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
$null = Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_i9-13ks_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to i9-13ks..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t -p 22146 i9-13ks "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_i9-13ks_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to i9-13ks..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t -p 22146 i9-13ks "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_masterbox_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to masterbox..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t masterbox "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_masterbox_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to masterbox..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t masterbox "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_max_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to max..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t max "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_max_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to max..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t max "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo Starting all worker CMD scripts...
|
|
||||||
|
|
||||||
start "Masterbox Worker CMD" cmd /c run_masterbox_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
start "i9-13ks Worker CMD" cmd /c run_i9-13ks_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
start "Max Worker CMD" cmd /c run_max_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
start "Echo Worker CMD" cmd /c run_echo_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
start "Blender-Boss Worker CMD" cmd /c run_blender-boss_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
echo All worker CMD scripts started!
|
|
||||||
echo.
|
|
||||||
echo Note: Each worker will open in its own command window.
|
|
||||||
echo.
|
|
||||||
pause
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo Starting all Flamenco workers...
|
|
||||||
|
|
||||||
start "Masterbox Worker" powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0masterbox_worker1.ps1"
|
|
||||||
timeout /t 2 >nul
|
|
||||||
|
|
||||||
start "Blender-Boss Worker" powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0blender-boss_worker1.ps1"
|
|
||||||
timeout /t 2 >nul
|
|
||||||
|
|
||||||
start "Echo Worker" powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0echo_worker1.ps1"
|
|
||||||
timeout /t 2 >nul
|
|
||||||
|
|
||||||
start "Max Worker" powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0max_worker1.ps1"
|
|
||||||
|
|
||||||
echo All workers have been launched in separate windows.
|
|
||||||
echo You can close this window now.
|
|
||||||
@@ -46,18 +46,6 @@ const JOB_TYPE = {
|
|||||||
},
|
},
|
||||||
description: "Base path where renders are stored, typically the project's Renders folder. If empty, derived automatically."
|
description: "Base path where renders are stored, typically the project's Renders folder. If empty, derived automatically."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: "daily_path",
|
|
||||||
type: "string",
|
|
||||||
required: false,
|
|
||||||
visible: "submission",
|
|
||||||
eval: "__import__('datetime').datetime.now().strftime('daily_%y%m%d')",
|
|
||||||
evalInfo: {
|
|
||||||
showLinkButton: true,
|
|
||||||
description: "Auto-fill with today's daily folder name"
|
|
||||||
},
|
|
||||||
description: "Daily folder name under the render root, e.g. 'daily_250813'. If empty, auto-fills to today's date."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: "use_submodule",
|
key: "use_submodule",
|
||||||
label: "Use Submodule",
|
label: "Use Submodule",
|
||||||
@@ -84,7 +72,7 @@ const JOB_TYPE = {
|
|||||||
type: "string",
|
type: "string",
|
||||||
subtype: "file_path",
|
subtype: "file_path",
|
||||||
editable: false,
|
editable: false,
|
||||||
eval: "str(Path(abspath(settings.render_output_root or '//'), ((str(settings.submodule or '').strip()) if (settings.use_submodule and str(settings.submodule or '').strip()) else ((__import__('os').path.basename(__import__('os').path.dirname(bpy.data.filepath))) if settings.use_submodule else '')), (settings.daily_path or __import__('datetime').datetime.now().strftime('daily_%y%m%d')), jobname, jobname + '_######'))",
|
eval: "((lambda Path, abspath, os_path, settings_obj, blend: str(Path(abspath(settings_obj.render_output_root or '//')) / (((str(settings_obj.submodule or '').strip()) if (settings_obj.use_submodule and str(settings_obj.submodule or '').strip()) else ((os_path.basename(os_path.dirname(bpy.data.filepath))) if settings_obj.use_submodule else ''))) / blend / (blend + '_######')))(__import__('pathlib').Path, __import__('os').path.abspath, __import__('os').path, settings, __import__('os').path.splitext(__import__('os').path.basename(bpy.data.filepath))[0]))",
|
||||||
description: "Final file path of where render output will be saved"
|
description: "Final file path of where render output will be saved"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -165,10 +153,6 @@ function compileJob(job) {
|
|||||||
if (projectRoot) settings.render_output_root = path.join(projectRoot, 'Renders');
|
if (projectRoot) settings.render_output_root = path.join(projectRoot, 'Renders');
|
||||||
else settings.render_output_root = path.join(path.dirname(settings.blendfile), 'Renders');
|
else settings.render_output_root = path.join(path.dirname(settings.blendfile), 'Renders');
|
||||||
}
|
}
|
||||||
if (!settings.daily_path || String(settings.daily_path).trim() === '') {
|
|
||||||
const createdDate = job && job.created ? new Date(job.created) : new Date();
|
|
||||||
settings.daily_path = formatDailyYYMMDD(createdDate);
|
|
||||||
}
|
|
||||||
const recomposed = computeAutoRenderOutputPath(job);
|
const recomposed = computeAutoRenderOutputPath(job);
|
||||||
if (recomposed) settings.render_output_path = recomposed;
|
if (recomposed) settings.render_output_path = recomposed;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -200,7 +184,7 @@ function compileJob(job) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Derive project root, submodule, and daily path from the blendfile path.
|
// Derive project root and submodule from the blendfile path.
|
||||||
function computeAutoRenderOutputPath(job) {
|
function computeAutoRenderOutputPath(job) {
|
||||||
const settings = job.settings || {};
|
const settings = job.settings || {};
|
||||||
if (!settings.blendfile) return null;
|
if (!settings.blendfile) return null;
|
||||||
@@ -220,26 +204,17 @@ function computeAutoRenderOutputPath(job) {
|
|||||||
renderRoot = path.join(path.dirname(settings.blendfile), 'Renders');
|
renderRoot = path.join(path.dirname(settings.blendfile), 'Renders');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolve daily path
|
const blendname = path.stem(settings.blendfile).replace('.flamenco', '');
|
||||||
let daily = null;
|
|
||||||
if (settings.daily_path && ("" + settings.daily_path).trim()) {
|
|
||||||
daily = ("" + settings.daily_path).trim();
|
|
||||||
} else {
|
|
||||||
const createdDate = job && job.created ? new Date(job.created) : new Date();
|
|
||||||
daily = formatDailyYYMMDD(createdDate);
|
|
||||||
}
|
|
||||||
const jobname = (job && job.name) ? job.name : path.stem(settings.blendfile).replace('.flamenco', '');
|
|
||||||
|
|
||||||
print('AutoPath: blendfile=', settings.blendfile);
|
print('AutoPath: blendfile=', settings.blendfile);
|
||||||
print('AutoPath: projectRoot=', projectRoot);
|
print('AutoPath: projectRoot=', projectRoot);
|
||||||
print('AutoPath: renderRoot=', renderRoot);
|
print('AutoPath: renderRoot=', renderRoot);
|
||||||
print('AutoPath: submodule=', submodule);
|
print('AutoPath: submodule=', submodule);
|
||||||
print('AutoPath: daily=', daily);
|
print('AutoPath: blendname=', blendname);
|
||||||
print('AutoPath: jobname=', jobname);
|
|
||||||
|
|
||||||
const parts = [renderRoot];
|
const parts = [renderRoot];
|
||||||
if (submodule) parts.push(submodule);
|
if (submodule) parts.push(submodule);
|
||||||
parts.push(daily, jobname, `${jobname}_######`);
|
parts.push(blendname, `${blendname}_######`);
|
||||||
const finalPath = path.join.apply(path, parts);
|
const finalPath = path.join.apply(path, parts);
|
||||||
print('AutoPath: finalPath=', finalPath);
|
print('AutoPath: finalPath=', finalPath);
|
||||||
return finalPath;
|
return finalPath;
|
||||||
@@ -296,14 +271,6 @@ function detectSubmodule(settings) {
|
|||||||
return detectSubmoduleFromBlendfile(bf);
|
return detectSubmoduleFromBlendfile(bf);
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDailyYYMMDD(dateObj) {
|
|
||||||
const pad2 = (n) => (n < 10 ? '0' + n : '' + n);
|
|
||||||
const yy = (dateObj.getFullYear() % 100);
|
|
||||||
const mm = dateObj.getMonth() + 1;
|
|
||||||
const dd = dateObj.getDate();
|
|
||||||
return `daily_${pad2(yy)}${pad2(mm)}${pad2(dd)}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Do field replacement on the render output path.
|
// Do field replacement on the render output path.
|
||||||
function renderOutputPath(job) {
|
function renderOutputPath(job) {
|
||||||
let path = job.settings.render_output_path;
|
let path = job.settings.render_output_path;
|
||||||
|
|||||||
@@ -37,16 +37,6 @@ const JOB_TYPE = {
|
|||||||
description:
|
description:
|
||||||
"Base path where renders are stored, typically the project's Renders folder. If empty, derived automatically.",
|
"Base path where renders are stored, typically the project's Renders folder. If empty, derived automatically.",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'daily_path',
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visible: 'submission',
|
|
||||||
eval: "__import__('datetime').datetime.now().strftime('daily_%y%m%d')",
|
|
||||||
evalInfo: { showLinkButton: true, description: "Auto-fill with today's daily folder name" },
|
|
||||||
description:
|
|
||||||
"Daily folder name under the render root, e.g. 'daily_250813'. If empty, auto-fills to today's date.",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'use_submodule',
|
key: 'use_submodule',
|
||||||
label: 'Use Submodule',
|
label: 'Use Submodule',
|
||||||
@@ -71,7 +61,8 @@ const JOB_TYPE = {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
subtype: 'file_path',
|
subtype: 'file_path',
|
||||||
editable: false,
|
editable: false,
|
||||||
eval: "str(Path(abspath(settings.render_output_root or '//'), ((str(settings.submodule or '').strip()) if (settings.use_submodule and str(settings.submodule or '').strip()) else ((__import__('os').path.basename(__import__('os').path.dirname(bpy.data.filepath))) if settings.use_submodule else '')), (settings.daily_path or __import__('datetime').datetime.now().strftime('daily_%y%m%d')), jobname, jobname + '_######'))",
|
eval:
|
||||||
|
"((lambda Path, abspath, os_path, settings_obj, blend: str(Path(abspath(settings_obj.render_output_root or '//')) / (((str(settings_obj.submodule or '').strip()) if (settings_obj.use_submodule and str(settings_obj.submodule or '').strip()) else ((os_path.basename(os_path.dirname(bpy.data.filepath))) if settings_obj.use_submodule else ''))) / blend / (blend + '_######')))(__import__('pathlib').Path, __import__('os').path.abspath, __import__('os').path, settings, __import__('os').path.splitext(__import__('os').path.basename(bpy.data.filepath))[0]))",
|
||||||
description: 'Final file path of where render output will be saved',
|
description: 'Final file path of where render output will be saved',
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -180,10 +171,6 @@ function compileJob(job) {
|
|||||||
if (projectRoot) settings.render_output_root = path.join(projectRoot, 'Renders');
|
if (projectRoot) settings.render_output_root = path.join(projectRoot, 'Renders');
|
||||||
else settings.render_output_root = path.join(path.dirname(settings.blendfile), 'Renders');
|
else settings.render_output_root = path.join(path.dirname(settings.blendfile), 'Renders');
|
||||||
}
|
}
|
||||||
if (!settings.daily_path || String(settings.daily_path).trim() === '') {
|
|
||||||
const createdDate = job && job.created ? new Date(job.created) : new Date();
|
|
||||||
settings.daily_path = formatDailyYYMMDD(createdDate);
|
|
||||||
}
|
|
||||||
const recomposed = computeAutoRenderOutputPath(job);
|
const recomposed = computeAutoRenderOutputPath(job);
|
||||||
if (recomposed) settings.render_output_path = recomposed;
|
if (recomposed) settings.render_output_path = recomposed;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -374,7 +361,7 @@ function cleanupJobSettings(settings) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Derive project root, submodule, and daily path from the blendfile path.
|
// Derive project root and submodule from the blendfile path.
|
||||||
function computeAutoRenderOutputPath(job) {
|
function computeAutoRenderOutputPath(job) {
|
||||||
const settings = job.settings || {};
|
const settings = job.settings || {};
|
||||||
if (!settings.blendfile) return null;
|
if (!settings.blendfile) return null;
|
||||||
@@ -391,19 +378,11 @@ function computeAutoRenderOutputPath(job) {
|
|||||||
} else {
|
} else {
|
||||||
renderRoot = path.join(path.dirname(settings.blendfile), 'Renders');
|
renderRoot = path.join(path.dirname(settings.blendfile), 'Renders');
|
||||||
}
|
}
|
||||||
// Resolve daily path
|
const blendname = path.stem(settings.blendfile).replace('.flamenco', '');
|
||||||
let daily = null;
|
|
||||||
if (settings.daily_path && ("" + settings.daily_path).trim()) {
|
|
||||||
daily = ("" + settings.daily_path).trim();
|
|
||||||
} else {
|
|
||||||
const createdDate = job && job.created ? new Date(job.created) : new Date();
|
|
||||||
daily = formatDailyYYMMDD(createdDate);
|
|
||||||
}
|
|
||||||
const jobname = job && job.name ? job.name : path.stem(settings.blendfile).replace('.flamenco', '');
|
|
||||||
|
|
||||||
const parts = [renderRoot];
|
const parts = [renderRoot];
|
||||||
if (submodule) parts.push(submodule);
|
if (submodule) parts.push(submodule);
|
||||||
parts.push(daily, jobname, `${jobname}_######`);
|
parts.push(blendname, `${blendname}_######`);
|
||||||
return path.join.apply(path, parts);
|
return path.join.apply(path, parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,11 +433,3 @@ function detectSubmodule(settings) {
|
|||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
return detectSubmoduleFromBlendfile(bf);
|
return detectSubmoduleFromBlendfile(bf);
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDailyYYMMDD(dateObj) {
|
|
||||||
const pad2 = (n) => (n < 10 ? '0' + n : '' + n);
|
|
||||||
const yy = dateObj.getFullYear() % 100;
|
|
||||||
const mm = dateObj.getMonth() + 1;
|
|
||||||
const dd = dateObj.getDate();
|
|
||||||
return `daily_${pad2(yy)}${pad2(mm)}${pad2(dd)}`;
|
|
||||||
}
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sqlite/2025.11.19.11.05.13_flamenco-manager.sqlite
LFS
Normal file
BIN
sqlite/2025.11.19.11.05.13_flamenco-manager.sqlite
LFS
Normal file
Binary file not shown.
5
unified_sheepit_launcher.bat
Normal file
5
unified_sheepit_launcher.bat
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
@echo off
|
||||||
|
title Unified SheepIt Launcher
|
||||||
|
echo Starting Unified SheepIt Launcher...
|
||||||
|
powershell -ExecutionPolicy Bypass -File "%~dp0unified_sheepit_launcher.ps1"
|
||||||
|
|
||||||
281
unified_sheepit_launcher.ps1
Normal file
281
unified_sheepit_launcher.ps1
Normal file
@@ -0,0 +1,281 @@
|
|||||||
|
function Show-Header {
|
||||||
|
Clear-Host
|
||||||
|
Write-Host "====================================" -ForegroundColor Cyan
|
||||||
|
Write-Host " UNIFIED SHEEPIT LAUNCHER" -ForegroundColor Cyan
|
||||||
|
Write-Host "====================================" -ForegroundColor Cyan
|
||||||
|
Write-Host
|
||||||
|
}
|
||||||
|
|
||||||
|
$SheepItJarUrls = @(
|
||||||
|
'https://www.sheepit-renderfarm.com/media/applet/client-latest.php',
|
||||||
|
'https://www.sheepit-renderfarm.com/media/applet/client-latest.jar'
|
||||||
|
)
|
||||||
|
$script:SheepItUsername = $null
|
||||||
|
$script:SheepItRenderKey = $null
|
||||||
|
|
||||||
|
function Initialize-SheepItCredentials {
|
||||||
|
if (-not $script:SheepItUsername) {
|
||||||
|
$script:SheepItUsername = "RaincloudTheDragon"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $script:SheepItRenderKey) {
|
||||||
|
$script:SheepItRenderKey = "IfCOWBHFQpceG0601DmyrwOOJOAp2UJAQ0O0X0jF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$workers = @(
|
||||||
|
@{ ID = 1; Name = "i9kf"; SSHArgs = "-t i9kf"; Enabled = $true },
|
||||||
|
@{ ID = 2; Name = "blender-boss"; SSHArgs = "-t blender-boss"; Enabled = $true },
|
||||||
|
@{ ID = 3; Name = "max"; SSHArgs = "-t max"; Enabled = $true },
|
||||||
|
@{ ID = 4; Name = "masterbox"; SSHArgs = "-t masterbox"; Enabled = $true },
|
||||||
|
@{ ID = 5; Name = "echo"; SSHArgs = "-t echo"; Enabled = $true },
|
||||||
|
@{ ID = 6; Name = "i9-13ks"; SSHArgs = "-t -p 22146 i9-13ks"; Enabled = $true }
|
||||||
|
)
|
||||||
|
|
||||||
|
function Get-RemoteSheepItCommand {
|
||||||
|
param(
|
||||||
|
[string]$RenderKey,
|
||||||
|
[string]$Username
|
||||||
|
)
|
||||||
|
|
||||||
|
$safeKey = $RenderKey -replace "'", "''"
|
||||||
|
$safeUser = $Username -replace "'", "''"
|
||||||
|
$userLine = if ([string]::IsNullOrWhiteSpace($Username)) {
|
||||||
|
''
|
||||||
|
} else {
|
||||||
|
" Write-Host 'Authenticating as ${safeUser} via render key.' -ForegroundColor Yellow`n"
|
||||||
|
}
|
||||||
|
|
||||||
|
$urlLiteral = '@(' + (($SheepItJarUrls | ForEach-Object { "'$_'" }) -join ', ') + ')'
|
||||||
|
|
||||||
|
@"
|
||||||
|
`$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
|
try {
|
||||||
|
`$appData = [Environment]::GetFolderPath('ApplicationData')
|
||||||
|
`$sheepDir = Join-Path `$appData 'sheepit'
|
||||||
|
if (-not (Test-Path `$sheepDir)) {
|
||||||
|
New-Item -Path `$sheepDir -ItemType Directory -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
`$jarPath = Join-Path `$sheepDir 'sheepit-client.jar'
|
||||||
|
`$urls = $urlLiteral
|
||||||
|
`$headers = @{ 'User-Agent' = 'Mozilla/5.0' }
|
||||||
|
|
||||||
|
if (Test-Path `$jarPath) {
|
||||||
|
Write-Host "SheepIt client already present at `$jarPath. Skipping download." -ForegroundColor Green
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
`$downloaded = `$false
|
||||||
|
|
||||||
|
foreach (`$url in `$urls) {
|
||||||
|
Write-Host "Downloading SheepIt client from `$url..." -ForegroundColor Cyan
|
||||||
|
try {
|
||||||
|
Invoke-WebRequest -Uri `$url -OutFile `$jarPath -UseBasicParsing -Headers `$headers
|
||||||
|
`$downloaded = `$true
|
||||||
|
Write-Host "Download complete." -ForegroundColor Green
|
||||||
|
break
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host ("Download failed from {0}: {1}" -f `$url, `$_.Exception.Message) -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not `$downloaded) {
|
||||||
|
throw 'Unable to download SheepIt client from any known URL.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Starting SheepIt client..." -ForegroundColor Cyan
|
||||||
|
|
||||||
|
# Check and fix problematic environment variables that can cause boot class path errors
|
||||||
|
`$envVarsFixed = `$false
|
||||||
|
|
||||||
|
# Check JAVA_HOME - invalid values like '\' or empty can cause issues
|
||||||
|
if (`$env:JAVA_HOME) {
|
||||||
|
if (`$env:JAVA_HOME -eq '\' -or `$env:JAVA_HOME.Trim() -eq '' -or -not (Test-Path `$env:JAVA_HOME)) {
|
||||||
|
Write-Host "Warning: Invalid JAVA_HOME detected ('`$env:JAVA_HOME'). Temporarily unsetting..." -ForegroundColor Yellow
|
||||||
|
Remove-Item Env:\JAVA_HOME -ErrorAction SilentlyContinue
|
||||||
|
`$envVarsFixed = `$true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check JAVA_TOOL_OPTIONS - invalid values can cause boot class path errors
|
||||||
|
if (`$env:JAVA_TOOL_OPTIONS) {
|
||||||
|
if (`$env:JAVA_TOOL_OPTIONS -eq '\' -or `$env:JAVA_TOOL_OPTIONS.Trim() -eq '') {
|
||||||
|
Write-Host "Warning: Invalid JAVA_TOOL_OPTIONS detected ('`$env:JAVA_TOOL_OPTIONS'). Temporarily unsetting..." -ForegroundColor Yellow
|
||||||
|
Remove-Item Env:\JAVA_TOOL_OPTIONS -ErrorAction SilentlyContinue
|
||||||
|
`$envVarsFixed = `$true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (`$envVarsFixed) {
|
||||||
|
Write-Host "Environment variables fixed. Proceeding with Java launch..." -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check Java version
|
||||||
|
try {
|
||||||
|
`$javaOutput = java -version 2>&1
|
||||||
|
`$javaVersion = `$javaOutput | Select-Object -First 1
|
||||||
|
Write-Host "Java version: `$javaVersion" -ForegroundColor Gray
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "Warning: Could not determine Java version" -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-Location `$sheepDir
|
||||||
|
|
||||||
|
# Use -XX:+IgnoreUnrecognizedVMOptions to handle any incompatible JVM args
|
||||||
|
# This flag helps with Java 9+ compatibility issues
|
||||||
|
`$javaArgs = @('-XX:+IgnoreUnrecognizedVMOptions', '-jar', `$jarPath,
|
||||||
|
'-ui', 'text', '--log-stdout', '--verbose',
|
||||||
|
'-gpu', 'OPTIX_0', '-login', '${safeUser}', '-password', '${safeKey}')
|
||||||
|
|
||||||
|
try {
|
||||||
|
& java @javaArgs
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host ('Java execution error: {0}' -f `$_.Exception.Message) -ForegroundColor Red
|
||||||
|
Write-Host "If the error persists, try reinstalling Java (Temurin 21 recommended)." -ForegroundColor Yellow
|
||||||
|
throw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host ('Error: {0}' -f `$_.Exception.Message) -ForegroundColor Red
|
||||||
|
Write-Host ('Stack trace: {0}' -f `$_.ScriptStackTrace) -ForegroundColor DarkRed
|
||||||
|
}
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
|
||||||
|
function New-SheepItSessionScript {
|
||||||
|
param(
|
||||||
|
[object]$Worker,
|
||||||
|
[string]$EncodedCommand
|
||||||
|
)
|
||||||
|
|
||||||
|
@"
|
||||||
|
Write-Host 'Connecting to $($Worker.Name)...' -ForegroundColor Cyan
|
||||||
|
ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=30 $($Worker.SSHArgs) `"powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -EncodedCommand $EncodedCommand`"
|
||||||
|
Write-Host "`nSSH session ended." -ForegroundColor Yellow
|
||||||
|
Read-Host "Press Enter to close"
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
|
||||||
|
function Start-SheepItTab {
|
||||||
|
param(
|
||||||
|
[string]$Title,
|
||||||
|
[string]$Content
|
||||||
|
)
|
||||||
|
|
||||||
|
$tempScript = [System.IO.Path]::GetTempFileName() + '.ps1'
|
||||||
|
Set-Content -Path $tempScript -Value $Content -Encoding UTF8
|
||||||
|
|
||||||
|
if (Get-Command wt.exe -ErrorAction SilentlyContinue) {
|
||||||
|
Start-Process wt.exe -ArgumentList "-w 0 new-tab --title `"$Title`" powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File `"$tempScript`""
|
||||||
|
} else {
|
||||||
|
Start-Process powershell -ArgumentList "-NoLogo -NoProfile -ExecutionPolicy Bypass -File `"$tempScript`""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Start-SheepItWorker {
|
||||||
|
param([object]$Worker)
|
||||||
|
|
||||||
|
if (-not $Worker.Enabled) {
|
||||||
|
Write-Host "$($Worker.Name) is not enabled for SheepIt." -ForegroundColor Yellow
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
Initialize-SheepItCredentials
|
||||||
|
|
||||||
|
$remoteCommand = Get-RemoteSheepItCommand -RenderKey $script:SheepItRenderKey -Username $script:SheepItUsername
|
||||||
|
$encoded = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($remoteCommand))
|
||||||
|
$sessionScript = New-SheepItSessionScript -Worker $Worker -EncodedCommand $encoded
|
||||||
|
$title = "$($Worker.Name) - SheepIt"
|
||||||
|
|
||||||
|
Start-SheepItTab -Title $title -Content $sessionScript
|
||||||
|
Write-Host "Opened SheepIt session for $($Worker.Name) in a new terminal tab." -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
function Start-AllSheepIt {
|
||||||
|
Initialize-SheepItCredentials
|
||||||
|
|
||||||
|
$targets = $workers | Where-Object { $_.Enabled }
|
||||||
|
|
||||||
|
if (-not $targets) {
|
||||||
|
Write-Host "No systems are ready for SheepIt." -ForegroundColor Yellow
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($worker in $targets) {
|
||||||
|
Start-SheepItWorker -Worker $worker
|
||||||
|
Start-Sleep -Milliseconds 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Select-SheepItWorker {
|
||||||
|
while ($true) {
|
||||||
|
Show-Header
|
||||||
|
Write-Host "Select a system:" -ForegroundColor Magenta
|
||||||
|
|
||||||
|
foreach ($worker in $workers) {
|
||||||
|
$status = if ($worker.Enabled) { "ready" } else { "disabled" }
|
||||||
|
$color = if ($worker.Enabled) { "Green" } else { "DarkYellow" }
|
||||||
|
Write-Host ("{0}. {1} ({2})" -f $worker.ID, $worker.Name, $status) -ForegroundColor $color
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "B. Back" -ForegroundColor Yellow
|
||||||
|
$selection = Read-Host "Choose system"
|
||||||
|
|
||||||
|
if ($selection -match '^[Bb]$') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($selection -match '^\d+$') {
|
||||||
|
$id = [int]$selection
|
||||||
|
$worker = $workers | Where-Object { $_.ID -eq $id }
|
||||||
|
|
||||||
|
if ($worker) {
|
||||||
|
Start-SheepItWorker -Worker $worker
|
||||||
|
Write-Host
|
||||||
|
Read-Host "Press Enter to return to the main menu" | Out-Null
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Unknown selection." -ForegroundColor Red
|
||||||
|
Start-Sleep -Seconds 1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Invalid input." -ForegroundColor Red
|
||||||
|
Start-Sleep -Seconds 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Initialize-SheepItCredentials
|
||||||
|
|
||||||
|
while ($true) {
|
||||||
|
Show-Header
|
||||||
|
Write-Host "Main Menu:" -ForegroundColor Magenta
|
||||||
|
Write-Host "1. Launch SheepIt on a single system" -ForegroundColor Yellow
|
||||||
|
Write-Host "2. Launch SheepIt on all ready systems" -ForegroundColor Yellow
|
||||||
|
Write-Host "3. Exit" -ForegroundColor Yellow
|
||||||
|
|
||||||
|
$choice = Read-Host "Select option (1-3)"
|
||||||
|
|
||||||
|
switch ($choice) {
|
||||||
|
'1' { Select-SheepItWorker }
|
||||||
|
'2' {
|
||||||
|
Start-AllSheepIt
|
||||||
|
Write-Host
|
||||||
|
Read-Host "Press Enter to return to the main menu" | Out-Null
|
||||||
|
}
|
||||||
|
'3' { break }
|
||||||
|
default {
|
||||||
|
Write-Host "Invalid selection." -ForegroundColor Red
|
||||||
|
Start-Sleep -Seconds 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "`nExiting SheepIt launcher." -ForegroundColor Cyan
|
||||||
|
|
||||||
Reference in New Issue
Block a user