diff options
author | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-31 16:26:40 +0000 |
---|---|---|
committer | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-31 16:26:40 +0000 |
commit | 808def96aa4589fba9c2d0ea55837754a3b7a4f7 (patch) | |
tree | 0ea221c59abb2474c694e7ab5bd61006be77e47e /Tools/Java/Source/FrameworkTasks/org/tianocore/framework/tasks/GenCRC32SectionTask.java | |
parent | 9216450d1143056a50a5f916984a2d7faf590488 (diff) | |
download | edk2-platforms-808def96aa4589fba9c2d0ea55837754a3b7a4f7.tar.xz |
Retiring the ANT/JAVA build and removing the older EDK II packages that required ANT/JAVA.
Last Ant/Java build was r7166
Developers requiring the Java/Ant packages should checkout the branch from:
https://edk2.tianocore.org/svn/edk2/branches/AntJava
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7168 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java/Source/FrameworkTasks/org/tianocore/framework/tasks/GenCRC32SectionTask.java')
-rw-r--r-- | Tools/Java/Source/FrameworkTasks/org/tianocore/framework/tasks/GenCRC32SectionTask.java | 142 |
1 files changed, 0 insertions, 142 deletions
diff --git a/Tools/Java/Source/FrameworkTasks/org/tianocore/framework/tasks/GenCRC32SectionTask.java b/Tools/Java/Source/FrameworkTasks/org/tianocore/framework/tasks/GenCRC32SectionTask.java deleted file mode 100644 index d9273acf7b..0000000000 --- a/Tools/Java/Source/FrameworkTasks/org/tianocore/framework/tasks/GenCRC32SectionTask.java +++ /dev/null @@ -1,142 +0,0 @@ -/** @file
- GenCRC32SectionTask class.
-
- GenCRC32SectionTask is to call GenCRC32Section.exe to generate crc32 section.
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.framework.tasks;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.Execute;
-import org.apache.tools.ant.taskdefs.LogStreamHandler;
-import org.apache.tools.ant.types.Commandline;
-
-import org.tianocore.common.logger.EdkLog;
-
-/**
- GenCRC32SectionTask
-
- GenCRC32SectionTask is to call GenCRC32Section.exe to generate crc32 section.
-
-**/
-public class GenCRC32SectionTask extends Task implements EfiDefine {
- //
- // Tool name
- //
- private static String toolName = "GenCRC32Section";
- //
- // output file
- //
- private FileArg outputFile = new FileArg();
- //
- // inputFile list
- //
- private InputFile inputFileList = new InputFile();
-
- //
- // Project
- //
- static private Project project;
-
- /**
- execute
-
- GenCRC32SectionTask execute is to assemble tool command line & execute
- tool command line
-
- @throws BuildException
- **/
- public void execute() throws BuildException {
-
- project = this.getOwningTarget().getProject();
- ///
- /// absolute path of efi tools
- ///
- String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH");
- String command;
- if (path == null) {
- command = toolName;
- } else {
- command = path + File.separator + toolName ;
- }
- //
- // assemble argument
- //
- String argument = "" + inputFileList.toStringWithSinglepPrefix(" -i ") + outputFile;
- //
- // return value of fwimage execution
- //
- int revl = -1;
-
- try {
- Commandline cmdline = new Commandline();
- cmdline.setExecutable(command);
- cmdline.createArgument().setLine(argument);
-
- LogStreamHandler streamHandler = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
- Execute runner = new Execute(streamHandler, null);
-
- runner.setAntRun(project);
- runner.setCommandline(cmdline.getCommandline());
-
- EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
- EdkLog.log(this, inputFileList.toFileList() + " => " + outputFile.toFileList());
-
- revl = runner.execute();
- if (EFI_SUCCESS == revl){
- //
- // command execution success
- //
- EdkLog.log(this, toolName + " succeeded!");
- } else {
- //
- // command execution fail
- //
- EdkLog.log(this, "ERROR = " + Integer.toHexString(revl));
- // LAH Added This Line
- throw new BuildException(toolName + " failed!");
- }
- } catch (Exception e) {
- throw new BuildException(e.getMessage());
- }
- }
-
- /**
- addInputFile
-
- This function is to add a inputFile element into list
- @param inputFile : inputFile element
- **/
- public void addConfiguredInputfile(InputFile inputFile) {
- inputFileList.insert(inputFile);
- }
-
- /**
- get class member "outputFile"
- @return name of output file
- **/
- public String getOutputFile() {
- return this.outputFile.getValue();
- }
- /**
- set class member "outputFile"
- @param outputFile : outputFile parameter
- **/
- public void setOutputFile(String outputFile) {
- this.outputFile.setArg(" -o ", outputFile);
- }
-}
|