diff options
author | onefang | 2021-08-27 12:49:30 +1000 |
---|---|---|
committer | onefang | 2021-08-27 12:49:30 +1000 |
commit | d7f8e982bed6d5b34b560ea052db970cc2397a3c (patch) | |
tree | 4f315f59d1bea160e3bcf749333d4c9a53cfb6eb /src/sledjchisl | |
parent | Comment++ (diff) | |
download | opensim-SC-d7f8e982bed6d5b34b560ea052db970cc2397a3c.zip opensim-SC-d7f8e982bed6d5b34b560ea052db970cc2397a3c.tar.gz opensim-SC-d7f8e982bed6d5b34b560ea052db970cc2397a3c.tar.bz2 opensim-SC-d7f8e982bed6d5b34b560ea052db970cc2397a3c.tar.xz |
Write actual update and builh sledjchisl commands.
Diffstat (limited to 'src/sledjchisl')
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 443698c..fcd8b99 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -2007,6 +2007,16 @@ static int filterARs(struct dirtree *node) | |||
2007 | return 0; | 2007 | return 0; |
2008 | } | 2008 | } |
2009 | 2009 | ||
2010 | static void copyOpenSim(char *t) | ||
2011 | { | ||
2012 | if (shellMeFail("rm -fr ", t)) E("Failed to rm!"); | ||
2013 | if ((! qfile_exist(t)) && (! qfile_mkdir(t, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", t); | ||
2014 | // TODO - have to make sure it's all owned by opensimsc. | ||
2015 | if (shellMeFail("cd %s; cp -lr current/* -t %s ", scRoot, t)) E("Failed to cp!"); | ||
2016 | if (shellMeFail("cd %s; cp -lr current/.git* -t %s ", scRoot, t)) E("Failed to cp!"); | ||
2017 | if (shellMeFail("cd %s; cp -lr current/.nant -t %s ", scRoot, t)) E("Failed to cp!"); | ||
2018 | if (shellMeFail("cd %s; cp -lr current/.hgignore -t %s ", scRoot, t)) E("Failed to cp!"); | ||
2019 | } | ||
2010 | 2020 | ||
2011 | static void runTests(char *tests[], char *title, char* file) | 2021 | static void runTests(char *tests[], char *title, char* file) |
2012 | { | 2022 | { |
@@ -2438,7 +2448,57 @@ gitARend: | |||
2438 | case BUILD : | 2448 | case BUILD : |
2439 | { | 2449 | { |
2440 | if (ourSims->doIt) | 2450 | if (ourSims->doIt) |
2441 | ;// testOpenSim(simd, sim, type, count, window, panes, pane); | 2451 | { |
2452 | char *t = xmprintf("%s/current_NEW", scRoot); | ||
2453 | |||
2454 | copyOpenSim(t); | ||
2455 | /* | ||
2456 | # Poor mans git sub modules / subtrees, coz otherwise it gets complex. | ||
2457 | #if [ ! -d git-sub-modules/opensim-moneymodule-gloebit ]; then | ||
2458 | # pushd git-sub-modules >/dev/null | ||
2459 | # git clone https://github.com/gloebit/opensim-moneymodule-gloebit.git | ||
2460 | # popd >/dev/null | ||
2461 | #else | ||
2462 | # pushd git-sub-modules/opensim-moneymodule-gloebit >/dev/null | ||
2463 | # git pull | ||
2464 | # popd >/dev/null | ||
2465 | #fi | ||
2466 | #rm -rf addon-modules/Gloebit/GloebitMoneyModule | ||
2467 | #cp -r git-sub-modules/opensim-moneymodule-gloebit/addon-modules/Gloebit/GloebitMoneyModule addon-modules/Gloebit/ | ||
2468 | */ | ||
2469 | if (shellMeFail("cd %s; ./runprebuild.sh autoclean", t)) E("Failed to autoclean!"); | ||
2470 | // Clean the stuff autoclean forgets to clean. I feel so dirty. | ||
2471 | if (shellMeFail("cd %s; find -name obj -type d -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!"); | ||
2472 | if (shellMeFail("cd %s; find -name *.csproj -type d -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!"); | ||
2473 | if (shellMeFail("cd %s; find -name *.csproj.* -type d -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!"); | ||
2474 | if (shellMeFail("cd %s; find -name *.pdb -type d -print | xargs /bin/rm -fr", t)) E("Failed to rm obj!"); | ||
2475 | if (shellMeFail("cd %s; rm -fr bin/ScriptEngines", t)) E("Failed to rm ScriptEngines!"); | ||
2476 | // Clean the stuff the tests created. | ||
2477 | if (shellMeFail("cd %s; rm Test*.txt", t)) E("Failed to Test results!"); | ||
2478 | /* | ||
2479 | # Prebuild converts Microsoft.CSharp.targets to Microsoft.CSHARP.Targets, which case sensitive file systems fail to find. | ||
2480 | #find -name *.csproj | xargs sed -i "s@Microsoft.CSHARP.Targets@Microsoft.CSharp.targets@g" | ||
2481 | |||
2482 | # Debian no longer provides nant. | ||
2483 | #./nant-color | ||
2484 | |||
2485 | if [ "4" == $(mono -V | head -n 1 | cut -d ' ' -f 5 | cut -d '.' -f 1) ]; then | ||
2486 | export XBUILD_COLORS=errors=brightred,warnings=yellow,events=blue | ||
2487 | xbuild /target:clean | ||
2488 | xbuild /p:TargetFrameworkVersion="v4.5"xbuild /p:TargetFrameworkVersion="v4.5" | ||
2489 | else | ||
2490 | # Use this for Mono 5 and later. | ||
2491 | msbuild /p:Configuration=Release | ||
2492 | # msbuild /p:Configuration=Debug | ||
2493 | fi | ||
2494 | */ | ||
2495 | // Use this for Mono 5 and later. | ||
2496 | if (shellMeFail("cd %s; ./runprebuild.sh vs2015", t)) E("Failed to prebuild!"); | ||
2497 | if (shellMeFail("cd %s; msbuild /p:Configuration=Release", t)) E("Failed to msbuild!"); | ||
2498 | // #cp -f addon-modules/Gloebit/GloebitMoneyModule/bin/Gloebit.dll bin | ||
2499 | if (shellMeFail("cd %s/src; time ./BuildIt.sh", t)) E("Failed to compile sledjchisl!"); | ||
2500 | free(t); | ||
2501 | } | ||
2442 | ourSims->doIt = 0; | 2502 | ourSims->doIt = 0; |
2443 | break; | 2503 | break; |
2444 | } | 2504 | } |
@@ -2454,7 +2514,13 @@ gitARend: | |||
2454 | case UPDATE : | 2514 | case UPDATE : |
2455 | { | 2515 | { |
2456 | if (ourSims->doIt) | 2516 | if (ourSims->doIt) |
2457 | ;// testOpenSim(simd, sim, type, count, window, panes, pane); | 2517 | { |
2518 | char *t = xmprintf("%s/current_NEW", scRoot); | ||
2519 | |||
2520 | copyOpenSim(t); | ||
2521 | if (shellMeFail("cd %s; git pull", t)) E("Failed to git pull!"); | ||
2522 | free(t); | ||
2523 | } | ||
2458 | ourSims->doIt = 0; | 2524 | ourSims->doIt = 0; |
2459 | break; | 2525 | break; |
2460 | } | 2526 | } |