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

Difference between revisions of "EPP/Obsolete/Installer SFX creation"

< EPP
(Compilation)
m (Jonah.kichwacoders.com moved page Installer SFX creation to EPP/Obsolete/Installer SFX creation: Obsolete)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{warning|Note: The contents of this page is obsolete, but it may still contain some interesting tid-bits.}}
 +
 +
[[Category:EPP:Obsolete]]
 
This document describes creation of self-extracting installations, based on EPP(http://www.eclipse.org/epp/).
 
This document describes creation of self-extracting installations, based on EPP(http://www.eclipse.org/epp/).
  
Line 7: Line 10:
 
== Preparing Content ==
 
== Preparing Content ==
 
Create temporary folder, for example "<tt>c:\Temp</tt>".
 
Create temporary folder, for example "<tt>c:\Temp</tt>".
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 they are "<tt>eclipse</tt>" and "<tt>installer</tt>" folders respectively. So, our temporary folder consists of this elements: "<tt>c:\Temp\eclipse</tt>" and "<tt>c:\Temp\installer</tt>"  
+
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 they are "<tt>eclipse</tt>" and "<tt>installer</tt>" folders respectively. So, our temporary folder consists of this elements: "<tt>c:\Temp\eclipse</tt>" and "<tt>c:\Temp\installer</tt>"<br>
'''NOTE:''' Temporary folder itself will not be included in resulting archive, i.e. files and directories will be stored in relative path.
+
'''NOTE:''' Temporary folder itself will not be included in resulting archive, i.e. files and directories will be stored in relative path. In our case archive will contain folders "eclipse" and "installer".
  
 
== Compilation ==
 
== Compilation ==
Compilation requires compiler, which is Java class with name "<tt>org.eclipse.epp.sfx.builder.XSECompiler</tt>". It is console application, that  requires at least 5 arguments (It prints help if executed without args):
+
Compiler is an Java console application with main class name "<tt>org.eclipse.epp.sfx.builder.XSECompiler</tt>". It requires at least 5 arguments (It prints help if executed with lesser number of arguments):
  
 
=== Arguments ===
 
=== Arguments ===
  
# Path to archive content folder
+
# Path to archive content folder.
# Type of autorun application (application what will be executed after extraction of required files): native("<tt>native</tt>" argument), Java console application("<tt>jconsole</tt>" argument) , Java windowed application("<tt>jwindow</tt>" argument) .
+
# Type of autorun application (application what will be executed after extraction of required files): native("<tt>native</tt>" argument), Java console application("<tt>jconsole</tt>" argument) , Java windowed application("<tt>jwindow</tt>" argument).
# Path to autorun
+
# Path to autorun.
 
# Arguments to be passed to autorun. Note, that  string "<tt>'''$#launcher#'''</tt>" (without quotes) will be replaced by launcher with it's full name.
 
# Arguments to be passed to autorun. Note, that  string "<tt>'''$#launcher#'''</tt>" (without quotes) will be replaced by launcher with it's full name.
# path to resulting archive file. Please note, that if file already exists it'll be overwritten without prompt.
+
# Path to resulting archive file. Please note, that if file already exists it'll be overwritten without prompt.
# list of files what must be extracted by launcher prior to execution of autorun.
+
# 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.<br>
'''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.<br>
 
+
'''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 <tt>XSECompiler</tt> would be like this:
 
'''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 <tt>XSECompiler</tt> would be like this:
 
 
  <code>C:\Temp native C:\Temp\install\eclipse.exe "-vmargs -Dinstaller.jar.path='''$#launcher#'''" C:\eclipse-archive.sfx</code>
 
  <code>C:\Temp native C:\Temp\install\eclipse.exe "-vmargs -Dinstaller.jar.path='''$#launcher#'''" C:\eclipse-archive.sfx</code>
 
 
'''NOTE:''' If you don't need to pass any arguments to installer, you still must pass an stub. In our example it would be:
 
'''NOTE:''' If you don't need to pass any arguments to installer, you still must pass an stub. In our example it would be:
 
 
  <code>C:\Temp native C:\Temp\install\eclipse.exe '''""''' C:\eclipse-archive.sfx</code>
 
  <code>C:\Temp native C:\Temp\install\eclipse.exe '''""''' C:\eclipse-archive.sfx</code>
 
+
Empty quoted string is a signal to compiler, that no arguments required by autorun executable.<br>
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 only to be extracted before autorun started, so we pass this arguments(line brakes added for readability, omit them if you want copy-paste arguments):
 
+
In our example, we want all contents of installer folder only to be extracted before autorun started, so we pass this arguments:
+
 
+
 
  <code>C:\Temp native C:\Temp\install\eclipse.exe "-vmargs -Dinstaller.jar.path=$#launcher#" C:\eclipse-archive.sfx
 
  <code>C:\Temp native C:\Temp\install\eclipse.exe "-vmargs -Dinstaller.jar.path=$#launcher#" C:\eclipse-archive.sfx
 
  C:\Temp\install\configuration\config.ini
 
  C:\Temp\install\configuration\config.ini
Line 78: Line 72:
 
== Linking ==
 
== Linking ==
 
For this we need launcher, it's "<tt>/org.eclipse.epp.sfx.tools/templates/win32.x86/extractor.exe</tt>" file.
 
For this we need launcher, it's "<tt>/org.eclipse.epp.sfx.tools/templates/win32.x86/extractor.exe</tt>" file.
To produce executable we must pass following args to the linker (it's Java console application, main class name is "<code>org.eclipse.epp.sfx.builder.XSELinker</code>"):
+
To link archive with launcher we must provide following arguments to the linker (it's Java console application, main class name is "<code>org.eclipse.epp.sfx.builder.XSELinker</code>"):
 
+
 
  <code>file "D:\EPP workspace\org.eclipse.epp.sfx.tools\templates\win32.x86\extractor.exe" c:\eclipse-archive.sfx c:\install.exe</code>
 
  <code>file "D:\EPP workspace\org.eclipse.epp.sfx.tools\templates\win32.x86\extractor.exe" c:\eclipse-archive.sfx c:\install.exe</code>
 
 
Where:
 
Where:
# argument, "<tt>file</tt>", reserved for future use. Currently must be "<tt>file</tt>" (in future it will be support for "<tt>msi</tt>", "<tt>deb</tt>", "<tt>rpm</tt>" etc)
+
#argument, "<tt>file</tt>", reserved for future use. Currently must be "<tt>file</tt>" (in future it will be support for "<tt>msi</tt>", "<tt>deb</tt>", "<tt>rpm</tt>" etc)
# argument, "<tt>"D:\EPP workspace\org.eclipse.epp.sfx.tools\templates\win32.x86\extractor.exe"</tt>", is a path to native launcher.
+
#argument, "<tt>"D:\EPP workspace\org.eclipse.epp.sfx.tools\templates\win32.x86\extractor.exe"</tt>", is a path to native launcher.
# argument, "<tt>c:\eclipse-archive.sfx</tt>", is a path to archive file, produced by <tt>XSECompiler</tt>.
+
#argument, "<tt>c:\eclipse-archive.sfx</tt>", is a path to archive file, produced by <tt>XSECompiler</tt>.
# argument, "<tt>c:\install.exe</tt>", is a full name for resulting self extracting installation.
+
#argument, "<tt>c:\install.exe</tt>", is a full name for resulting self extracting installation.
  
 
Done, we have an Eclipse installation for Windows :)
 
Done, we have an Eclipse installation for Windows :)
 +
 +
 +
[[Category:EPP]]

Latest revision as of 21:40, 6 May 2021

Warning2.png
Note: The contents of this page is obsolete, but it may still contain some interesting tid-bits.

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 stages below.

Preparing Content

Create temporary folder, for example "c:\Temp". 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 they are "eclipse" and "installer" folders respectively. So, our temporary folder consists of this elements: "c:\Temp\eclipse" and "c:\Temp\installer"
NOTE: Temporary folder itself will not be included in resulting archive, i.e. files and directories will be stored in relative path. In our case archive will contain folders "eclipse" and "installer".

Compilation

Compiler is an Java console application with main class name "org.eclipse.epp.sfx.builder.XSECompiler". It requires at least 5 arguments (It prints help if executed with lesser number of arguments):

Arguments

  1. Path to archive content folder.
  2. Type of autorun application (application what will be executed after extraction of required files): native("native" argument), Java console application("jconsole" argument) , Java windowed application("jwindow" argument).
  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. 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:\Temp native C:\Temp\install\eclipse.exe "-vmargs -Dinstaller.jar.path=$#launcher#" C:\eclipse-archive.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:\Temp native C:\Temp\install\eclipse.exe "" C:\eclipse-archive.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 only to be extracted before autorun started, so we pass this arguments(line brakes added for readability, omit them if you want copy-paste arguments):

C:\Temp native C:\Temp\install\eclipse.exe "-vmargs -Dinstaller.jar.path=$#launcher#" C:\eclipse-archive.sfx
C:\Temp\install\configuration\config.ini
C:\Temp\install\.eclipseproduct
C:\Temp\install\eclipse.exe
C:\Temp\install\plugins\org.eclipse.core.commands_3.3.0.I20070502-1300a.jar
C:\Temp\install\plugins\org.eclipse.core.contenttype_3.2.100.v20070319.jar
C:\Temp\install\plugins\org.eclipse.core.jobs_3.3.0.v20070423.jar
C:\Temp\install\plugins\org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar
C:\Temp\install\plugins\org.eclipse.core.runtime_3.3.100.v20070409.jar
C:\Temp\install\plugins\org.eclipse.epp.installer.core.win32_0.5.0.jar
C:\Temp\install\plugins\org.eclipse.epp.installer.core_0.5.0.jar
C:\Temp\install\plugins\org.eclipse.epp.installer.europa_0.5.0.jar
C:\Temp\install\plugins\org.eclipse.epp.installer.ui_0.5.0.jar
C:\Temp\install\plugins\org.eclipse.epp.sfx.archive_0.5.0.jar
C:\Temp\install\plugins\org.eclipse.equinox.app_1.0.0.v20070423.jar
C:\Temp\install\plugins\org.eclipse.equinox.common_3.3.0.v20070426.jar
C:\Temp\install\plugins\org.eclipse.equinox.launcher_1.0.0.v20070502.jar
C:\Temp\install\plugins\org.eclipse.equinox.preferences_3.2.100.v20070409.jar
C:\Temp\install\plugins\org.eclipse.equinox.registry_3.3.0.v20070416.jar
C:\Temp\install\plugins\org.eclipse.jface_3.3.0.I20070503-0010.jar
C:\Temp\install\plugins\org.eclipse.osgi_3.3.0.v20070430.jar
C:\Temp\install\plugins\org.eclipse.swt.win32.win32.x86_3.3.0.v3339.jar
C:\Temp\install\plugins\org.eclipse.swt_3.3.0.v3339b.jar
C:\Temp\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\META-INF\eclipse.inf
C:\Temp\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\META-INF\MANIFEST.MF
C:\Temp\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\META-INF\ECLIPSE.RSA
C:\Temp\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\META-INF\ECLIPSE.SF
C:\Temp\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\about.html
C:\Temp\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\runtime_registry_compatibility.jar
C:\Temp\install\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316\fragment.properties
C:\Temp\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\META-INF\eclipse.inf
C:\Temp\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\META-INF\MANIFEST.MF
C:\Temp\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\META-INF\ECLIPSE.RSA
C:\Temp\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\META-INF\ECLIPSE.SF
C:\Temp\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\eclipse_1013.dll
C:\Temp\install\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070426\about.html
C:\Temp\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 link archive with launcher we must provide following arguments to the linker (it's Java console application, main class name is "org.eclipse.epp.sfx.builder.XSELinker"):

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

Where:

  1. argument, "file", reserved for future use. Currently must be "file" (in future it will be support for "msi", "deb", "rpm" etc)
  2. argument, ""D:\EPP workspace\org.eclipse.epp.sfx.tools\templates\win32.x86\extractor.exe"", is a path to native launcher.
  3. argument, "c:\eclipse-archive.sfx", is a path to archive file, produced by XSECompiler.
  4. 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