<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Developers, Developers, Developers! &#187; installation</title>
	<atom:link href="http://maksim.sorokin.dk/it/tag/installation/feed/" rel="self" type="application/rss+xml" />
	<link>http://maksim.sorokin.dk/it</link>
	<description>Maksim Sorokin IT Blog</description>
	<lastBuildDate>Sun, 05 Feb 2012 19:37:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Building IzPack installers on the fly</title>
		<link>http://maksim.sorokin.dk/it/2011/03/31/building-izpack-installers-on-the-fly/</link>
		<comments>http://maksim.sorokin.dk/it/2011/03/31/building-izpack-installers-on-the-fly/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 16:59:24 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[installers]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=685</guid>
		<description><![CDATA[One can grab ideas on how to build IzPack installers on the fly from izpack-maven-plugin. You will of course need to depend on IzPack standalone compiler. Basically, what do you need to do is to have some directory for staging. This is useful, when you want to run some filtering or putting some additional resources [...]]]></description>
			<content:encoded><![CDATA[<p>One can grab ideas on how to build IzPack installers on the fly from <a href="http://izpack.codehaus.org/izpack-maven-plugin/">izpack-maven-plugin</a>.</p>
<p>You will of course need to depend on IzPack standalone compiler.</p>
<p>Basically, what do you need to do is to have some directory for staging. This is useful, when you want to run some filtering or putting some additional resources from somewhere else to the installer. You can use %TEMP% directory (<code>File.createTempFile(...)</code>) for that. Do not forget to wipe it afterwards!<br />
When you have all your installer resources in some staging directory and you know the direct path to your <code>install.xml</code> you are ready to build a installer:</p>
<pre class="brush: java; title: ;">
CompilerConfig compilerConfig = new CompilerConfig(installXmlPath, stagingDirPath, null, targetFilePath);
compilerConfig.executeCompiler();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/03/31/building-izpack-installers-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IzPack. Adding 64bit support.</title>
		<link>http://maksim.sorokin.dk/it/2011/03/24/izpack-adding-64bit-support/</link>
		<comments>http://maksim.sorokin.dk/it/2011/03/24/izpack-adding-64bit-support/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 16:17:48 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=676</guid>
		<description><![CDATA[IzPack should work everywhere. However, you have to be aware about several things if you have support for 64bit machines. First, if you are using COI tools from IzPack (for example if you have your own custom panel that works with registry or using CheckedHelloPanel) you also have to deliver 64bit dll: &#60;native type=&#34;3rdparty&#34; name=&#34;COIOSHelper.dll&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>IzPack should work everywhere. However, you have to be aware about several things if you have support for 64bit machines.</p>
<p>First, if you are using COI tools from IzPack (for example if you have your <a href="http://maksim.sorokin.dk/it/2011/03/11/izpack-panels-things-you-have-to-know-when-developing-registry-panels/">own custom panel that works with registry</a> or using <a href="http://izpack.org/documentation/panels.html#checkedhellopanel">CheckedHelloPanel</a>) you also have to deliver 64bit dll:</p>
<pre class="brush: xml; title: ;">
  &lt;native type=&quot;3rdparty&quot; name=&quot;COIOSHelper.dll&quot; stage=&quot;both&quot;&gt;
    &lt;os family=&quot;windows&quot; /&gt;
  &lt;/native&gt;
  &lt;native type=&quot;3rdparty&quot; name=&quot;COIOSHelper_x64.dll&quot; stage=&quot;both&quot;&gt;
    &lt;os family=&quot;windows&quot; /&gt;
  &lt;/native&gt;
</pre>
<p>The second thing, if you are using <a href="http://izpack.org/documentation/panels.html#shortcutpanel">ShortcutPanel</a>, you will also have to deliver 64bit dlls:</p>
<pre class="brush: xml; title: ;">
  &lt;native type=&quot;izpack&quot; name=&quot;ShellLink.dll&quot;&gt;
    &lt;os family=&quot;windows&quot; /&gt;
  &lt;/native&gt;
  &lt;native type=&quot;izpack&quot; name=&quot;ShellLink_x64.dll&quot;&gt;
    &lt;os family=&quot;windows&quot; /&gt;
  &lt;/native&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/03/24/izpack-adding-64bit-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom IzPack Panels. Necessary Changes for Silent Installation.</title>
		<link>http://maksim.sorokin.dk/it/2011/03/17/custom-izpack-panels-necessary-changes-for-silent-installation/</link>
		<comments>http://maksim.sorokin.dk/it/2011/03/17/custom-izpack-panels-necessary-changes-for-silent-installation/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 11:59:11 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[custom panels]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[silent installation]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=672</guid>
		<description><![CDATA[Here I described how to develop and debug your own custom panel. However, in order to have it work with automated installers (aka silent installation) we need to add some changes. You will need to add AutomationHelper class. Here is how you can do it. Assuming you have custom panel with a name MyPanel, create [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://maksim.sorokin.dk/it/2011/02/28/developing-and-debugging-izpack-panels-in-eclipse/">Here</a> I described how to develop and debug your own custom panel. However, in order to have it work with <a href="http://izpack.org/documentation/advanced-features.html#automated-installers">automated installers (aka silent installation)</a> we need to add some changes.</p>
<p>You will need to add <code>AutomationHelper</code> class. Here is how you can do it. Assuming you have custom panel with a name <code>MyPanel</code>, create class <code>MyPanelAutomationHelper</code> in the same package. This class has to extend <code>PanelAutomationHelper</code> and implement <code>PanelAutomation</code>. And then you will have to specify how to run the panel silently.<br />
Basically, you can just repeat all the routine from <code>panelActivate</code> method in <code>MyPanel</code> panel (or if you do not want to repeat yourself, invoke/call <code>MyPanel</code> smartly). But you cannot use UI stuff like <code>emitWarning</code> or <code>emitError</code>. If you need to inform user about something -- write it directly to the output. Silent installer should be silent. </p>
<p>Here is <code>AutomationHelper</code> class for <code>MyPanel</code> panel, which we developed previously:</p>
<pre class="brush: java; title: ;">
package com.izforge.izpack.panels;

import java.util.List;

import com.coi.tools.os.win.MSWinConstants;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.InstallerException;
import com.izforge.izpack.installer.PanelAutomation;
import com.izforge.izpack.installer.PanelAutomationHelper;

public class MyPanelAutomationHelper extends PanelAutomationHelper implements PanelAutomation {

  @Override
  public void makeXMLData(AutomatedInstallData installData, IXMLElement panelRoot) {
    //
  }

  @Override
  public void runAutomated(AutomatedInstallData installData, IXMLElement panelRoot) throws InstallerException {
    System.out.println(&quot;Hello, IzPack&quot;);
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/03/17/custom-izpack-panels-necessary-changes-for-silent-installation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IzPack Panels: Things You Have to Know When Developing Registry Panels</title>
		<link>http://maksim.sorokin.dk/it/2011/03/11/izpack-panels-things-you-have-to-know-when-developing-registry-panels/</link>
		<comments>http://maksim.sorokin.dk/it/2011/03/11/izpack-panels-things-you-have-to-know-when-developing-registry-panels/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 16:35:48 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[Windows registry]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=649</guid>
		<description><![CDATA[There are certain things one has to know when developing panels that interact with registry. CheckedHelloPanel is an example of interaction with a registry. If you decide to go that way, you will need to do some additional things too besides writing the code. First of all, you will need to define a COIOSHelper.dll in [...]]]></description>
			<content:encoded><![CDATA[<p>There are certain things one has to know when developing panels that interact with registry. </p>
<p><a href="http://izpack.org/documentation/panels.html#checkedhellopanel">CheckedHelloPanel</a> is an example of interaction with a registry. If you decide to go that way, you will need to do some additional things too besides writing the code. </p>
<p>First of all, you will need to define a <code>COIOSHelper.dll</code> in your <code>install.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;native type=&quot;3rdparty&quot; name=&quot;COIOSHelper.dll&quot; stage=&quot;both&quot;&gt;
  &lt;os family=&quot;windows&quot;/&gt;
&lt;/native&gt;
</pre>
<p>The second thing is that if you take a look into <code>CheckedHelloPanel</code> code, you will see, that it also uses some <code>com.coi.tools</code> code. You will need to include that into your panel jar too.<br />
Here is the way how we do it. First, we took this <code>com.coi.tools</code> and put it to our maven repository. For each our custom IzPack panel we have a separate maven module nesting some common parent routine (I have already <a href="http://maksim.sorokin.dk/it/2011/03/02/izpack-adding-custom-panels-without-rebuilding-standalone-compiler/">described it in one of the previous posts</a>. Then during <code>package</code> phase of our custom panel code we use <a href="http://maven.apache.org/plugins/maven-shade-plugin/">Maven Shade Plugin</a> to combine sources of <code>com.coi.tools</code> and our panel code.</p>
<p>The third thing deals with development cycle. If you develop your own custom panel to work with registry using the way <a href="http://maksim.sorokin.dk/it/2011/02/28/developing-and-debugging-izpack-panels-in-eclipse/">, you will need to place dlls inside "izpack" project.<br />
Create <code>src\native</code> folder and copy dlls from <code>bin\native</code> directory in IzPack installation. Then you could use them inside <code>install.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;native type=&quot;3rdparty&quot; name=&quot;COIOSHelper.dll&quot; stage=&quot;both&quot;&gt;
  &lt;os family=&quot;windows&quot;/&gt;
&lt;/native&gt;
</pre>
<p>This is because <code>com.izforge.izpack.util.Librarian</code> in IzPack has to know where to find the dlls. Since we import only the sources to Eclipse, dlls are not imported, so we have to do that manualy.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/03/11/izpack-panels-things-you-have-to-know-when-developing-registry-panels/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IzPack: Adding Custom Panels without Rebuilding Standalone Compiler</title>
		<link>http://maksim.sorokin.dk/it/2011/03/02/izpack-adding-custom-panels-without-rebuilding-standalone-compiler/</link>
		<comments>http://maksim.sorokin.dk/it/2011/03/02/izpack-adding-custom-panels-without-rebuilding-standalone-compiler/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 16:44:14 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=655</guid>
		<description><![CDATA[On FAQ page of izpack-maven-plugin there is a link on how to include own custom panels without rebuilding standalone compiler. I will describe our own approach. We have a specific Maven project for IzPack extensions. For every custom panel we have a child module. Basically, each child module is just a plain Java project with [...]]]></description>
			<content:encoded><![CDATA[<p>On <a href="http://izpack.codehaus.org/izpack-maven-plugin/faq.html">FAQ page of izpack-maven-plugin</a> there is a link on how to include own custom panels without rebuilding standalone compiler. I will describe our own approach.</p>
<p>We have a specific Maven project for IzPack extensions. For every custom panel we have a child module. Basically, each child module is just a plain Java project with required IzPack structure.</p>
<p>We have a special Maven parent project for all our installers. This parent defines 3 steps to build IzPack installer in <code>pluginManagement</code> section:</p>
<ul>
<li>Copy all dependencies to specific folder defined by child installers. Then we will pick up these dumped files in <code>install.xml</code> file. It is used to dump our own product, third party stuff and our own custom panels, which are referenced from dependency section in <code>pom.xml</code></li>
<li>Filtering step. We run filtering through all IzPack files to automatically replace version, name, path to files (fx dumped in previous step) in <code>install.xml</code> and all other resources. Filtered files are copied to specific staging directory. We use <a href="http://maven.apache.org/plugins/maven-resources-plugin/">Maven resources plugin</a> for that purpose.</li>
<li>The last step defines the routine to build IzPack installation</li>
</ul>
<p>All child projects have to do is to inherit these plugins from parent.</p>
<p>As I said, our custom panels are ordinary Maven projects. In each installer in dependency section in <code>pom.xml</code> we add a reference to custom panel project. As I described above, all jars are dumped in specific folder and we just have to pick them in our <code>install.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;panel classname=&quot;MyPanel&quot; jar=&quot;${dependencies.dir}/izpackExtensions-myPanel-${izpackExtensions.version}.jar&quot; /&gt;
</pre>
<p>Where <code>dependencies.dir</code> and <code>izpackExtensions.version</code> are ordinary Maven variables which are substituted during filtering step.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/03/02/izpack-adding-custom-panels-without-rebuilding-standalone-compiler/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reading XML File in Custom IzPack Panel</title>
		<link>http://maksim.sorokin.dk/it/2011/03/01/reading-xml-file-in-custom-izpack-panel/</link>
		<comments>http://maksim.sorokin.dk/it/2011/03/01/reading-xml-file-in-custom-izpack-panel/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 13:52:20 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=647</guid>
		<description><![CDATA[Sometimes it is needed to have some configuration file in your custom IzPack panels. It is easy to have one! First, you have to reference your configuration file from resources section in install.xml file: &#60;resources&#62; &#60;res id=&#34;mySpec.xml&#34; src=&#34;mySpec.xml&#34; /&#62; &#60;/resources&#62; Then you would need to create such file in your IzPack resources. And then you [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is needed to have some configuration file in your custom IzPack panels. It is easy to have one!</p>
<p>First, you have to reference your configuration file from <code>resources</code> section in <code>install.xml</code> file:</p>
<pre class="brush: xml; title: ;">
&lt;resources&gt;
  &lt;res id=&quot;mySpec.xml&quot; src=&quot;mySpec.xml&quot; /&gt;
&lt;/resources&gt;
</pre>
<p>Then you would need to <span id="more-647"></span>create such file in your IzPack resources.</p>
<p>And then you can read your file from your custom panel:</p>
<pre class="brush: java; title: ;">
@Override
public void panelActivate() {
  InputStream is = ResourceManager.getInstance().getInputStream(&quot;mySpec.xml&quot;);
...
</pre>
<p>Moreover, you can read xml using IzPack capabilities. Not that convenient, but anyway:</p>
<pre class="brush: java; title: ;">
    String xml = inputStreamToString(is);    // I omit this peace of code, since it is not relevant. &quot;is&quot; -- is InputStream

    IXMLParser parser = new XMLParser();
    IXMLElement rootEl = parser.parse(xml);

    Vector&lt;IXMLElement&gt; els = rootEl.getChildrenNamed(&quot;myElements&quot;);
    Iterator&lt;IXMLElement&gt; it = els.iterator();
    while (it.hasNext()) {
      IXMLElement el = it.next();

      String myAttribute = el.getAttribute(&quot;myAttribute&quot;);
      ...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/03/01/reading-xml-file-in-custom-izpack-panel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Developing and debugging IzPack panels in Eclipse</title>
		<link>http://maksim.sorokin.dk/it/2011/02/28/developing-and-debugging-izpack-panels-in-eclipse/</link>
		<comments>http://maksim.sorokin.dk/it/2011/02/28/developing-and-debugging-izpack-panels-in-eclipse/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 14:50:19 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=641</guid>
		<description><![CDATA[Here I will describe how one can develop and debug own IzPack panels using Eclipse. First go and download IzPack. We will use 4.3.3 vesion here. After installation you will find source directory src\lib in installation location. Import it into Eclipse. Or create a Java project in Eclipse and copy sources afterwards. Obviously, project has [...]]]></description>
			<content:encoded><![CDATA[<p>Here I will describe how one can develop and debug own IzPack panels using Eclipse.</p>
<p>First go and <a href="http://izpack.org/downloads/">download IzPack</a>. We will use 4.3.3 vesion here.<br />
After installation you will find source directory <code>src\lib</code> in installation location. Import it into Eclipse. Or create a Java project in Eclipse and copy sources afterwards. Obviously, project has some dependencies, so in Java Build Path add all external jars from IzPack installation folder <code>lib</code>. Now you should not have any errors. IzPack code is now browsable.</p>
<p>You can have a<span id="more-641"></span> maven project for your custom IzPack panels. It is straight forward creation of Maven project, so I will omit it here. I will just assume, that you have a Java project for your panel.</p>
<p>Link you Java project to IzPack libraries, which are located in <code>lib</code> folder of IzPack installation. Please note, that you should not link to imported IzPack project in your Eclipse, because we will need it later on for debugging the panel -- in this case you would have cyclic dependency. Do that in project properties Java Build Path. </p>
<p>According to <a href="http://izpack.org/documentation/creating-panels.html">documentation</a>, panels classes have to be created in <code>com.izforge.izpack.panels</code>. In your project create a package with that name. Now in that package create class <code>MyPanel</code>:</p>
<pre class="brush: java; title: ;">
package com.izforge.izpack.panels;

import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.installer.IzPanel;

public class MyPanel extends IzPanel {

  private static final long serialVersionUID = -2686831922771063920L;

  public MyPanel(InstallerFrame parent, InstallData idata) {
    super(parent, idata);
  }

  @Override
  public void panelActivate() {
    System.out.println(&quot;Hello, IzPack&quot;);
  }
}
</pre>
<p>Let's create a test IzPack installation, which would use our new panel. Basically, just create "install.xml" file in any folder. I will do that in <code>c:\projects\test25\src\main\resources</code>. Here are the internals of <code>install.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;installation version=&quot;1.0&quot;&gt;

  &lt;info&gt;
    &lt;appname&gt;Test 25&lt;/appname&gt;
    &lt;appversion&gt;1.0&lt;/appversion&gt;
    &lt;uninstaller write=&quot;no&quot; /&gt;
    &lt;javaversion&gt;1.6&lt;/javaversion&gt;

    &lt;pack200 /&gt;
  &lt;/info&gt;

  &lt;guiprefs resizable=&quot;yes&quot; width=&quot;500&quot; height=&quot;340&quot;&gt;
    &lt;modifier key=&quot;allXGap&quot; value=&quot;5&quot; /&gt;
    &lt;modifier key=&quot;allYGap&quot; value=&quot;5&quot; /&gt;
    &lt;modifier key=&quot;paragraphYGap&quot; value=&quot;15&quot; /&gt;
    &lt;modifier key=&quot;useHeadingPanel&quot; value=&quot;yes&quot; /&gt;
    &lt;modifier key=&quot;headingLineCount&quot; value=&quot;1&quot; /&gt;
    &lt;modifier key=&quot;headingFontSize&quot; value=&quot;2&quot; /&gt;
    &lt;modifier key=&quot;headingBackgroundColor&quot; value=&quot;0x00ffffff&quot; /&gt;
    &lt;modifier key=&quot;headingPanelCounter&quot; value=&quot;text&quot; /&gt;
    &lt;modifier key=&quot;headingPanelCounterPos&quot; value=&quot;inHeading&quot; /&gt;
  &lt;/guiprefs&gt;

  &lt;locale&gt;
    &lt;langpack iso3=&quot;eng&quot; /&gt;
  &lt;/locale&gt;

  &lt;panels&gt;
    &lt;panel classname=&quot;MyPanel&quot; /&gt;
    &lt;panel classname=&quot;SimpleFinishPanel&quot; /&gt;
  &lt;/panels&gt;

  &lt;packs&gt;
    &lt;pack name=&quot;main&quot; required=&quot;yes&quot;&gt;
      &lt;description&gt;Test 25 Installation&lt;/description&gt;
    &lt;/pack&gt;
  &lt;/packs&gt;

&lt;/installation&gt;
</pre>
<p>Now, here is the development flow. You modify the panel code. Then you run IzPack compiler from Eclipse and IzPack installer, also from Eclipse. Just two button clicks!</p>
<p>Here is how you configure it. Navigate to <code>com.izforge.izpack.compiler.Compiler</code> class in imported IzPack project in Eclipse. In menu choose "Run-&gt;Profile Configurations..". In "Java Application" on the left create new application entry. In "Main" tab in "Project" choose "izpack" in Main class choose "com.izforge.izpack.compiler.Compiler". In "Arguments" tab write "<code>c:\projects\test25\src\main\resources\install.xml -b c:\projects\test25\src\main\resources -o c:\projects\test25\target\out -h "c:/Program Files/Izpack-4.3.3"</code>", where you specify path to <code>install.xml</code>, where installer jar will be outputed and home path to IzPack installation.</p>
<p>Now, all we need is to tell IzPack, which installer we want to debug. In "Compiler" run configuration we specified the output of Compiler. Right-click "izpack" project and in Build Path specify that jar (which you specified in <code>-o</code> option).</p>
<p>Now you can simply call main class <code>com.izforge.izpack.installer</code>. GUI installer will be launched and you will be able to see all the output in the console. You can run in Debug mode as well.</p>
<p>So again, first modify the code. Then run <code>Compiler</code> and then run <code>Installer</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/02/28/developing-and-debugging-izpack-panels-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IzPack: Thoughts on Using Environmental Variables in Silent Installation</title>
		<link>http://maksim.sorokin.dk/it/2010/07/27/izpack-thoughts-on-using-environmental-variables-in-silent-installation/</link>
		<comments>http://maksim.sorokin.dk/it/2010/07/27/izpack-thoughts-on-using-environmental-variables-in-silent-installation/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 15:48:19 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[BAT]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[shell scripts]]></category>
		<category><![CDATA[silent installation]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=302</guid>
		<description><![CDATA[IzPack is pretty powerful installation tool. However, silent installation (or the call it Automated Installers) lacks some flexibility. One of the things, which I lack, is a possibility to provide environmental variables in silent installation configuration files (auto-install.xml). Here I will provide some tricks which would help making your installer "eat" silent installation configuration files [...]]]></description>
			<content:encoded><![CDATA[<p>IzPack is pretty powerful installation tool. However, silent installation (or the call it <a href="http://izpack.org/documentation/advanced-features.html#automated-installers">Automated Installers</a>) lacks some flexibility. One of the things, which I lack, is a possibility to provide environmental variables in silent installation configuration files (<code>auto-install.xml</code>). Here I will provide some tricks which would help making your installer "eat" silent installation configuration files <em>with</em> environmental variables.</p>
<p>To start with, <span id="more-302"></span> I will notice that in <code>installpath</code> you can always use <a href="http://izpack.org/documentation/installation-files.html#environment-variables">IzPack way of interpreting environmental variables</a>. For example:</p>
<pre class="brush: xml; title: ;">
&lt;installpath&gt;${ENV[APPDATA]}\3Dfacto\installers\glassfish&lt;/installpath&gt;
</pre>
<p>Next, ordinary IzPack variables to be used in BAT files.<br />
In your silent configuration files you would like to see something like:</p>
<pre class="brush: xml; title: ;">
&lt;AutomatedInstallation langpack=&quot;eng&quot;&gt;
   ...
  &lt;com.izforge.izpack.panels.UserInputPanel id=&quot;UNKNOWN (com.izforge.izpack.panels.UserInputPanel)&quot;&gt;
    &lt;userInput&gt;
      &lt;entry key=&quot;myVar&quot; value=&quot;%HOMEDRIVE%\location\file.txt&quot;/&gt;
   ...
&lt;/AutomatedInstallation&gt;
</pre>
<p>Here are some ideas which may help you make it work.</p>
<p>Now, when you use <a href="http://izpack.org/documentation/panels.html#processpanel">ProcessPanel</a> to launch your bat file, you pass a environmental variable inside a variable. Once you realize it, it is easy to make small trick to make everything work. For example, if in silent installation configuration file (in example above), you provide environmental variable to <code>myVar</code> variable. And then you pass it to the bat file with <code>ProcessPanel</code> in <code>processPanelSpec.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;processing&gt;
  &lt;job name=&quot;Install configuratorPortal&quot;&gt;
    &lt;executefile name=&quot;$INSTALL_PATH/script.bat&quot;&gt;
      &lt;env&gt;myVar=$myVar&lt;/env&gt;
  ...
&lt;/processing&gt;
</pre>
<p>When <code>ProcessPanel</code> launches that bat file, your <code>myVar</code> will be substituted once. But you need to get it substituted two times! What you may do is to simply add shell <code>call</code> command in front of the expression, where <code>myVar</code> is used. In this case, variable will be substituted twice.<br />
However, it will not work in some cases, for example:</p>
<pre class="brush: plain; title: ;">call echo hi&gt; %myVar%</pre>
<p>or</p>
<pre class="brush: plain; title: ;">call if exist %myVar% echo &quot;hi&quot;</pre>
<p>What you can do in this case is to use a wrapper. For instance, if you want to call <code>echo</code> command to substitute variable twice:</p>
<pre class="brush: plain; title: ;">call echo hi&gt; %myVar%</pre>
<p>Then create a helper <code>parameterDumper.bat</code>:</p>
<pre class="brush: plain; title: ;">
echo off

:: %1 -- what
:: %2 -- where

call echo %~1&amp;gt;&amp;gt; %~2
</pre>
<p>Include it into installation and simply call that instead:</p>
<pre class="brush: plain; title: ;">call &quot;%INSTALL_PATH%\parameterDumper.bat&quot; &quot;hi&quot; &quot;%myVar%&quot;</pre>
<p>Then two <code>call</code> commands will be executed and the parameter will be evaluated twice.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/07/27/izpack-thoughts-on-using-environmental-variables-in-silent-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silent Installation of Modularized Installers with IzPack</title>
		<link>http://maksim.sorokin.dk/it/2010/07/06/silent-installation-of-modularized-installers-with-izpack/</link>
		<comments>http://maksim.sorokin.dk/it/2010/07/06/silent-installation-of-modularized-installers-with-izpack/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 18:40:50 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=275</guid>
		<description><![CDATA[link to modularized installers 2 times As one can see from my previous post it is easy to create a modularized installer with IzPack. However, one may wonder, what about a silent installation of "master" installer? Is there a way to apply auto installation for such "master" installer and make it totally silent? Yes, it [...]]]></description>
			<content:encoded><![CDATA[<p>link to modularized installers 2 times</p>
<p>As one can see from my previous post it is easy to create a modularized installer with IzPack. However, one may wonder, what about a silent installation of "master" installer? Is there a way to apply <a href="http://izpack.org/documentation/advanced-features.html#automated-installers">auto installation</a> for such "master" installer and make it totally silent? Yes, it is possible.</p>
<p>So as one probably knows, <span id="more-275"></span>in order to have a silent (auto) installation, one has to provide an <code>auto-install.xml</code> file. We can change our installer easily to do that. For example, during the installation of "master" installer, but just before launching our modularized installers, we can pre-copy <code>auto-install.xml</code> files to specific location. And then in the bat file, where we launch our installers we simply add a path to those <code>auto-install.xml</code> files.</p>
<p>This also can be used when you distribute your installer to some groups of people, who need some specific parameters to be set up accordingly to their setups. What you can do is to ask a system administrator, who knows all the requirements of that group, to modify <code>auto-install.xml</code> files and distribute those files to some specific location on users' machines. And then, when "master" installer will be launched on those machines, it can look whereas <code>auto-install.xml</code> file is present in that specific location. If it is, then launch a silent installation, if it is not, launch normal installation. So <code>dependenciesInstall.bat</code> file from the previous post can be changed to:</p>
<pre class="brush: plain; title: ;">
echo.
echo -------------------------------------------------------
echo Launching Project1 installer
IF EXIST &quot;locaton_of_auto_config_for_project1&quot; (
  echo Silent install..
  &quot;${INSTALL_PATH}\install\project1-install-standard.jar&quot; &quot;locaton_of_auto_config_for_project1&quot;
) ELSE (
  echo Normal install..
  &quot;${INSTALL_PATH}\install\project1-install-standard.jar&quot;
)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/07/06/silent-installation-of-modularized-installers-with-izpack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compressing IzPack Installers</title>
		<link>http://maksim.sorokin.dk/it/2010/06/16/compressing-izpack-installers/</link>
		<comments>http://maksim.sorokin.dk/it/2010/06/16/compressing-izpack-installers/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 13:05:36 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[pack200]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=241</guid>
		<description><![CDATA[Sometimes one need to carry a lot of different files in the installer. There is a possibility to compress them using pack200. In your install.xml in info section simply specify: &#60;pack200 /&#62; But be aware, that when your installer is getting bigger and you are using pack200 to compress it, it can take quite a [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes one need to carry a lot of different files in the installer. There is a possibility to compress them using <a href="http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/pack200.html">pack200</a>. </p>
<p>In your <code>install.xml</code> in <code>info</code> section simply specify:</p>
<pre class="brush: xml; title: ;">&lt;pack200 /&gt;</pre>
<p>But be aware, that when your installer is getting bigger and you are using pack200 to compress it, it can take quite a long time!<br />
For instance, if you are carrying other jar files or other installers (I hope to write about modularized installers some time later), building the installer with <code>pack200</code> can take up to several minutes!</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/06/16/compressing-izpack-installers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

