提交 1387fee2 编写于 作者: O ohair

6695765: Remove winver.exe completely from jdk sources

Summary: Binary file winver.exe is unnecessary and the repositories should not manage binary files.
Reviewed-by: darcy
上级 df538c04
......@@ -72,7 +72,6 @@ PLATFORM_SHARED=done
# ISA_DIR solaris only: /sparcv9 or /amd64
# LIBARCH32 solaris only: sparc or i386
# LIBARCH64 solaris only: sparcv9 or amd64
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
# USING_CYGWIN windows only: true or false
# WINDOWS_NT_VERSION_STRING windows only: long version name
......@@ -311,19 +310,11 @@ ifeq ($(PLATFORM), windows)
endif
endif
export ARCH_DATA_MODEL
# LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
ARCH=i586
LIBARCH=i386
# Value of Java os.arch property
ARCHPROP=x86
REQUIRED_WINDOWS_NAME=Windows Professional 2000
REQUIRED_WINDOWS_VERSION=5 0 Service Pack 4
ifeq ($(ARCH_DATA_MODEL), 64)
# If the user wants to perform a cross compile build then they must
# - set ARCH_DATA_MODEL=64 and either
# + set ARCH to ia64 or amd64, or
REQUIRED_WINDOWS_NAME=Windows Server 2003
REQUIRED_WINDOWS_VERSION=5 2 Service Pack 1
REQUIRED_WINDOWS_VERSION=Server 2003 Enterprise x64 Edition
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)), AMD64)
ARCH=amd64
else
......@@ -332,6 +323,14 @@ ifeq ($(PLATFORM), windows)
LIBARCH=$(ARCH)
# Value of Java os.arch property
ARCHPROP=$(LIBARCH)
else
REQUIRED_WINDOWS_VERSION=2000 or Unknown
#REQUIRED_WINDOWS_VERSION=XP Professional
# LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
ARCH=i586
LIBARCH=i386
# Value of Java os.arch property
ARCHPROP=x86
endif
ARCH_FAMILY = $(ARCH)
# Where is unwanted output to be delivered?
......
......@@ -82,15 +82,16 @@ ifeq ($(PLATFORM), linux)
endif
ifeq ($(PLATFORM), windows)
WINVER=$(JDK_TOPDIR)/make/tools/winver/bin/winver.exe
FREE_SPACE := $(shell $(DF) -kP $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
TEMP_FREE_SPACE := $(shell $(DF) -kP $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
WINDOWS_VERSION := $(shell \
if [ -x $(WINVER) ]; then \
$(WINVER) ; \
else \
$(ECHO) "Unknown Windows Version"; \
fi)
# Localized systeminfo has localized labels, but not localized values.
_WINDOWS_VERSION := \
$(shell systeminfo 2> $(DEV_NULL) | grep 'Microsoft' | grep 'Windows' | \
cut -d':' -f2)
ifeq ($(_WINDOWS_VERSION),)
_WINDOWS_VERSION := Windows 2000 or Unknown (no systeminfo utility)
endif
WINDOWS_VERSION := $(strip $(_WINDOWS_VERSION))
DXSDK_VER := $(shell $(EGREP) DIRECTDRAW_VERSION $(DXSDK_INCLUDE_PATH)/ddraw.h 2>&1 | \
$(EGREP) "\#define" | $(NAWK) '{print $$3}')
endif
......@@ -264,9 +265,9 @@ ifndef OPENJDK
"" >> $(WARNING_FILE) ; \
fi
ifeq ($(PLATFORM), windows)
@if [ "$(WINDOWS_VERSION)" != "$(REQUIRED_WINDOWS_VERSION)" ]; then \
$(ECHO) "WARNING: $(YOU_ARE_USING) an unsupported version of $(REQUIRED_WINDOWS_NAME). \n" \
" The supported version is $(REQUIRED_WINDOWS_NAME) $(REQUIRED_WINDOWS_VERSION). \n" \
@if [ "$(findstring $(REQUIRED_WINDOWS_VERSION),$(WINDOWS_VERSION))" = "" ]; then \
$(ECHO) "WARNING: $(YOU_ARE_USING) an unknown version of Windows. \n" \
" The required version is $(REQUIRED_WINDOWS_VERSION). \n" \
" $(YOU_ARE_USING) $(WINDOWS_VERSION) \n" \
"" >> $(WARNING_FILE) ; \
fi
......
......@@ -51,7 +51,6 @@ SUBDIRS = \
jdwpgen \
makeclasslist \
strip_properties \
winver \
CharsetMapping
all build clean clobber::
......
#
# 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
# 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 the winver tool
#
BUILDDIR = ../..
PRODUCT = tools
PROGRAM = winver
include $(BUILDDIR)/common/Defs.gmk
build: permissions
permissions:
ifeq ($(PLATFORM),windows)
$(CHMOD) a+x bin/winver.exe
endif
#
# Rules.
#
include $(BUILDDIR)/common/Rules.gmk
.PHONY: permissions
/*
* Copyright 2001 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.
*/
// stdafx.cpp : source file that includes just the standard includes
// getver.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
/*
* Copyright 2001 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.
*/
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__C592D6C3_027D_11D5_8DFB_080020C19238__INCLUDED_)
#define AFX_STDAFX_H__C592D6C3_027D_11D5_8DFB_080020C19238__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__C592D6C3_027D_11D5_8DFB_080020C19238__INCLUDED_)
/*
* Copyright 2001 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.
*/
// getver.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
int main(int argc, char* argv[])
{
OSVERSIONINFO verInfo;
memset(&verInfo,0,sizeof(verInfo));
verInfo.dwOSVersionInfoSize = sizeof(verInfo);
if (GetVersionEx(&verInfo))
{
printf("%d %d %s",verInfo.dwMajorVersion,verInfo.dwMinorVersion,verInfo.szCSDVersion);
}
else
{
printf("No version info available");
}
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册