[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Re: Encountered several problems with self-provisioning RCP application

Hi Pascal,

Thank you so much for the explanation. I believe that I've moved more closer to making it. Before getting your email, I found the following classes with Profile:

The class: SimpleProfileRegistry
The method: ProvisioningUtil.addProfile(...)
The method: ProvSDKUIActivator.getSelfProfileId(),

What I did so far:
1. The null profile issue when launching from IDE is fixed by setting ProvSDKUIActivator.ANY_PROFILE = true.
2. Modified org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer to turn on Automatic Update, check update on startup, and download directly.
3. Add a menu command to open Preferences dialog. It is used to check if the Automatic settings are right.

After reading your email, I checked my installation and p2 command. The maildemo application was exported with metadata in the folder c:/test/p2-maildemo/.

c:/test/p2-maildemo/eclipse  ----------- the RCP product build
c:/test/p2-maildemo/repository -------- the repository   

Here is my p2 director command:

eclipse.exe -application org.eclipse.equinox.p2.director.app.application -metadataRepository file:c:/test/p2-maildemo/repository -artifactRepository file:c:/test/p2-maildemo/repository -installIU p2_maildemo.product -version 1.0.0 -destination c:/test/p2-maildemo-install -profile MaildemoProfile -bundlepool c:/test/p2-maildemo-install -profileProperties org.eclipse.update.install.features=true -p2.os win32 -p2.ws win32 -p2.arch x86 -roaming -consoleLog -Declipse.p2.data.area=c:/testp2-maildemo-install/p2


Okay, so far so good! I am very happy now, because I have been much closer. Since it's too late, I gonna resume my work next Monday. In the meanwhile, here is my plan next week. Please feel free to comment when you have time next week. I wish to add a detailed wiki page when I really make it works finally:

1. Configure Software Update repository list in code, to have our repository URL pre-loaded in the list.
  I can added the repository myself, and do update manually so far. The automatic update doesn't happen right now, because it has no idea where the repository is located. Next I need to figure out how to preload the link.

2. Test it. Oops.... Until now, I reliaze that it's a two-step plan.

Thank you so much Pascal! Your presentation on p2 is also very helpful! Have a nice weekend!

Best Regards,
Frank




On Fri, Nov 21, 2008 at 10:21 PM, Pascal Rapicault <Pascal_Rapicault@xxxxxxxxxx> wrote:

Profiles are held in a profile registry. A profile registry can contain several profiles potentially representing completely different instances of eclipse (1). The list of profiles in a registry can be obtained from the IProfileRegistry.getProfiles(). When an instance of eclipse runs, it has access to a profile registry, however it needs to be told who it is (its profile ID) and set itself as the default profile (aka self profile). The communication of its identity to an eclipse instance is done through the eclipse.p2.profile property (see config.ini).
Profiles result from a p2 installation, they are the p2 representation of what makes your application (see http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html)

If you are launching your app from within your IDE, the fact that you don't have a profile (or this profile is not filled) is a known tooling issue (not a trivial one) and it may be addressed in 3.5.
If you are seeing this pb while running your app once deployed, it is because the application you are running has *not* been installed using p2 and therefore you don't have a corresponding profile.

HTH

PaScaL

Inactive hide details for "Frank Du" ---20/11/2008 04:21:53 PM---Well, I went back to a previous reply by Susan at http://dev.e"Frank Du" ---20/11/2008 04:21:53 PM---Well, I went back to a previous reply by Susan at http://dev.eclipse.org/mhonarc/lists/p2-dev/msg004


From:

"Frank Du" <du.qixing@xxxxxxxxx>

To:

"P2 developer discussions" <p2-dev@xxxxxxxxxxx>

Date:

20/11/2008 04:21 PM

Subject:

[p2-dev] Re: Encountered several problems with self-provisioning RCP application




Well, I went back to a previous reply by Susan at http://dev.eclipse.org/mhonarc/lists/p2-dev/msg00447.html. After carefully review it, I imported org.eclipse.equinox.p2.ui.sdk as Source Project, and added it to launcher. Then debug the code, and found that the error message is caused by a null profile Id at:

class: org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler
method: execute
line: profileId = ProvSDKUIActivator.getSelfProfileId();

The variable profileId is null. So I fake one 'p2-maildemo-profile', lol...

Now the "Software Updates and Add-ons" dialog can show up. However, the Installed Software list is empty. I added the local repository. Tried to do the update. Another error message appeared, claiming: Profile id p2-maildemo-profile is not registered. The complaint is fair enough, since I faked it.

Now my question changes to: Where could I find all the registered profile ids? Or how could I register one for my RCP application? Thanks so much in adavance!

Best Regards,
Frank Du




On Wed, Nov 19, 2008 at 10:25 PM, Frank Du <du.qixing@xxxxxxxxx> wrote:
    Hey all,

    I am exploring self-provisioning RCP application. I followed the steps in Kai's blog, and encountered several problems. Please help to check how I could make it works:

    http://toedter.com/blog/?p=27

    1. At step 7, when I click Help -> Software Update menu, it says 'Cannot launch the Update UI. This installation has not been configured properly for Software Updates.' It happens when being launched from eclipse. Nothing happens with an exported build. Is there any configuration that I missed? How to configure it?

    2. At step 11, I can't do it since Software Update menu does not work.

    3. Then I clicked the menu Help -> About RCP Product -> Plug-in Details. In the plug-in list, the RCP is updated to new version
    1.0.1. However, its icon is broken. Does it mean that the update is broken?

    Thanks so much for the help in advance! Have a nice day!

    --
    Best Regards,

    Frank Du



--
Best Regards,
Frank Du
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev



_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev




--
Best Regards,
Frank Du

GIF image

GIF image