forked from webrtc-uwp/webrtc-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinputHandler.py
More file actions
38 lines (26 loc) · 1.61 KB
/
inputHandler.py
File metadata and controls
38 lines (26 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
import sys
import argparse
from system import System
from settings import Settings
class Input:
@classmethod
def parseInput(cls,inputArgs):
parser = argparse.ArgumentParser()
parser.add_argument('template', nargs='?', help='Template name, where default settings are overwritten')
parser.add_argument('-a','--actions', nargs='*', choices=['clean','createuserdef', 'prepare', 'build', 'backup', 'createnuget'], type=str.lower, help='Actions to perform')
if System.checkIfTargetIsSupported('ortc'):
parser.add_argument('-t','--targets', nargs='*', choices=['ortc', 'webrtc'], help='Target')
else:
parser.add_argument('-t','--targets', nargs='*', choices=['webrtc'], help='Target')
if System.hostOs == 'mac':
parser.add_argument('-p','--platforms', nargs='*', choices=['mac', 'iOS'], help='Target platform')
elif System.hostOs == 'linux':
parser.add_argument('-p','--platforms', nargs='*', choices=['linux', 'android'], help='Target platform')
else:
parser.add_argument('-p','--platforms', nargs='*', choices=['winuwp', 'win'], help='Target platform')
parser.add_argument('--cpus', nargs='*', choices=['x64', 'x86', 'arm', 'arm64'], type=str.lower, help='Target cpu')
parser.add_argument('-c','--configurations', nargs='*', choices=['debug', 'release'], type=str.lower, help='Target build configuration')
parser.add_argument('--noColor', action='store_true', help='Do not colorize output')
parser.add_argument('--noWrapper', action='store_true', help='Do not build wrapper projects')
Settings.inputArgs = parser.parse_args()