Eclipse RCP 제품 파일 - 플랫폼별 종속성이 있는 여러 플랫폼을 처리하는 방법 (Eclipse RCP Product File - how to handle multiple platforms with platform specific dependencies)


문제 설명

Eclipse RCP 제품 파일 ‑ 플랫폼별 종속성이 있는 여러 플랫폼을 처리하는 방법 (Eclipse RCP Product File ‑ how to handle multiple platforms with platform specific dependencies)

.product 파일에 기본 SWT 플러그인에 대한 참조가 포함된 Eclipse RCP 애플리케이션이 있습니다.

6
   <plugins>
      <plugin id="org.eclipse.equinox.launcher.win32.win32.x86_64" fragment="true"/>
      <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
   </plugins>

그러나 다른 플랫폼(예: Mac)에서는 해당 플러그인을 확인할 수 없습니다. . 해당 플러그인의 Mac 버전(예: org.eclipse.swt.cocoa.macosx.x86_64)을 사용하면 모든 것이 잘 작동합니다.

다른 플러그인을 지정하는 방법이 있습니까? 다른 환경이나 더 일반적인 플러그인이 있습니까?

다중 플랫폼 RCP 제품을 배포할 때 상황이 복잡해집니다. 하지만 지금은 최대한 간단하게 만들려고 노력하고 있습니다. 여러 플랫폼의 개발자가 최종 사용자가 아닌 애플리케이션을 시작하고 실행할 수 있도록 합니다.


참조 솔루션

방법 1:

Use a feature based product file rather than plug‑in based.

The feature.xml file defining a feature can specify the OS / GUI / architecture.

This is what the standard Eclipse org.eclipse.e4.rcp feature.xml has for the SWT plug‑in / fragments:

<plugin
      id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64"
      os="macosx"
      ws="cocoa"
      arch="x86_64"
      download‑size="40"
      install‑size="88"
      version="1.1.1100.v20190907‑0426"
      fragment="true"/>

<plugin
      id="org.eclipse.equinox.launcher.gtk.linux.ppc64le"
      os="linux"
      ws="gtk"
      arch="ppc64le"
      download‑size="76"
      install‑size="253"
      version="1.1.1100.v20190907‑0426"
      fragment="true"/>

<plugin
      id="org.eclipse.equinox.launcher.gtk.linux.x86_64"
      os="linux"
      ws="gtk"
      arch="x86_64"
      download‑size="69"
      install‑size="166"
      version="1.1.1100.v20190907‑0426"
      fragment="true"/>

<plugin
      id="org.eclipse.equinox.launcher.win32.win32.x86_64"
      os="win32"
      ws="win32"
      arch="x86_64"
      download‑size="80"
      install‑size="161"
      version="1.1.1100.v20190907‑0426"
      fragment="true"/>

<plugin
      id="org.eclipse.swt"
      download‑size="16"
      install‑size="32"
      version="3.114.0.v20200304‑0601"
      unpack="false"/>

방법 2:

Based on the solution provided by greg‑449, I noticed that you can have multiple contradicting plugins without issue ‑ i.e. both Windows & Mac plugins can be specified and at runtime Eclipse will use whatever it can find.

This means that by specifying both plugins, despite one always being displayed as an error (as it's unresolvable on that platform), it works fine.

(by Jakggreg‑449Jakg)

참조 문서

  1. Eclipse RCP Product File ‑ how to handle multiple platforms with platform specific dependencies (CC BY‑SA 2.5/3.0/4.0)

#equinox #eclipse-plugin #eclipse #eclipse-rcp #swt






관련 질문

Eclipse에서 OSGi 래퍼 번들을 실행할 수 없습니다. .jar은 잘 빌드되고 있지만 파일을 대상/클래스에 복사하려면 어떻게 해야 합니까? (Can't run OSGi wrapper bundle in Eclipse; .jar is building okay, but how do I also copy files into target/classes?)

최대 절전 모드 5.0 + 춘분 4.5.0 및 사용자 정의 UserType (hibernate 5.0 + equinox 4.5.0 and custom UserType)

Domino에 OSGi 서블릿 배치(IBM 프리젠테이션) - 404 오류 (Deploying OSGi Servlet to Domino (IBM presentation) - 404 error)

Java 7을 사용하여 Equinox 3.8.2 프로젝트 컴파일 (Compile Equinox 3.8.2 Project with java 7)

OSGI 애플리케이션에서 EntityManager를 제공하는 모범 사례 (Best practice to provide EntityManager in OSGI applications)

Eclipse RCP 제품 파일 - 플랫폼별 종속성이 있는 여러 플랫폼을 처리하는 방법 (Eclipse RCP Product File - how to handle multiple platforms with platform specific dependencies)

OSGI 번들이 설치 및 시작되었지만 출력이 표시되지 않음 (OSGI Bundle Installed and Started but no visible output)

Jetty 서버의 포트(Equinox OSGi) (Port in Jetty server (Equinox OSGi ))

Equinox에서 Arquillian 실행 (Running Arquillian in Equinox)

OSGi 가져오기 버전 제한을 동적으로 설정하시겠습니까? (Setting OSGi import version restrictions dynamically?)

OSGI의 AspectJ LoadTimeWeaving (AspectJ LoadTimeWeaving on OSGI)

user.home 디렉토리에 쓰지 못하도록 Eclipse 위치를 어떻게 수정합니까? (How modify Eclipse locations to prevent write to user.home directory?)







코멘트