简体   繁体   English

获取Eclipse RCP Mac应用程序以显示初始屏幕

[英]Getting an Eclipse RCP Mac application to show splash screen

I've tried everything, spent hours on this, created rcp example projects from eclipse downloaded for mac and selected show splash and for the life of me I cannot get my splash screen to show up. 我已经尝试了所有方法,花了数小时,从eclipse创建了rcp示例项目,并下载了mac版,并选择了show splash,但对于我来说,我无法显示我的启动画面。 I've tried the following: 我尝试了以下方法:

  1. In product definition select the plugin that contains splash.bmp in root 在产品定义中,选择根目录中包含splash.bmp的插件
  2. Added show splash in plugin_customization.ini 在plugin_customization.ini中添加了显示飞溅
  3. Tried to use the default eclipse splash.bmp to ensure my bmp file is not corrupted. 尝试使用默认的eclipse splash.bmp以确保我的bmp文件没有损坏。

Its frustrating that the eclipse rcp wizard when selecting show splash screen does not work out of the box and really need this for my release, any help would be appreciated. 令人沮丧的是,在选择显示初始屏幕时,eclipse rcp向导无法立即使用,我的发行版确实需要此功能,我们将不胜感激。 I have literally searched all of google. 我从字面上搜索了所有的谷歌。

By default, the splash screen is made visible by the executable even before the Java VM is started ( here is the C code for macOS that does this ). 默认情况下,即使在启动Java VM之前,可执行文件也会使启动屏幕可见这是执行此操作的macOS的C代码 )。

If you bypass the executable by calling directly Java ( java -jar plugins/org.eclipse.equinox.launcher_... ), you have to use the command line argument -showSplash <path-to-splash.bmp> (either with an absolute path starting with / or a releative path relative to your current working directory). 如果您通过直接调用Javajava -jar plugins/org.eclipse.equinox.launcher_... )来绕过可执行文件,则必须使用命令行参数-showSplash <path-to-splash.bmp> (以/开头的绝对路径,或相对于当前工作目录的相对路径)。 By bypassing the executable, also <executable>.ini is not read and all arguments must be specified on the command line instead. 通过绕过可执行文件,也不会读取<executable>.ini ,而必须在命令行上指定所有参数。

If using the executable , the splash screen location is specified in the config.ini ( osgi.splashPath=platform\\:/base/plugins/<plugin_containing_splash.bmp> ). 如果使用可执行文件 ,则在config.ini指定初始屏幕位置osgi.splashPath=platform\\:/base/plugins/<plugin_containing_splash.bmp> )。 In plugin_customization.ini it can be specified whether a progress bar is displayed at a later time during startup ( org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true ). plugin_customization.ini ,可以指定是否在启动过程中稍后显示进度条( org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true )。

Make also sure the splash screen BMP is in 24-bit format (8R, 8G, 8B) . 还要确保初始屏幕BMP为24位格式(8R,8G,8B) Otherwise, the splash screen will not be displayed or with the wrong colors. 否则,将不会显示初始屏幕或颜色错误。

Since Eclipse itself is also an RCP application, you can see how Eclipse does it and experiment with it, eg trying to start the Eclipse IDE via java ... and showing a different splash screen ( "MONKEY SEE/MONKEY DO RULE - Always start by copying the structure of a similiar plug-in" ). 由于Eclipse本身也是RCP应用程序,因此您可以看到Eclipse的工作方式并对其进行试验,例如,尝试通过java ...启动Eclipse IDE java ...并显示不同的启动屏幕( “ MONKEY SEE / MONKEY DO RULE-始终启动通过复制类似插件的结构” )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM