Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Installer SFX creation using XSEBuilder"

m (Archive Definition File)
Line 19: Line 19:
 
<destination path="C:\name of archive to create.sfx" cmd="some_native_application.exe some_required_file some_another_argument"/>
 
<destination path="C:\name of archive to create.sfx" cmd="some_native_application.exe some_required_file some_another_argument"/>
 
  </sfxArchive></nowiki></code>
 
  </sfxArchive></nowiki></code>
As you can see, definition consist of two major parts: <tt>source</tt> and <tt>destination</tt>. Every child of <tt>source</tt> node is a description of archive entry: it's type (<tt>'''file'''</tt> or <tt>'''dir'''ectory</tt>), path (<tt>'''path'''</tt> attribute value) and necessity of entry extraction before starting autorun application(value of '''unpack''' attribute). The <tt>'''source'''</tt> element must have attribute <tt>'''path'''</tt>, which is path to folder, where files and directories, listed in sub elements, are located. So it's exactly the same as 1st argument to [[Installer SFX creation#Arguments|XSEComiler]].  
+
As you can see, definition consist of two major parts: <tt>source</tt> and <tt>destination</tt>. Every sub element of <tt>source</tt> element is a description of archive entry: it's type (<tt>'''file'''</tt> or <tt>'''dir'''ectory</tt>), path (<tt>'''path'''</tt> attribute value) and necessity of entry extraction before starting autorun application(value of '''unpack''' attribute). The <tt>'''source'''</tt> element must have attribute <tt>'''path'''</tt>, which is path to folder, where files and directories, listed in sub elements, are located. So it's exactly the same as 1st argument to [[Installer SFX creation#Arguments|XSEComiler]].  
 
<tt>destination</tt> element describes name of produced archive/sfx module(value of <tt>'''path'''</tt> attribute) and autorun command with arguments (value of <tt>'''cmd'''</tt> attribute). Name of output file can be overriden (we will cover this later). Please note, that autorun application, "some_native_application.exe", is not in list of source files and directories. XSEBuilder will automatically include autorun application to source list, and mark it as required.<br>While you can make archive definition files manually we strongly advice to use GUI (link needed!).
 
<tt>destination</tt> element describes name of produced archive/sfx module(value of <tt>'''path'''</tt> attribute) and autorun command with arguments (value of <tt>'''cmd'''</tt> attribute). Name of output file can be overriden (we will cover this later). Please note, that autorun application, "some_native_application.exe", is not in list of source files and directories. XSEBuilder will automatically include autorun application to source list, and mark it as required.<br>While you can make archive definition files manually we strongly advice to use GUI (link needed!).
 +
 
===Producing Archives and SFX modules===
 
===Producing Archives and SFX modules===
 
To produce archive, below arguments should be passed to XSEBuilder:
 
To produce archive, below arguments should be passed to XSEBuilder:

Revision as of 06:16, 14 June 2007

This document describes creation of SFX archives using XSEBuilder and archive definition files. While you still can use old technique, which described in Installer SFX creation, we strongly recommend to use XSEBuilder - it's much easier and convenient way.

Overview

Creation of sfx archive are consist of two steps: Creating SFX Archive Definition File and passing it with some arguments to the builder. This document covers the latter.

Using XSEBuilder

Where to get and requirements

XSEBuilder itself can be downloaded from CVS repository at dev.eclipse.org (module /cvsroot/technology/org.eclipse.epp/plugins/org.eclipse.epp.sfx.tools). It requires this Java projects : org.eclipse.epp.sfx.archive and org.eclipse.epp.installer.core. They are located in same repository.

Archive Definition File

Archive Definition File is an XML file with structure like in example below:

<?xml version="1.0" encoding="UTF-8"?>
 <?sfx version="1.0"?>

 <sfxArchive>
	 <source path="C:\Folder_with_content">
		<dir path="required_directory" unpack="true"/>
		<file path="some_not_required_file"/>
                <file path="another_not_required_file" unpack="anything, but not true"/>
		<file path="required_file" unpack="true"/>
	</source>
	 <destination path="C:\name of archive to create.sfx" cmd="some_native_application.exe some_required_file some_another_argument"/>
 </sfxArchive>

As you can see, definition consist of two major parts: source and destination. Every sub element of source element is a description of archive entry: it's type (file or directory), path (path attribute value) and necessity of entry extraction before starting autorun application(value of unpack attribute). The source element must have attribute path, which is path to folder, where files and directories, listed in sub elements, are located. So it's exactly the same as 1st argument to XSEComiler. destination element describes name of produced archive/sfx module(value of path attribute) and autorun command with arguments (value of cmd attribute). Name of output file can be overriden (we will cover this later). Please note, that autorun application, "some_native_application.exe", is not in list of source files and directories. XSEBuilder will automatically include autorun application to source list, and mark it as required.
While you can make archive definition files manually we strongly advice to use GUI (link needed!).

Producing Archives and SFX modules

To produce archive, below arguments should be passed to XSEBuilder:

sfx path_to_archive_definition_file path_to_launchers_directory

Where:

  1. argument, "sfx" tells builder that we want only SFX archive
  2. argument, "path_to_archive_definition_file" is a path to file with definition of archive.
  3. argument, "path_to_launchers_directory" is a path to folder, where template launchers are located. Typically it's "PATH_TO_YOUR_WORKSPACE_HERE\org.eclipse.epp.sfx.tools\templates".
  4. argument is optional and not included in example above. That is path to output file. By passing this argument you override path, specified in definition file.

To produce self-extracting module, pass this arguments to the builder:

exe path_to_archive_definition_file path_to_launchers_directory

As you can see, arguments differs from previous only in first argument. "'exe" keyword tells XSEBuilder that we want produce an Windows self-extracting module. When XSEBuilder met exe keyword, it compiles new archive and links it with native launcher (it looks for "extractor.exe" in "path_to_launchers_directory\win32.x86\" folder). Like in previous case, you may pass additional argument - name of output file. But unlike the case, if you don't, XSEBuilder will name resulting file "destination_path_in_definition_file" + ".exe". E.g. if destination path was "c:\my_archive.sfx", self-extracting module will be named "c:\my_archive.sfx.exe".

Back to the top