Created
October 25, 2016 07:49
-
-
Save Ation/37ef00ed5461d7bfa96e7b324e2b86b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
import subprocess | |
def generate_project(): | |
command = ['python', 'generate_project.py', 'release'] | |
result = subprocess.call(command) | |
if result == 0: | |
print 'Project generated' | |
return True | |
else: | |
print 'Failed to genearte project' | |
return False | |
def build_terminal(): | |
print 'Starting build of the terminal. Please hold on.' | |
currentDir = os.getcwd() | |
os.chdir('terminal.release') | |
command = ['devenv', 'BlockSettle.sln', '/build', 'Release'] | |
result = subprocess.call(command) | |
os.chdir(currentDir) | |
if result == 0: | |
buildDir = os.path.join(currentDir, 'build_terminal','Release','bin','Release') | |
print 'Terminal is ready. Could be found in ' + buildDir | |
return True | |
else: | |
print 'Failed to build terminal' | |
return False | |
if __name__ == '__main__': | |
if generate_project(): | |
build_terminal() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment