aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-09-02 22:21:25 +1000
committeronefang2021-09-02 22:21:25 +1000
commitea0ba59bffdbcb03e300467c6f5d46cabc90e0f1 (patch)
tree8230de970788ea0a947addb792d2024f6d87c062
parentMinor web logging tweak. (diff)
downloadopensim-SC-ea0ba59bffdbcb03e300467c6f5d46cabc90e0f1.zip
opensim-SC-ea0ba59bffdbcb03e300467c6f5d46cabc90e0f1.tar.gz
opensim-SC-ea0ba59bffdbcb03e300467c6f5d46cabc90e0f1.tar.bz2
opensim-SC-ea0ba59bffdbcb03e300467c6f5d46cabc90e0f1.tar.xz
Move the sledjchisl BUILD code to just after the directory building.
And clean up whitespace around that.
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/sledjchisl.c321
1 files changed, 167 insertions, 154 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index cce4e04..53362f9 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -2457,60 +2457,7 @@ gitARend:
2457 2457
2458 case BUILD : 2458 case BUILD :
2459 { 2459 {
2460 if (ourSims->doIt) 2460 // Done elsewhere.
2461 {
2462 char *t = xmprintf("%s/current_NEW", scRoot);
2463
2464 copyOpenSim(t);
2465/*
2466# Poor mans git sub modules / subtrees, coz otherwise it gets complex.
2467#if [ ! -d git-sub-modules/opensim-moneymodule-gloebit ]; then
2468# pushd git-sub-modules >/dev/null
2469# git clone https://github.com/gloebit/opensim-moneymodule-gloebit.git
2470# popd >/dev/null
2471#else
2472# pushd git-sub-modules/opensim-moneymodule-gloebit >/dev/null
2473# git pull
2474# popd >/dev/null
2475#fi
2476#rm -rf addon-modules/Gloebit/GloebitMoneyModule
2477#cp -r git-sub-modules/opensim-moneymodule-gloebit/addon-modules/Gloebit/GloebitMoneyModule addon-modules/Gloebit/
2478*/
2479 if (shellMeFail("cd %s; ./runprebuild.sh autoclean", t)) E("Failed to autoclean!");
2480 // Clean the stuff autoclean forgets to clean. I feel so dirty.
2481 if (shellMeFail("cd %s; find -name obj -type d -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!");
2482 if (shellMeFail("cd %s; find -name *.csproj -type f -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!");
2483 if (shellMeFail("cd %s; find -name *.csproj.* -type f -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!");
2484 if (shellMeFail("cd %s; find -name *.pdb -type f -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!");
2485 if (shellMeFail("cd %s; rm -fr bin/ScriptEngines", t)) E("Failed to rm ScriptEngines!");
2486 // Clean the stuff the tests created.
2487 if (shellMeFail("cd %s; rm Test*.txt", t)) E("Failed to Test results!");
2488/*
2489# Prebuild converts Microsoft.CSharp.targets to Microsoft.CSHARP.Targets, which case sensitive file systems fail to find.
2490#find -name *.csproj | xargs sed -i "s@Microsoft.CSHARP.Targets@Microsoft.CSharp.targets@g"
2491
2492# Debian no longer provides nant.
2493#./nant-color
2494
2495if [ "4" == $(mono -V | head -n 1 | cut -d ' ' -f 5 | cut -d '.' -f 1) ]; then
2496 export XBUILD_COLORS=errors=brightred,warnings=yellow,events=blue
2497 xbuild /target:clean
2498 xbuild /p:TargetFrameworkVersion="v4.5"xbuild /p:TargetFrameworkVersion="v4.5"
2499else
2500 # Use this for Mono 5 and later.
2501 msbuild /p:Configuration=Release
2502# msbuild /p:Configuration=Debug
2503fi
2504*/
2505 // Use this for Mono 5 and later.
2506 if (shellMeFail("cd %s; ./runprebuild.sh vs2015", t)) E("Failed to prebuild!");
2507 if (shellMeFail("cd %s; msbuild /p:Configuration=Debug", t)) E("Failed to msbuild!");
2508// if (shellMeFail("cd %s; msbuild /p:Configuration=Release", t)) E("Failed to msbuild!");
2509// #cp -f addon-modules/Gloebit/GloebitMoneyModule/bin/Gloebit.dll bin
2510 if (shellMeFail("cd %s/src; time ./BuildIt.sh", t)) E("Failed to compile sledjchisl!");
2511 free(t);
2512 }
2513 ourSims->doIt = 0;
2514 break; 2461 break;
2515 } 2462 }
2516 2463
@@ -8554,70 +8501,70 @@ Build the OpenSim.
8554 } 8501 }
8555 8502
8556 8503
8557 if ((!isWeb) && (START == currentMode) && (0 == toys.optc)) 8504 if ((!isWeb) && ((BUILD == currentMode) || (START == currentMode)) && (0 == toys.optc))
8558 { 8505 {
8559//////////////////////////////////////////////////////////////////////////////////////////////////// 8506////////////////////////////////////////////////////////////////////////////////////////////////////
8560// Sort out directories, part 2 8507// Sort out directories, part 2
8561//////////////////////////////////////////////////////////////////////////////////////////////////// 8508////////////////////////////////////////////////////////////////////////////////////////////////////
8562 8509
8563 // Doing this here coz at this point we should be the correct user, and we only want to do this during initial startup. 8510 // Doing this here coz at this point we should be the correct user, and we only want to do this during initial startup.
8564 /* From man 7 inode - 8511 /* From man 7 inode -
8565 S_ISUID 04000 set-user-ID bit 8512 S_ISUID 04000 set-user-ID bit
8566 S_ISGID 02000 set-group-ID bit (see below) 8513 S_ISGID 02000 set-group-ID bit (see below)
8567 S_ISVTX 01000 sticky bit (see below) 8514 S_ISVTX 01000 sticky bit (see below)
8568 8515
8569 S_IRWXU 00700 owner has read, write, and execute permission 8516 S_IRWXU 00700 owner has read, write, and execute permission
8570 S_IRUSR 00400 owner has read permission 8517 S_IRUSR 00400 owner has read permission
8571 S_IWUSR 00200 owner has write permission 8518 S_IWUSR 00200 owner has write permission
8572 S_IXUSR 00100 owner has execute permission 8519 S_IXUSR 00100 owner has execute permission
8573 8520
8574 S_IRWXG 00070 group has read, write, and execute permission 8521 S_IRWXG 00070 group has read, write, and execute permission
8575 S_IRGRP 00040 group has read permission 8522 S_IRGRP 00040 group has read permission
8576 S_IWGRP 00020 group has write permission 8523 S_IWGRP 00020 group has write permission
8577 S_IXGRP 00010 group has execute permission 8524 S_IXGRP 00010 group has execute permission
8578 8525
8579 S_IRWXO 00007 others (not in group) have read, write, and execute permission 8526 S_IRWXO 00007 others (not in group) have read, write, and execute permission
8580 S_IROTH 00004 others have read permission 8527 S_IROTH 00004 others have read permission
8581 S_IWOTH 00002 others have write permission 8528 S_IWOTH 00002 others have write permission
8582 S_IXOTH 00001 others have execute permission 8529 S_IXOTH 00001 others have execute permission
8583 8530
8584 The set-group-ID bit (S_ISGID) has several special uses. For a directory, it indicates that BSD semantics is to be used for that directory: files created there inherit their group 8531 The set-group-ID bit (S_ISGID) has several special uses. For a directory, it indicates that BSD semantics is to be used for that directory: files created there inherit their group
8585 ID from the directory, not from the effective group ID of the creating process, and directories created there will also get the S_ISGID bit set. For a file that does not have the 8532 ID from the directory, not from the effective group ID of the creating process, and directories created there will also get the S_ISGID bit set. For a file that does not have the
8586 group execution bit (S_IXGRP) set, the set-group-ID bit indicates mandatory file/record locking. 8533 group execution bit (S_IXGRP) set, the set-group-ID bit indicates mandatory file/record locking.
8587 8534
8588 The sticky bit (S_ISVTX) on a directory means that a file in that directory can be renamed or deleted only by the owner of the file, by the owner of the directory, 8535 The sticky bit (S_ISVTX) on a directory means that a file in that directory can be renamed or deleted only by the owner of the file, by the owner of the directory,
8589 and by a privileged process 8536 and by a privileged process
8590 */ 8537 */
8591 V("Making directories in %s.", scRoot); 8538 V("Making directories in %s.", scRoot);
8592 if ((! qfile_exist(scBin)) && (! qfile_mkdir(scBin, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBin); 8539 if ((! qfile_exist(scBin)) && (! qfile_mkdir(scBin, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBin);
8593 if ((! qfile_exist(scEtc)) && (! qfile_mkdir(scEtc, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scEtc); 8540 if ((! qfile_exist(scEtc)) && (! qfile_mkdir(scEtc, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scEtc);
8594 if ((! qfile_exist(scLib)) && (! qfile_mkdir(scLib, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scLib); 8541 if ((! qfile_exist(scLib)) && (! qfile_mkdir(scLib, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scLib);
8595 if ((! qfile_exist(scBackup)) && (! qfile_mkdir(scBackup, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBackup); 8542 if ((! qfile_exist(scBackup)) && (! qfile_mkdir(scBackup, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBackup);
8596 if ((! qfile_exist(scCache)) && (! qfile_mkdir(scCache, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scCache); 8543 if ((! qfile_exist(scCache)) && (! qfile_mkdir(scCache, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scCache);
8597 if ((! qfile_exist(scData)) && (! qfile_mkdir(scData, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scData); 8544 if ((! qfile_exist(scData)) && (! qfile_mkdir(scData, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scData);
8598 if ((! qfile_exist(scLog)) && (! qfile_mkdir(scLog, S_IRWXU, true))) C("Unable to create path %s", scLog); 8545 if ((! qfile_exist(scLog)) && (! qfile_mkdir(scLog, S_IRWXU, true))) C("Unable to create path %s", scLog);
8599 if ((! qfile_exist(scTemp)) && (! qfile_mkdir(scTemp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scTemp); 8546 if ((! qfile_exist(scTemp)) && (! qfile_mkdir(scTemp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scTemp);
8600 tmp = xmprintf("%s/sessions", scCache); 8547 tmp = xmprintf("%s/sessions", scCache);
8601 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); 8548 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp);
8602 free(tmp); 8549 free(tmp);
8603 tmp = xmprintf("%s/users", scData); 8550 tmp = xmprintf("%s/users", scData);
8604 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); 8551 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp);
8605 free(tmp); 8552 free(tmp);
8606 tmp = xmprintf("%s/db", scData); 8553 tmp = xmprintf("%s/db", scData);
8607 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); 8554 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp);
8608 free(tmp); 8555 free(tmp);
8609 tmp = xmprintf("%s/config", scRoot); 8556 tmp = xmprintf("%s/config", scRoot);
8610 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); 8557 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp);
8611 free(tmp); 8558 free(tmp);
8612 tmp = xmprintf("%s/AssetFiles/data", scRoot); 8559 tmp = xmprintf("%s/AssetFiles/data", scRoot);
8613 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); 8560 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp);
8614 free(tmp); 8561 free(tmp);
8615 tmp = xmprintf("%s/AssetFiles/tmp/spool", scRoot); 8562 tmp = xmprintf("%s/AssetFiles/tmp/spool", scRoot);
8616 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); 8563 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp);
8617 free(tmp); 8564 free(tmp);
8618 tmp = xmprintf("%s/web", scRoot); 8565 tmp = xmprintf("%s/web", scRoot);
8619 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); 8566 if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp);
8620 free(tmp); 8567 free(tmp);
8621 8568
8622/* TODO - tighten up security. 8569/* TODO - tighten up security.
8623Make sure correct permissions are set everywhere. 8570Make sure correct permissions are set everywhere.
@@ -8632,50 +8579,116 @@ Create the /opt/opensim-SC directory structure.
8632. var/run HAS to be setup correctly BEFORE we try to start up tmux. 8579. var/run HAS to be setup correctly BEFORE we try to start up tmux.
8633 web // Fill it with default web stuff from current -> example.. 8580 web // Fill it with default web stuff from current -> example..
8634*/ 8581*/
8635 I("Securing directories and files in %s. This might take a while.", scRoot); 8582 I("Securing directories and files in %s. This might take a while.", scRoot);
8636 if (shellMeFail("chmod u=rw,go= %s/config/*.ini", scRoot)) C("Can't set proper permissions for %s/config*.ini", scRoot); 8583 if (shellMeFail("chmod u=rw,go= %s/config/*.ini", scRoot)) C("Can't set proper permissions for %s/config*.ini", scRoot);
8637 if (shellMeFail("chmod u=rw,go= %s/config/ROBUST/*.ini", scRoot)) C("Can't set proper permissions for %s/config/ROBUST/*.ini", scRoot); 8584 if (shellMeFail("chmod u=rw,go= %s/config/ROBUST/*.ini", scRoot)) C("Can't set proper permissions for %s/config/ROBUST/*.ini", scRoot);
8638 if (shellMeFail("chmod u=rw,go= %s/.sledjChisl.conf.lua", scEtc)) C("Can't set proper permissions for %s/.sledjChisl.conf.lua", scEtc); 8585 if (shellMeFail("chmod u=rw,go= %s/.sledjChisl.conf.lua", scEtc)) C("Can't set proper permissions for %s/.sledjChisl.conf.lua", scEtc);
8639 if (shellMeFail("chmod ug+rw %s/config", scRoot)) C("Can't set proper permissions for %s/config", scRoot); 8586 if (shellMeFail("chmod ug+rw %s/config", scRoot)) C("Can't set proper permissions for %s/config", scRoot);
8640 if (shellMeFail("chmod g+s %s/config", scRoot)) C("Can't set proper permissions for %s/config", scRoot); 8587 if (shellMeFail("chmod g+s %s/config", scRoot)) C("Can't set proper permissions for %s/config", scRoot);
8641 if (shellMeFail("chmod u=rw,go= %s/config/*.ini", scRoot)) C("Can't set proper permissions for %s/config/*.ini", scRoot); 8588 if (shellMeFail("chmod u=rw,go= %s/config/*.ini", scRoot)) C("Can't set proper permissions for %s/config/*.ini", scRoot);
8642 if (shellMeFail("chmod u=rw,go= %s/config/ROBUST/*.ini", scRoot)) C("Can't set proper permissions for %s/configROBUST/*.ini", scRoot); 8589 if (shellMeFail("chmod u=rw,go= %s/config/ROBUST/*.ini", scRoot)) C("Can't set proper permissions for %s/configROBUST/*.ini", scRoot);
8643 8590
8644 if (shellMeFail("chmod ug=rwx,o= %s/AssetFiles", scRoot)) C("Can't set proper permissions for %s/AssetFiles", scRoot); 8591 if (shellMeFail("chmod ug=rwx,o= %s/AssetFiles", scRoot)) C("Can't set proper permissions for %s/AssetFiles", scRoot);
8645 if (shellMeFail("chmod -fR ug=rw,o=,a+X %s", scBackup)) C("Can't set proper permissions for %s", scBackup); 8592 if (shellMeFail("chmod -fR ug=rw,o=,a+X %s", scBackup)) C("Can't set proper permissions for %s", scBackup);
8646 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scBin)) C("Can't set proper permissions for %s", scBin); 8593 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scBin)) C("Can't set proper permissions for %s", scBin);
8647 if (shellMeFail("chmod -fR ug=rw,o=,a+X %s", scCache)) C("Can't set proper permissions for %s", scCache); 8594 if (shellMeFail("chmod -fR ug=rw,o=,a+X %s", scCache)) C("Can't set proper permissions for %s", scCache);
8648 if (shellMeFail("chmod ug=rwx,o= %s", scCache)) C("Can't set proper permissions for %s", scCache); 8595 if (shellMeFail("chmod ug=rwx,o= %s", scCache)) C("Can't set proper permissions for %s", scCache);
8649 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scData)) C("Can't set proper permissions for %s", scData); 8596 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scData)) C("Can't set proper permissions for %s", scData);
8650 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scEtc)) C("Can't set proper permissions for %s", scEtc); 8597 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scEtc)) C("Can't set proper permissions for %s", scEtc);
8651 if (shellMeFail("chmod u=rw,g=r,o= %s/.sledjChisl.conf.lua", scEtc)) C("Can't set proper permissions for %s/.sledjChisl.conf.lua", scEtc); 8598 if (shellMeFail("chmod u=rw,g=r,o= %s/.sledjChisl.conf.lua", scEtc)) C("Can't set proper permissions for %s/.sledjChisl.conf.lua", scEtc);
8652 if (shellMeFail("chmod g+s %s", scEtc)) C("Can't set proper permissions for %s", scEtc); 8599 if (shellMeFail("chmod g+s %s", scEtc)) C("Can't set proper permissions for %s", scEtc);
8653 if (shellMeFail("chmod a+x %s/*.shini", scEtc)) C("Can't set proper permissions for %s/*.shini", scEtc); 8600 if (shellMeFail("chmod a+x %s/*.shini", scEtc)) C("Can't set proper permissions for %s/*.shini", scEtc);
8654 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scLib)) C("Can't set proper permissions for %s", scLib); 8601 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scLib)) C("Can't set proper permissions for %s", scLib);
8655 if (shellMeFail("chmod -fR u=rw,u+X,go= %s", scLog)) C("Can't set proper permissions for %s", scLog); 8602 if (shellMeFail("chmod -fR u=rw,u+X,go= %s", scLog)) C("Can't set proper permissions for %s", scLog);
8656 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scTemp)) C("Can't set proper permissions for %s", scTemp); 8603 if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scTemp)) C("Can't set proper permissions for %s", scTemp);
8657 8604
8658// if (shellMeFail("chmod -R a+x %s/current/*.sh", scRoot)) C("Can't set proper permissions for %s/current/*.sh", scRoot); 8605 char *newPath = xmprintf("%s/current/bin/sledjchisl", scRoot);
8659// if (shellMeFail("chmod -R a+x %s/current/scripts/*.sh", scRoot)) C("Can't set proper permissions for %s/current/scripts/*.sh", scRoot); 8606 tmp = xmprintf("%s/sledjchisl", scBin);
8660// if (shellMeFail("chmod -R a+x %s/current/scripts/install/*.sh", scRoot)) C("Can't set proper permissions for %s/current/scripts/install/*.sh", scRoot); 8607 V("Symlinking %s to %s", newPath, tmp);
8661// if (shellMeFail("chmod a+x %s/current/scripts/show-console", scRoot)) C("Can't set proper permissions for %s/current/scripts/show-console", scRoot); 8608 if (qfile_exist(tmp))
8662// if (shellMeFail("chmod a+x %s/current/scripts/start-sim", scRoot)) C("Can't set proper permissions for %s/current/scripts/start-sim", scRoot); 8609 {
8663 8610 if (shellMeFail("rm %s", tmp))
8664 char *newPath = xmprintf("%s/current/bin/sledjchisl", scRoot); 8611 E("rm command failed!");
8665 tmp = xmprintf("%s/sledjchisl", scBin); 8612 }
8666 V("Symlinking %s to %s", newPath, tmp); 8613 if (0 != symlink(newPath, tmp))
8667 if (qfile_exist(tmp)) 8614 perror_msg("Symlinking %s to %s", newPath, tmp);
8668 { 8615 free(tmp);
8669 if (shellMeFail("rm %s", tmp)) 8616 free(newPath);
8670 E("rm command failed!"); 8617
8671 } 8618
8672 if (0 != symlink(newPath, tmp)) 8619 if (BUILD == currentMode)
8673 perror_msg("Symlinking %s to %s", newPath, tmp); 8620 {
8674 free(tmp); 8621 char *t = xmprintf("%s/current_NEW", scRoot);
8675 free(newPath); 8622
8623 I("Building opensim-SC.");
8624 copyOpenSim(t);
8625
8626 if (shellMeFail("chmod -R a+x %s/*.sh", t)) C("Can't set proper permissions for %s/*.sh", t);
8627 if (shellMeFail("chmod -R a+x %s/scripts/*.sh", t)) C("Can't set proper permissions for %s/scripts/*.sh", t);
8628 if (shellMeFail("chmod -R a+x %s/scripts/install/*.sh", t)) C("Can't set proper permissions for %s/scripts/install/*.sh", t);
8629 if (shellMeFail("chmod a+x %s/scripts/show-console", t)) C("Can't set proper permissions for %s/scripts/show-console", t);
8630 if (shellMeFail("chmod a+x %s/scripts/start-sim", t)) C("Can't set proper permissions for %s/scripts/start-sim", t);
8631
8632/*
8633# Poor mans git sub modules / subtrees, coz otherwise it gets complex.
8634#if [ ! -d git-sub-modules/opensim-moneymodule-gloebit ]; then
8635# pushd git-sub-modules >/dev/null
8636# git clone https://github.com/gloebit/opensim-moneymodule-gloebit.git
8637# popd >/dev/null
8638#else
8639# pushd git-sub-modules/opensim-moneymodule-gloebit >/dev/null
8640# git pull
8641# popd >/dev/null
8642#fi
8643#rm -rf addon-modules/Gloebit/GloebitMoneyModule
8644#cp -r git-sub-modules/opensim-moneymodule-gloebit/addon-modules/Gloebit/GloebitMoneyModule addon-modules/Gloebit/
8645*/
8646 if (shellMeFail("cd %s; ./runprebuild.sh autoclean", t)) E("Failed to autoclean!");
8647 // Clean the stuff autoclean forgets to clean. I feel so dirty.
8648 if (shellMeFail("cd %s; find -name obj -type d -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!");
8649 if (shellMeFail("cd %s; find -name *.csproj -type f -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!");
8650 if (shellMeFail("cd %s; find -name *.csproj.* -type f -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!");
8651 if (shellMeFail("cd %s; find -name *.pdb -type f -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!");
8652 if (shellMeFail("cd %s; rm -fr bin/ScriptEngines", t)) E("Failed to rm ScriptEngines!");
8653 // Clean the stuff the tests created.
8654 if (shellMeFail("cd %s; rm Test*.txt", t)) E("Failed to Test results!");
8655/*
8656# Prebuild converts Microsoft.CSharp.targets to Microsoft.CSHARP.Targets, which case sensitive file systems fail to find.
8657#find -name *.csproj | xargs sed -i "s@Microsoft.CSHARP.Targets@Microsoft.CSharp.targets@g"
8658
8659# Debian no longer provides nant.
8660#./nant-color
8661
8662if [ "4" == $(mono -V | head -n 1 | cut -d ' ' -f 5 | cut -d '.' -f 1) ]; then
8663 export XBUILD_COLORS=errors=brightred,warnings=yellow,events=blue
8664 xbuild /target:clean
8665 xbuild /p:TargetFrameworkVersion="v4.5"xbuild /p:TargetFrameworkVersion="v4.5"
8666else
8667 # Use this for Mono 5 and later.
8668 msbuild /p:Configuration=Release
8669# msbuild /p:Configuration=Debug
8670fi
8671*/
8672 // Use this for Mono 5 and later.
8673 if (shellMeFail("cd %s; ./runprebuild.sh vs2015", t)) E("Failed to prebuild!");
8674 if (shellMeFail("cd %s; msbuild /p:Configuration=Debug /verbosity:minimal", t)) E("Failed to msbuild!");
8675// if (shellMeFail("cd %s; msbuild /p:Configuration=Release /verbosity:minimal", t)) E("Failed to msbuild!");
8676// #cp -f addon-modules/Gloebit/GloebitMoneyModule/bin/Gloebit.dll bin
8677 if (shellMeFail("cd %s/src; time ./BuildIt.sh", t)) E("Failed to compile sledjchisl!");
8678/* TODO -
8679 figure out what current symlink currently points to
8680 delete that_BACKUP
8681 copy that to that_BACKUP
8682 point the symlink to this
8683*/
8684 free(t);
8685 I("Done building opensim-SC.");
8686 goto finished;
8687 }
8676 } 8688 }
8677 8689
8678 8690
8691
8679//////////////////////////////////////////////////////////////////////////////////////////////////// 8692////////////////////////////////////////////////////////////////////////////////////////////////////
8680// Other start up stuff. 8693// Other start up stuff.
8681//////////////////////////////////////////////////////////////////////////////////////////////////// 8694////////////////////////////////////////////////////////////////////////////////////////////////////