MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / Main

Function Main

BaseTools/Source/Python/UPT/UPT.py:103–314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101# Main
102#
103def Main():
104 Logger.Initialize()
105
106 Parser = OptionParser(version=(MSG_VERSION + ' Build ' + gBUILD_VERSION), description=MSG_DESCRIPTION,
107 prog="UPT.exe", usage=MSG_USAGE)
108
109 Parser.add_option("-d", "--debug", action="store", type="int", dest="debug_level", help=ST.HLP_PRINT_DEBUG_INFO)
110
111 Parser.add_option("-v", "--verbose", action="store_true", dest="opt_verbose",
112 help=ST.HLP_PRINT_INFORMATIONAL_STATEMENT)
113
114 Parser.add_option("-s", "--silent", action="store_true", dest="opt_slient", help=ST.HLP_RETURN_NO_DISPLAY)
115
116 Parser.add_option("-q", "--quiet", action="store_true", dest="opt_quiet", help=ST.HLP_RETURN_AND_DISPLAY)
117
118 Parser.add_option("-i", "--install", action="append", type="string", dest="Install_Distribution_Package_File",
119 help=ST.HLP_SPECIFY_PACKAGE_NAME_INSTALL)
120
121 Parser.add_option("-c", "--create", action="store", type="string", dest="Create_Distribution_Package_File",
122 help=ST.HLP_SPECIFY_PACKAGE_NAME_CREATE)
123
124 Parser.add_option("-r", "--remove", action="store", type="string", dest="Remove_Distribution_Package_File",
125 help=ST.HLP_SPECIFY_PACKAGE_NAME_REMOVE)
126
127 Parser.add_option("-t", "--template", action="store", type="string", dest="Package_Information_Data_File",
128 help=ST.HLP_SPECIFY_TEMPLATE_NAME_CREATE)
129
130 Parser.add_option("-p", "--dec-filename", action="append", type="string", dest="EDK2_DEC_Filename",
131 help=ST.HLP_SPECIFY_DEC_NAME_CREATE)
132
133 Parser.add_option("-m", "--inf-filename", action="append", type="string", dest="EDK2_INF_Filename",
134 help=ST.HLP_SPECIFY_INF_NAME_CREATE)
135
136 Parser.add_option("-l", "--list", action="store_true", dest="List_Dist_Installed",
137 help=ST.HLP_LIST_DIST_INSTALLED)
138
139 Parser.add_option("-f", "--force", action="store_true", dest="Yes", help=ST.HLP_DISABLE_PROMPT)
140
141 Parser.add_option("-n", "--custom-path", action="store_true", dest="CustomPath", help=ST.HLP_CUSTOM_PATH_PROMPT)
142
143 Parser.add_option("-x", "--free-lock", action="store_true", dest="SkipLock", help=ST.HLP_SKIP_LOCK_CHECK)
144
145 Parser.add_option("-u", "--replace", action="store", type="string", dest="Replace_Distribution_Package_File",
146 help=ST.HLP_SPECIFY_PACKAGE_NAME_REPLACE)
147
148 Parser.add_option("-o", "--original", action="store", type="string", dest="Original_Distribution_Package_File",
149 help=ST.HLP_SPECIFY_PACKAGE_NAME_TO_BE_REPLACED)
150
151 Parser.add_option("--use-guided-paths", action="store_true", dest="Use_Guided_Paths", help=ST.HLP_USE_GUIDED_PATHS)
152
153 Parser.add_option("-j", "--test-install", action="append", type="string",
154 dest="Test_Install_Distribution_Package_Files", help=ST.HLP_TEST_INSTALL)
155
156 Opt = Parser.parse_args()[0]
157
158 Var2Var = [
159 ("PackageInformationDataFile", Opt.Package_Information_Data_File),
160 ("PackFileToInstall", Opt.Install_Distribution_Package_File),

Callers 1

UPT.pyFile · 0.70

Calls 13

rollbackMethod · 0.95
commitMethod · 0.95
GetWorkspaceFunction · 0.90
IpiDatabaseClass · 0.90
SetLogLevelFunction · 0.85
CheckConflictOptionFunction · 0.85
GetFullPathDistFunction · 0.85
InitializeMethod · 0.80
joinMethod · 0.80
RollBackMethod · 0.80
CommitMethod · 0.80
CloseDbMethod · 0.80

Tested by

no test coverage detected