Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify name of OSX application file for Eclipse RCP app

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?

like image 710
Mark Phippard Avatar asked Sep 22 '16 12:09

Mark Phippard


1 Answers

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>
like image 125
Mark Phippard Avatar answered Nov 12 '22 18:11

Mark Phippard