Skip to content

Instantly share code, notes, and snippets.

@Ation
Created October 25, 2016 07:49
Show Gist options
  • Save Ation/37ef00ed5461d7bfa96e7b324e2b86b3 to your computer and use it in GitHub Desktop.
Save Ation/37ef00ed5461d7bfa96e7b324e2b86b3 to your computer and use it in GitHub Desktop.
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