Bug 223727 - Product editor should handle per platform config.ini files
Summary: Product editor should handle per platform config.ini files
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 218878
Blocks: 227589 227590
  Show dependency tree
 
Reported: 2008-03-24 16:57 EDT by DJ Houghton CLA
Modified: 2008-04-17 16:38 EDT (History)
4 users (show)

See Also:


Attachments
org.eclipse.pde.patch (25.55 KB, patch)
2008-04-16 16:43 EDT, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.pde.patch (29.25 KB, patch)
2008-04-17 12:16 EDT, Chris Aniszczyk CLA
no flags Details | Diff
mylyn/context/zip (3.04 KB, application/octet-stream)
2008-04-17 12:16 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2008-03-24 16:57:32 EDT
As per bug 218878, we would like to add the ability to have per-platform config.ini files. Once this support is added to the file formats in the core, we will need to be able to set these properties in the UI's product editor.

It would probably be easiest to have a mechanism to replace the whole file, rather than try and specify per-platform properties and merge the rest of the common contents.
Comment 1 DJ Houghton CLA 2008-03-24 16:58:56 EDT
I should have also added that minimally we should ensure that any changes that we make to the product file by hand, are not lost.
Comment 2 Chris Aniszczyk CLA 2008-03-24 18:00:50 EDT
I assume we want this in M7?
Comment 3 DJ Houghton CLA 2008-04-15 13:53:10 EDT
please
Comment 4 Andrew Niefer CLA 2008-04-15 14:09:06 EDT
note there is a patch on bug 218878
Comment 5 Chris Aniszczyk CLA 2008-04-16 16:43:14 EDT
Created attachment 96340 [details]
org.eclipse.pde.patch

Here is the patch that adds support to the UI and also modifies the model a bit to be more consistent with the other properties and how PDE UI handles things.
Comment 6 Chris Aniszczyk CLA 2008-04-16 16:46:26 EDT
Note, this entails a small change in the .product format. Things look like this now:

   <configIni use="default">
      <solaris>/rcp/configs/solaris/config.ini</solaris>
      <windows>/rcp/configs/win32/config.ini</windows>
   </configIni>
   
platform specific paths go under the configIni property

I'm not releasing a patch until I test things more... as with product things, I have to make sure export and launching are 100%

After this, we can discuss adding "version" to the product editor.
Comment 7 Chris Aniszczyk CLA 2008-04-17 12:16:02 EDT
Created attachment 96460 [details]
org.eclipse.pde.patch

An updated patch.

This patch adds UI support for platform-specific config.ini files. It also adds a backwards compatibilty layer so that if we come across an older product file, we intelligently convert their intentions to the new style. For example, if people had a previous custom config.ini from an older product file, that would be converted to appear on "all platforms." This time, the next time the file is saved, things would be up to date. PDE also modified the way it launches and exports to accomodate platform specific config.ini files while maintaining backwards compatbility.

The format would slightly changed to accomodate PDE UI. I will open bugs against p2/PDE Build
Comment 8 Chris Aniszczyk CLA 2008-04-17 12:16:10 EDT
Created attachment 96461 [details]
mylyn/context/zip
Comment 9 Chris Aniszczyk CLA 2008-04-17 12:17:22 EDT
done.

> 20080417
Comment 10 Andrew Niefer CLA 2008-04-17 13:39:16 EDT
The list of platform in the patch is missing some platforms.  Also I wonder if we can instead use the constants from Platform.OS_*

The notable cases are:
windows -> win32
macos -> macosx

and missing: aix, hpux
Comment 11 Chris Aniszczyk CLA 2008-04-17 14:20:14 EDT
Sure, we can Andrew, but we have never exposed those environments in the product editor. We have traditionally stuck with 4:

windows, mac, solaris, linux

Find me a person building products on hpux and aix ;P

With that said, we should still not override settings if they exist for those platforms. Is that approach fair?
Comment 12 Andrew Niefer CLA 2008-04-17 14:32:05 EDT
thats fine
Comment 13 Chris Aniszczyk CLA 2008-04-17 15:01:54 EDT
done. 

I updated it to use OS constants from org.eclipse.osgi.service.environment.Constants

Please do the same DJ for PDE Build ;)
Comment 14 DJ Houghton CLA 2008-04-17 15:26:17 EDT
Do you mean have the ProductFile class in PDE/Build use the Constants from OSGi instead of from the Platform class? Or something else?
Comment 15 Chris Aniszczyk CLA 2008-04-17 15:37:58 EDT
What's worse, a dep on org.eclipse.osgi or org.eclipse.core.runtime?

Tom, do you have a feeling where we should be going for these constants? Aren't they defined by OSGi somewhere in a framework independent way?
Comment 16 DJ Houghton CLA 2008-04-17 15:59:05 EDT
Changing the code to reference the constants in OSGi is fine, I just wasn't sure if you were asking for something more.
Comment 17 Thomas Watson CLA 2008-04-17 16:28:03 EDT
OSGi does not have a set of constants for operating platforms because the list can change so much that a new spec release would be needed each time a new OS was released.  Instead the values are published at a reference URL at OSGi http://www.osgi.org/Specifications/Reference
Comment 18 Chris Aniszczyk CLA 2008-04-17 16:38:16 EDT
(In reply to comment #17)
> OSGi does not have a set of constants for operating platforms because the list
> can change so much that a new spec release would be needed each time a new OS
> was released.  Instead the values are published at a reference URL at OSGi
> http://www.osgi.org/Specifications/Reference

Well that isn't any fun. Thanks for the response.