提交 13d54fd0 编写于 作者: J jgodinez

Merge

^build/
^dist/
^nbproject/private/
^make/netbeans/.*/nbproject/private/
^make/netbeans/.*/build/
^make/netbeans/.*/dist/
......@@ -41,3 +41,8 @@ f72c0dc047b9b2e797beee68ae0b50decb1f020d jdk7-b61
a50217eb3ee10b9f9547e0708e5c9625405083ef jdk7-b64
382a27aa78d3236fa123c60577797a887fe93e09 jdk7-b65
bd31b30a5b21f20e42965b1633f18a5c7946d398 jdk7-b66
a952aafd5181af953b0ef3010dbd2fcc28460e8a jdk7-b67
b23d905cb5d3b382295240d28ab0bfb266b4503c jdk7-b68
226b20019b1f020c09ea97d137d98e011ce65d76 jdk7-b69
893bcca951b747ddcf6986362b877f0e1dbb835b jdk7-b70
b3f3240135f0c10b9f2481c174b81b7fcf0daa60 jdk7-b71
......@@ -9,35 +9,25 @@ Simple Build Instructions:
http://java.sun.com/javase/downloads/index.jsp
Set the environment variable ALT_BOOTDIR to the location of this JDK 6.
2. Download and install the JIBX libraries, version 1.1.5 from
http://sourceforge.net/project/showfiles.php?group_id=69358&package_id=68290
You'll need the following four JAR files:
bcel.jar
jibx-bind.jar
jibx-run.jar
xpp3.jar
Set the environment variable ALT_JIBX_LIBS_PATH to the location of
these JAR files.
3. Download and install the Binary Plugs for the most recent JDK7 from
2. Download and install the Binary Plugs for the most recent JDK7 from
http://download.java.net/openjdk/jdk7/
Set the environment variable ALT_BINARY_PLUGS_PATH to the location of
these binary plugs.
4. Either download and install the latest JDK7 from
3. Either download and install the latest JDK7 from
http://download.java.net/openjdk/jdk7/, or build your own complete
OpenJDK7 by using the top level Makefile in the OpenJDK Mercurial forest.
Set the environment variable ALT_JDK_IMPORT_PATH to the location of
this latest JDK7 or OpenJDK7 build.
5. Check the sanity of doing a build with the current machine:
4. Check the sanity of doing a build with the current machine:
cd make && gnumake sanity
See README-builds.html if you run into problems.
6. Do a partial build of the jdk:
5. Do a partial build of the jdk:
cd make && gnumake all
7. Construct the images:
6. Construct the images:
cd make && gnumake images
The resulting JDK image should be found in build/*/j2sdk-image
......
......@@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
--- end of LICENSE file ---
%% This notice is provided with respect to ASM, which may be included with this software:
Copyright (c) 2000-2005 INRIA, France Telecom
Copyright (c) 2000-2007 INRIA, France Telecom
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
#
# Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -45,54 +45,49 @@
# For OpenJDK, the jar files built here are installed directly into the
# OpenJDK.
#
# For JDK, the binaries use pre-built/pre-signed/pre-obfuscated binary
# files stored in the closed workspace that are not shipped in the
# OpenJDK workspaces. We still build the JDK files here to verify the
# files compile, and in preparation for possible signing and
# obfuscation. Developers working on JCE in JDK must sign the JCE files
# before testing: obfuscation is optional during development. The JCE
# signing key is kept separate from the JDK workspace to prevent its
# disclosure. The obfuscation tool has not been licensed for general
# usage.
#
# For JDK, the binaries use pre-built/pre-signed binary files stored in
# the closed workspace that are not shipped in the OpenJDK workspaces.
# We still build the JDK files here to verify the files compile, and in
# preparation for possible signing. Developers working on JCE in JDK
# must sign the JCE files before testing. The JCE signing key is kept
# separate from the JDK workspace to prevent its disclosure.
#
# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
# be built, obfuscated, signed, and then the resulting jar files MUST BE
# CHECKED INTO THE CLOSED PART OF THE WORKSPACE*. This separate step
# *MUST NOT BE FORGOTTEN*, otherwise a bug fixed in the source code will
# not be reflected in the shipped binaries. The "release" target should be
# be built and signed, and the resulting jar files MUST BE CHECKED INTO
# THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT BE
# FORGOTTEN*, otherwise a bug fixed in the source code will not be
# reflected in the shipped binaries. The "release" target should be
# used to generate the required files.
#
# There are a number of targets to help both JDK/OpenJDK developers.
#
# Main Targets (JDK/OPENJDK):
#
# all/clobber/clean The usual.
# If OpenJDK, installs sunjce_provider.jar.
# If JDK, installs prebuilt
# sunjce_provider.jar.
# all/clobber/clean The usual.
# If OpenJDK, installs sunjce_provider.jar.
# If JDK, installs prebuilt
# sunjce_provider.jar.
#
# jar Builds/installs sunjce_provider.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
# jar Builds/installs sunjce_provider.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
#
# Other lesser-used Targets (JDK/OPENJDK):
#
# build-jar Builds sunjce_provider.jar
# (does not sign/install)
# build-jar Builds sunjce_provider.jar
# (does not sign/install)
#
# install-jar Alias for "jar" above.
# install-jar Alias for "jar" above.
#
# Other targets (JDK only):
#
# sign Alias for sign-jar
# sign-jar Builds/signs sunjce_provider.jar (no install)
#
# obfus Builds/obfuscates/signs sunjce_provider.jar
# sign Alias for sign-jar
# sign-jar Builds/signs sunjce_provider.jar (no install)
#
# release Builds all targets in preparation
# for workspace integration.
# release Builds all targets in preparation
# for workspace integration.
#
# install-prebuilt Installs the pre-built jar files
# install-prebuilt Installs the pre-built jar files
#
# This makefile was written to support parallel target execution.
#
......@@ -103,7 +98,7 @@ PRODUCT = sun
#
# The following is for when we need to do postprocessing
# (signing/obfuscation) against a read-only build. If the OUTPUTDIR
# (signing) against a read-only build. If the OUTPUTDIR
# isn't writable, the build currently crashes out.
#
ifndef OPENJDK
......@@ -158,8 +153,8 @@ endif # OPENJDK
#
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# part of the build we're doing. Both OPENJDK/JDK builds are initially
# done in the unsigned area. When files are signed or obfuscated in JDK,
# they will be placed in the appropriate areas.
# done in the unsigned area. When files are signed in JDK, they will be
# placed in the appropriate areas.
#
UNSIGNED_DIR = $(TEMPDIR)/unsigned
......@@ -223,61 +218,15 @@ $(SIGNED_DIR)/sunjce_provider.jar:
endif
$(call sign-file, $(UNSIGNED_DIR)/sunjce_provider.jar)
# =====================================================
# Obfuscate/sign/install the JDK build. Not needed for OpenJDK.
#
OBFUS_DIR = $(JCE_BUILD_DIR)/obfus/sunjce
CLOSED_DIR = $(BUILDDIR)/closed/com/sun/crypto/provider
obfus: $(OBFUS_DIR)/sunjce_provider.jar
$(release-warning)
ifndef ALT_JCE_BUILD_DIR
$(OBFUS_DIR)/sunjce_provider.jar: build-jar $(JCE_MANIFEST_FILE) \
$(OBFUS_DIR)/sunjce.dox
else
$(OBFUS_DIR)/sunjce_provider.jar: $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/sunjce.dox
@if [ ! -d $(CLASSDESTDIR) ] ; then \
$(ECHO) "Couldn't find $(CLASSDESTDIR)"; \
exit 1; \
fi
endif
@$(ECHO) ">>>Obfuscating SunJCE Provider..."
$(presign)
$(preobfus)
$(prep-target)
$(CD) $(OBFUS_DIR); \
$(OBFUSCATOR) -fv sunjce.dox
@$(CD) $(OBFUS_DIR); $(java-vm-cleanup)
$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ \
-C $(OBFUS_DIR)/build com \
$(BOOT_JAR_JFLAGS)
$(sign-target)
@$(java-vm-cleanup)
$(OBFUS_DIR)/sunjce.dox: $(CLOSED_DIR)/obfus/sunjce.dox
@$(ECHO) ">>>Creating sunjce.dox"
$(prep-target)
$(SED) "s:@@TEMPDIR@@:$(ABS_TEMPDIR):" $< > $@
#
# The current obfuscator has a limitation in that it currently only
# supports up to v49 class file format. Force v49 classfiles in our
# builds for now.
#
TARGET_CLASS_VERSION = 5
# =====================================================
# Create the Release Engineering files. Obfuscated builds, etc.
# Create the Release Engineering files. Signed builds, etc.
#
release: $(OBFUS_DIR)/sunjce_provider.jar
release: $(SIGNED_DIR)/sunjce_provider.jar
$(RM) $(JCE_BUILD_DIR)/release/sunjce_provider.jar
$(MKDIR) -p $(JCE_BUILD_DIR)/release
$(CP) $(OBFUS_DIR)/sunjce_provider.jar $(JCE_BUILD_DIR)/release
$(CP) $(SIGNED_DIR)/sunjce_provider.jar $(JCE_BUILD_DIR)/release
$(release-warning)
endif # OPENJDK
......@@ -319,5 +268,5 @@ clobber clean::
.PHONY: build-jar jar install-jar
ifndef OPENJDK
.PHONY: sign sign-jar obfus release install-prebuilt
.PHONY: sign sign-jar release install-prebuilt
endif
......@@ -67,15 +67,14 @@ ifeq ($(STANDALONE),true)
$(ZIPOBJDIR)/deflate.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/trees.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/zadler32.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/compress.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/zutil.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/inflate.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/infblock.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/infcodes.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/infback.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/inftrees.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/infutil.$(OBJECT_SUFFIX) \
$(ZIPOBJDIR)/inffast.$(OBJECT_SUFFIX)
ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
OTHER_CXXFLAGS += $(ZINCLUDE)
LDDFLAGS += $(ZIPOBJS)
else
......
......@@ -242,6 +242,12 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \
endif
endif
#
# zlib version
#
ZLIB_VERSION = 1.2.3
#
# Localizations for the different parts of the product beyond English
#
......
......@@ -93,8 +93,7 @@ sanity-all:: sanity-base \
sane-alt_bootdir \
sane-bootdir \
sane-local-bootdir \
sane-alsa-headers \
sane-jibx
sane-alsa-headers
ifdef OPENJDK
sanity-all:: sane-freetype
......
......@@ -92,9 +92,9 @@ ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp
dummy := $(shell $(MKDIR) -p $(TEMP_DIR))
# The language version we want for this jdk build
SOURCE_LANGUAGE_VERSION=5
SOURCE_LANGUAGE_VERSION=7
# The class version we want for this jdk build
TARGET_CLASS_VERSION=5
TARGET_CLASS_VERSION=7
# The MESSAGE, WARNING and ERROR files are used to store sanity check and
# source check messages, warnings and errors.
......
......@@ -122,13 +122,13 @@ ifeq ($(JAVAC_WARNINGS_FATAL), true)
JAVACFLAGS += -Werror
endif
# Add the source level (currently all source is 1.5, should this be 1.6?)
SOURCE_LANGUAGE_VERSION = 5
# Add the source level
SOURCE_LANGUAGE_VERSION = 7
LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
JAVACFLAGS += $(LANGUAGE_VERSION)
# Add the class version we want (currently this is 5, should it be 6 or even 7?)
TARGET_CLASS_VERSION = 5
# Add the class version we want
TARGET_CLASS_VERSION = 7
CLASS_VERSION = -target $(TARGET_CLASS_VERSION)
JAVACFLAGS += $(CLASS_VERSION)
JAVACFLAGS += -encoding ascii
......@@ -201,7 +201,10 @@ endif
ifeq ($(JAVAC_WARNINGS_FATAL), true)
BOOT_JAVACFLAGS += -Werror
endif
BOOT_JAVACFLAGS += -encoding ascii
BOOT_SOURCE_LANGUAGE_VERSION = 6
BOOT_TARGET_CLASS_VERSION = 6
BOOT_JAVACFLAGS += -encoding ascii -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
BOOT_JAR_JFLAGS += $(JAR_JFLAGS)
BOOT_JAVACFLAGS += $(NO_PROPRIETARY_API_WARNINGS)
......
......@@ -536,15 +536,6 @@ endif
# NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64
BINDIR = $(OUTPUTDIR)/bin$(ISA_DIR)
# JIBX_LIBS_PATH: path to JIBX libraries, needed for NimbusLookAndFeel
ifdef ALT_JIBX_LIBS_PATH
JIBX_LIBS_PATH:=$(call FullPath,$(ALT_JIBX_LIBS_PATH))
JIBX_LIBS_PATH:=$(call AltCheckSpaces,JIBX_LIBS_PATH)
JIBX_LIBS_PATH:=$(call AltCheckValue,JIBX_LIBS_PATH)
else
JIBX_LIBS_PATH=$(JDK_DEVTOOLS_DIR)/share/jibx/lib
endif
# MOZILLA_HEADERS_PATH: path to mozilla header files for plugin
ifdef ALT_MOZILLA_HEADERS_PATH
MOZILLA_HEADERS_PATH :=$(call FullPath,$(ALT_MOZILLA_HEADERS_PATH))
......
......@@ -233,7 +233,6 @@ ifeq ($(PLATFORM),windows)
endif
endif
ALL_SETTINGS+=$(call addAltSetting,CACERTS_FILE)
ALL_SETTINGS+=$(call addAltSetting,JIBX_LIBS_PATH)
ifndef OPENJDK
ALL_SETTINGS+=$(call addAltSetting,MOZILLA_HEADERS_PATH)
endif
......
......@@ -214,7 +214,6 @@ include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk
sane-link \
sane-cacerts \
sane-alsa-headers \
sane-jibx \
sane-ant_version \
sane-zip_version \
sane-unzip_version \
......@@ -1516,22 +1515,6 @@ ifeq ($(PLATFORM), solaris)
endif
######################################################
# JIBX_LIBS_PATH must be valid
######################################################
sane-jibx:
ifdef DISABLE_NIMBUS
$(call SanityWarning,Disabling Nimbus will remove public API in javax.swing.plaf.nimbus.)
else
@if [ ! -r $(subst \,/,$(JIBX_LIBS_PATH))/jibx-run.jar ]; then \
$(ECHO) "ERROR: You do not have access to valid JIBX library files. \n" \
" Please check your access to \n" \
" $(subst \,/,$(JIBX_LIBS_PATH))/jibx-run.jar \n" \
" and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_JIBX_LIBS_PATH \n" \
"" >> $(ERROR_FILE) ; \
fi
endif
######################################################
# MOZILLA_HEADERS_PATH must be valid
######################################################
......
......@@ -33,8 +33,8 @@ AUTO_FILES_JAVA_DIRS = java/dyn sun/dyn
# The sources built here use new language syntax to generate
# method handle calls. Let's be sure we are using that format.
#LANGUAGE_VERSION = -source 7
#CLASS_VERSION = -target 7
LANGUAGE_VERSION = -source 7
CLASS_VERSION = -target 7
# Actually, it will be less disruptive to compile with the same
# -target option as the rest of the system, and just turn on
......
......@@ -77,6 +77,7 @@ JAVA_JAVA_java = \
java/lang/Compiler.java \
java/lang/Throwable.java \
java/lang/Exception.java \
java/lang/ReflectiveOperationException.java \
java/lang/IllegalAccessException.java \
java/lang/InstantiationException.java \
java/lang/ClassNotFoundException.java \
......@@ -250,6 +251,8 @@ JAVA_JAVA_java = \
java/util/IdentityHashMap.java \
java/util/EnumMap.java \
java/util/Arrays.java \
java/util/TimSort.java \
java/util/ComparableTimSort.java \
java/util/ConcurrentModificationException.java \
java/util/ServiceLoader.java \
java/util/ServiceConfigurationError.java \
......
......@@ -44,7 +44,6 @@ MS_RUNTIME_STATIC = true
include $(BUILDDIR)/common/Defs.gmk
ZLIB_VERSION = 1.1.3
ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin
LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
......@@ -68,12 +67,10 @@ FILES_c = \
wildcard.c \
jli_util.c \
inflate.c \
infblock.c \
inftrees.c \
infcodes.c \
inffast.c \
infutil.c \
zadler32.c \
zcrc32.c \
zutil.c
ifneq ($(PLATFORM), windows)
......
......@@ -160,7 +160,6 @@ FILES_src = \
\
sun/nio/ByteBuffered.java \
\
sun/nio/ch/AbstractFuture.java \
sun/nio/ch/AbstractPollArrayWrapper.java \
sun/nio/ch/AllocatedNativeObject.java \
sun/nio/ch/AsynchronousChannelGroupImpl.java \
......
......@@ -29,15 +29,16 @@ FILES_c = \
Deflater.c \
Inflater.c \
ZipFile.c \
zadler32.c \
zcrc32.c \
zip_util.c \
compress.c \
deflate.c \
trees.c \
zutil.c \
gzio.c \
infback.c \
inffast.c \
inflate.c \
infblock.c \
inftrees.c \
infcodes.c \
infutil.c \
inffast.c \
zip_util.c
trees.c \
uncompr.c \
zadler32.c \
zcrc32.c \
zutil.c
......@@ -30,7 +30,9 @@ LIBRARY = zip
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
ZLIB_VERSION = 1.1.3
#
# ZLIB_VERSION is defined in make/common/Defs.gmk
#
#
# Files to compile.
......
......@@ -32,38 +32,17 @@ text: .text%Java_java_util_zip_Inflater_initIDs;
text: .text%Java_java_util_zip_Inflater_init;
text: .text%inflateInit2_;
text: .text%zcalloc;
text: .text%inflate_blocks_new;
text: .text%inflate_blocks_reset;
text: .text%inflateReset;
text: .text%Java_java_util_zip_Inflater_inflateBytes;
text: .text%inflate;
text: .text%inflate_blocks;
text: .text%inflate_flush;
text: .text%Java_java_util_zip_ZipFile_read;
text: .text%ZIP_Read;
text: .text%inflate_trees_bits;
text: .text%huft_build: OUTPUTDIR/tmp/sun/java.util.zip/zip/obj/inftrees.o;
text: .text%zcfree;
text: .text%inflate_trees_dynamic;
text: .text%inflate_codes_new;
text: .text%inflate_codes;
text: .text%inflate_fast;
text: .text%inflate_codes_free;
text: .text%inflate_trees_fixed;
# Test Exit
# Test Hello
# Test Sleep
# Test IntToString
# Test LoadToolkit
text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames;
text: .text%ZIP_ReadEntry;
text: .text%InflateFully;
text: .text%inflateEnd;
text: .text%inflate_blocks_free;
# Test LoadFrame
# Test LoadJFrame
# Test JHello
# SwingSet
text: .text%Java_java_util_zip_Inflater_reset;
text: .text%Java_java_util_zip_ZipFile_close;
text: .text%ZIP_Close;
......
......@@ -31,37 +31,13 @@ text: .text%Java_java_util_zip_Inflater_initIDs;
text: .text%Java_java_util_zip_Inflater_init;
text: .text%inflateInit2_;
text: .text%zcalloc;
text: .text%inflate_blocks_new;
text: .text%inflate_blocks_reset;
text: .text%inflateReset;
text: .text%Java_java_util_zip_Inflater_inflateBytes;
text: .text%inflate;
text: .text%inflate_blocks;
text: .text%inflate_flush;
text: .text%Java_java_util_zip_ZipFile_read;
text: .text%ZIP_Read;
text: .text%inflate_trees_bits;
text: .text%huft_build: OUTPUTDIR/tmp/sun/java.util.zip/zip/obj/inftrees.o;
text: .text%zcfree;
text: .text%inflate_trees_dynamic;
text: .text%inflate_codes_new;
text: .text%inflate_codes;
text: .text%inflate_fast;
text: .text%inflate_codes_free;
text: .text%inflate_trees_fixed;
# Test Exit
# Test Hello
# Test Sleep
# Test IntToString
# Test LoadToolkit
text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames;
# Test LoadFrame
# Test LoadJFrame
# Test JHello
# SwingSet
text: .text%Java_java_util_zip_Inflater_reset;
text: .text%Java_java_util_zip_Inflater_end;
text: .text%inflateEnd;
text: .text%inflate_blocks_free;
text: .text%Java_java_util_zip_ZipFile_close;
text: .text%ZIP_Close;
data = R0x2000;
text = LOAD ?RXO;
# Test Null
text: .text%ZIP_Open;
text: .text%ZIP_Open_Generic;
text: .text%InitializeZip;
......@@ -32,38 +31,17 @@ text: .text%Java_java_util_zip_Inflater_initIDs;
text: .text%Java_java_util_zip_Inflater_init;
text: .text%inflateInit2_;
text: .text%zcalloc;
text: .text%inflate_blocks_new;
text: .text%inflate_blocks_reset;
text: .text%inflateReset;
text: .text%Java_java_util_zip_Inflater_inflateBytes;
text: .text%inflate;
text: .text%inflate_blocks;
text: .text%inflate_flush;
text: .text%Java_java_util_zip_ZipFile_read;
text: .text%ZIP_Read;
text: .text%inflate_trees_bits;
text: .text%huft_build: OUTPUTDIR/tmp/sun/java.util.zip/zip/obj64/inftrees.o;
text: .text%zcfree;
text: .text%inflate_trees_dynamic;
text: .text%inflate_codes_new;
text: .text%inflate_codes;
text: .text%inflate_fast;
text: .text%inflate_codes_free;
text: .text%inflate_trees_fixed;
# Test Exit
# Test Hello
# Test Sleep
# Test IntToString
# Test LoadToolkit
text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames;
text: .text%ZIP_ReadEntry;
text: .text%InflateFully;
text: .text%inflateEnd;
text: .text%inflate_blocks_free;
# Test LoadFrame
# Test LoadJFrame
# Test JHello
# SwingSet
text: .text%Java_java_util_zip_Inflater_reset;
text: .text%Java_java_util_zip_ZipFile_close;
text: .text%ZIP_Close;
......
#
# Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -61,7 +61,7 @@ SIGNING_PASSPHRASE = $(SIGNING_KEY_DIR)/passphrase.txt
SIGNING_ALIAS = jce_rsa
#
# Defines for signing/obfuscating the various jar files.
# Defines for signing the various jar files.
#
define presign
......@@ -100,19 +100,4 @@ define sign-file
$(sign-target)
endef
#
# Location for the Obfuscation product. JDK currently has
# the requirement that we obfuscate our JCE jars.
#
OBFUSCATOR = /security/tools/bin/obfus
OBFUS_DIR = $(TEMPDIR)/obfus
define preobfus
@if [ ! -f $(OBFUSCATOR) ]; then \
$(ECHO) "\n$(OBFUSCATOR): Obfuscator *NOT* available..." \
$(README-MAKEFILE_WARNING); \
exit 2; \
fi
endef
endif # !OPENJDK
#
# Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -44,64 +44,65 @@
# For OpenJDK, the jar files built here are installed directly into the
# OpenJDK.
#
# For JDK, the binaries use pre-built/pre-signed/pre-obfuscated binary
# files stored in the closed workspace that are not shipped in the
# OpenJDK workspaces. We still build the JDK files here to verify the
# files compile, and in preparation for possible signing and
# obfuscation. Developers working on JCE in JDK must sign the JCE files
# before testing: obfuscation is optional during development. The JCE
# signing key is kept separate from the JDK workspace to prevent its
# disclosure. The obfuscation tool has not been licensed for general
# usage.
# For JDK, the binaries use pre-built/pre-signed binary files stored in
# the closed workspace that are not shipped in the OpenJDK workspaces.
# We still build the JDK files here to verify the files compile, and in
# preparation for possible signing. Developers working on JCE in JDK
# must sign the JCE files before testing. The JCE signing key is kept
# separate from the JDK workspace to prevent its disclosure.
#
# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
# be built, obfuscated, signed, and the resulting jar files *MUST BE
# CHECKED INTO THE CLOSED PART OF THE WORKSPACE*. This separate step
# *MUST NOT BE FORGOTTEN*, otherwise a bug fixed in the source code will
# not be reflected in the shipped binaries. The "release" target should
# be used to generate the required files.
# be built and signed, and the resulting jar files *MUST BE CHECKED INTO
# THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT BE
# FORGOTTEN*, otherwise a bug fixed in the source code will not be
# reflected in the shipped binaries. The "release" target should be
# used to generate the required files.
#
# There are a number of targets to help both JDK/OpenJDK developers.
#
# Main Targets (JDK/OPENJDK):
#
# all/clobber/clean The usual.
# If OpenJDK, installs
# jce.jar/limited policy files.
# If JDK, installs prebuilt
# jce.jar/limited policy files.
#
# jar Builds/installs jce.jar
# If OpenJDK, does not sign
# If JDK, tries to sign
# all/clobber/clean The usual.
# If OpenJDK: builds/installs the
# jce.jar/limited policy files.
# If JDK: builds but does not install.
# During full tops-down builds,
# prebuilt/presigned jce.jar &
# limited policy files are copied
# in by make/java/redist/Makefile.
# If you are working in this directory
# and want to install the prebuilts,
# use the "install-prebuilt" target.
#
# jar Builds/installs jce.jar
# If OpenJDK, does not sign
# If JDK, tries to sign
#
# Other lesser-used Targets (JDK/OPENJDK):
#
# build-jar Builds jce.jar (does not sign/install)
# build-jar Builds jce.jar (does not sign/install)
#
# build-policy Builds policy files (does not sign/install)
# build-policy Builds policy files (does not sign/install)
#
# install-jar Alias for "jar" above
# install-jar Alias for "jar" above
#
# install-limited Builds/installs limited policy files
# If OpenJDK, does not sign
# If JDK, tries to sign
# install-unlimited Builds/nstalls unlimited policy files
# If OpenJDK, does not sign
# If JDK, tries to sign
# install-limited Builds/installs limited policy files
# If OpenJDK, does not sign
# If JDK, tries to sign
# install-unlimited Builds/nstalls unlimited policy files
# If OpenJDK, does not sign
# If JDK, tries to sign
#
# Other targets (JDK only):
#
# sign Alias for sign-jar and sign-policy
# sign-jar Builds/signs jce.jar file (no install)
# sign-policy Builds/signs policy files (no install)
#
# obfus Builds/obfuscates/signs jce.jar
# sign Alias for sign-jar and sign-policy
# sign-jar Builds/signs jce.jar file (no install)
# sign-policy Builds/signs policy files (no install)
#
# release Builds all targets in preparation
# for workspace integration.
# release Builds all targets in preparation
# for workspace integration.
#
# install-prebuilt Installs the pre-built jar files
# install-prebuilt Installs the pre-built jar files
#
# This makefile was written to support parallel target execution.
#
......@@ -112,7 +113,7 @@ PRODUCT = sun
#
# The following is for when we need to do postprocessing
# (signing/obfuscation) against a read-only build. If the OUTPUTDIR
# (signing) against a read-only build. If the OUTPUTDIR
# isn't writable, the build currently crashes out.
#
ifndef OPENJDK
......@@ -169,8 +170,8 @@ endif # OPENJDK
#
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# part of the build we're doing. Both OPENJDK/JDK builds are initially
# done in the unsigned area. When files are signed or obfuscated in JDK,
# they will be placed in the appropriate areas.
# done in the unsigned area. When files are signed in JDK, they will be
# placed in the appropriate areas.
#
UNSIGNED_DIR = $(TEMPDIR)/unsigned
......@@ -178,7 +179,7 @@ include Defs-jce.gmk
# =====================================================
# Build the unsigned jce.jar file. Signing/obfuscation comes later.
# Build the unsigned jce.jar file. Signing comes later.
#
JAR_DESTFILE = $(LIBDIR)/jce.jar
......@@ -363,68 +364,13 @@ $(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar: \
# =====================================================
# Obfuscate/sign/install the JDK build. Not needed for OpenJDK.
# Create the Release Engineering files. Signed builds,
# unlimited policy file distribution, etc.
#
OBFUS_DIR = $(JCE_BUILD_DIR)/obfus/jce
CLOSED_DIR = $(BUILDDIR)/closed/javax/crypto
obfus: $(OBFUS_DIR)/jce.jar
$(release-warning)
ifndef ALT_JCE_BUILD_DIR
$(OBFUS_DIR)/jce.jar: build-jar $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/framework.dox
else
#
# We have to remove the build dependency, otherwise, we'll try to rebuild it
# which we can't do on a read-only filesystem.
#
$(OBFUS_DIR)/jce.jar: $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/framework.dox
@if [ ! -d $(CLASSDESTDIR) ] ; then \
$(ECHO) "Couldn't find $(CLASSDESTDIR)"; \
exit 1; \
fi
endif
@$(ECHO) ">>>Obfuscating JCE framework..."
$(presign)
$(preobfus)
$(prep-target)
$(CD) $(OBFUS_DIR); \
$(OBFUSCATOR) -fv framework.dox
@$(CD) $(OBFUS_DIR); $(java-vm-cleanup)
@#
@# The sun.security.internal classes are currently not obfuscated
@# due to an obfus problem. Manually copy them to the build directory
@# so that they are included in the jce.jar file.
@#
$(CP) -r $(CLASSDESTDIR)/sun $(OBFUS_DIR)/build
$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ \
-C $(OBFUS_DIR)/build javax \
-C $(OBFUS_DIR)/build sun \
$(BOOT_JAR_JFLAGS)
$(sign-target)
@$(java-vm-cleanup)
$(OBFUS_DIR)/framework.dox: $(CLOSED_DIR)/obfus/framework.dox
@$(ECHO) ">>>Creating framework.dox"
$(prep-target)
$(SED) "s:@@TEMPDIR@@:$(ABS_TEMPDIR):" $< > $@
#
# The current obfuscator has a limitation in that it currently only
# supports up to v49 class file format. Force v49 classfiles in our
# builds for now.
#
TARGET_CLASS_VERSION = 5
# =====================================================
# Create the Release Engineering files. Obfuscated builds,
# unlimited policy file distribution, etc.
#
release: $(OBFUS_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/COPYRIGHT.html \
release: $(SIGNED_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/COPYRIGHT.html \
$(CLOSED_DIR)/doc/README.txt
$(RM) -r \
$(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy \
......@@ -433,7 +379,7 @@ release: $(OBFUS_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/COPYRIGHT.html \
$(JCE_BUILD_DIR)/release/local_policy.jar \
$(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy.zip
$(MKDIR) -p $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
$(CP) $(OBFUS_DIR)/jce.jar $(JCE_BUILD_DIR)/release
$(CP) $(SIGNED_DIR)/jce.jar $(JCE_BUILD_DIR)/release
$(CP) \
$(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \
$(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar \
......@@ -529,5 +475,5 @@ clobber clean::
.PHONY: build-jar jar build-policy unlimited limited install-jar \
install-limited install-unlimited
ifndef OPENJDK
.PHONY: sign sign-jar sign-policy obfus release install-prebuilt
.PHONY: sign sign-jar sign-policy release install-prebuilt
endif
......@@ -34,16 +34,14 @@ include $(BUILDDIR)/common/Defs.gmk
#
include FILES.gmk
AUTO_FILES_JAVA_DIRS = javax/swing/plaf sun/swing com/sun/java/swing/plaf
ifndef DISABLE_NIMBUS
SUBDIRS = nimbus
endif
# Nimbus is handled in its own directory
AUTO_JAVA_PRUNE = nimbus
ifeq ($(PLATFORM), windows)
# Don't build GTK L&F on Windows
AUTO_JAVA_PRUNE += gtk
AUTO_JAVA_PRUNE = gtk
endif
ifdef DISABLE_NIMBUS
AUTO_JAVA_PRUNE += nimbus
endif
MISC_FILES = $(MISC_SWING_FILES)
......@@ -52,6 +50,10 @@ ifneq ($(PLATFORM), windows)
MISC_FILES += $(MISC_SWING_FILES_UNIX)
endif
NIMBUS_GENSRC_DIR = $(GENSRCDIR)/javax/swing/plaf/nimbus
NIMBUS_SKIN_FILE = $(SWING_SRC)/plaf/nimbus/skin.laf
NIMBUS_GENERATOR_JAR = $(BUILDTOOLJARDIR)/generatenimbus.jar
FILES_java = $(FILES_SWING_java)
#
......@@ -75,14 +77,25 @@ endif
# Process LOGO_ICONS and Motif Icons first.
#
build: $(LOGO_ICONS) $(MISC_SWING_FILES_MOTIF_GIF) $(MISC_SWING_FILES_MOTIF_PNG) other_files
$(SUBDIRS-loop)
clean clobber::
$(SUBDIRS-loop)
$(NIMBUS_GENSRC_DIR): $(NIMBUS_SKIN_FILE) $(NIMBUS_GENERATOR_JAR)
@$(ECHO) "Generating Nimbus source files:"
$(RM) -r $(NIMBUS_GENSRC_DIR)
$(BOOT_JAVA_CMD) -jar $(NIMBUS_GENERATOR_JAR) \
-skinFile $(NIMBUS_SKIN_FILE) -buildDir $(GENSRCDIR) \
-packagePrefix $(PACKAGE).nimbus -lafName Nimbus
@$(ECHO) "Finished generating Nimbus source files"
clean:: classes.clean
$(RM) -r $(NIMBUS_GENSRC_DIR)
#
# Include
#
ifndef DISABLE_NIMBUS
CLASSES_INIT = $(NIMBUS_GENSRC_DIR)
endif
include $(BUILDDIR)/common/Classes.gmk
ifndef OPENJDK
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="jdwpgen" default="default" basedir=".">
<description>Builds, tests, and runs the project jdwpgen.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="jdwpgen-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
此差异已折叠。
#FindBugs User Preferences
#Mon Jun 15 13:37:16 PDT 2009
detectorAbnormalFinallyBlockReturn=AbnormalFinallyBlockReturn|false
detectorAbstractClassEmptyMethods=AbstractClassEmptyMethods|false
detectorAbstractOverriddenMethod=AbstractOverriddenMethod|false
detectorArrayBasedCollections=ArrayBasedCollections|false
detectorArrayWrappedCallByReference=ArrayWrappedCallByReference|false
detectorBloatedAssignmentScope=BloatedAssignmentScope|false
detectorBloatedSynchronizedBlock=BloatedSynchronizedBlock|false
detectorClassEnvy=ClassEnvy|false
detectorCollectStatistics=CollectStatistics|false
detectorConfusingAutoboxedOverloading=ConfusingAutoboxedOverloading|false
detectorConstantListIndex=ConstantListIndex|false
detectorCopiedOverriddenMethod=CopiedOverriddenMethod|false
detectorCustomBuiltXML=CustomBuiltXML|false
detectorCyclomaticComplexity=CyclomaticComplexity|false
detectorDateComparison=DateComparison|false
detectorDeclaredRuntimeException=DeclaredRuntimeException|false
detectorDeletingWhileIterating=DeletingWhileIterating|false
detectorDubiousListCollection=DubiousListCollection|false
detectorFieldCouldBeLocal=FieldCouldBeLocal|false
detectorFinalParameters=FinalParameters|false
detectorFloatingPointLoops=FloatingPointLoops|false
detectorInefficientStringBuffering=InefficientStringBuffering|false
detectorInheritanceTypeChecking=InheritanceTypeChecking|false
detectorJDBCVendorReliance=JDBCVendorReliance|false
detectorListIndexedIterating=ListIndexedIterating|false
detectorLiteralStringComparison=LiteralStringComparison|false
detectorLocalSynchronizedCollection=LocalSynchronizedCollection|false
detectorLostExceptionStackTrace=LostExceptionStackTrace|false
detectorManualArrayCopy=ManualArrayCopy|false
detectorMethodReturnsConstant=MethodReturnsConstant|false
detectorNeedlessAutoboxing=NeedlessAutoboxing|false
detectorNeedlessCustomSerialization=NeedlessCustomSerialization|false
detectorNeedlessInstanceRetrieval=NeedlessInstanceRetrieval|false
detectorNeedlessMemberCollectionSynchronization=NeedlessMemberCollectionSynchronization|false
detectorNonCollectionMethodUse=NonCollectionMethodUse|false
detectorNonOwnedSynchronization=NonOwnedSynchronization|false
detectorNonRecycleableTaglibs=NonRecycleableTaglibs|false
detectorOrphanedDOMNode=OrphanedDOMNode|false
detectorOverlyConcreteParameter=OverlyConcreteParameter|false
detectorParallelLists=ParallelLists|false
detectorPartiallyConstructedObjectAccess=PartiallyConstructedObjectAccess|false
detectorPossibleIncompleteSerialization=PossibleIncompleteSerialization|false
detectorPossibleMemoryBloat=PossibleMemoryBloat|false
detectorPossiblyRedundantMethodCalls=PossiblyRedundantMethodCalls|false
detectorSQLInLoop=SQLInLoop|false
detectorSection508Compliance=Section508Compliance|false
detectorSillynessPotPourri=SillynessPotPourri|false
detectorSloppyClassReflection=SloppyClassReflection|false
detectorSluggishGui=SluggishGui|false
detectorSpoiledChildInterfaceImplementor=SpoiledChildInterfaceImplementor|false
detectorSpuriousThreadStates=SpuriousThreadStates|false
detectorStaticArrayCreatedInMethod=StaticArrayCreatedInMethod|false
detectorStaticMethodInstanceInvocation=StaticMethodInstanceInvocation|false
detectorSuspiciousComparatorReturnValues=SuspiciousComparatorReturnValues|false
detectorSuspiciousJDKVersionUse=SuspiciousJDKVersionUse|false
detectorSuspiciousWaitOnConcurrentObject=SuspiciousWaitOnConcurrentObject|false
detectorSyncCollectionIterators=SyncCollectionIterators|false
detectorTailRecursion=TailRecursion|false
detectorUnnecessaryStoreBeforeReturn=UnnecessaryStoreBeforeReturn|false
detectorUnrelatedCollectionContents=UnrelatedCollectionContents|false
detectorUnrelatedReturnValues=UnrelatedReturnValues|false
detectorUseAddAll=UseAddAll|false
detectorUseCharacterParameterizedMethod=UseCharacterParameterizedMethod|false
detectorUseEnumCollections=UseEnumCollections|false
detectorUseSplit=UseSplit|false
detectorUseToArray=UseToArray|false
detector_threshold=2
effort=default
filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
filter_settings_neg=|
build.xml.data.CRC32=b40e775f
build.xml.script.CRC32=af8dc3cb
build.xml.stylesheet.CRC32=958a1d3e
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=b40e775f
nbproject/build-impl.xml.script.CRC32=624d12c5
nbproject/build-impl.xml.stylesheet.CRC32=65b8de21
application.title=jdwpgen
application.vendor=sun
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/jdwpgen.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
file.reference.tools-jdwpgen=../../tools/src/build/tools/jdwpgen
file.reference.tools-src=../../tools/src
includes=build/tools/jdwpgen/**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:all
javac.deprecation=false
javac.source=1.5
javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}:\
${libs.junit_4.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=true
javadoc.nonavbar=true
javadoc.notree=true
javadoc.private=true
javadoc.splitindex=false
javadoc.use=false
javadoc.version=false
javadoc.windowtitle=
main.class=jdwpgen.Main
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.src.dir=${file.reference.tools-src}
test.src.dir=test
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>jdwpgen</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<source-roots>
<root id="src.src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
#Path to FindbugsSettingsFile (relative)
findbugs.settings.file=findbugs.settings
......@@ -21,4 +21,4 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
tzdata2009g
tzdata2009l
......@@ -22,6 +22,8 @@
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
......@@ -263,18 +265,18 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 -
# The following appeared in Red Hat bugzilla[1] (edited):
#
# > $ zdump -v /usr/share/zoneinfo/Africa/Cairo | grep 2009
# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 21:59:59 2009 UTC =3D Thu =
# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 21:59:59 2009 UTC = Thu =
# Apr 23
# > 23:59:59 2009 EET isdst=3D0 gmtoff=3D7200
# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 22:00:00 2009 UTC =3D Fri =
# > 23:59:59 2009 EET isdst=0 gmtoff=7200
# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 22:00:00 2009 UTC = Fri =
# Apr 24
# > 01:00:00 2009 EEST isdst=3D1 gmtoff=3D10800
# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 20:59:59 2009 UTC =3D Thu =
# > 01:00:00 2009 EEST isdst=1 gmtoff=10800
# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 20:59:59 2009 UTC = Thu =
# Aug 27
# > 23:59:59 2009 EEST isdst=3D1 gmtoff=3D10800
# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 21:00:00 2009 UTC =3D Thu =
# > 23:59:59 2009 EEST isdst=1 gmtoff=10800
# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 21:00:00 2009 UTC = Thu =
# Aug 27
# > 23:00:00 2009 EET isdst=3D0 gmtoff=3D7200
# > 23:00:00 2009 EET isdst=0 gmtoff=7200
#
# > end date should be Thu Sep 24 2009 (Last Thursday in September at 23:59=
# :59)
......@@ -282,11 +284,11 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 -
#
# timeanddate[2] and another site I've found[3] also support that.
#
# [1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=3D492263">
# https://bugzilla.redhat.com/show_bug.cgi?id=3D492263
# [1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=492263">
# https://bugzilla.redhat.com/show_bug.cgi?id=492263
# </a>
# [2] <a href="http://www.timeanddate.com/worldclock/clockchange.html?n=3D53">
# http://www.timeanddate.com/worldclock/clockchange.html?n=3D53
# [2] <a href="http://www.timeanddate.com/worldclock/clockchange.html?n=53">
# http://www.timeanddate.com/worldclock/clockchange.html?n=53
# </a>
# [3] <a href="http://wwp.greenwichmeantime.com/time-zone/africa/egypt/">
# http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
......@@ -296,8 +298,27 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 -
# In 2009 (and for the next several years), Ramadan ends before the fourth
# Thursday in September; Egypt is expected to revert to the last Thursday
# in September.
# From Steffen Thorsen (2009-08-11):
# We have been able to confirm the August change with the Egyptian Cabinet
# Information and Decision Support Center:
# <a href="http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html">
# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
# </a>
#
# The Middle East News Agency
# <a href="http://www.mena.org.eg/index.aspx">
# http://www.mena.org.eg/index.aspx
# </a>
# also reports "Egypt starts winter time on August 21"
# today in article numbered "71, 11/08/2009 12:25 GMT."
# Only the title above is available without a subscription to their service,
# and can be found by searching for "winter" in their search engine
# (at least today).
Rule Egypt 2008 only - Aug lastThu 23:00s 0 -
Rule Egypt 2009 max - Sep lastThu 23:00s 0 -
Rule Egypt 2009 only - Aug 20 23:00s 0 -
Rule Egypt 2010 max - Sep lastThu 23:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Cairo 2:05:00 - LMT 1900 Oct
......@@ -499,8 +520,8 @@ Zone Africa/Nouakchott -1:03:48 - LMT 1912
# From Riad M. Hossen Ally (2008-08-03):
# The Government of Mauritius weblink
# <a href="http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=3D4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD">
# http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=3D4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD
# <a href="http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD">
# http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD
# </a>
# Cabinet Decision of July 18th, 2008 states as follows:
#
......@@ -522,11 +543,33 @@ Zone Africa/Nouakchott -1:03:48 - LMT 1912
# http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf
# </a>
# From Steffen Thorsen (2009-06-05):
# According to several sources, Mauritius will not continue to observe
# DST the coming summer...
#
# Some sources, in French:
# <a href="http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB">
# http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB
# </a>
# <a href="http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-">
# http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
# </a>
#
# Our wrap-up:
# <a href="http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html">
# http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
# </a>
# From Arthur David Olson (2009-07-11):
# The "mauritius-dst-will-not-repeat" wrapup includes this:
# "The trial ended on March 29, 2009, when the clocks moved back by one hour
# at 2am (or 02:00) local time..."
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mauritius 1982 only - Oct 10 0:00 1:00 S
Rule Mauritius 1983 only - Mar 21 0:00 0 -
Rule Mauritius 2008 max - Oct lastSun 2:00s 1:00 S
Rule Mauritius 2009 max - Mar lastSun 2:00s 0 -
Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 S
Rule Mauritius 2009 only - Mar lastSun 2:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
4:00 Mauritius MU%sT # Mauritius Time
......
......@@ -22,6 +22,8 @@
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# From Paul Eggert (1999-11-15):
# To keep things manageable, we list only locations occupied year-round; see
......
......@@ -22,6 +22,8 @@
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
......@@ -147,6 +149,57 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # Al Manamah
3:00 - AST
# Bangladesh
# From Alexander Krivenyshev (2009-05-13):
# According to newspaper Asian Tribune (May 6, 2009) Bangladesh may introduce
# Daylight Saving Time from June 16 to Sept 30
#
# Bangladesh to introduce daylight saving time likely from June 16
# <a href="http://www.asiantribune.com/?q=node/17288">
# http://www.asiantribune.com/?q=node/17288
# </a>
# or
# <a href="http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html">
# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html
# </a>
#
# "... Bangladesh government has decided to switch daylight saving time from
# June
# 16 till September 30 in a bid to ensure maximum use of daylight to cope with
# crippling power crisis. "
#
# The switch will remain in effect from June 16 to Sept 30 (2009) but if
# implemented the next year, it will come in force from April 1, 2010
# From Steffen Thorsen (2009-06-02):
# They have finally decided now, but changed the start date to midnight between
# the 19th and 20th, and they have not set the end date yet.
#
# Some sources:
# <a href="http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601">
# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
# </a>
# <a href="http://bdnews24.com/details.php?id=85889&cid=2">
# http://bdnews24.com/details.php?id=85889&cid=2
# </a>
#
# Our wrap-up:
# <a href="http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html">
# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
# </a>
# From A. N. M. Kamrus Saadat (2009-06-15):
# Finally we've got the official mail regarding DST start time where DST start
# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh
# Telecommunication Regulatory Commission).
#
# No DST end date has been announced yet.
# From Arthur David Olson (2009-07-11):
# Arbitrarily end DST at the end of 2009 so that a POSIX-sytle time zone string
# can appear in the Dhaka binary file and for the benefit of old glibc
# reimplementations of the time zone software that mishandle permanent DST.
# A change will be required once the end date is known.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Dhaka 6:01:40 - LMT 1890
5:53:20 - HMT 1941 Oct # Howrah Mean Time?
......@@ -154,7 +207,9 @@ Zone Asia/Dhaka 6:01:40 - LMT 1890
5:30 - IST 1942 Sep
6:30 - BURT 1951 Sep 30
6:00 - DACT 1971 Mar 26 # Dacca Time
6:00 - BDT # Bangladesh Time
6:00 - BDT 2009 Jun 19 23:00 # Bangladesh Time
6:00 1:00 BDST 2010
6:00 - BDT
# Bhutan
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
......@@ -1129,7 +1184,7 @@ Rule Jordan 1995 1998 - Sep Fri>=15 0:00s 0 -
Rule Jordan 1999 only - Jul 1 0:00s 1:00 S
Rule Jordan 1999 2002 - Sep lastFri 0:00s 0 -
Rule Jordan 2000 2001 - Mar lastThu 0:00s 1:00 S
Rule Jordan 2002 max - Mar lastFri 0:00s 1:00 S
Rule Jordan 2002 max - Mar lastThu 24:00 1:00 S
Rule Jordan 2003 only - Oct 24 0:00s 0 -
Rule Jordan 2004 only - Oct 15 0:00s 0 -
Rule Jordan 2005 only - Sep lastFri 0:00s 0 -
......
......@@ -22,6 +22,8 @@
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# This file also includes Pacific islands.
......@@ -447,6 +449,22 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
-11:00 - SST # S=Samoa
# Samoa
# From Alexander Krivenyshev (2008-12-06):
# The Samoa government (Western Samoa) may implement DST on the first Sunday of
# October 2009 (October 4, 2009) until the last Sunday of March 2010 (March 28,
# 2010).
#
# "Selected Committee reports to Cabinet on Daylight Saving Time",
# Government of Samoa:
# <a href="http://www.govt.ws/pr_article.cfm?pr_id=560">
# http://www.govt.ws/pr_article.cfm?pr_id=560
# </a>
# or
# <a href="http://www.worldtimezone.com/dst_news/dst_news_samoa01.html">
# http://www.worldtimezone.com/dst_news/dst_news_samoa01.html
# </a>
Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5
-11:26:56 - LMT 1911
-11:30 - SAMT 1950 # Samoa Time
......@@ -1141,6 +1159,27 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From Paul Eggert (2007-07-23):
# See "southeast Australia" above for 2008 and later.
# From Steffen Thorsen (2009-04-28):
# According to the official press release, South Australia's extended daylight
# saving period will continue with the same rules as used during the 2008-2009
# summer (southern hemisphere).
#
# From
# <a href="http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf">
# http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf
# </a>
# The extended daylight saving period that South Australia has been trialling
# for over the last year is now set to be ongoing.
# Daylight saving will continue to start on the first Sunday in October each
# year and finish on the first Sunday in April the following year.
# Industrial Relations Minister, Paul Caica, says this provides South Australia
# with a consistent half hour time difference with NSW, Victoria, Tasmania and
# the ACT for all 52 weeks of the year...
#
# We have a wrap-up here:
# <a href="http://www.timeanddate.com/news/time/south-australia-extends-dst.html">
# http://www.timeanddate.com/news/time/south-australia-extends-dst.html
# </a>
###############################################################################
# New Zealand
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# This file provides links between current names for time zones
# and their old names. Many names changed in late 1993.
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# These entries are mostly present for historical reasons, so that
# people in areas not otherwise covered by the tz files could "zic -l"
......
......@@ -22,6 +22,8 @@
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
......@@ -479,7 +481,7 @@ Rule EU 1979 1995 - Sep lastSun 1:00u 0 -
Rule EU 1981 max - Mar lastSun 1:00u 1:00 S
Rule EU 1996 max - Oct lastSun 1:00u 0 -
# The most recent directive covers the years starting in 2002. See:
# <a href="http://europa.eu.int/eur-lex/en/lif/dat/2000/en_300L0084.html">
# <a="http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:32000L0084:EN:NOT">
# Directive 2000/84/EC of the European Parliament and of the Council
# of 19 January 2001 on summer-time arrangements.
# </a>
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# For companies who don't want to put time zone specification in
# their installation procedures. When users run date, they'll get the message.
......
......@@ -21,9 +21,11 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# ISO 3166 alpha-2 country codes
#
#
# From Paul Eggert (2006-09-27):
#
# This file contains a table with the following columns:
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# Allowance for leapseconds added to each timezone file.
......@@ -75,13 +78,13 @@ Leap 2008 Dec 31 23:59:60 + S
# SERVICE DE LA ROTATION TERRESTRE
# OBSERVATOIRE DE PARIS
# 61, Av. de l'Observatoire 75014 PARIS (France)
# Tel. : 33 (0) 1 40 51 22 29
# Tel. : 33 (0) 1 40 51 22 26
# FAX : 33 (0) 1 40 51 22 91
# Internet : services.iers@obspm.fr
#
# Paris, 15 January 2009
# Paris, 4 July 2009
#
# Bulletin C 37
# Bulletin C 38
#
# To authorities responsible
# for the measurement and
......@@ -89,7 +92,7 @@ Leap 2008 Dec 31 23:59:60 + S
#
# INFORMATION ON UTC - TAI
#
# NO positive leap second will be introduced at the end of June 2009.
# NO positive leap second will be introduced at the end of December 2009.
# The difference between Coordinated Universal Time UTC and the
# International Atomic Time TAI is :
#
......@@ -101,6 +104,6 @@ Leap 2008 Dec 31 23:59:60 + S
# will be no time step at the next possible date.
#
# Daniel GAMBIS
# Head
# Earth Orientation Center of the IERS
# Director
# Earth Orientation Center of IERS
# Observatoire de Paris, France
......@@ -22,6 +22,8 @@
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# also includes Central America and the Caribbean
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# From Arthur David Olson (1989-04-05):
# On 1989-04-05, the U. S. House of Representatives passed (238-154) a bill
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# So much for footnotes about Saudi Arabia.
# Apparent noon times below are for Riyadh; your mileage will vary.
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# Apparent noon times below are for Riyadh; they're a bit off for other places.
# Times were computed using formulas in the U.S. Naval Observatory's
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# Apparent noon times below are for Riyadh; they're a bit off for other places.
# Times were computed using a formula provided by the U. S. Naval Observatory:
......
......@@ -22,6 +22,8 @@
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
......@@ -696,8 +698,8 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# From Rodrigo Severo (2008-06-24):
# Just correcting the URL:
# <a href="https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=3Ddo&secao=3D1&pagina=3D1&data=3D25/04/2008">
# https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=3Ddo&secao=3D1&pagina=3D1&data=3D25/04/2008
# <a href="https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=do&secao=1&pagina=1&data=25/04/2008">
# https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=do&secao=1&pagina=1&data=25/04/2008
# </a>
#
# As a result of the above Decree I believe the America/Rio_Branco
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# Old rules, should the need arise.
# No attempt is made to handle Newfoundland, since it cannot be expressed
......
......@@ -21,6 +21,9 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
# TZ zone descriptions
#
......@@ -123,7 +126,7 @@ BR -0640-06952 America/Eirunepe W Amazonas
BR -0958-06748 America/Rio_Branco Acre
BS +2505-07721 America/Nassau
BT +2728+08939 Asia/Thimphu
BW -2545+02555 Africa/Gaborone
BW -2439+02555 Africa/Gaborone
BY +5354+02734 Europe/Minsk
BZ +1730-08812 America/Belize
CA +4734-05243 America/St_Johns Newfoundland Time, including SE Labrador
......@@ -307,7 +310,7 @@ MY +0310+10142 Asia/Kuala_Lumpur peninsular Malaysia
MY +0133+11020 Asia/Kuching Sabah & Sarawak
MZ -2558+03235 Africa/Maputo
NA -2234+01706 Africa/Windhoek
NC -2216+16530 Pacific/Noumea
NC -2216+16627 Pacific/Noumea
NE +1331+00207 Africa/Niamey
NF -2903+16758 Pacific/Norfolk
NG +0627+00324 Africa/Lagos
......@@ -387,7 +390,7 @@ TK -0922-17114 Pacific/Fakaofo
TL -0833+12535 Asia/Dili
TM +3757+05823 Asia/Ashgabat
TN +3648+01011 Africa/Tunis
TO -2110+17510 Pacific/Tongatapu
TO -2110-17510 Pacific/Tongatapu
TR +4101+02858 Europe/Istanbul
TT +1039-06131 America/Port_of_Spain
TV -0831+17913 Pacific/Funafuti
......@@ -431,7 +434,7 @@ US +211825-1575130 Pacific/Honolulu Hawaii
UY -3453-05611 America/Montevideo
UZ +3940+06648 Asia/Samarkand west Uzbekistan
UZ +4120+06918 Asia/Tashkent east Uzbekistan
VA +4154+01227 Europe/Vatican
VA +415408+0122711 Europe/Vatican
VC +1309-06114 America/St_Vincent
VE +1030-06656 America/Caracas
VG +1827-06437 America/Tortola
......
......@@ -41,6 +41,7 @@ FILES_java = \
sun/net/NetProperties.java \
sun/net/NetHooks.java \
sun/net/util/IPAddressUtil.java \
sun/net/util/URLUtil.java \
sun/net/dns/ResolverConfiguration.java \
sun/net/dns/ResolverConfigurationImpl.java \
sun/net/ftp/FtpClient.java \
......
#
# Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -60,7 +60,7 @@ ifeq ($(PLATFORM), windows)
endif
endif
SUBDIRS = other action util tools jgss krb5 smartcardio $(PKCS11) \
SUBDIRS = ec other action util tools jgss krb5 smartcardio $(PKCS11) \
$(JGSS_WRAPPER) $(MSCAPI)
all build clean clobber::
......
#
# Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -23,69 +23,32 @@
# have any questions.
#
#
# Makefile for building the Nimbus generator
#
BUILDDIR = ../..
PACKAGE = org.jdesktop.synthdesigner.generator
PRODUCT = tools
PROGRAM = nimbus_generator
include $(BUILDDIR)/common/Defs.gmk
BUILDTOOL_SOURCE_ROOT = classes
BUILDTOOL_MAIN = $(PKGDIR)/Generator.java
#
# Files
#
MAIN_CLASS_FILE = $(BUILDTOOLCLASSDIR)/$(BUILDTOOL_MAIN:%.java=%.class)
SOURCE_FILES = $(shell $(FIND) $(BUILDTOOL_SOURCE_ROOT) -name '*.java' -print)
TEMPLATE_FILES = $(SHARE_SRC)/classes/javax/swing/plaf/nimbus/Defaults.template \
$(SHARE_SRC)/classes/javax/swing/plaf/nimbus/PainterImpl.template \
$(SHARE_SRC)/classes/javax/swing/plaf/nimbus/StateImpl.template
TEMPLATE_DEST = $(BUILDTOOLCLASSDIR)/org/jdesktop/synthdesigner/generator/resources
JIBX_FILES = $(BUILDTOOL_SOURCE_ROOT)/org/jdesktop/swingx/designer/Designer.jibx.xml \
$(BUILDTOOL_SOURCE_ROOT)/org/jdesktop/synthdesigner/synthmodel/SynthModel.jibx.xml
JIBX_LIBS_CP = $(JIBX_LIBS_PATH)/bcel.jar$(CLASSPATH_SEPARATOR)$(JIBX_LIBS_PATH)/xpp3.jar$(CLASSPATH_SEPARATOR)$(JIBX_LIBS_PATH)/jibx-bind.jar$(CLASSPATH_SEPARATOR)$(JIBX_LIBS_PATH)/jibx-run.jar
JIBX_LIBS_LIST = $(subst $(CLASSPATH_SEPARATOR), ,$(JIBX_LIBS_CP))
#
# Rules
#
include $(BUILDDIR)/common/BuildToolJar.gmk
$(MAIN_CLASS_FILE): $(SOURCE_FILES) $(JIBX_LIBS_LIST)
@$(MKDIR) -p $(BUILDTOOLCLASSDIR)
$(BOOT_JAVAC_CMD) -classpath "$(JIBX_LIBS_CP)" \
-d $(BUILDTOOLCLASSDIR) -sourcepath $(BUILDTOOL_SOURCE_ROOT) \
$(SOURCE_FILES)
$(TEMPLATE_DEST): $(TEMPLATE_FILES)
$(MKDIR) -p $(TEMPLATE_DEST)
$(RM) $(TEMPLATE_DEST)/*.template
$(CP) $(TEMPLATE_FILES) $(TEMPLATE_DEST)
$(BUILDTOOL_MANIFEST_FILE): $(MAIN_CLASS_FILE)
$(ECHO) "Main-Class: $(BUILTTOOL_MAINCLASS)" > $@
$(ECHO) "Class-Path: $(JIBX_LIBS_LIST:$(JIBX_LIBS_PATH)/%=%)" >> $@
$(CP) $(JIBX_LIBS_LIST) $(BUILDTOOLJARDIR)
$(BUILDTOOL_JAR_FILE): $(MAIN_CLASS_FILE) $(TEMPLATE_DEST) \
$(JIBX_FILES) $(BUILDTOOL_MANIFEST_FILE)
@$(prep-target)
$(BOOT_JAVA_CMD) \
-classpath "$(JIBX_LIBS_CP)$(CLASSPATH_SEPARATOR)$(BUILDTOOLCLASSDIR)" \
org.jibx.binding.Compile $(JIBX_FILES)
$(BOOT_JAR_CMD) cfm $@ $(BUILDTOOL_MANIFEST_FILE) \
-C $(BUILDTOOLCLASSDIR) org \
$(BOOT_JAR_JFLAGS) || $(RM) $@
@$(java-vm-cleanup)
FILES_c = \
ec.c \
ec2_163.c \
ec2_193.c \
ec2_233.c \
ec2_aff.c \
ec2_mont.c \
ecdecode.c \
ecl.c \
ecl_curve.c \
ecl_gf.c \
ecl_mult.c \
ec_naf.c \
ecp_192.c \
ecp_224.c \
ecp_256.c \
ecp_384.c \
ecp_521.c \
ecp_aff.c \
ecp_jac.c \
ecp_jm.c \
ecp_mont.c \
mp_gf2m.c \
mpi.c \
mplogic.c \
mpmontg.c \
oid.c \
secitem.c
clean clobber::
$(RM) -r $(TEMPLATE_DEST)
#
# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
#
# Makefile for building sunec.jar and sunecc native library.
#
# This file was derived from make/com/sun/crypto/provider/Makefile.
#
#
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
# respectively.)
#
# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
# jar files do not require signing, but those for JDK do. If an unsigned
# jar file is installed into JDK, things will break when the crypto
# routines are called.
#
# This Makefile does the "real" build of the JCE files. For OpenJDK,
# the jar files built here are installed directly into the OpenJDK.
#
# For JDK, the binaries use pre-built/pre-signed binary files stored in
# the closed workspace that are not shipped in the OpenJDK workspaces.
# We still build the JDK files here to verify the files compile, and in
# preparation for possible signing. Developers working on JCE in JDK
# must sign the JCE files before testing. The JCE signing key is kept
# separate from the JDK workspace to prevent its disclosure.
#
# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
# be built, signed, and then the resulting jar files MUST BE CHECKED
# INTO THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT
# BE FORGOTTEN*, otherwise a bug fixed in the source code will not be
# reflected in the shipped binaries. The "release" target should be
# used to generate the required files.
#
# There are a number of targets to help both JDK/OpenJDK developers.
#
# Main Targets (JDK/OPENJDK):
#
# all/clobber/clean The usual, plus the native libraries.
# If OpenJDK, installs sunec.jar.
# If JDK, installs prebuilt
# sunec.jar.
#
# jar Builds/installs sunec.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
#
# Other lesser-used Targets (JDK/OPENJDK):
#
# build-jar Builds sunec.jar
# (does not sign/install)
#
# install-jar Alias for "jar" above.
#
# Other targets (JDK only):
#
# sign Alias for sign-jar
# sign-jar Builds/signs sunec.jar (no install)
#
# release Builds all targets in preparation
# for workspace integration.
#
# install-prebuilt Installs the pre-built jar files
#
# This makefile was written to support parallel target execution.
#
BUILDDIR = ../../..
PACKAGE = sun.security.ec
PRODUCT = sun
#
# The following is for when we need to do postprocessing
# (signing) against a read-only build. If the OUTPUTDIR
# isn't writable, the build currently crashes out.
#
ifndef OPENJDK
ifdef ALT_JCE_BUILD_DIR
# =====================================================
# Where to place the output, in case we're building from a read-only
# build area. (e.g. a release engineering build.)
JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
IGNORE_WRITABLE_OUTPUTDIR_TEST=true
else
JCE_BUILD_DIR=${TEMPDIR}
endif
endif
include $(BUILDDIR)/common/Defs.gmk
#
# Location for the newly built classfiles.
#
CLASSDESTDIR = $(TEMPDIR)/classes
#
# Java files
#
AUTO_FILES_JAVA_DIRS = $(PKGDIR)
include $(BUILDDIR)/common/Classes.gmk
#
# Some licensees do not get the native ECC sources, but we still need to
# be able to build "all" for them. Check here to see if the sources are
# available. If not, then skip them.
#
NATIVE_ECC_AVAILABLE := $(shell \
if [ -d $(SHARE_SRC)/native/$(PKGDIR) ] ; then \
$(ECHO) true; \
else \
$(ECHO) false; \
fi)
ifeq ($(NATIVE_ECC_AVAILABLE), true)
LIBRARY = sunecc
#
# Java files that define native methods
#
FILES_export = \
$(PKGDIR)/ECDHKeyAgreement.java \
$(PKGDIR)/ECDSASignature.java \
$(PKGDIR)/ECKeyPairGenerator.java
JAVAHFLAGS += -classpath $(CLASSDESTDIR)
#
# C and C++ files
#
include FILES_c.gmk
FILES_cpp = ECC_JNI.cpp
CPLUSPLUSLIBRARY=true
FILES_m = mapfile-vers
#
# Find native code
#
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)
#
# Find include files
#
OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR)
#
# Compiler flags
#
OTHER_CFLAGS += -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B
#
# Libraries to link
#
ifeq ($(PLATFORM), windows)
OTHER_LDLIBS += $(JVMLIB)
else
OTHER_LDLIBS = -ldl $(JVMLIB) $(LIBCXX)
endif
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
endif # NATIVE_ECC_AVAILABLE
#
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# part of the build we're doing. Both OPENJDK/JDK builds are initially
# done in the unsigned area. When files are signed in JDK,
# they will be placed in the appropriate area.
#
UNSIGNED_DIR = $(TEMPDIR)/unsigned
include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
#
# Rules
#
ifdef OPENJDK
all: build-jar install-jar
else
all: build-jar install-prebuilt
$(build-warning)
endif
# =====================================================
# Build the unsigned sunec.jar file.
#
JAR_DESTFILE = $(EXTDIR)/sunec.jar
#
# Since the -C option to jar is used below, each directory entry must be
# preceded with the appropriate directory to "cd" into.
#
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
build-jar: $(UNSIGNED_DIR)/sunec.jar
#
# Build sunec.jar.
#
$(UNSIGNED_DIR)/sunec.jar: build
$(prep-target)
$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
ifndef OPENJDK
# =====================================================
# Sign the provider jar file. Not needed for OpenJDK.
#
SIGNED_DIR = $(JCE_BUILD_DIR)/signed
sign: sign-jar
sign-jar: $(SIGNED_DIR)/sunec.jar
ifndef ALT_JCE_BUILD_DIR
$(SIGNED_DIR)/sunec.jar: $(UNSIGNED_DIR)/sunec.jar
else
#
# We have to remove the build dependency, otherwise, we'll try to rebuild it
# which we can't do on a read-only filesystem.
#
$(SIGNED_DIR)/sunec.jar:
@if [ ! -r $(UNSIGNED_DIR)/sunec.jar ] ; then \
$(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunec.jar"; \
exit 1; \
fi
endif
$(call sign-file, $(UNSIGNED_DIR)/sunec.jar)
# =====================================================
# Create the Release Engineering files. Signed builds, etc.
#
release: $(SIGNED_DIR)/sunec.jar
$(RM) $(JCE_BUILD_DIR)/release/sunec.jar
$(MKDIR) -p $(JCE_BUILD_DIR)/release
$(CP) $(SIGNED_DIR)/sunec.jar $(JCE_BUILD_DIR)/release
$(release-warning)
endif # OPENJDK
# =====================================================
# Install routines.
#
#
# Install sunec.jar, depending on which type is requested.
#
install-jar jar: $(JAR_DESTFILE)
ifndef OPENJDK
$(release-warning)
endif
ifdef OPENJDK
$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunec.jar
else
$(JAR_DESTFILE): $(SIGNED_DIR)/sunec.jar
endif
$(install-file)
ifndef OPENJDK
install-prebuilt:
@$(ECHO) "\n>>>Installing prebuilt SunEC provider..."
$(RM) $(JAR_DESTFILE)
$(CP) $(PREBUILT_DIR)/ec/sunec.jar $(JAR_DESTFILE)
endif
# =====================================================
# Support routines.
#
clobber clean::
$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
.PHONY: build-jar jar install-jar
ifndef OPENJDK
.PHONY: sign sign-jar release install-prebuilt
endif
#
# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# Define public interface.
SUNWprivate_1.1 {
global:
Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair;
Java_sun_security_ec_ECKeyPairGenerator_getEncodedBytes;
Java_sun_security_ec_ECDSASignature_signDigest;
Java_sun_security_ec_ECDSASignature_verifySignedDigest;
Java_sun_security_ec_ECDHKeyAgreement_deriveKey;
local:
*;
};
#
# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -59,31 +59,31 @@
#
# Main Targets (JDK/OPENJDK):
#
# all/clobber/clean The usual, plus the native libraries.
# If OpenJDK, installs sunmscapi.jar.
# If JDK, installs prebuilt
# sunmscapi.jar.
# all/clobber/clean The usual, plus the native libraries.
# If OpenJDK, installs sunmscapi.jar.
# If JDK, installs prebuilt
# sunmscapi.jar.
#
# jar Builds/installs sunmscapi.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
# jar Builds/installs sunmscapi.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
#
# Other lesser-used Targets (JDK/OPENJDK):
#
# build-jar Builds sunmscapi.jar
# (does not sign/install)
# build-jar Builds sunmscapi.jar
# (does not sign/install)
#
# install-jar Alias for "jar" above.
# install-jar Alias for "jar" above.
#
# Other targets (JDK only):
#
# sign Alias for sign-jar
# sign-jar Builds/signs sunmscapi.jar (no install)
# sign Alias for sign-jar
# sign-jar Builds/signs sunmscapi.jar (no install)
#
# release Builds all targets in preparation
# for workspace integration.
# release Builds all targets in preparation
# for workspace integration.
#
# install-prebuilt Installs the pre-built jar files
# install-prebuilt Installs the pre-built jar files
#
# This makefile was written to support parallel target execution.
#
......
#
# Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -33,7 +33,6 @@ include $(BUILDDIR)/common/Defs.gmk
#
AUTO_FILES_JAVA_DIRS = \
sun/security/acl \
sun/security/ec \
sun/security/jca \
sun/security/pkcs \
sun/security/pkcs12 \
......
#
# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -59,31 +59,31 @@
#
# Main Targets (JDK/OPENJDK):
#
# all/clobber/clean The usual, plus the native libraries.
# If OpenJDK, installs sunpkcs11.jar.
# If JDK, installs prebuilt
# sunpkcs11.jar.
# all/clobber/clean The usual, plus the native libraries.
# If OpenJDK, installs sunpkcs11.jar.
# If JDK, installs prebuilt
# sunpkcs11.jar.
#
# jar Builds/installs sunpkcs11.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
# jar Builds/installs sunpkcs11.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
#
# Other lesser-used Targets (JDK/OPENJDK):
#
# build-jar Builds sunpkcs11.jar
# (does not sign/install)
# build-jar Builds sunpkcs11.jar
# (does not sign/install)
#
# install-jar Alias for "jar" above.
# install-jar Alias for "jar" above.
#
# Other targets (JDK only):
#
# sign Alias for sign-jar
# sign-jar Builds/signs sunpkcs11.jar (no install)
# sign Alias for sign-jar
# sign-jar Builds/signs sunpkcs11.jar (no install)
#
# release Builds all targets in preparation
# for workspace integration.
# release Builds all targets in preparation
# for workspace integration.
#
# install-prebuilt Installs the pre-built jar files
# install-prebuilt Installs the pre-built jar files
#
# This makefile was written to support parallel target execution.
#
......
......@@ -52,12 +52,10 @@ FILES_c = \
compress.c \
deflate.c \
gzio.c \
infblock.c \
infcodes.c \
infback.c \
inffast.c \
inflate.c \
inftrees.c \
infutil.c \
trees.c \
uncompr.c \
zadler32.c \
......
......@@ -77,13 +77,13 @@ endif # PLATFORM
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/splashscreen
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/giflib
vpath %.c $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
vpath %.c $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/libpng
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen
CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
# Shun the less than portable MMX assembly code in pnggccrd.c,
# and use alternative implementations in C.
......
0x15 U+0085
#
# The diff of 01A434B0.TXMAP110 and 34B001A4.RXMAP110
#
# Added: 0x15 U+0085
#
0x15 U+0085
0x42 U+FE7C
0x46 U+FE80
0x47 U+FE81
0x49 U+FE83
0x4B U+066C
0x4B U+FF0E
0x4C U+FF1C
0x4D U+FF08
0x4E U+FF0B
0x4F U+FF5C
0x50 U+FF06
0x52 U+FE85
0x52 U+FE86
0x55 U+FE89
0x55 U+FE8A
0x55 U+FE8B
0x55 U+FE8C
0x56 U+0625
0x56 U+FE87
0x56 U+FE8D
0x57 U+FE88
0x58 U+FE8F
0x58 U+FE90
0x59 U+FE92
0x5A U+FF01
0x5B U+FF04
0x5C U+066D
0x5C U+FF0A
0x5D U+FF09
0x5E U+FF1B
0x60 U+FF0D
0x61 U+FF0F
0x62 U+FE93
0x62 U+FE94
0x63 U+FE95
0x63 U+FE96
0x64 U+FE98
0x65 U+FE99
0x65 U+FE9A
0x66 U+FE9C
0x67 U+FE9D
0x67 U+FE9E
0x68 U+FEA0
0x69 U+FEA1
0x69 U+FEA2
0x6B U+066B
0x6B U+FF0C
0x6C U+066A
0x6C U+FF05
0x6D U+FF3F
0x6E U+FF1E
0x6F U+FF1F
0x70 U+FEA4
0x71 U+FEA5
0x71 U+FEA6
0x72 U+FEA8
0x73 U+FEA9
0x73 U+FEAA
0x74 U+FEAB
0x74 U+FEAC
0x75 U+FEAD
0x75 U+FEAE
0x76 U+FEAF
0x76 U+FEB0
0x77 U+FEB1
0x77 U+FEB2
0x78 U+FEB4
0x7A U+FF1A
0x7B U+FF03
0x7C U+FF20
0x7D U+FF07
0x7E U+FF1D
0x7F U+FF02
0x80 U+FEB5
0x80 U+FEB6
0x81 U+FF41
0x82 U+FF42
0x83 U+FF43
0x84 U+FF44
0x85 U+FF45
0x86 U+FF46
0x87 U+FF47
0x88 U+FF48
0x89 U+FF49
0x8A U+FEB8
0x8B U+FEB9
0x8B U+FEBA
0x8C U+FEBC
0x8D U+FEBD
0x8D U+FEBE
0x8E U+FEC0
0x8F U+FEC1
0x8F U+FEC2
0x8F U+FEC3
0x8F U+FEC4
0x90 U+FEC5
0x90 U+FEC6
0x90 U+FEC7
0x90 U+FEC8
0x91 U+FF4A
0x92 U+FF4B
0x93 U+FF4C
0x94 U+FF4D
0x95 U+FF4E
0x96 U+FF4F
0x97 U+FF50
0x98 U+FF51
0x99 U+FF52
0x9A U+FEC9
0x9E U+FECD
0xA2 U+FF53
0xA3 U+FF54
0xA4 U+FF55
0xA5 U+FF56
0xA6 U+FF57
0xA7 U+FF58
0xA8 U+FF59
0xA9 U+FF5A
0xAB U+FED1
0xAB U+FED2
0xAC U+FED4
0xAD U+FED5
0xAD U+FED6
0xAE U+FED8
0xAF U+FED9
0xAF U+FEDA
0xB0 U+FEDC
0xB1 U+FEDD
0xB1 U+FEDE
0xB8 U+FEF9
0xB9 U+FEFA
0xBA U+FEE0
0xBB U+FEE1
0xBB U+FEE2
0xBC U+FEE4
0xBD U+FEE5
0xBD U+FEE6
0xBE U+FEE8
0xBF U+FEE9
0xBF U+FEEA
0xC1 U+FF21
0xC2 U+FF22
0xC3 U+FF23
0xC4 U+FF24
0xC5 U+FF25
0xC6 U+FF26
0xC7 U+FF27
0xC8 U+FF28
0xC9 U+FF29
0xCF U+FEED
0xCF U+FEEE
0xD1 U+FF2A
0xD2 U+FF2B
0xD3 U+FF2C
0xD4 U+FF2D
0xD5 U+FF2E
0xD6 U+FF2F
0xD7 U+FF30
0xD8 U+FF31
0xD9 U+FF32
0xDA U+FEEF
0xDC U+FEF1
0xDE U+FEF4
0xE2 U+FF33
0xE3 U+FF34
0xE4 U+FF35
0xE5 U+FF36
0xE6 U+FF37
0xE7 U+FF38
0xE8 U+FF39
0xE9 U+FF3A
0xF0 U+FF10
0xF1 U+FF11
0xF2 U+FF12
0xF3 U+FF13
0xF4 U+FF14
0xF5 U+FF15
0xF6 U+FF16
0xF7 U+FF17
0xF8 U+FF18
0xF9 U+FF19
#Generated from IBM420.java
0x00 U+0000
0x01 U+0001
0x02 U+0002
0x03 U+0003
0x04 U+009c
0x05 U+0009
0x06 U+0086
0x07 U+007f
0x08 U+0097
0x09 U+008d
0x0a U+008e
0x0b U+000b
0x0c U+000c
0x0d U+000d
0x0e U+000e
0x0f U+000f
0x10 U+0010
0x11 U+0011
0x12 U+0012
0x13 U+0013
0x14 U+009d
0x15 U+000a
0x16 U+0008
0x17 U+0087
0x18 U+0018
0x19 U+0019
0x1a U+0092
0x1b U+008f
0x1c U+001c
0x1d U+001d
0x1e U+001e
0x1f U+001f
0x20 U+0080
0x21 U+0081
0x22 U+0082
0x23 U+0083
0x24 U+0084
0x25 U+000a
0x26 U+0017
0x27 U+001b
0x28 U+0088
0x29 U+0089
0x2a U+008a
0x2b U+008b
0x2c U+008c
0x2d U+0005
0x2e U+0006
0x2f U+0007
0x30 U+0090
0x31 U+0091
0x32 U+0016
0x33 U+0093
0x34 U+0094
0x35 U+0095
0x36 U+0096
0x37 U+0004
0x38 U+0098
0x39 U+0099
0x3a U+009a
0x3b U+009b
0x3c U+0014
0x3d U+0015
0x3e U+009e
0x3f U+001a
0x40 U+0020
0x41 U+00a0
0x42 U+fe7c
0x43 U+fe7d
0x44 U+0640
0x45 U+f8fc
0x46 U+fe80
0x47 U+fe81
0x48 U+fe82
0x49 U+fe83
0x4a U+00a2
0x4b U+002e
0x4c U+003c
0x4d U+0028
0x4e U+002b
0x4f U+007c
0x50 U+0026
0x51 U+fe84
0x52 U+fe85
0x53 U+fffd
0x54 U+fffd
0x55 U+fe8b
0x56 U+fe8d
0x57 U+fe8e
0x58 U+fe8f
0x59 U+fe91
0x5a U+0021
0x5b U+0024
0x5c U+002a
0x5d U+0029
0x5e U+003b
0x5f U+00ac
0x60 U+002d
0x61 U+002f
0x62 U+fe93
0x63 U+fe95
0x64 U+fe97
0x65 U+fe99
0x66 U+fe9b
0x67 U+fe9d
0x68 U+fe9f
0x69 U+fea1
0x6a U+00a6
0x6b U+002c
0x6c U+0025
0x6d U+005f
0x6e U+003e
0x6f U+003f
0x70 U+fea3
0x71 U+fea5
0x72 U+fea7
0x73 U+fea9
0x74 U+feab
0x75 U+fead
0x76 U+feaf
0x77 U+f8f6
0x78 U+feb3
0x79 U+060c
0x7a U+003a
0x7b U+0023
0x7c U+0040
0x7d U+0027
0x7e U+003d
0x7f U+0022
0x80 U+f8f5
0x81 U+0061
0x82 U+0062
0x83 U+0063
0x84 U+0064
0x85 U+0065
0x86 U+0066
0x87 U+0067
0x88 U+0068
0x89 U+0069
0x8a U+feb7
0x8b U+f8f4
0x8c U+febb
0x8d U+f8f7
0x8e U+febf
0x8f U+fec3
0x90 U+fec7
0x91 U+006a
0x92 U+006b
0x93 U+006c
0x94 U+006d
0x95 U+006e
0x96 U+006f
0x97 U+0070
0x98 U+0071
0x99 U+0072
0x9a U+fec9
0x9b U+feca
0x9c U+fecb
0x9d U+fecc
0x9e U+fecd
0x9f U+fece
0xa0 U+fecf
0xa1 U+00f7
0xa2 U+0073
0xa3 U+0074
0xa4 U+0075
0xa5 U+0076
0xa6 U+0077
0xa7 U+0078
0xa8 U+0079
0xa9 U+007a
0xaa U+fed0
0xab U+fed1
0xac U+fed3
0xad U+fed5
0xae U+fed7
0xaf U+fed9
0xb0 U+fedb
0xb1 U+fedd
0xb2 U+fef5
0xb3 U+fef6
0xb4 U+fef7
0xb5 U+fef8
0xb6 U+fffd
0xb7 U+fffd
0xb8 U+fefb
0xb9 U+fefc
0xba U+fedf
0xbb U+fee1
0xbc U+fee3
0xbd U+fee5
0xbe U+fee7
0xbf U+fee9
0xc0 U+061b
0xc1 U+0041
0xc2 U+0042
0xc3 U+0043
0xc4 U+0044
0xc5 U+0045
0xc6 U+0046
0xc7 U+0047
0xc8 U+0048
0xc9 U+0049
0xca U+00ad
0xcb U+feeb
0xcc U+fffd
0xcd U+feec
0xce U+fffd
0xcf U+feed
0xd0 U+061f
0xd1 U+004a
0xd2 U+004b
0xd3 U+004c
0xd4 U+004d
0xd5 U+004e
0xd6 U+004f
0xd7 U+0050
0xd8 U+0051
0xd9 U+0052
0xda U+feef
0xdb U+fef0
0xdc U+fef1
0xdd U+fef2
0xde U+fef3
0xdf U+0660
0xe0 U+00d7
0xe1 U+2007
0xe2 U+0053
0xe3 U+0054
0xe4 U+0055
0xe5 U+0056
0xe6 U+0057
0xe7 U+0058
0xe8 U+0059
0xe9 U+005a
0xea U+0661
0xeb U+0662
0xec U+fffd
0xed U+0663
0xee U+0664
0xef U+0665
0xf0 U+0030
0xf1 U+0031
0xf2 U+0032
0xf3 U+0033
0xf4 U+0034
0xf5 U+0035
0xf6 U+0036
0xf7 U+0037
0xf8 U+0038
0xf9 U+0039
0xfa U+fffd
0xfb U+0666
0xfc U+0667
0xfd U+0668
0xfe U+0669
0xff U+009f
#
# Frm IBMCDC datatable 01A434B0.TXMAP110
#
# Changed
# 0x15 U+0085 -> 0x15 U+000a
#
0x00 U+0000
0x01 U+0001
0x02 U+0002
0x03 U+0003
0x04 U+009C
0x05 U+0009
0x06 U+0086
0x07 U+007F
0x08 U+0097
0x09 U+008D
0x0A U+008E
0x0B U+000B
0x0C U+000C
0x0D U+000D
0x0E U+000E
0x0F U+000F
0x10 U+0010
0x11 U+0011
0x12 U+0012
0x13 U+0013
0x14 U+009D
0x15 U+000A
0x16 U+0008
0x17 U+0087
0x18 U+0018
0x19 U+0019
0x1A U+0092
0x1B U+008F
0x1C U+001C
0x1D U+001D
0x1E U+001E
0x1F U+001F
0x20 U+0080
0x21 U+0081
0x22 U+0082
0x23 U+0083
0x24 U+0084
0x25 U+000A
0x26 U+0017
0x27 U+001B
0x28 U+0088
0x29 U+0089
0x2A U+008A
0x2B U+008B
0x2C U+008C
0x2D U+0005
0x2E U+0006
0x2F U+0007
0x30 U+0090
0x31 U+0091
0x32 U+0016
0x33 U+0093
0x34 U+0094
0x35 U+0095
0x36 U+0096
0x37 U+0004
0x38 U+0098
0x39 U+0099
0x3A U+009A
0x3B U+009B
0x3C U+0014
0x3D U+0015
0x3E U+009E
0x3F U+001A
0x40 U+0020
0x41 U+00A0
0x42 U+0651
0x43 U+FE7D
0x44 U+0640
0x45 U+200B
0x46 U+0621
0x47 U+0622
0x48 U+FE82
0x49 U+0623
0x4A U+00A2
0x4B U+002E
0x4C U+003C
0x4D U+0028
0x4E U+002B
0x4F U+007C
0x50 U+0026
0x51 U+FE84
0x52 U+0624
0x55 U+0626
0x56 U+0627
0x57 U+FE8E
0x58 U+0628
0x59 U+FE91
0x5A U+0021
0x5B U+0024
0x5C U+002A
0x5D U+0029
0x5E U+003B
0x5F U+00AC
0x60 U+002D
0x61 U+002F
0x62 U+0629
0x63 U+062A
0x64 U+FE97
0x65 U+062B
0x66 U+FE9B
0x67 U+062C
0x68 U+FE9F
0x69 U+062D
0x6A U+00A6
0x6B U+002C
0x6C U+0025
0x6D U+005F
0x6E U+003E
0x6F U+003F
0x70 U+FEA3
0x71 U+062E
0x72 U+FEA7
0x73 U+062F
0x74 U+0630
0x75 U+0631
0x76 U+0632
0x77 U+0633
0x78 U+FEB3
0x79 U+060C
0x7A U+003A
0x7B U+0023
0x7C U+0040
0x7D U+0027
0x7E U+003D
0x7F U+0022
0x80 U+0634
0x81 U+0061
0x82 U+0062
0x83 U+0063
0x84 U+0064
0x85 U+0065
0x86 U+0066
0x87 U+0067
0x88 U+0068
0x89 U+0069
0x8A U+FEB7
0x8B U+0635
0x8C U+FEBB
0x8D U+0636
0x8E U+FEBF
0x8F U+0637
0x90 U+0638
0x91 U+006A
0x92 U+006B
0x93 U+006C
0x94 U+006D
0x95 U+006E
0x96 U+006F
0x97 U+0070
0x98 U+0071
0x99 U+0072
0x9A U+0639
0x9B U+FECA
0x9C U+FECB
0x9D U+FECC
0x9E U+063A
0x9F U+FECE
0xA0 U+FECF
0xA1 U+00F7
0xA2 U+0073
0xA3 U+0074
0xA4 U+0075
0xA5 U+0076
0xA6 U+0077
0xA7 U+0078
0xA8 U+0079
0xA9 U+007A
0xAA U+FED0
0xAB U+0641
0xAC U+FED3
0xAD U+0642
0xAE U+FED7
0xAF U+0643
0xB0 U+FEDB
0xB1 U+0644
0xB2 U+FEF5
0xB3 U+FEF6
0xB4 U+FEF7
0xB5 U+FEF8
0xB8 U+FEFB
0xB9 U+FEFC
0xBA U+FEDF
0xBB U+0645
0xBC U+FEE3
0xBD U+0646
0xBE U+FEE7
0xBF U+0647
0xC0 U+061B
0xC1 U+0041
0xC2 U+0042
0xC3 U+0043
0xC4 U+0044
0xC5 U+0045
0xC6 U+0046
0xC7 U+0047
0xC8 U+0048
0xC9 U+0049
0xCA U+00AD
0xCB U+FEEB
0xCD U+FEEC
0xCF U+0648
0xD0 U+061F
0xD1 U+004A
0xD2 U+004B
0xD3 U+004C
0xD4 U+004D
0xD5 U+004E
0xD6 U+004F
0xD7 U+0050
0xD8 U+0051
0xD9 U+0052
0xDA U+0649
0xDB U+FEF0
0xDC U+064A
0xDD U+FEF2
0xDE U+FEF3
0xDF U+0660
0xE0 U+00D7
0xE2 U+0053
0xE3 U+0054
0xE4 U+0055
0xE5 U+0056
0xE6 U+0057
0xE7 U+0058
0xE8 U+0059
0xE9 U+005A
0xEA U+0661
0xEB U+0662
0xED U+0663
0xEE U+0664
0xEF U+0665
0xF0 U+0030
0xF1 U+0031
0xF2 U+0032
0xF3 U+0033
0xF4 U+0034
0xF5 U+0035
0xF6 U+0036
0xF7 U+0037
0xF8 U+0038
0xF9 U+0039
0xFB U+0666
0xFC U+0667
0xFD U+0668
0xFE U+0669
0xFF U+009F
......@@ -54,7 +54,7 @@ SUBDIRS = \
CharsetMapping
ifndef DISABLE_NIMBUS
SUBDIRS += swing-nimbus
SUBDIRS += generate_nimbus
endif
all build clean clobber::
......
......@@ -28,16 +28,21 @@ BUILDDIR = ../..
include $(BUILDDIR)/common/Defs.gmk
# Default name
FT_TEST = $(BUILDTOOLBINDIR)/freetype_versioncheck$(EXE_SUFFIX)
PROGRAM = freetype_versioncheck
FT_OBJ = $(BUILDTOOLBINDIR)/$(PROGRAM).$(OBJECT_SUFFIX)
FT_TEST = $(BUILDTOOLBINDIR)/$(PROGRAM)$(EXE_SUFFIX)
# Used on openjdk only
ifeq ($(OPENJDK),true)
# Start with CFLAGS (which gets us the required -xarch setting on solaris)
ifeq ($(PLATFORM), windows)
FT_OPTIONS = /nologo $(CC_OBJECT_OUTPUT_FLAG)$(TEMPDIR)
FT_OPTIONS = /nologo /c
FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
FT_LD_OPTIONS = $(FREETYPE_LIB_PATH)/freetype.lib
ifdef MT
FT_LD_OPTIONS += /manifest
endif
else
FT_OPTIONS = $(CFLAGS)
FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH)
......@@ -55,15 +60,22 @@ FT_LD_OPTIONS += $(LFLAGS_$(COMPILER_VERSION))
# Create test program
all: $(FT_TEST)
@$(FT_TEST)
$(FT_TEST)
# On windows we need to copy dll to test dir to ensure it will be found
# at runtime
$(FT_TEST): freetypecheck.c
@$(prep-target)
@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
$(prep-target)
ifeq ($(PLATFORM), windows)
@$(CP) $(FREETYPE_DLL) `dirname $@`
$(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $<
$(LINK) $(FT_LD_OPTIONS) /OUT:$(FT_TEST) $(FT_OBJ)
$(CP) $(FREETYPE_DLL) $(@D)/
ifdef MT
$(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/
$(MT) /manifest $(FT_TEST).manifest /outputresource:$(FT_TEST);#1
endif
else
@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
endif
else
......
......@@ -32,6 +32,45 @@
#include "ft2build.h"
#include FT_FREETYPE_H
#ifdef _MSC_VER
#if _MSC_VER > 1400
/*
* When building for Microsoft Windows, your program has a dependency
* on msvcr??.dll.
*
* When using Visual Studio 2005 or later, that must be recorded in
* the <program>.exe.manifest file.
*
* Reference:
* C:/Program Files/Microsoft SDKs/Windows/v6.1/include/crtdefs.h
*/
#include <crtassem.h>
#ifdef _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='x86' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif /* _M_IX86 */
//This may not be necessary yet for the Windows 64-bit build, but it
//will be when that build environment is updated. Need to test to see
//if it is harmless:
#ifdef _M_AMD64
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='amd64' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif /* _M_AMD64 */
#endif /* _MSC_VER > 1400 */
#endif /* _MSC_VER */
#define QUOTEMACRO(x) QUOTEME(x)
#define QUOTEME(x) #x
......
#
# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -23,38 +23,50 @@
# have any questions.
#
BUILDDIR = ../../../..
PACKAGE = javax.swing.plaf.nimbus
PRODUCT = com
SWING_SRC = $(SHARE_SRC)/classes/javax/swing
#
# Makefile for building the Nimbus generator
#
BUILDDIR = ../..
PACKAGE = build.tools.generatenimbus
PRODUCT = tools
PROGRAM = generatenimbus
include $(BUILDDIR)/common/Defs.gmk
BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
BUILDTOOL_MAIN = $(PKGDIR)/Generator.java
#
# Files
#
NIMBUS_PKG = javax/swing/plaf/nimbus
NIMBUS_COMPAT_PKG = com/sun/java/swing/plaf/nimbus
NIMBUS_GENSRC_DIR = $(GENSRCDIR)/$(NIMBUS_PKG)
NIMBUS_SKIN_FILE = $(SHARE_SRC)/classes/$(NIMBUS_PKG)/skin.laf
NIMBUS_GENERATOR_JAR = $(BUILDTOOLJARDIR)/nimbus_generator.jar
AUTO_FILES_JAVA_DIRS = $(NIMBUS_PKG) $(NIMBUS_COMPAT_PKG)
SOURCE_FILES = Generator.java \
ObjectFactory.java \
Paint.java \
SynthModel.java \
UIDefault.java \
UIStyle.java
TEMPLATE_FILES = Defaults.template \
PainterImpl.template \
StateImpl.template
TEMPLATE_DEST = $(BUILDTOOLCLASSDIR)/$(PKGDIR)/resources
#
# Rules
#
CLASSES_INIT = $(NIMBUS_GENSRC_DIR)
include $(BUILDDIR)/common/Classes.gmk
all: $(TEMPLATE_DEST) $(BUILDTOOL_JAR_FILE)
include $(BUILDDIR)/common/BuildToolJar.gmk
$(TEMPLATE_DEST): $(TEMPLATE_FILES:%=$(SHARE_SRC)/classes/javax/swing/plaf/nimbus/%)
$(MKDIR) -p $@
$(RM) $(TEMPLATE_FILES:%=$@/%)
$(CP) $^ $@
$(NIMBUS_GENSRC_DIR): $(NIMBUS_SKIN_FILE) $(NIMBUS_GENERATOR_JAR)
@$(ECHO) "Generating Nimbus source files:"
$(BOOT_JAVA_CMD) -jar $(NIMBUS_GENERATOR_JAR) \
-skinFile $(NIMBUS_SKIN_FILE) \
-buildDir $(GENSRCDIR) -srcDir $(GENSRCDIR) \
-packagePrefix $(PACKAGE) -lafName Nimbus
@$(ECHO) "Finished generating Nimbus source files"
BUILDTOOL_MAIN_SOURCE_FILE = $(SOURCE_FILES:%=$(BUILDTOOL_SOURCE_ROOT)/$(PKGDIR)/%)
clean clobber::
$(RM) -r $(NIMBUS_GENSRC_DIR)
$(RM) -r $(TEMPLATE_DEST)
......@@ -26,6 +26,7 @@
package build.tools.charsetmapping;
import java.io.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Formatter;
......@@ -54,33 +55,19 @@ public class GenerateSBCS {
String pkgName = fields[4];
System.out.printf("%s,%s,%s,%b,%s%n", clzName, csName, hisName, isASCII, pkgName);
StringBuilder b2c = new StringBuilder();
int c2bLen = genB2C(
new FileInputStream(new File(args[0], clzName+".map")), b2c);
String b2cNR = null;
File nrF = new File(args[0], clzName+".nr");
if (nrF.exists()) {
b2cNR = genNR(new FileInputStream(nrF));
}
String c2bNR = null;
File c2bF = new File(args[0], clzName+".c2b");
if (c2bF.exists()) {
c2bNR = genC2BNR(new FileInputStream(c2bF));
}
genSBCSClass(args[0], args[1], "SingleByte-X.java",
clzName, csName, hisName, pkgName, isASCII,
b2c.toString(), b2cNR, c2bNR, c2bLen);
genClass(args[0], args[1], "SingleByte-X.java",
clzName, csName, hisName, pkgName, isASCII);
}
}
private static void toString(char[] sb, int off, int end,
Formatter out, String closure) {
Formatter out, String closure,
boolean comment) {
while (off < end) {
out.format(" \"");
for (int j = 0; j < 8; j++) {
if (off == end)
break;
char c = sb[off++];
switch (c) {
case '\b':
......@@ -103,101 +90,124 @@ public class GenerateSBCS {
out.format("\\u%04X", c & 0xffff);
}
}
if (off == end)
out.format("\" %s // 0x%02x - 0x%02x%n", closure, off-8, off-1);
else
out.format("\" + // 0x%02x - 0x%02x%n", off-8, off-1);
if (comment) {
if (off == end)
out.format("\" %s // 0x%02x - 0x%02x%n",
closure, off-8, off-1);
else
out.format("\" + // 0x%02x - 0x%02x%n",
off-8, off-1);
} else {
if (off == end)
out.format("\"%s%n", closure);
else
out.format("\" +%n");
}
}
}
static Pattern sbmap = Pattern.compile("0x(\\p{XDigit}++)\\s++U\\+(\\p{XDigit}++)(\\s++#.*)?");
private static int genB2C(InputStream in, StringBuilder out)
private static void genClass(String srcDir, String dstDir,
String template,
String clzName,
String csName,
String hisName,
String pkgName,
boolean isASCII)
throws Exception
{
char[] sb = new char[0x100];
int[] indexC2B = new int[0x100];
StringBuilder b2cSB = new StringBuilder();
StringBuilder b2cNRSB = new StringBuilder();
StringBuilder c2bNRSB = new StringBuilder();
for (int i = 0; i < sb.length; i++)
sb[i] = UNMAPPABLE_DECODING;
char[] sb = new char[0x100];
char[] c2bIndex = new char[0x100];
int c2bOff = 0;
Arrays.fill(sb, UNMAPPABLE_DECODING);
Arrays.fill(c2bIndex, UNMAPPABLE_DECODING);
// parse the b2c mapping table
// (1)read in .map to parse all b->c entries
FileInputStream in = new FileInputStream(
new File(srcDir, clzName + ".map"));
Parser p = new Parser(in, sbmap);
Entry e = null;
int off = 0;
while ((e = p.next()) != null) {
sb[e.bs] = (char)e.cp;
if (indexC2B[e.cp>>8] == 0) {
off += 0x100;
indexC2B[e.cp>>8] = 1;
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
c2bOff += 0x100;
c2bIndex[e.cp>>8] = 1;
}
}
Formatter fm = new Formatter(out);
Formatter fm = new Formatter(b2cSB);
fm.format("%n");
// vm -server shows cc[byte + 128] access is much faster than
// cc[byte&0xff] so we output the upper segment first
toString(sb, 0x80, 0x100, fm, "+");
toString(sb, 0x00, 0x80, fm, ";");
toString(sb, 0x80, 0x100, fm, "+", true);
toString(sb, 0x00, 0x80, fm, ";", true);
fm.close();
return off;
}
// generate non-roundtrip entries from xxx.nr file
private static String genNR(InputStream in) throws Exception
{
StringBuilder sb = new StringBuilder();
Formatter fm = new Formatter(sb);
Parser p = new Parser(in, sbmap);
Entry e = null;
fm.format("// remove non-roundtrip entries%n");
fm.format(" b2cMap = b2cTable.toCharArray();%n");
while ((e = p.next()) != null) {
fm.format(" b2cMap[%d] = UNMAPPABLE_DECODING;%n",
(e.bs>=0x80)?(e.bs-0x80):(e.bs+0x80));
}
fm.close();
return sb.toString();
}
// (2)now the .nr file which includes "b->c" non-roundtrip entries
File f = new File(srcDir, clzName + ".nr");
if (f.exists()) {
in = new FileInputStream(f);
fm = new Formatter(b2cNRSB);
p = new Parser(in, sbmap);
e = null;
// generate c2b only entries from xxx.c2b file
private static String genC2BNR(InputStream in) throws Exception
{
StringBuilder sb = new StringBuilder();
Formatter fm = new Formatter(sb);
Parser p = new Parser(in, sbmap);
ArrayList<Entry> es = new ArrayList<Entry>();
Entry e = null;
while ((e = p.next()) != null) {
es.add(e);
fm.format("// remove non-roundtrip entries%n");
fm.format(" b2cMap = b2cTable.toCharArray();%n");
while ((e = p.next()) != null) {
fm.format(" b2cMap[%d] = UNMAPPABLE_DECODING;%n",
(e.bs>=0x80)?(e.bs-0x80):(e.bs+0x80));
}
fm.close();
}
fm.format("// non-roundtrip c2b only entries%n");
fm.format(" c2bNR = new char[%d];%n", es.size() * 2);
int i = 0;
for (Entry entry: es) {
fm.format(" c2bNR[%d] = 0x%x; c2bNR[%d] = 0x%x;%n",
i++, entry.bs, i++, entry.cp);
// (3)finally the .c2b file which includes c->b non-roundtrip entries
f = new File(srcDir, clzName + ".c2b");
if (f.exists()) {
in = new FileInputStream(f);
fm = new Formatter(c2bNRSB);
p = new Parser(in, sbmap);
e = null;
ArrayList<Entry> es = new ArrayList<Entry>();
while ((e = p.next()) != null) {
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
c2bOff += 0x100;
c2bIndex[e.cp>>8] = 1;
}
es.add(e);
}
fm.format("// non-roundtrip c2b only entries%n");
if (es.size() < 100) {
fm.format(" c2bNR = new char[%d];%n", es.size() * 2);
int i = 0;
for (Entry entry: es) {
fm.format(" c2bNR[%d] = 0x%x; c2bNR[%d] = 0x%x;%n",
i++, entry.bs, i++, entry.cp);
}
} else {
char[] cc = new char[es.size() * 2];
int i = 0;
for (Entry entry: es) {
cc[i++] = (char)entry.bs;
cc[i++] = (char)entry.cp;
}
fm.format(" c2bNR = (%n");
toString(cc, 0, i, fm, ").toCharArray();", false);
}
fm.close();
}
fm.close();
return sb.toString();
}
private static void genSBCSClass(String srcDir,
String dstDir,
String template,
String clzName,
String csName,
String hisName,
String pkgName,
boolean isASCII,
String b2c,
String b2cNR,
String c2bNR,
int c2blen)
throws Exception
{
// (4)it's time to generate the source file
String b2c = b2cSB.toString();
String b2cNR = b2cNRSB.toString();
String c2bNR = c2bNRSB.toString();
Scanner s = new Scanner(new File(srcDir, template));
PrintStream out = new PrintStream(new FileOutputStream(
new File(dstDir, clzName + ".java")));
......@@ -239,16 +249,16 @@ public class GenerateSBCS {
line = line.replace("$B2CTABLE$", b2c);
}
if (line.indexOf("$C2BLENGTH$") != -1) {
line = line.replace("$C2BLENGTH$", "0x" + Integer.toString(c2blen, 16));
line = line.replace("$C2BLENGTH$", "0x" + Integer.toString(c2bOff, 16));
}
if (line.indexOf("$NONROUNDTRIP_B2C$") != -1) {
if (b2cNR == null)
if (b2cNR.length() == 0)
continue;
line = line.replace("$NONROUNDTRIP_B2C$", b2cNR);
}
if (line.indexOf("$NONROUNDTRIP_C2B$") != -1) {
if (c2bNR == null)
if (c2bNR.length() == 0)
continue;
line = line.replace("$NONROUNDTRIP_C2B$", c2bNR);
}
......
......@@ -22,20 +22,13 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package org.jdesktop.synthdesigner.generator;
package build.tools.generatenimbus;
import static org.jdesktop.synthdesigner.generator.TemplateWriter.read;
import static org.jdesktop.synthdesigner.generator.TemplateWriter.writeSrcFile;
import org.jdesktop.synthdesigner.synthmodel.SynthModel;
import org.jibx.runtime.BindingDirectory;
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IUnmarshallingContext;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
/**
* Generates the various Java artifacts based on a SynthModel.
......@@ -51,12 +44,12 @@ import java.util.Map;
* @author Jasper Potts
*/
public class Generator {
private static Generator instance;
/** A map of variables that are used for variable substitution in the template files. */
private Map<String, String> variables;
private boolean full = false;
private File buildPackageRoot;
private File srcPackageRoot;
private String packageNamePrefix;
private String lafName;
private SynthModel model;
......@@ -68,7 +61,7 @@ public class Generator {
*
* @param args The commandline arguments
*/
public static void main(String[] args) {
public static void main(String[] args) throws Exception {
if (args.length == 0 || (args.length % 2) != 0) {
System.out.println("Usage: generator [-options]\n" +
" -full <true|false> True if we should build the whole LAF or false for building just states and painters.\n" +
......@@ -76,9 +69,6 @@ public class Generator {
" -buildDir <value> The directory beneath which the build-controlled artifacts (such as the Painters) should\n" +
" be placed. This is the root directory beneath which the necessary packages and source\n" +
" files will be created.\n" +
" -srcDir <value> The directory beneath which the normal user-controlled artifacts (such as the core\n" +
" LookAndFeel file) should be placed. These are one-time generated files. This is the root\n" +
" directory beneath which the necessary packages and source files will be created.\n" +
" -resourcesDir <value> The resources directory containing templates and images.\n" +
" -packagePrefix <value> The package name associated with this synth look and feel. For example,\n" +
" \"org.mypackage.mylaf\"\n" +
......@@ -87,7 +77,6 @@ public class Generator {
boolean full = false;
File skinFile = new File(System.getProperty("user.dir"));
File buildDir = new File(System.getProperty("user.dir"));
File srcDir = new File(System.getProperty("user.dir"));
File resourcesDir = new File(System.getProperty("user.dir"));
String packagePrefix = "org.mypackage.mylaf";
String lafName = "MyLAF";
......@@ -100,8 +89,6 @@ public class Generator {
skinFile = new File(value);
} else if ("-builddir".equals(key)) {
buildDir = new File(value);
} else if ("-srcdir".equals(key)) {
srcDir = new File(value);
} else if ("-resourcesdir".equals(key)) {
resourcesDir = new File(value);
} else if ("-packageprefix".equals(key)) {
......@@ -114,25 +101,15 @@ public class Generator {
System.out.println(" full :" + full);
System.out.println(" skinFile :" + skinFile.getAbsolutePath());
System.out.println(" buildDir :" + buildDir.getAbsolutePath());
System.out.println(" srcDir :" + srcDir.getAbsolutePath());
System.out.println(" resourcesDir :" + resourcesDir.getAbsolutePath());
System.out.println(" packagePrefix :" +packagePrefix);
System.out.println(" lafName :" +lafName);
try {
// LOAD SKIN MODEL
IBindingFactory bindingFactory = BindingDirectory.getFactory(SynthModel.class);
IUnmarshallingContext mctx = bindingFactory.createUnmarshallingContext();
mctx.setDocument(new FileInputStream(skinFile), "UTF-8");
// pass resources directory in as user context so it can be used in SynthModel preSet
mctx.setUserContext(resourcesDir);
SynthModel model = (SynthModel) mctx.unmarshalElement();
// create and run generator
Generator generator = new Generator(full, buildDir, srcDir, packagePrefix, lafName, model);
generator.generate();
} catch (Exception e) {
System.err.println("Error loading skin and generating java src:");
e.printStackTrace();
}
JAXBContext ctx = JAXBContext.newInstance("build.tools.generatenimbus");
Unmarshaller u = ctx.createUnmarshaller();
SynthModel model = (SynthModel) u.unmarshal(skinFile);
Generator.init(full, buildDir, packagePrefix, lafName, model);
Generator.getInstance().generate();
}
}
......@@ -152,8 +129,8 @@ public class Generator {
* @param lafName The name of the laf, such as MyLAF.
* @param model The actual SynthModel to base these generated files on.
*/
public Generator(boolean full, File buildDir, File srcDir, String packageNamePrefix, String lafName,
SynthModel model) {
private Generator(boolean full, File buildDir,
String packageNamePrefix, String lafName, SynthModel model) {
this.full = full;
//validate the input variables
if (packageNamePrefix == null) {
......@@ -162,9 +139,6 @@ public class Generator {
if (buildDir == null) {
throw new IllegalArgumentException("You must specify the build directory");
}
if (srcDir == null) {
throw new IllegalArgumentException("You must specify the source directory");
}
if (model == null) {
throw new IllegalArgumentException("You must specify the SynthModel");
}
......@@ -183,8 +157,6 @@ public class Generator {
//org.mypackage.mylaf subdirectories)
buildPackageRoot = new File(buildDir, packageNamePrefix.replaceAll("\\.", "\\/"));
buildPackageRoot.mkdirs();
srcPackageRoot = new File(srcDir, packageNamePrefix.replaceAll("\\.", "\\/"));
srcPackageRoot.mkdirs();
//save the variables
this.packageNamePrefix = packageNamePrefix;
......@@ -192,98 +164,104 @@ public class Generator {
this.model = model;
}
public void generate() {
//Generate the one-time files. If these files already exist, skip the
//ones that exist and create the missing ones. Register warnings for the
//already existing files.
//TODO Skip existing files, send warnings, etc.
if (full) {
try {
//create the LookAndFeel file
String template = read("resources/LookAndFeel.template");
writeSrcFile(template, variables, new File(srcPackageRoot, lafName + "LookAndFeel.java"));
} catch (IOException e) {
e.printStackTrace();
}
}
//create the painters and such.
regenerate();
public static void init(boolean full, File buildDir,
String packageNamePrefix, String lafName, SynthModel model) {
instance = new Generator(full, buildDir, packageNamePrefix, lafName, model);
model.initStyles();
}
public void regenerate() {
try {
if (full) {
//first, create the AbstractRegionPainter.java file.
String template = read("resources/AbstractRegionPainter.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "AbstractRegionPainter.java"));
//write out BlendingMode.java
template = read("resources/BlendingMode.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "BlendingMode.java"));
//create the SynthPainterImpl class
template = read("resources/SynthPainterImpl.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "SynthPainterImpl.java"));
public static Generator getInstance() {
return instance;
}
//create the IconImpl class
template = read("resources/IconImpl.template");
writeSrcFile(template, variables, new File(buildPackageRoot, lafName + "Icon.java"));
public static Map<String, String> getVariables() {
return new HashMap<String, String>(instance.variables);
}
//create the StyleImpl class
template = read("resources/StyleImpl.template");
writeSrcFile(template, variables, new File(buildPackageRoot, lafName + "Style.java"));
public void generate() {
if (full) {
//create the LookAndFeel file
writeSrcFileImpl("LookAndFeel", variables, lafName + "LookAndFeel");
//write out Effect.java
template = read("resources/Effect.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "Effect.java"));
writeSrcFileImpl("AbstractRegionPainter", variables);
writeSrcFileImpl("BlendingMode", variables);
writeSrcFileImpl("SynthPainterImpl", variables);
writeSrcFileImpl("IconImpl", variables, lafName + "Icon.java");
writeSrcFileImpl("StyleImpl", variables, lafName + "Style.java");
writeSrcFileImpl("Effect", variables);
writeSrcFileImpl("EffectUtils", variables);
writeSrcFileImpl("ShadowEffect", variables);
writeSrcFileImpl("DropShadowEffect", variables);
writeSrcFileImpl("InnerShadowEffect", variables);
writeSrcFileImpl("InnerGlowEffect", variables);
writeSrcFileImpl("OuterGlowEffect", variables);
writeSrcFileImpl("State", variables);
writeSrcFileImpl("ImageCache", variables);
writeSrcFileImpl("ImageScalingHelper", variables);
}
//next, populate the first set of ui defaults based on what is in the
//various palettes of the synth model
StringBuilder defBuffer = new StringBuilder();
StringBuilder styleBuffer = new StringBuilder();
model.write(defBuffer, styleBuffer, packageNamePrefix);
//write out EffectUtils.java
template = read("resources/EffectUtils.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "EffectUtils.java"));
Map<String, String> vars = getVariables();
vars.put("UI_DEFAULT_INIT", defBuffer.toString());
vars.put("STYLE_INIT", styleBuffer.toString());
writeSrcFile("Defaults", vars, lafName + "Defaults");
}
//write out ShadowEffect.java
template = read("resources/ShadowEffect.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "ShadowEffect.java"));
private void writeSrcFileImpl(String name, Map<String, String> variables) {
writeSrcFileImpl(name, variables, name);
}
//write out DropShadowEffect.java
template = read("resources/DropShadowEffect.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "DropShadowEffect.java"));
private void writeSrcFileImpl(String templateName,
Map<String, String> variables, String outputName) {
PrintWriter out = null;
try {
InputStream stream = getClass().getResourceAsStream(
"resources/" + templateName + ".template");
TemplateReader in = new TemplateReader(variables, stream);
//write out InnerShadowEffect.java
template = read("resources/InnerShadowEffect.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "InnerShadowEffect.java"));
out = new PrintWriter(new File(buildPackageRoot, outputName + ".java"));
String line = in.readLine();
while (line != null) {
out.println(line);
line = in.readLine();
}
} catch (IOException e) {
throw new RuntimeException("IOException in writer", e);
} finally {
if (out != null) out.close();
}
}
//write out InnerGlowEffect.java
template = read("resources/InnerGlowEffect.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "InnerGlowEffect.java"));
public static void writeSrcFile(String templateName,
Map<String, String> variables, String outputName) {
instance.writeSrcFileImpl(templateName, variables, outputName);
}
//write out OuterGlowEffect.java
template = read("resources/OuterGlowEffect.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "OuterGlowEffect.java"));
/** A BufferedReader implementation that automatically performs
* string replacements as needed.
*/
private static final class TemplateReader extends BufferedReader {
private Map<String, String> variables;
//write out State.java
template = read("resources/State.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "State.java"));
TemplateReader(Map<String, String> variables, InputStream template) {
super(new InputStreamReader(template));
this.variables = variables;
}
template = read("resources/ImageCache.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "ImageCache.java"));
@Override public String readLine() throws IOException {
return substituteVariables(super.readLine());
}
template = read("resources/ImageScalingHelper.template");
writeSrcFile(template, variables, new File(buildPackageRoot, "ImageScalingHelper.java"));
private String substituteVariables(String input) {
if (input == null) return null;
for (Map.Entry<String, String> variable : variables.entrySet()) {
input = input.replace("${" + variable.getKey() + "}", variable.getValue());
}
//next, populate the first set of ui defaults based on what is in the
//various palettes of the synth model
StringBuilder uiDefaultInit = new StringBuilder();
StringBuilder styleInit = new StringBuilder();
DefaultsGenerator.generateDefaults(uiDefaultInit, styleInit, model, variables, packageNamePrefix,
buildPackageRoot);
variables.put("UI_DEFAULT_INIT", uiDefaultInit.toString());
variables.put("STYLE_INIT", styleInit.toString());
writeSrcFile(read("resources/Defaults.template"), variables,
new File(buildPackageRoot, lafName + "Defaults.java"));
} catch (IOException e) {
e.printStackTrace();
return input;
}
}
}
......@@ -22,34 +22,41 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package org.jdesktop.swingx.designer.effects;
import org.jdesktop.swingx.designer.paint.Matte;
package build.tools.generatenimbus;
import javax.xml.bind.annotation.XmlRegistry;
import javax.swing.UIDefaults;
import java.awt.Color;
/**
* OuterGlowEffect
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the test package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
* @author Created by Jasper Potts (Jun 21, 2007)
*/
public class OuterGlowEffect extends DropShadowEffect {
protected OuterGlowEffect() {
distance = 0;
}
@XmlRegistry
public class ObjectFactory {
public OuterGlowEffect(UIDefaults uiDefaults) {
color = new Matte(new Color(255, 255, 211), uiDefaults);
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: test
*
*/
public ObjectFactory() {
}
/**
* Get the display name for this effect
* Create an instance of {@link SynthModel }
*
* @return The user displayable name
*/
public String getDisplayName() {
return "Outer Glow";
public SynthModel createSynthModel() {
return new SynthModel();
}
}
/*
* Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package build.tools.generatenimbus;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
public abstract class Paint {
}
class Matte extends Paint {
@XmlAttribute private int red;
@XmlAttribute private int green;
@XmlAttribute private int blue;
@XmlAttribute private int alpha;
@XmlAttribute private String uiDefaultParentName = null;
@XmlAttribute private float hueOffset = 0;
@XmlAttribute private float saturationOffset = 0;
@XmlAttribute private float brightnessOffset = 0;
@XmlAttribute private int alphaOffset = 0;
@XmlAttribute private String componentPropertyName = null;
public String getComponentPropertyName() { return componentPropertyName; }
@XmlAttribute private boolean uiResource = true;
public boolean isAbsolute() {
return uiDefaultParentName == null;
}
public String getDeclaration() {
if (isAbsolute()) {
return String.format("new Color(%d, %d, %d, %d)",
red, green, blue, alpha);
} else {
return String.format("decodeColor(\"%s\", %sf, %sf, %sf, %d)",
uiDefaultParentName, String.valueOf(hueOffset),
String.valueOf(saturationOffset),
String.valueOf(brightnessOffset), alphaOffset);
}
}
public String write() {
if (isAbsolute()) {
return String.format("%s, %s, %s, %s", red, green, blue, alpha);
} else {
String s = String.format("\"%s\", %sf, %sf, %sf, %d",
uiDefaultParentName, String.valueOf(hueOffset),
String.valueOf(saturationOffset),
String.valueOf(brightnessOffset), alphaOffset);
if (! uiResource) {
s += ", false";
}
return s;
}
}
public ComponentColor createComponentColor(String variableName) {
return new ComponentColor(componentPropertyName, variableName,
saturationOffset, brightnessOffset, alphaOffset);
}
}
class ComponentColor {
private String propertyName;
private String defaultColorVariableName;
private float saturationOffset = 0, brightnessOffset = 0;
private int alphaOffset = 0;
ComponentColor(String propertyName,
String defaultColorVariableName,
float saturationOffset,
float brightnessOffset,
int alphaOffset) {
this.propertyName = propertyName;
this.defaultColorVariableName = defaultColorVariableName;
this.saturationOffset = saturationOffset;
this.brightnessOffset = brightnessOffset;
this.alphaOffset = alphaOffset;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComponentColor c = (ComponentColor) o;
if (alphaOffset != c.alphaOffset) {
return false;
}
if (Float.compare(saturationOffset, c.saturationOffset) != 0) {
return false;
}
if (Float.compare(brightnessOffset, c.brightnessOffset) != 0) {
return false;
}
if (defaultColorVariableName != null ? !defaultColorVariableName.equals(c.defaultColorVariableName) : c.defaultColorVariableName != null) {
return false;
}
if (propertyName != null ? !propertyName.equals(c.propertyName) : c.propertyName != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int hash = 5;
hash = 61 * hash + (this.propertyName != null ? this.propertyName.hashCode() : 0);
hash = 61 * hash + (this.defaultColorVariableName != null ? this.defaultColorVariableName.hashCode() : 0);
hash = 61 * hash + Float.floatToIntBits(this.saturationOffset);
hash = 61 * hash + Float.floatToIntBits(this.brightnessOffset);
hash = 61 * hash + this.alphaOffset;
return hash;
}
public void write(StringBuilder sb) {
sb.append(" getComponentColor(c, \"").
append(propertyName).append("\", ").
append(defaultColorVariableName).append(", ").
append(saturationOffset).append("f, ").
append(brightnessOffset).append("f, ").
append(alphaOffset);
}
}
class GradientStop {
@XmlAttribute private float position;
public float getPosition() { return position; }
@XmlAttribute private float midpoint;
public float getMidpoint() { return midpoint; }
@XmlElement private Matte matte;
public Matte getColor() { return matte; }
}
class AbstractGradient extends Paint {
public static enum CycleMethod {
NO_CYCLE, REFLECT, REPEAT
}
@XmlElement(name="stop") private ArrayList<GradientStop> stops;
public List<GradientStop> getStops() { return stops; }
}
class Gradient extends AbstractGradient {
}
class RadialGradient extends AbstractGradient {
}
/*
* Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package build.tools.generatenimbus;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlElements;
public abstract class Shape {
@XmlElement
private PaintPoints paintPoints;
public double getPaintX1() { return paintPoints.x1; }
public double getPaintX2() { return paintPoints.x2; }
public double getPaintY1() { return paintPoints.y1; }
public double getPaintY2() { return paintPoints.y2; }
@XmlElements({
@XmlElement(name = "matte", type = Matte.class),
@XmlElement(name = "gradient", type = Gradient.class),
@XmlElement(name = "radialGradient", type = RadialGradient.class)
})
private Paint paint;
public Paint getPaint() { return paint; }
static class PaintPoints {
@XmlAttribute double x1;
@XmlAttribute double y1;
@XmlAttribute double x2;
@XmlAttribute double y2;
}
}
class Point {
@XmlAttribute private double x;
public double getX() { return x; }
@XmlAttribute private double y;
public double getY() { return y; }
@XmlAttribute(name="cp1x") private double cp1x;
public double getCp1X() { return cp1x; }
@XmlAttribute(name="cp1y") private double cp1y;
public double getCp1Y() { return cp1y; }
@XmlAttribute(name="cp2x") private double cp2x;
public double getCp2X() { return cp2x; }
@XmlAttribute(name="cp2y") private double cp2y;
public double getCp2Y() { return cp2y; }
public boolean isP1Sharp() {
return cp1x == x && cp1y == y;
}
public boolean isP2Sharp() {
return cp2x == x && cp2y == y;
}
}
class Path extends Shape {
@XmlElement(name="point")
@XmlElementWrapper(name="points")
private List<Point> controlPoints = new ArrayList<Point>();
public List<Point> getControlPoints() { return controlPoints; }
}
class Rectangle extends Shape {
@XmlAttribute private double x1;
public double getX1() { return x1; }
@XmlAttribute private double x2;
public double getX2() { return x2; }
@XmlAttribute private double y1;
public double getY1() { return y1; }
@XmlAttribute private double y2;
public double getY2() { return y2; }
@XmlAttribute
public double getRounding() {
double rounding = Math.abs(roundingX - x1) * 2;
return rounding > 2 ? rounding : 0;
}
public void setRounding(double rounding) {
if (rounding > 0 && rounding < 2) {
rounding = 0;
}
roundingX = rounding / 2d + x1;
}
private double roundingX;
public boolean isRounded() {
return getRounding() > 0;
}
}
class Ellipse extends Shape {
@XmlAttribute private double x1;
public double getX1() { return x1; }
@XmlAttribute private double x2;
public double getX2() { return x2; }
@XmlAttribute private double y1;
public double getY1() { return y1; }
@XmlAttribute private double y2;
public double getY2() { return y2; }
}
/*
* Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package build.tools.generatenimbus;
import java.awt.Font;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.*;
@XmlRootElement(name="synthModel")
public class SynthModel {
@XmlElement private UIStyle style;
@XmlElement(name="uiColor")
@XmlElementWrapper(name="colors")
private ArrayList<UIColor> colors;
@XmlElement(name="uiFont")
@XmlElementWrapper(name="fonts")
private ArrayList<UIFont> fonts;
@XmlElement(name="uiComponent")
@XmlElementWrapper(name="components")
private ArrayList<UIComponent> components;
public void initStyles() {
for (UIComponent c: components) {
c.initStyles(this.style);
}
}
public void write(StringBuilder defBuffer, StringBuilder styleBuffer, String packageName) {
defBuffer.append(" //Color palette\n");
for (UIColor c: colors) defBuffer.append(c.write());
defBuffer.append('\n');
defBuffer.append(" //Font palette\n");
defBuffer.append(" d.put(\"defaultFont\", new FontUIResource(defaultFont));\n");
for (UIFont f: fonts) defBuffer.append(f.write());
defBuffer.append('\n');
defBuffer.append(" //Border palette\n");
defBuffer.append('\n');
defBuffer.append(" //The global style definition\n");
defBuffer.append(style.write(""));
defBuffer.append('\n');
for (UIComponent c: components) {
String prefix = Utils.escape(c.getKey());
defBuffer.append(" //Initialize ").append(prefix).append("\n");
c.write(defBuffer, styleBuffer, c, prefix, packageName);
defBuffer.append('\n');
}
}
}
class Typeface {
public enum DeriveStyle {
Default, Off, On;
@Override public String toString() {
switch (this) {
default: return "null";
case On: return "true";
case Off: return "false";
}
}
}
@XmlAttribute private String uiDefaultParentName;
@XmlAttribute(name="family") private String name;
@XmlAttribute private int size;
@XmlAttribute private DeriveStyle bold = DeriveStyle.Default;
@XmlAttribute private DeriveStyle italic = DeriveStyle.Default;
@XmlAttribute private float sizeOffset = 1f;
public boolean isAbsolute() {
return uiDefaultParentName == null;
}
public String write() {
if (isAbsolute()) {
int style = Font.PLAIN;
if (bold == DeriveStyle.On) {
style = style | Font.BOLD;
}
if (italic == DeriveStyle.On) {
style = style | Font.ITALIC;
}
return String.format(
"new javax.swing.plaf.FontUIResource(\"%s\", %d, %d)",
name, style, size);
} else {
return String.format(
"new DerivedFont(\"%s\", %sf, %s, %s)",
uiDefaultParentName, String.valueOf(sizeOffset), bold, italic);
}
}
}
class Border {
enum BorderType {
@XmlEnumValue("empty") EMPTY,
@XmlEnumValue("painter") PAINTER
}
@XmlAttribute private BorderType type;
@XmlAttribute private String painter;
@XmlAttribute private int top;
@XmlAttribute private int left;
@XmlAttribute private int bottom;
@XmlAttribute private int right;
public String write() {
switch (type) {
case PAINTER:
return String.format("new PainterBorder(\"%s\", new Insets(%d, %d, %d, %d))",
painter, top, left, bottom, right);
case EMPTY:
return String.format("BorderFactory.createEmptyBorder(%d, %d, %d, %d)",
top, left, bottom, right);
default:
return "### Look, here's an unknown border! $$$";
}
}
}
class Insets {
@XmlAttribute int top;
@XmlAttribute int left;
@XmlAttribute int bottom;
@XmlAttribute int right;
public Insets() {
this(0, 0, 0, 0);
}
public Insets(int top, int left, int bottom, int right) {
this.top = top;
this.left = left;
this.bottom = bottom;
this.right = right;
}
public String write(boolean uiResource) {
String uiSuffix = (uiResource ? "UIResource" : "");
return String.format("new Insets%s(%d, %d, %d, %d)",
uiSuffix, top, left, bottom, right);
}
}
class Dimension {
@XmlAttribute int width;
@XmlAttribute int height;
public String write(boolean uiResource) {
String uiSuffix = (uiResource ? "UIResource" : "");
return String.format("new Dimension%s(%d, %d)", uiSuffix, width, height);
}
}
class Canvas {
@XmlElement private Dimension size;
public Dimension getSize() { return size; }
@XmlElement(name="layer") private List<Layer> layers;
public List<Layer> getLayers() { return layers; }
@XmlElement private Insets stretchingInsets = null;
public Insets getStretchingInsets() { return stretchingInsets; }
public boolean isBlank() {
return layers.size() == 0 || (layers.size() == 1 && layers.get(0).isEmpty());
}
}
class Layer {
/** List of shapes in this layer, first shape is painted on top */
@XmlElements({
@XmlElement(name = "ellipse", type = Ellipse.class),
@XmlElement(name = "path", type = Path.class),
@XmlElement(name = "rectangle", type = Rectangle.class)
})
@XmlElementWrapper(name="shapes")
private List<Shape> shapes = new ArrayList<Shape>();
public List<Shape> getShapes() { return shapes; }
public boolean isEmpty() {
return shapes.isEmpty();
}
}
此差异已折叠。
......@@ -30,7 +30,7 @@ import java.io.*;
abstract class AbstractNamedNode extends Node {
NameNode nameNode;
NameNode nameNode = null;
String name;
public String name() {
......
......@@ -30,7 +30,7 @@ import java.io.*;
class AltNode extends AbstractGroupNode implements TypeNode {
SelectNode select;
SelectNode select = null;
void constrain(Context ctx) {
super.constrain(ctx);
......
......@@ -33,13 +33,7 @@ class ConstantSetNode extends AbstractNamedNode {
/**
* The mapping between a constant and its value.
*/
protected static Map<String, String> constantMap;
ConstantSetNode(){
if (constantMap == null) {
constantMap = new HashMap<String, String>();
}
}
protected static final Map<String, String> constantMap = new HashMap<String, String>();
void prune() {
List<Node> addons = new ArrayList<Node>();
......@@ -95,9 +89,6 @@ class ConstantSetNode extends AbstractNamedNode {
}
public static String getConstant(String key){
if (constantMap == null) {
return "";
}
String com = constantMap.get(key);
if(com == null){
return "";
......
......@@ -25,13 +25,11 @@
package build.tools.jdwpgen;
import java.util.*;
import java.io.*;
class Main {
static String specSource;
static Map nameMap = new HashMap();
static boolean genDebug = true;
static void usage() {
......@@ -43,7 +41,6 @@ class Main {
System.err.println("-doc <doc_output>");
System.err.println("-jdi <java_output>");
System.err.println("-include <include_file_output>");
System.exit(1);
}
public static void main(String args[]) throws IOException {
......@@ -66,6 +63,7 @@ class Main {
} else {
System.err.println("Invalid option: " + arg);
usage();
return;
}
} else {
specSource = arg;
......@@ -75,6 +73,7 @@ class Main {
if (reader == null) {
System.err.println("<spec_input> must be specified");
usage();
return;
}
Parse parse = new Parse(reader);
......
......@@ -30,7 +30,7 @@ import java.io.*;
class RepeatNode extends AbstractTypeNode {
Node member;
Node member = null;
void constrain(Context ctx) {
super.constrain(ctx);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册