diff options
author | onefang | 2021-09-02 13:31:04 +1000 |
---|---|---|
committer | onefang | 2021-09-02 13:31:04 +1000 |
commit | b0062b1bdf7329273043716633eb19897d8bb7e1 (patch) | |
tree | 49d2ac80b87d1d8456675c5047e308424e2969b7 /src | |
parent | Tweak some of the error reports. (diff) | |
download | opensim-SC-b0062b1bdf7329273043716633eb19897d8bb7e1.zip opensim-SC-b0062b1bdf7329273043716633eb19897d8bb7e1.tar.gz opensim-SC-b0062b1bdf7329273043716633eb19897d8bb7e1.tar.bz2 opensim-SC-b0062b1bdf7329273043716633eb19897d8bb7e1.tar.xz |
Only use old fashioned way of setting tmux pane titles.
Also, slip in the mono debug stuffs.
Diffstat (limited to 'src')
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 3970f26..550faac 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -1911,8 +1911,9 @@ void startSim(simData *simd, char *sim, char *type, int count, int window, int p | |||
1911 | if (!checkSimIsRunning(simd->tab)) | 1911 | if (!checkSimIsRunning(simd->tab)) |
1912 | { | 1912 | { |
1913 | 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); | 1913 | 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); |
1914 | doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, simd->tab); | 1914 | // 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. |
1915 | snprintf(toybuf, sizeof(toybuf), "cd %s/current/bin; printf \"\\033]0;%s\\007\"; mono OpenSim.exe -inidirectory=%s/sim%d", scRoot, simd->tab, scTemp, count); | 1915 | // doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, simd->tab); |
1916 | 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); | ||
1916 | sendTmuxCmd(simd->paneID, toybuf); | 1917 | sendTmuxCmd(simd->paneID, toybuf); |
1917 | if (0 == ourSims->doIt) | 1918 | if (0 == ourSims->doIt) |
1918 | { | 1919 | { |
@@ -2498,7 +2499,8 @@ fi | |||
2498 | */ | 2499 | */ |
2499 | // Use this for Mono 5 and later. | 2500 | // Use this for Mono 5 and later. |
2500 | if (shellMeFail("cd %s; ./runprebuild.sh vs2015", t)) E("Failed to prebuild!"); | 2501 | if (shellMeFail("cd %s; ./runprebuild.sh vs2015", t)) E("Failed to prebuild!"); |
2501 | if (shellMeFail("cd %s; msbuild /p:Configuration=Release", t)) E("Failed to msbuild!"); | 2502 | if (shellMeFail("cd %s; msbuild /p:Configuration=Debug", t)) E("Failed to msbuild!"); |
2503 | // if (shellMeFail("cd %s; msbuild /p:Configuration=Release", t)) E("Failed to msbuild!"); | ||
2502 | // #cp -f addon-modules/Gloebit/GloebitMoneyModule/bin/Gloebit.dll bin | 2504 | // #cp -f addon-modules/Gloebit/GloebitMoneyModule/bin/Gloebit.dll bin |
2503 | if (shellMeFail("cd %s/src; time ./BuildIt.sh", t)) E("Failed to compile sledjchisl!"); | 2505 | if (shellMeFail("cd %s/src; time ./BuildIt.sh", t)) E("Failed to compile sledjchisl!"); |
2504 | free(t); | 2506 | free(t); |
@@ -8508,32 +8510,27 @@ Build the OpenSim. | |||
8508 | snprintf(toybuf, sizeof(toybuf), | 8510 | snprintf(toybuf, sizeof(toybuf), |
8509 | "%s %s %s/%s set-option -g default-command 'export PATH=%s:$PATH; bash'\\; " | 8511 | "%s %s %s/%s set-option -g default-command 'export PATH=%s:$PATH; bash'\\; " |
8510 | // Set x,y to huge values, to work around an OpenSim bug. | 8512 | // Set x,y to huge values, to work around an OpenSim bug. |
8511 | "new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; /usr/bin/valgrind --leak-check=full sledjchisl %s; cd %s; bash' \\; " | 8513 | "new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; printf \"\\033]0;SledjChisl\\007\"; /usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s; cd %s; bash' \\; " |
8512 | "split-window -vp 50 -d -t '%s:0.0' \\; " | 8514 | "split-window -vp 50 -d -t '%s:0.0' \\; " |
8513 | "split-window -hp 50 -d -t '%s:0.1' \\; " | 8515 | "split-window -hp 50 -d -t '%s:0.1' \\; " |
8514 | "split-window -hp 50 -d -t '%s:0.0' " | 8516 | "split-window -hp 50 -d -t '%s:0.0' " |
8515 | // TODO - remove this once we handle the fcgi stuff ourselves. | 8517 | // TODO - remove this once we handle the fcgi stuff ourselves. |
8516 | // Make the FCGI socket world read / write, coz we can't set it to group www-data, since -G only works for root, and we ain't root. | 8518 | // Make the FCGI socket world read / write, coz we can't set it to group www-data, since -G only works for root, and we ain't root. |
8517 | // TODO - BIG SECURITY HOLE??? | 8519 | // TODO - BIG SECURITY HOLE??? |
8518 | "bash -c 'export PATH=%s:$PATH; sleep 3;" // The sleep is so that both are not creating the .shini files at the same time. | 8520 | "bash -c 'export PATH=%s:$PATH; printf \"\\033]0;FCGI web server\\007\"; sleep 2;" // The sleep is so that both are not creating the .shini files at the same time. |
8519 | "spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0666 -G www-data -- /usr/bin/valgrind --leak-check=full sledjchisl %s; " | 8521 | "spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0666 -G www-data -- /usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s; " |
8520 | "cd %s; bash'" | 8522 | "cd %s; bash'" |
8521 | , | 8523 | , |
8522 | pre, Tcmd, scRun, Tsocket, scBin, | 8524 | pre, Tcmd, scRun, Tsocket, scBin, |
8523 | Tconsole, Ttab, scBin, FLAG(v) ? "-v" : "", scRoot, | 8525 | Tconsole, Ttab, scBin, scRoot, FLAG(v) ? "-v" : "", scRoot, |
8524 | Tconsole, | 8526 | Tconsole, |
8525 | Tconsole, | 8527 | Tconsole, |
8526 | Tconsole, | 8528 | Tconsole, |
8527 | scBin, | 8529 | scBin, |
8528 | scUser, scRun, FLAG(v) ? "-v" : "", scRoot); | 8530 | scUser, scRun, scRoot, FLAG(v) ? "-v" : "", scRoot); |
8529 | free(pre); | 8531 | free(pre); |
8530 | if (shellMeFail(toybuf)) | 8532 | if (shellMeFail(toybuf)) |
8531 | E("tmux new-session command failed! %s", toybuf); | 8533 | E("tmux new-session command failed! %s", toybuf); |
8532 | else | ||
8533 | { | ||
8534 | if (shellMeFail("%s %s/%s select-pane -t 1 -T 'SledjChisl' \\; select-pane -t @0.%%3 -T 'FCGI web server'", Tcmd, scRun, Tsocket)) | ||
8535 | E("tmux select-pane command failed!"); | ||
8536 | } | ||
8537 | // toybox argument parsing is half working. | 8534 | // toybox argument parsing is half working. |
8538 | if (!FLAG(q)) | 8535 | if (!FLAG(q)) |
8539 | { | 8536 | { |
@@ -8801,10 +8798,9 @@ Create the /opt/opensim-SC directory structure. | |||
8801 | I("ROBUST is starting up."); | 8798 | I("ROBUST is starting up."); |
8802 | sendTmuxCmd("@0.%1", c); | 8799 | sendTmuxCmd("@0.%1", c); |
8803 | free(c); | 8800 | free(c); |
8804 | c = xmprintf("cd %s/current/bin; mono Robust.exe -inidirectory=%s/config/ROBUST", scRoot, scRoot); | 8801 | c = xmprintf("cd %s/current/bin; printf \"\\033]0;ROBUST\\007\"; mono --debug Robust.exe -inidirectory=%s/config/ROBUST", scRoot, scRoot); |
8805 | sendTmuxCmd("@0.%1", c); | 8802 | sendTmuxCmd("@0.%1", c); |
8806 | free(c); | 8803 | free(c); |
8807 | doTmuxCmd("select-pane -t @0.%%1 -T 'ROBUST'", Tcmd, scRun, Tsocket); | ||
8808 | 8804 | ||
8809 | // Create all the tmux windows, panes, and temporary .ini files coz OpenSim sucketh. | 8805 | // Create all the tmux windows, panes, and temporary .ini files coz OpenSim sucketh. |
8810 | forEachSim("Prepping", prepSims, NULL); | 8806 | forEachSim("Prepping", prepSims, NULL); |