Updated/fixed init script.
This commit is contained in:
parent
d9371e9cd4
commit
9fa0f631bf
@ -1,5 +1,5 @@
|
||||
config = {
|
||||
'PROJECT_NAME': 'spp_template'
|
||||
'PROJECT_NAME': 'Lua Demo'
|
||||
}
|
||||
env = SConscript('external/scons-plus-plus/SConscript', exports = ['config'])
|
||||
env.Append(CPPPATH = [Dir('private'), Dir('public')])
|
||||
@ -9,6 +9,6 @@ env.RecipeRepo('mewin-stable', 'https://git.mewin.de/mewin/spp_recipes.git', 'st
|
||||
# env.RecipeRepo('mewin-testing', 'https://git.mewin.de/mewin/spp_recipes.git', 'testing')
|
||||
|
||||
# app
|
||||
env = env.Module('private/spp_template/SModule')
|
||||
env = env.Module('private/lua_demo/SModule')
|
||||
|
||||
env.Finalize()
|
||||
|
@ -6,8 +6,8 @@ src_files = Split("""
|
||||
""")
|
||||
|
||||
prog_app = env.UnityProgram(
|
||||
name = 'Template',
|
||||
target = env['BIN_DIR'] + '/spp_template',
|
||||
name = '%MODULE_NAME%',
|
||||
target = env['BIN_DIR'] + '/%EXE_NAME%',
|
||||
source = src_files,
|
||||
dependencies = {
|
||||
'mijin': {}
|
||||
|
@ -111,15 +111,29 @@ def setup_project() -> None:
|
||||
_logger.info('Creating a git commit for the setup.')
|
||||
_exec_checked(['git', 'commit', '-m', 'Project setup', 'SConstruct', 'private'])
|
||||
|
||||
def setup_git_remote() -> None:
|
||||
current_url = _exec_get_output(['git', 'remote', 'get-url', 'origin'])
|
||||
if 'spp_template' not in current_url:
|
||||
_logger.debug('Remote already set up.')
|
||||
return
|
||||
|
||||
remote_url = ''
|
||||
while remote_url == '':
|
||||
print('Please enter a new URL for your git remote.')
|
||||
remote_url = _prompt().strip()
|
||||
_exec_checked(['git', 'remote', 'set-url', 'origin', remote_url])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(level=logging.DEBUG, format='%(message)s')
|
||||
_root = Path(__file__).parent.parent
|
||||
os.chdir(_root)
|
||||
#try:
|
||||
verify_tools()
|
||||
download_spp()
|
||||
update_spp()
|
||||
setup_project()
|
||||
#except Exception as e:
|
||||
# _logger.error('There was an error running the script: %s.', e)
|
||||
# sys.exit(1)
|
||||
try:
|
||||
verify_tools()
|
||||
download_spp()
|
||||
update_spp()
|
||||
setup_project()
|
||||
setup_git_remote()
|
||||
except Exception as e:
|
||||
_logger.error('There was an error running the script: %s.', e)
|
||||
sys.exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user