コード例 #1
0
def main(argv):
    app.openProject()
    args = cli.parse_args(argv[1:])

    if args.build:
        buildTargetName = 'host'
        if args.platform != 'native':
            buildTargetName = args.platform

        from gii.core.tools import Build
        buildOptions = {
            'build_type': args.build_type,
            'targets': [buildTargetName]
        }
        code = Build.run(**buildOptions)
        if code and code != 0:
            exit(code)

    from gii.core.tools import RunHost
    options = {
        'base': args.local and 'local' or 'game',
        'platform': args.platform,
        'steam_support': args.steam_support
    }
    code = RunHost.run(args.target, *args.arguments, **options)
    exit(code)
コード例 #2
0
def main(argv):
    interpreter = sys.executable
    args = argv[1:]
    # if len( args ) < 1:
    # 	print 'no script specified'
    # 	return 0
    cwd = os.getcwd()
    try:
        app.openProject()
        projectExtPath = app.getProject().getBinaryPath('python')
        addEnvPath('PYTHONPATH', projectExtPath, True)
        #add project binary into path
    except Exception as ex:
        pass

    os.chdir(cwd)

    l = [interpreter] + args
    if not os.path.exists(interpreter):
        print('python interperter not found')
        return -1

    try:
        code = subprocess.call(l)
    except Exception as ex:
        print(ex)
        return -1

    return code
コード例 #3
0
ファイル: __init__.py プロジェクト: pixpil/gii
def main( argv ):
	app.openProject()
	args = cli.parse_args( argv[1:] )		
	code = Build.run( 
		**vars( args )
		)
	exit( code )
	
コード例 #4
0
ファイル: __init__.py プロジェクト: pixpil/gii
def main( argv ):
	task = stub.start()
	if task['task'] == 'open':
		app.openProject( task['path'] )
		import gii.SceneEditor
		import gii.AssetEditor
		# import gii.ScriptView
		import gii.DeviceManager
		app.run()
コード例 #5
0
def main(argv):
    task = stub.start()
    if task['task'] == 'open':
        app.openProject(task['path'])
        import gii.SceneEditor
        import gii.AssetEditor
        # import gii.ScriptView
        import gii.DeviceManager
        app.run()
コード例 #6
0
def main(argv):
    app.openProject()
    args = cli.parse_args(argv[1:])
    if args.build:
        from gii.core.tools import Build
        code = Build.run()
        if code and code != 0:
            exit(code)

    from gii.core.tools import RunHost
    code = RunHost.run(args.target)
    exit(code)
コード例 #7
0
ファイル: __init__.py プロジェクト: pixpil/gii
def main( argv ):
	app.openProject()
	args = cli.parse_args( argv[1:] )	
	if args.build:
		from gii.core.tools import Build
		code = Build.run()
		if code and code != 0:
			exit( code )

	from gii.core.tools import RunHost
	code = RunHost.run( args.target )
	exit( code )
コード例 #8
0
def run( 
		stop_other_instance
	):
	app.openProject()
	import gii.SceneEditor
	import gii.AssetEditor
	import gii.DeviceManager
	import gii.DebugView

	import gii.ScriptView
	
	options = {}
	options[ 'stop_other_instance' ] = stop_other_instance

	print 'starting gii IDE...'
	app.run( **options )		
コード例 #9
0
def main(argv):
    try:
        proj = app.openProject()
    except Exception as ex:
        print(ex)
        return -1

    projPath = proj.getPath()
    shellPath = projPath + '/env/shell'
    args = argv[1:]
    if len(args) < 1:
        print('no script specified')
        return 0

    execName = shellPath + '/' + args[0]
    l = [execName] + args[1:]
    if not os.path.exists(execName):
        print('script not found')
        return -1

    try:
        code = subprocess.call(l, cwd=projPath)
    except Exception as ex:
        print(ex)
        return -1

    return code
コード例 #10
0
ファイル: __init__.py プロジェクト: pixpil/gii
def run(**kwargs):
    app.openProject()
    import sip
    try:
        sip.setapi("QString", 2)
        sip.setapi('QVariant', 2)
    except Exception as e:
        pass

    options = {}
    options['stop_other_instance'] = kwargs.get('stop_other_instance', False)
    options['load_compiled_project'] = kwargs.get('load_compiled_project',
                                                  False)

    print('starting gii IDE...')
    print('------------------------')

    app.run(**options)

    print('------------------------')
    print('bye!')
コード例 #11
0
ファイル: __init__.py プロジェクト: pixpil/gii
def main( argv ):
	proj = app.openProject()
	args = cli.parse_args( argv[1:] )	
	print proj.getPath()
	exit( 0 )
コード例 #12
0
def main(argv):
    app.openProject()
    args = cli.parse_args(argv[1:])
    code = Build.run(**vars(args))
    exit(code)
コード例 #13
0
def main(argv):
    proj = app.openProject()
    args = cli.parse_args(argv[1:])
    print proj.getPath()
    exit(0)
コード例 #14
0
def main(argv):
    try:
        proj = app.openProject()
    except Exception, ex:
        print ex
        return -1