Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EPP/Obsolete/Installer SFX creation

This document describes creation of self-extracting installations, based on EPP(http://www.eclipse.org/epp/).

The creation requires three elements: compiler, linker and native launcher. All of them can be retrieved from CVS repository at dev.eclipse.org (module /cvsroot/technology/org.eclipse.epp/plugins/org.eclipse.epp.sfx.tools)

In short, process consist of the folowing stages:

Preparing Content

Create temporary folder, for example c:\1. Put into the folder desired data. For example, if we want create an Eclipse installation, we must put Eclipse itself and installer. Lets take that "eclipse" and "installer" folders respectively. So, our temp folder consist of this elements: c:\1\eclipse c:\1\installer NOTE: Temporary folder itself will not be included in resulting archive, i.e. files and directories will be stored in relative path. That is why we create temporary folder.

Compilation

Compilation requires compiler, which is Java class with name "org.eclipse.epp.sfx.builder.XSECompiler". It requires at least 5 arguments (It prints help if executed without args): 1) Path to archive content folder 2) Type of autorun application (application what will be executed after extraction of required files): native, Java console application , Java windowed application . 3) Path to autorun 4) Arguments to be passed to autorun. Note, that string "$#launcher#" (without quotes) will be replaced by launcher with it's full name. 5) path to resulting archive file. Please note, that if file already exists it'll be overwritten without prompt. 6...N) list of files what must be extracted by launcher prior to execution of autorun. NOTE: when native launcher executed it will extract only files, which names were passed in 6..N arguments. NOTE: make sure that you don't forget to put path to installer autorun file in that list. HOWEVER: if you don't sure what files are required to be extracted before executing installer, simply don't pass any arguments. That is signal to compiler, that ALL content of folder, which path is given in 1st argument are required to be extracted. So if we wanted extraction of all files, arguments for XSECompiler would be like this:

C:\1 native C:\1\install\eclipse.exe "-vmargs -Dinstaller.jar.path=$#launcher#" C:\installt.sfx

NOTE: if you don't need to pass any arguments to installer, you still must pass an stub. In our example it would be:

C:\1 native C:\1\install\eclipse.exe "" C:\installt.sfx

Empty quoted string is a signal to compiler, that no arguments required by autorun executable.

In our example, we want all contents of installer folder to be extracted before autorun started, so we pass this arguments:

C:\1 native C:\1\install\eclipse.exe "-vmargs -Dinstaller.jar.path=$#launcher#" C:\installt.sfx C:\1\install\configuration\config.ini C:\1\install\.eclipseproduct C:\1\install\eclipse.exe C:\1\install\plugins\org.eclipse.core.commands_3.3.0.I20070502-1300a.jar C:\1\install\plugins\org.eclipse.core.contenttype_3.2.100.v20070319.jar C:\1\install\plugins\org.eclipse.core.jobs_3.3.0.v20070423.jar C:\1\install\plugins\org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar C:\1\install\plugins\org.eclipse.core.runtime_3.3.100.v20070409.jar C:\1\install\plugins\org.eclipse.epp.installer.core.win32_0.5.0.jar C:\1\install\plugins\org.eclipse.epp.installer.core_0.5.0.jar C:\1\install\plugins\org.eclipse.epp.installer.europa_0.5.0.jar C:\1\install\plugins\org.eclipse.epp.installer.ui_0.5.0.jar C:\1\install\plugins\org.eclipse.epp.sfx.archive_0.5.0.jar C:\1\install\plugins\org.eclipse.equinox.app_1.0.0.v20070423.jar C:\1\install\plugins\org.eclipse.equinox.common_3.3.0.v20070426.jar C:\1\install\plugins\org.eclipse.equinox.launcher_1.0.0.v20070502.jar C:\1\install\plugins\org.eclipse.equinox.preferences_3.2.100.v20070409.jar C:\1\install\plugins\org.eclipse.equinox.registry_3.3.0.v20070416.jar C:\1\install\plugins\org.eclipse.jface_3.3.0.I20070503-0010.jar C:\1\install\plugins\org.eclipse.osgi_3.3.0.v20070430.jar C:\1\install\plugins\org.eclipse.swt.win32.win32.x86_3.3.0.v3339.jar C:\1\install\plugins\org.eclipse.swt_3.3.0.v3339b.jar C:\1\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\META-INF\eclipse.inf C:\1\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\META-INF\MANIFEST.MF C:\1\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\META-INF\ECLIPSE.RSA C:\1\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\META-INF\ECLIPSE.SF C:\1\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\about.html C:\1\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\runtime_registry_compatibility.jar C:\1\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\fragment.properties C:\1\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\META-INF\eclipse.inf C:\1\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\META-INF\MANIFEST.MF C:\1\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\META-INF\ECLIPSE.RSA C:\1\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\META-INF\ECLIPSE.SF C:\1\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\eclipse_1013.dll C:\1\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\about.html C:\1\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\launcher.win32.win32.x86.properties

Linking

For this we need launcher, it's "/org.eclipse.epp.sfx.tools/templates/win32.x86/extractor.exe" file. To produce executable we must pass following args to the linker (it's Java class with name "org.eclipse.epp.sfx.builder.XSELinker"):

file "D:\EPP workspace\org.eclipse.epp.sfx.tools\templates\win32.x86\extractor.exe" c:\installt.sfx c:\install.exe

Where: 1st argument, "file", reserved for future use. must be "file" 2nd argument, ""D:\EPP workspace\org.eclipse.epp.sfx.tools\templates\win32.x86\extractor.exe"", is a path to native launcher. 3d argument, "c:\installt.sfx", is a path to archive file, produced by XSECompiler. 4th argument, "c:\install.exe", is a full name for resulting self extracting installation.

Done, we have an Eclipse installation for Windows :)

Back to the top