Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
3bca7263
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3bca7263
编写于
9月 24, 2012
作者:
L
leonidr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7179349: [macosx] Java processes on Mac should not use default Apple icon
Reviewed-by: anthony
上级
22edf3f1
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
102 addition
and
16 deletion
+102
-16
make/sun/osxapp/Makefile
make/sun/osxapp/Makefile
+36
-2
make/sun/osxapp/ToBin.java
make/sun/osxapp/ToBin.java
+50
-0
src/macosx/native/sun/osxapp/NSApplicationAWT.m
src/macosx/native/sun/osxapp/NSApplicationAWT.m
+16
-14
src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
+0
-0
未找到文件。
make/sun/osxapp/Makefile
浏览文件 @
3bca7263
...
@@ -28,6 +28,11 @@ LIBRARY = osxapp
...
@@ -28,6 +28,11 @@ LIBRARY = osxapp
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
GEN_DIR
=
$(GENSRCDIR)
/sun/osxapp
ICON_DATA
=
$(GEN_DIR)
/AWTIconData.h
CLASSES_INIT
+=
$(ICON_DATA)
#
#
# Files
# Files
#
#
...
@@ -63,6 +68,7 @@ OTHER_LDLIBS += \
...
@@ -63,6 +68,7 @@ OTHER_LDLIBS += \
-framework
QuartzCore
-framework
QuartzCore
CPPFLAGS
+=
\
CPPFLAGS
+=
\
-I
$(GEN_DIR)
\
$(
call
NativeSrcDirList,-I,/native/sun/osxapp
)
$(
call
NativeSrcDirList,-I,/native/sun/osxapp
)
...
@@ -70,6 +76,34 @@ ifeq ($(MILESTONE), internal)
...
@@ -70,6 +76,34 @@ ifeq ($(MILESTONE), internal)
CPPFLAGS
+=
-DINTERNAL_BUILD
CPPFLAGS
+=
-DINTERNAL_BUILD
endif
endif
clean clobber
::
TEMPDIR_CLASSES
=
$(TEMPDIR)
/classes
$(TEMPDIR_CLASSES)/sun/osxapp/ToBin.class
:
ToBin.java
@
$
(
prep-target
)
$(BOOT_JAVAC_CMD)
-d
$(TEMPDIR_CLASSES)
$<
ifdef
OPENJDK
ICONS_PATH_PREFIX
=
$(PLATFORM_SRC_MACOS)
else
ICONS_PATH_PREFIX
=
$(CLOSED_SRC)
/macosx
endif
generated.clean
:
$(RM)
-r
$(GEN_DIR)
/
*
.h
ICONPATH
=
$(ICONS_PATH_PREFIX)
/native/sun/osxapp/resource/icons
ICON
=
$(ICONPATH)
/JavaApp.icns
$(GEN_DIR)/AWTIconData.h
:
$(TEMPDIR_CLASSES)/sun/osxapp/ToBin.class $(ICON)
$
(
prep-target
)
$(RM)
$(ICON_DATA)
$(ECHO)
"static unsigned char sAWTIconData[] = { "
>>
$(ICON_DATA)
;
\
$(CAT)
$(ICON)
|
\
$(BOOT_JAVA_CMD)
-cp
$(TEMPDIR_CLASSES)
-Djava
.awt.headless
=
true
\
sun.osxapp.ToBin
>>
$(ICON_DATA)
;
\
$(ECHO)
"};"
>>
$(ICON_DATA)
;
clean clobber
::
generated.clean
.PHONY
:
.PHONY
:
generated.clean
make/sun/osxapp/ToBin.java
0 → 100644
浏览文件 @
3bca7263
/*
* Copyright (c) 2012, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.osxapp
;
import
java.io.*
;
public
class
ToBin
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
();
int
nRead
;
byte
[]
data
=
new
byte
[
4096
];
while
((
nRead
=
System
.
in
.
read
(
data
,
0
,
data
.
length
))
!=
-
1
)
{
baos
.
write
(
data
,
0
,
nRead
);
}
baos
.
flush
();
byte
[]
buf
=
baos
.
toByteArray
();
for
(
int
i
=
0
;
i
<
buf
.
length
;
i
++)
{
System
.
out
.
print
(
String
.
format
(
"0x%1$02X"
,
buf
[
i
])
+
", "
);
if
(
i
%
20
==
0
)
{
System
.
out
.
println
();
}
}
}
}
src/macosx/native/sun/osxapp/NSApplicationAWT.m
浏览文件 @
3bca7263
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#import "PropertiesUtilities.h"
#import "PropertiesUtilities.h"
#import "ThreadUtilities.h"
#import "ThreadUtilities.h"
#import "QueuingApplicationDelegate.h"
#import "QueuingApplicationDelegate.h"
#import "AWTIconData.h"
static
BOOL
sUsingDefaultNIB
=
YES
;
static
BOOL
sUsingDefaultNIB
=
YES
;
...
@@ -258,25 +259,26 @@ AWT_ASSERT_APPKIT_THREAD;
...
@@ -258,25 +259,26 @@ AWT_ASSERT_APPKIT_THREAD;
theIconPath
=
[
PropertiesUtilities
javaSystemPropertyForKey
:
@"apple.awt.application.icon"
withEnv
:
env
];
theIconPath
=
[
PropertiesUtilities
javaSystemPropertyForKey
:
@"apple.awt.application.icon"
withEnv
:
env
];
}
}
// If the icon file wasn't specified as an argument and we need to get an icon
// Use the path specified to get the icon image
// we'll use the generic java app icon.
NSImage
*
iconImage
=
nil
;
NSString
*
defaultIconPath
=
[
NSString
stringWithFormat
:
@"%@%@"
,
SHARED_FRAMEWORK_BUNDLE
,
@"/Resources/GenericApp.icns"
];
if
(
theIconPath
==
nil
)
{
NSString
*
bundleIcon
=
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"CFBundleIconFile"
];
if
(
bundleIcon
==
nil
)
{
theIconPath
=
defaultIconPath
;
}
}
// Set up the dock icon if we have an icon name.
if
(
theIconPath
!=
nil
)
{
if
(
theIconPath
!=
nil
)
{
NSImage
*
iconImage
=
[[
NSImage
alloc
]
initWithContentsOfFile
:
theIconPath
];
iconImage
=
[[
NSImage
alloc
]
initWithContentsOfFile
:
theIconPath
];
}
// If we failed for some reason fall back to the default icon.
// If no icon file was specified or we failed to get the icon image
// and there is no bundle's icon, then use the default icon
if
(
iconImage
==
nil
)
{
if
(
iconImage
==
nil
)
{
iconImage
=
[[
NSImage
alloc
]
initWithContentsOfFile
:
defaultIconPath
];
NSString
*
bundleIcon
=
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"CFBundleIconFile"
];
if
(
bundleIcon
==
nil
)
{
NSData
*
iconData
;
iconData
=
[[
NSData
alloc
]
initWithBytesNoCopy
:
sAWTIconData
length
:
sizeof
(
sAWTIconData
)
freeWhenDone
:
NO
];
iconImage
=
[[
NSImage
alloc
]
initWithData
:
iconData
];
[
iconData
release
];
}
}
}
// Set up the dock icon if we have an icon image.
if
(
iconImage
!=
nil
)
{
[
NSApp
setApplicationIconImage
:
iconImage
];
[
NSApp
setApplicationIconImage
:
iconImage
];
[
iconImage
release
];
[
iconImage
release
];
}
}
...
...
src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
0 → 100644
浏览文件 @
3bca7263
文件已添加
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录