public final class WindowsPlatform
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
WindowsPlatform()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addVersionFiles(VersionInfo versionInfo,
LinkType linkType,
java.io.File outputFile,
boolean isDebug,
java.io.File objDir,
TargetMatcher matcher)
Adds source or object files to the bidded fileset to
support version information.
|
private static void |
encodeVersion(java.lang.StringBuffer buf,
short[] version)
Converts parsed version information into a string representation.
|
private static boolean |
hasSameContent(java.io.InputStream stream1,
java.io.InputStream stream2)
Compare two input streams for duplicate content
Naive implementation, but should not be performance issue.
|
static short[] |
parseVersion(java.lang.String version)
Parse version string into array of four short values.
|
static void |
writeResource(java.io.Writer writer,
VersionInfo versionInfo,
java.io.File outputFile,
boolean isDebug,
LinkType linkType)
Writes windows resource.
|
public static void addVersionFiles(VersionInfo versionInfo, LinkType linkType, java.io.File outputFile, boolean isDebug, java.io.File objDir, TargetMatcher matcher) throws java.io.IOException
versionInfo - version informationlinkType - link typeisDebug - true if debug buildoutputFile - name of generated executableobjDir - directory for generated filesmatcher - bidded filesetjava.io.IOException - if unable to write version resourceprivate static boolean hasSameContent(java.io.InputStream stream1,
java.io.InputStream stream2)
throws java.io.IOException
stream1 - streamstream2 - streamjava.io.IOException - if error reading streamspublic static short[] parseVersion(java.lang.String version)
version - String versionprivate static void encodeVersion(java.lang.StringBuffer buf,
short[] version)
buf - StringBuffer string buffer to receive version numberversion - short[] four-element arraypublic static void writeResource(java.io.Writer writer,
VersionInfo versionInfo,
java.io.File outputFile,
boolean isDebug,
LinkType linkType)
throws java.io.IOException
writer - writer, may not be nulversionInfo - version informationoutputFile - executable fileisDebug - true if debuglinkType - link typejava.io.IOException - if error writing resource file