home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
MicrosoftSigning.java
< prev
next >
Wrap
Text File
|
1998-10-14
|
2KB
|
73 lines
package com.symantec.itools.tools.archive;
import java.io.File;
import java.io.IOException;
import com.symantec.itools.io.FileSystem;
import com.symantec.itools.lang.Debug;
import com.symantec.itools.lang.ProcessManager;
/**
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public class MicrosoftSigning
extends TypeSigning
{
/**
* @since VCafe 3.0
*/
protected ProcessManager processManager;
public MicrosoftSigning(Options options)
{
super(options);
}
/**
* @param errorMsg TODO
* @since VCafe 3.0
*/
public boolean sign(StringBuffer errorMsg)
{
StringBuffer command;
command = new StringBuffer(FileSystem.quoteIfNeeded(FileSystem.getCanonicalPath(options.getMicrosoftTools(), true)) + "signcode.exe");
command.append(FileSystem.quoteIfNeeded(options.getOutputLocation()));
try
{
processManager = new ProcessManager();
if(processManager.monitorLaunchedProcess(Runtime.getRuntime().exec(command.toString())) != 0)
{
return (false);
}
}
catch(IOException ex)
{
Debug.logException(ex);
return (false);
}
return (true);
}
/**
* @since VCafe 3.0
*/
public void cancel()
{
if(processManager != null)
{
processManager.destroyProcess();
processManager = null;
}
}
}