【问题标题】:Netbeans Plattform - Branding doesn't work on created installerNetbeans 平台 - 品牌不适用于创建的安装程序
【发布时间】:2015-01-05 23:29:04
【问题描述】:

我创建了一个 netbeans 平台应用程序。我使用品牌功能添加更改应用程序的窗口标题和启动画面。如果我直接使用 IDE 中的运行按钮启动应用程序,则品牌可以正常工作。但是,如果我为 Windows 创建一个安装程序并安装该应用程序,那么品牌就不再起作用了。

如果我启动已安装的应用程序,我会看到默认启动屏幕,并且应用程序标题更改为“Netbeans 平台应用程序”。

需要在安装程序中添加品牌吗?

(我用的是 netbeans 8.0.2)

【问题讨论】:

    标签: java netbeans netbeans-platform


    【解决方案1】:

    我在 Netbeans 7.4 下也遇到了同样的问题,解决方案应该也适用于 netbeans 8 及更高版本。 基本上,当您从 IDE 运行应用程序时,它会从您的文件夹结构中获取品牌信息。但是,当您在 IDE 之外运行它时,它会专门寻找品牌参数。当它找不到时,它会提供 netbeans 的默认品牌(启动画面等)。解决方案是 - 您必须提供额外的品牌参数作为启动参数。

    我的项目是一个 Netbeans Maven 项目。我创建了一个额外的配置文件,将其添加到 pom 文件中,如下所示-

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>nbm-maven-plugin</artifactId>       
                <configuration>
                <etcConfFile>${basedir}/installer/my.conf</etcConfFile>
                </configuration>
       </plugin>
        </plugins>
    </build>
    

    现在在 my.conf 文件中,只需添加您的品牌集群-

    default_options=" --branding your_branding_cluster "
    

    希望对您有所帮助。

    【讨论】:

    • 我没有使用maven。但是我已经使用了一个配置文件“projectname.conf”,我在其中定义了 jdkhome 和 default_userdir 我可以使用这个配置文件吗?我如何知道品牌集群的名称?
    • 嗨,Markus,很抱歉这么晚才回复您。无论如何,是的,您可以使用相同的 projectname.conf 文件。品牌集群也称为品牌令牌。可能您正在使用 ant build。您可以在platform.propertiesbranding.token=your_branding_tokenbranding.token=your_branding_token的项目结构下找到您的品牌令牌
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多