\r
VfrCompiler main class and main function.\r
\r
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
mOptions.IncludePaths = NULL;\r
mOptions.SkipCPreprocessor = TRUE;\r
mOptions.CPreprocessorOptions = NULL;\r
- mOptions.CompatibleMode = FALSE;\r
mOptions.HasOverrideClassGuid = FALSE;\r
mOptions.WarningAsError = FALSE;\r
mOptions.AutoDefault = FALSE;\r
}\r
\r
AppendCPreprocessorOptions (Argv[Index]);\r
- } else if (stricmp(Argv[Index], "-c") == 0 || stricmp(Argv[Index], "--compatible-framework") == 0) {\r
- mOptions.CompatibleMode = TRUE;\r
} else if (stricmp(Argv[Index], "-s") == 0|| stricmp(Argv[Index], "--string-db") == 0) {\r
Index++;\r
if ((Index >= Argc) || (Argv[Index][0] == '-')) {\r
" create an IFR HII pack file",\r
" -n, --no-pre-processing",\r
" do not preprocessing input file",\r
- " -c, --compatible-framework",\r
- " compatible framework vfr file",\r
" -s, --string-db",\r
" input uni string package file",\r
" -g, --guid",\r
goto Fail;\r
}\r
\r
- InputInfo.CompatibleMode = mOptions.CompatibleMode;\r
if (mOptions.HasOverrideClassGuid) {\r
InputInfo.OverrideClassGuid = &mOptions.OverrideClassGuid;\r
} else {\r
DebugError (NULL, 0, 0001, "Error parsing vfr file", " %s.Buffer not allocated.", mOptions.VfrFileName);\r
}\r
\r
- //\r
- // For UEFI mode, not do OpCode Adjust\r
- //\r
- if (mOptions.CompatibleMode) {\r
- //\r
- // Adjust Opcode to be compatible with framework vfr\r
- //\r
- Status = gCIfrRecordInfoDB.IfrRecordAdjust ();\r
- if (Status != VFR_RETURN_SUCCESS) {\r
- //\r
- // Record List Adjust Failed\r
- //\r
- SET_RUN_STATUS (STATUS_FAILED);\r
- return;\r
- }\r
- //\r
- // Re get the IfrRecord Buffer.\r
- //\r
- gCIfrRecordInfoDB.IfrRecordOutput (gRBuffer);\r
- }\r
-\r
return;\r
}\r
\r
goto Fail;\r
}\r
\r
- if (!mOptions.CreateIfrPkgFile || mOptions.CompatibleMode) {\r
+ if (!mOptions.CreateIfrPkgFile) {\r
if ((pFile = fopen (LongFilePath (mOptions.COutputFileName), "w")) == NULL) {\r
DebugError (NULL, 0, 0001, "Error opening output C file", "%s", mOptions.COutputFileName);\r
goto Fail;\r
fprintf (pFile, "%s\n", gSourceFileHeader[Index]);\r
}\r
\r
- if (mOptions.CompatibleMode) {\r
- gCVfrBufferConfig.OutputCFile (pFile, mOptions.VfrBaseFileName);\r
- }\r
-\r
if (gCFormPkg.GenCFile (mOptions.VfrBaseFileName, pFile, &gRBuffer) != VFR_RETURN_SUCCESS) {\r
fclose (pFile);\r
goto Fail;\r