Jump to: navigation, search

Eclipse RCP Installer/Packages Generator

First draft of Eclipse Installers Wizard.

This is the first draft of the design, we are still working on it and we are (hopefully) making progress every day, which may not be reflected on this document. Feel free to comment, though.


How does eclipse installer wizard works?

First the user runs the wizard: a window with operating systems between the user can choose to generate the installers/packages appears. Then the user selects the desired options and presses next.

The following window that appears allows the user to choose the deployment type he wants (ftp,folder,cvs), then user presses next again.

In the next window the user must type the ftp/cvs location with the parameters (login/pass, anonymous, cvs type), or select with a file chooser the folder where he wants to export the packages (if the user have decided to export packages to a folder). It's obvious that the window provide the elements (widgets) to fill based in the option selected in the previous step.

At this moment, when the user pushes next, the building process starts. I have found two ways to implement the building:

1.Create an ant task that generates the build.xml and run the pde build inside the ant task. Like François explains in one document.

or

2.PDE call to generate the build, I think this is similar a the Create Ant Build File menu option that appears right clicking plugin.xml and selecting PDE Tools.

The build(s) will be placed in a temporal folder, I assume (but I'm not sure) that a build is generated for each architecture and every build is placed in the temporal folder obviogusly with a different name.

It's evident that no matter the method I choose I have to ensure that every architecture specified in the first step of the wizard is being built.

Then, bassed on the information provided in the wizard, plugin.properties and manifest.mf (I have to check out what I do exactly need) packaging process is run. I have two choices too.

1. Use ant templates, one for each operating system (windows, mac, linux) for the packaging/installer part and fill the necesary data (os, window system, destination folder, etc.) on the scripts. And run the ant scripts.

Question: Can I run ant scripts from inside Eclipse without having to call command line programs? If is this the case, what is the plugin that allows me to do that, PDE? Question: Can I use NSIS (not Eclipse NSIS) as a command line tool?

I believe this method is only valid to every platform if I can have command line tools for the platform. That means: NSIS and hdiutil for Windows, Mac and Linux. This not look feasible.

Also I can run shell scripts / batch processes to do this task, but this is not elegant, also depends on the platform.

or

2. Create the packages/installers in pure Java. Think EclpseNSIS and a new Java plugin that functions exactly as hdiutil. For the Linux part I have to make some packign utilities that build rpm and deb. packages.


Finally the plugin moves the scripts to the specified folder or tries to upload to ftp or add to cvs. Here I have the same problem again.

1. The Ant Way: does ant provide ftp and cvs support?, I'm inclined to think so, but not sure. Does Ant provide it through ftp and cvs command line tools?

Or we can resolve this part with more shell scripting, and batch processing in windows environments. Looks uglier here than in previous section.

2. The Java Way: using classes to copy files, sure there is some eclipse plugins that provide ftp and cvs support, so it could not be difficult to use them to provide the features we want.

The Cross Platform Issue.

I think the biggest problem for the moment is building packages/installers for different operating systems that the one in which the application is being developed. We rely on hdiutil in order to build Mac OS X .dmg installers, and NSIS installers for Windows.

The Windows installer problem could be solved using Eclipse NSIS plugin but Françoise said that it's difficult to run it outside Windows. ¿Any other options?.

Do I have to create a substitute for hdiutil in order to have packaging for Mac OS in Linux and Windows? If I have to sure it will be an Eclipse plugin.

For the Linux part, It is obvious that I have to write an Eclipse plugin that provides .deb and .rpm packaging funcionality.

I prefer to skip using shell scripting solutions because I think it is not elegant and also platform dependent.

My proposal.

It seems that there is two clear paths on making eclipse installer wizard.

Sticking the most to the platform: Advantages: easier and faster to achieve the goals. Problems: we can't provide full cross-platform funcionality.

The Java Way Advantages: Fully cross platform funcionality. Elegant design. Problems: A lot of work to do, problems hard to circunvent.

I think The Java Way is best choice, but I am not sure if I will have enough time to get the work done in time. Maybe we can find some intermediate solution, what are your thoughts and your requirements about this. Perhaps the first approach is enough.