Specify name of OSX application file for Eclipse RCP app
Asked Answered
S

1

7

I have an Eclipse RCP application that I have been managing for a few years. I am updating it from Luna to Neon as the base and have updated to Tycho 0.26 in the process.

One of the new features in Eclipse since Luna is that on OSX the application is packaged as a .app with the content inside the app folder. My build process is working, however the resulting application is now named Eclipse.app rather than MyRCP.app. How is this best handled? Do I just rename it after the build or can this be controlled from the Maven/Tycho configuration?

Shanonshanta answered 22/9, 2016 at 12:55 Comment(0)
S
9

Figured it out. Just need to add configuration to the tycho-p2-director-plugin that was in my product pom.xml Here are some snippets from the file:

  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-p2-repository-plugin</artifactId>
    <version>${tycho-version}</version>
    <configuration>
      <includeAllDependencies>true</includeAllDependencies>
      <profileProperties>
        <macosx-bundled>true</macosx-bundled>
      </profileProperties>
    </configuration>
  </plugin>

  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-p2-director-plugin</artifactId>
    <version>${tycho-version}</version>
    <configuration>
        <formats>
            <win32>zip</win32>
            <linux>zip</linux>
            <macosx>zip</macosx>
        </formats>
        <products>
            <product>
                <id>MyProduct</id>
                <rootFolders>
                    <macosx>MyProduct.app</macosx>
                </rootFolders>
            </product>
        </products>
    </configuration>
    <executions>
        <execution>
            <!-- install the product using the p2 director -->
            <id>materialize-products</id>
            <goals>
                <goal>materialize-products</goal>
            </goals>
        </execution>
        <execution>
            <!-- create zip file with the installed product -->
            <id>archive-products</id>
            <goals>
                <goal>archive-products</goal>
            </goals>
        </execution>
    </executions>
  </plugin>
Shanonshanta answered 22/9, 2016 at 17:48 Comment(3)
I have the same issue and I didn't find how to change the name of "Eclipse.app" in the documentation, do you remember ? Instead, I have renamed the folder from my ANT script.Cheslie
I edited my answer to include relevant snippets to the best of my memoryShanonshanta
<rootFolders> <macosx>MyRCPProductName</macosx></rootFolders> did the trick!Berenice

© 2022 - 2024 — McMap. All rights reserved.