Files
Yogstation/tools/linux_build.py
coiax 4483d5275c Shuttle manipulator (#17436)
* Starting out on our tgui journey

* God tgui, why do you need to be updated

You're dynamically generated anyway

* Commit of stuff

* Further progress is being made

* Everyone loves buildscripts

* Further modifications to my incredible running script

* Starting to modify the minimap code to be better

* It's going well thusfar, I guess

* What have I done

* RIP minimap

* FUN FUN FUN FUN FUN

* Adds shuttle_manipulator.dmi

MUH HOLOGRAMS

* Is it done? IS IT OVER

* Peer review

* Some bug fixes

* Makes that damn greentext shut up

* Shuttle registration

* Made the Emergency Escape Bar more robust

No climbing on the bar.

* Do not stare into the operation end of the device

* Compile shame

* THE MOST DUMB

* Passive barmaiden

* Emergency shuttle memes

* MORE SAFETY CODE

* Fancy shuttle manipulator icons

* Smoothing it out

* We are going to have a lot of fun with this one

* Independent blobbernauts

* WABBAJACK WABBAJACK

* Message for attempting to authenticate old style

* Angry alert noise is back

* Revert "Independent blobbernauts"

This reverts commit 34d6af7c9c88cfc2864990cb37b586bb90163dd3.

* No parrot sleep plz

* Moves the special shuttle stuff to special.dm

* No Bartender like a Centcom Bartender

* Non-controversial map changes

- Backup shuttle moved closer to Centcom main structure, docking tube
created
- Moved shuttle import landmark to above Centcom main building
- Added shuttle displays to Conference Room
- Squashed the Chapel a bit in Metastation
- Made the docking port on Z2 massive
- Made the docking port on Metastation a lot larger

* Hacks and slashes at Box

A bunch of things are extended and squashed so Box shuttle dock can
support the MetaStation emergency shuttle.

* Some Metastationshit

* Never ending changes

* Wabbajack to TGM

* Modified the bar, I think that's all of them

* Stops Barmaiden wandering around

* More code review

* Whitspace, the bane of us all

* DIE WHITESPACE DIE
2016-05-26 15:15:19 +02:00

78 lines
1.8 KiB
Python
Executable File

#!/usr/bin/env python
import subprocess
import os
import sys
import argparse
from subprocess import PIPE, STDOUT
null = open("/dev/null", "wb")
def wait(p):
rc = p.wait()
if rc != 0:
p = play("sound/misc/compiler-failure.ogg")
p.wait()
assert p.returncode == 0
sys.exit(rc)
def play(soundfile):
p = subprocess.Popen(["play", soundfile], stdout=null, stderr=null)
assert p.wait() == 0
return p
def stage1():
p = subprocess.Popen("(cd tgui; /bin/bash ./build.sh)", shell=True)
wait(p)
play("sound/misc/compiler-stage1.ogg")
def stage2():
p = subprocess.Popen("DreamMaker tgstation.dme", shell=True)
wait(p)
def stage3():
play("sound/misc/compiler-stage2.ogg")
logfile = open('server.log~','w')
p = subprocess.Popen(
"DreamDaemon tgstation.dmb 25001 -trusted",
shell=True, stdout=PIPE, stderr=STDOUT)
try:
while p.returncode is None:
stdout = p.stdout.readline()
t = "Initializations complete."
if t in stdout:
play("sound/misc/server-ready.ogg")
sys.stdout.write(stdout)
sys.stdout.flush()
logfile.write(stdout)
finally:
logfile.flush()
os.fsync(logfile.fileno())
logfile.close()
p.kill()
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-s','---stage',default=1,type=int)
parser.add_argument('--only',action='store_true')
args = parser.parse_args()
stage = args.stage
assert stage in (1,2,3)
if stage == 1:
stage1()
if not args.only:
stage = 2
if stage == 2:
stage2()
if not args.only:
stage = 3
if stage == 3:
stage3()
if __name__=='__main__':
try:
main()
except KeyboardInterrupt:
pass