2. 목 차
Making the application updateable
Feature / Product setup
배포
참고자료
이 PPT는
http://www.ralfebert.de/blog/eclipsercp/p2_upd
ates_tutorial_36/
를 요약 하였습니다.
3. Making the application updateable
Creating the example project
Create a new plug-in project com.example.mail
Download org.eclipselabs.p2.rcpupdate
File -> Import -> Existing Projects
Create a new menu
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="menu:help">
<command commandId="org.eclipselabs.p2.rcpupdate.install" style="push"/>
<command commandId="org.eclipselabs.p2.rcpupdate.update" style="push"/>
</menuContribution>
</extension>
Add a package import to
org.eclipselabs.p2.rcpupdate.utils
4. Making the application updateable
Application startup by calling P2Util
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
// ...
@Override
public void preStartup() {
P2Util.checkForUpdates();
}
}
5. Feature / Product setup
P2 will only install features.
Make a feature project.
com.example.mail.app
Referenced a main plugins
com.example.mail
Add org.eclipse.rcp and org.eclipselabs.p2.rcpupdate to the list of
included features
6. Feature / Product setup
Create a new product
mail.product
File -> New
-> Plug-in Development
-> Product configuration
Open a mail.product
Check version number like ‘1.0.0.qualifier’
7. Feature / Product setup
Add the feature com.example.mail.app
Product dependencies and
delete the version number
(Properties…)
Create a p2.inf file
instructions.configure=
addRepository(type:0,location:file${#58}/c:/export/repository/);
addRepository(type:1,location:file${#58}/c:/export/repository/);
instructions.configure=
addRepository(type:0,location:http${#58}//localhost:1234/repository/);
addRepository(type:1,location:http${#58}//localhost:1234/repository/);
* plugin.xml에 Build tab에 p2.inf를 선택합니다.
8. Feature / Product setup
Launch the product from the product
configuration
Check that the application
여기서는 단지 메뉴가 정상적으로
있는 지만 확인합니다.
(실제 동작하지 않습니다)