initial commit - cross reference with 5th port - obviously has compile errors

This commit is contained in:
LetterJay
2016-07-03 02:17:19 -05:00
commit 35a1723e98
4355 changed files with 2221257 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
set -e
#If this is the build tools step, we do not bother to install/build byond
if [ "$BUILD_TOOLS" = true ]; then
exit 0
fi;
if [ -d "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin" ];
then
echo "Using cached directory."
exit 0
else
echo "Setting up BYOND."
mkdir -p "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}"
cd "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}"
curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip
unzip byond.zip
cd byond
make here
cd ~/
exit 0
fi
#some variable not set correctly, panic
exit 1
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
set -e
if [ "$BUILD_TOOLS" = true ]; then
cd tgui && source ~/.nvm/nvm.sh && npm install && cd ..
fi;
if [ "$DM_MAPFILE" = "templates" ]; then
python tools/travis/template_dm_generator.py
fi;
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
#nb: must be bash to support shopt globstar
set -e
shopt -s globstar
if [ "$BUILD_TOOLS" = false ]; then
(! grep 'step_[xy]' _maps/**/*.dmm)
source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
tools/travis/dm.sh -M${DM_MAPFILE} tgstation.dme
fi;
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
#must also be bash for the md5sum commands
set -e
if [ "$BUILD_TOOLS" = true ];
then
md5sum -c - <<< "49bc6b1b9ed56c83cceb6674bd97cb34 *html/changelogs/example.yml";
cd tgui && source ~/.nvm/nvm.sh && gulp && cd ..;
python tools/ss13_genchangelog.py html/changelog.html html/changelogs;
fi;
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
if [ -n "$1" ]
then
dme=$1
else
echo "Specify a DME to check"
exit 1
fi
if [[ $(awk '/BEGIN_FILE_DIR/{flag=1;next}/END_FILE_DIR/{flag=0}flag' $dme | wc -l) -ne 1 ]]
then
echo "File DIR was ticked, please untick it, see: https://tgstation13.org/phpBB/viewtopic.php?f=5&t=321 for more"
exit 1
fi
+97
View File
@@ -0,0 +1,97 @@
#!/bin/bash
dmepath=""
retval=1
for var
do
if [[ $var != -* && $var == *.dme ]]
then
dmepath=`echo $var | sed -r 's/.{4}$//'`
break
fi
done
if [[ $dmepath == "" ]]
then
echo "No .dme file specified, aborting."
exit 1
fi
if [[ -a $dmepath.mdme ]]
then
rm $dmepath.mdme
fi
cp $dmepath.dme $dmepath.mdme
if [[ $? != 0 ]]
then
echo "Failed to make modified dme, aborting."
exit 2
fi
for var
do
arg=`echo $var | sed -r 's/^.{2}//'`
if [[ $var == -D* ]]
then
sed -i '1s/^/#define '$arg'\n/' $dmepath.mdme
continue
fi
if [[ $var == -M* ]]
then
sed -i '1s/^/#define MAP_OVERRIDE\n/' $dmepath.mdme
sed -i 's!// BEGIN_INCLUDE!// BEGIN_INCLUDE\n#include "_maps\\'$arg'.dm"!' $dmepath.mdme
continue
fi
done
#windows
if [[ `uname` == MINGW* ]]
then
dm=""
if hash dm.exe 2>/dev/null
then
dm='dm.exe'
elif [[ -a '/c/Program Files (x86)/BYOND/bin/dm.exe' ]]
then
dm='/c/Program Files (x86)/BYOND/bin/dm.exe'
elif [[ -a '/c/Program Files/BYOND/bin/dm.exe' ]]
then
dm='/c/Program Files/BYOND/bin/dm.exe'
fi
if [[ $dm == "" ]]
then
echo "Couldn't find the DreamMaker executable, aborting."
exit 3
fi
"$dm" $dmepath.mdme 2>&1 | tee result.log
retval=$?
if ! grep '\- 0 errors, 0 warnings' result.log
then
retval=1 #hard fail, due to warnings or errors
fi
else
if hash DreamMaker 2>/dev/null
then
DreamMaker $dmepath.mdme 2>&1 | tee result.log
retval=$?
if ! grep '\- 0 errors, 0 warnings' result.log
then
retval=1 #hard fail, due to warnings or errors
fi
else
echo "Couldn't find the DreamMaker executable, aborting."
exit 3
fi
fi
mv $dmepath.mdme.dmb $dmepath.dmb
mv $dmepath.mdme.rsc $dmepath.rsc
rm $dmepath.mdme
exit $retval
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
set -e
if [ "$BUILD_TOOLS" = true ]; then
rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $NODE_VERSION
npm install -g gulp-cli
pip install --user PyYaml -q
pip install --user beautifulsoup4 -q
fi;
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env python
import os
import os.path
import sys
folders = ["_maps/RandomRuins", "_maps/RandomZLevels", "_maps/shuttles",
"_maps/templates"]
generated = "_maps/templates.dm"
template_filenames = []
def find_dm(path):
L = []
for dirpath, dirnames, filenames in os.walk(path):
for name in filenames:
if name.endswith(".dmm"):
s = os.path.join(dirpath, name)
s = s.replace("_maps/","")
L.append(s)
return L
for folder in folders:
template_filenames.extend(find_dm(folder))
with open(generated, 'w') as f:
for template in template_filenames:
f.write('''#include "{}"\n'''.format(template))