From b0062b1bdf7329273043716633eb19897d8bb7e1 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 2 Sep 2021 13:31:04 +1000 Subject: Only use old fashioned way of setting tmux pane titles. Also, slip in the mono debug stuffs. --- src/sledjchisl/sledjchisl.c | 26 +++++++++++--------------- 1 file 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 if (!checkSimIsRunning(simd->tab)) { 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); - doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, simd->tab); - 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); + // 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. +// doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, simd->tab); + 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); sendTmuxCmd(simd->paneID, toybuf); if (0 == ourSims->doIt) { @@ -2498,7 +2499,8 @@ fi */ // Use this for Mono 5 and later. if (shellMeFail("cd %s; ./runprebuild.sh vs2015", t)) E("Failed to prebuild!"); - if (shellMeFail("cd %s; msbuild /p:Configuration=Release", t)) E("Failed to msbuild!"); + if (shellMeFail("cd %s; msbuild /p:Configuration=Debug", t)) E("Failed to msbuild!"); +// if (shellMeFail("cd %s; msbuild /p:Configuration=Release", t)) E("Failed to msbuild!"); // #cp -f addon-modules/Gloebit/GloebitMoneyModule/bin/Gloebit.dll bin if (shellMeFail("cd %s/src; time ./BuildIt.sh", t)) E("Failed to compile sledjchisl!"); free(t); @@ -8508,32 +8510,27 @@ Build the OpenSim. snprintf(toybuf, sizeof(toybuf), "%s %s %s/%s set-option -g default-command 'export PATH=%s:$PATH; bash'\\; " // Set x,y to huge values, to work around an OpenSim bug. - "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' \\; " + "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' \\; " "split-window -vp 50 -d -t '%s:0.0' \\; " "split-window -hp 50 -d -t '%s:0.1' \\; " "split-window -hp 50 -d -t '%s:0.0' " // TODO - remove this once we handle the fcgi stuff ourselves. // 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. // TODO - BIG SECURITY HOLE??? - "bash -c 'export PATH=%s:$PATH; sleep 3;" // The sleep is so that both are not creating the .shini files at the same time. - "spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0666 -G www-data -- /usr/bin/valgrind --leak-check=full sledjchisl %s; " + "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. + "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; " "cd %s; bash'" , pre, Tcmd, scRun, Tsocket, scBin, - Tconsole, Ttab, scBin, FLAG(v) ? "-v" : "", scRoot, + Tconsole, Ttab, scBin, scRoot, FLAG(v) ? "-v" : "", scRoot, Tconsole, Tconsole, Tconsole, scBin, - scUser, scRun, FLAG(v) ? "-v" : "", scRoot); + scUser, scRun, scRoot, FLAG(v) ? "-v" : "", scRoot); free(pre); if (shellMeFail(toybuf)) E("tmux new-session command failed! %s", toybuf); - else - { - if (shellMeFail("%s %s/%s select-pane -t 1 -T 'SledjChisl' \\; select-pane -t @0.%%3 -T 'FCGI web server'", Tcmd, scRun, Tsocket)) - E("tmux select-pane command failed!"); - } // toybox argument parsing is half working. if (!FLAG(q)) { @@ -8801,10 +8798,9 @@ Create the /opt/opensim-SC directory structure. I("ROBUST is starting up."); sendTmuxCmd("@0.%1", c); free(c); - c = xmprintf("cd %s/current/bin; mono Robust.exe -inidirectory=%s/config/ROBUST", scRoot, scRoot); + c = xmprintf("cd %s/current/bin; printf \"\\033]0;ROBUST\\007\"; mono --debug Robust.exe -inidirectory=%s/config/ROBUST", scRoot, scRoot); sendTmuxCmd("@0.%1", c); free(c); - doTmuxCmd("select-pane -t @0.%%1 -T 'ROBUST'", Tcmd, scRun, Tsocket); // Create all the tmux windows, panes, and temporary .ini files coz OpenSim sucketh. forEachSim("Prepping", prepSims, NULL); -- cgit v1.1