aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authoronefang2021-10-07 15:25:40 +1000
committeronefang2021-10-07 15:25:40 +1000
commit7b65d35c1044d4e44e77b45f7037084c4346799f (patch)
tree68c0c2395f97836b97ae387cd25fd0ac27893db7 /src
parentOops, hard coded path for default inventory. (diff)
downloadopensim-SC-7b65d35c1044d4e44e77b45f7037084c4346799f.zip
opensim-SC-7b65d35c1044d4e44e77b45f7037084c4346799f.tar.gz
opensim-SC-7b65d35c1044d4e44e77b45f7037084c4346799f.tar.bz2
opensim-SC-7b65d35c1044d4e44e77b45f7037084c4346799f.tar.xz
Use names instead of numbers in the tmp sim directories.
Diffstat (limited to 'src')
-rw-r--r--src/sledjchisl/sledjchisl.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index eb38df1..09e8100 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -2084,7 +2084,7 @@ void findWindow(simData *simd, char *sim, char *type, int count, int window, int
2084void prepSims(simData *simd, char *sim, char *type, int count, int window, int panes, int pane) 2084void prepSims(simData *simd, char *sim, char *type, int count, int window, int panes, int pane)
2085{ 2085{
2086 char *path = xmprintf("%s/%s.shini", scEtc, simd->tab); 2086 char *path = xmprintf("%s/%s.shini", scEtc, simd->tab);
2087 char *newPath = xmprintf("%s/sim%d/%s.ini", scTemp, count, simd->tab); // Coz OpenSim sucks. 2087 char *newPath = xmprintf("%s/%s/%s.ini", scTemp, simd->tab, simd->tab); // Coz OpenSim sucks.
2088 char *cmd; 2088 char *cmd;
2089 2089
2090 // Make sure all tmux windows and panes are startned. 2090 // Make sure all tmux windows and panes are startned.
@@ -2121,7 +2121,7 @@ void prepSims(simData *simd, char *sim, char *type, int count, int window, int p
2121 findWindow(simd, sim, type, count, window, panes, pane); 2121 findWindow(simd, sim, type, count, window, panes, pane);
2122 simd->portH = startPort + 2 + count * 2; 2122 simd->portH = startPort + 2 + count * 2;
2123 simd->portU = startPort + 3 + count * 2; 2123 simd->portU = startPort + 3 + count * 2;
2124 cmd = xmprintf("rm -fr %s/sim%d; mkdir -p %s/sim%d; sed -E" 2124 cmd = xmprintf("rm -fr %s/%s; mkdir -p %s/%s; sed -E"
2125 " -e 's@\\[Region\\]@" 2125 " -e 's@\\[Region\\]@"
2126 " paneID = \"\\%s\"\\n\\n" 2126 " paneID = \"\\%s\"\\n\\n"
2127 "\\[Startup\\]\\n" 2127 "\\[Startup\\]\\n"
@@ -2134,8 +2134,8 @@ void prepSims(simData *simd, char *sim, char *type, int count, int window, int p
2134 "\\n\\[Region\\]\\n" 2134 "\\n\\[Region\\]\\n"
2135 " InternalPort = %d@'" 2135 " InternalPort = %d@'"
2136 " %s >%s", 2136 " %s >%s",
2137 scTemp, count, 2137 scTemp, simd->tab,
2138 scTemp, count, 2138 scTemp, simd->tab,
2139 simd->paneID, 2139 simd->paneID,
2140 simd->portH, 2140 simd->portH,
2141 simd->portU, 2141 simd->portU,
@@ -2167,10 +2167,10 @@ void startSim(simData *simd, char *sim, char *type, int count, int window, int p
2167 snprintf(toybuf, sizeof(toybuf), "%s/current/bin/OpenSim.exe", scRoot); 2167 snprintf(toybuf, sizeof(toybuf), "%s/current/bin/OpenSim.exe", scRoot);
2168 if (! qfile_exist(toybuf)) 2168 if (! qfile_exist(toybuf))
2169 buildOpensim(); 2169 buildOpensim();
2170 I("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/sim%d - %s is starting.", window, type, pane, simd->paneID, scTemp, count, simd->name); 2170 I("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/%s - %s is starting.", window, type, pane, simd->paneID, scTemp, simd->tab, simd->name);
2171 // NOTE - earlier versions of tmux that are still in use don't have the '-T pane title' option, so do it with a printf command. 2171 // NOTE - earlier versions of tmux that are still in use don't have the '-T pane title' option, so do it with a printf command.
2172// doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, simd->tab); 2172// doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, simd->tab);
2173 snprintf(toybuf, sizeof(toybuf), "cd %s/current/bin; printf \"\\033]0;%s\\007\"; mono --debug OpenSim.exe -inidirectory=%s/sim%d", scRoot, simd->tab, scTemp, count); 2173 snprintf(toybuf, sizeof(toybuf), "cd %s/current/bin; printf \"\\033]0;%s\\007\"; mono --debug OpenSim.exe -inidirectory=%s/%s", scRoot, simd->tab, scTemp, simd->tab);
2174 sendTmuxCmd(simd->paneID, toybuf); 2174 sendTmuxCmd(simd->paneID, toybuf);
2175 if (0 == ourSims->doIt) 2175 if (0 == ourSims->doIt)
2176 { 2176 {
@@ -2584,7 +2584,7 @@ gitARend:
2584 2584
2585 case RESTART : // "restart 'Welcome sim'" "restart Welcome.shini" "Welcome.shini restart" "restart Welcome.ini" "restart Welcome" "restart" restart everything 2585 case RESTART : // "restart 'Welcome sim'" "restart Welcome.shini" "Welcome.shini restart" "restart Welcome.ini" "restart Welcome" "restart" restart everything
2586 { 2586 {
2587 I("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/sim%d - %s is stopping.", window, type, pane, simd->paneID, scTemp, count, simd->name); 2587 I("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/%s - %s is stopping.", window, type, pane, simd->paneID, scTemp, simd->tab, simd->name);
2588 stopSim(simd, sim, type, count, window, panes, pane); 2588 stopSim(simd, sim, type, count, window, panes, pane);
2589 while (checkSimIsRunning(simd->tab)) 2589 while (checkSimIsRunning(simd->tab))
2590 usleep(100000); 2590 usleep(100000);
@@ -2601,7 +2601,7 @@ gitARend:
2601 ; // Do nothing, this is better done in the calling function, coz it has the details. 2601 ; // Do nothing, this is better done in the calling function, coz it has the details.
2602 } 2602 }
2603 else if (checkSimIsRunning(simd->tab)) 2603 else if (checkSimIsRunning(simd->tab))
2604 I("%s is running in Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/sim%d", simd->name, window, type, pane, simd->paneID, scTemp, count); 2604 I("%s is running in Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/%s", simd->name, window, type, pane, simd->paneID, scTemp, simd->tab);
2605 else 2605 else
2606 W("%s is not running.", simd->name); 2606 W("%s is not running.", simd->name);
2607 break; 2607 break;
@@ -2654,7 +2654,7 @@ void stopSims(simData *simd, char *sim, char *type, int count, int window, int p
2654// TODO - should move onto others if this one takes too long, and come back later. 2654// TODO - should move onto others if this one takes too long, and come back later.
2655 // NOTE - these sleeps are guesses, seems to work on my super desktop during testing. 2655 // NOTE - these sleeps are guesses, seems to work on my super desktop during testing.
2656 if (checkSimIsRunning(simd->tab)) 2656 if (checkSimIsRunning(simd->tab))
2657 T("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/sim%d - %s has NOT stopped YET.", window, type, pane, simd->paneID, scTemp, count, simd->name); 2657 T("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/%s - %s has NOT stopped YET.", window, type, pane, simd->paneID, scTemp, simd->tab, simd->name);
2658 if (simd->users) 2658 if (simd->users)
2659 { 2659 {
2660 ourSims->doIt = 0; 2660 ourSims->doIt = 0;
@@ -2666,7 +2666,7 @@ void stopSims(simData *simd, char *sim, char *type, int count, int window, int p
2666 usleep(100000); 2666 usleep(100000);
2667 usleep(10000); 2667 usleep(10000);
2668 doTmuxCmd("kill-pane -t %s", simd->paneID); 2668 doTmuxCmd("kill-pane -t %s", simd->paneID);
2669 I("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/sim%d - %s has stopped.", window, type, pane, simd->paneID, scTemp, count, simd->name); 2669 I("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/%s - %s has stopped.", window, type, pane, simd->paneID, scTemp, simd->tab, simd->name);
2670 } 2670 }
2671} 2671}
2672 2672