[izpack-users] Unix formatted files are not copied from Windows

Kevin Hartig kevin.hartig at gmail.com
Wed Jun 28 14:19:57 CEST 2006


Iain,

You should be able to use something like the following:
in your install.xml file include

<resources>
    <res id="ProcessPanel.Spec.xml" src="installer/process_panel.xml"/>
</resources>

to specify the configuration file for the Process panel step in the 
install which allows running scripts. In the process_panel.xml file 
include something like the following:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<processing>

    <logfiledir>$INSTALL_PATH</logfiledir>

    <job name="Windows scripts">
        <os family="windows"/>

        <executefile name="windows_script.bat">
            <!-- arguments to pass into the script -->
            <arg>1</arg> 
            <arg>2</arg>
        </executefile>
    </job>

    <job name="Windows scripts">
        <os family="windows"/>

        <executefile name="windows_script.bat">
            <!-- arguments to pass into the script -->
            <arg>1</arg> 
            <arg>2</arg>
        </executefile>
    </job>

    <job name="Unix scripts">
        <os family="unix"/>

        <executefile name="unix_script.sh">
            <!-- arguments to pass into the script -->
            <arg>1</arg> 
            <arg>2</arg>
        </executefile>
    </job>

</processing>

Hope this helps.

-kevin.

Iain Willis wrote:
> Hi,
>  
> We've created an installer on a Windows system which should install to 
> both Windows and Linux.
> We need to execute a script once the files have been copied, however 
> if the script is in Unix format, it doesn't get installed.  If we 
> leave it as Windows format, it gets installed, but then cannot be 
> executed.
>  
> One solution I thought of was to run "dos2unix" on the script after 
> installation, but there doesn't seem to be any way of simply running a 
> command after installation (the executable tag tries to modify the 
> file access properties).
>  
> Does anyone have a solution to this?
>  
> Thanks,
>  
> Iain
>  
> www.ardentia.com <http://www.ardentia.com/>
> The home of NetSearch
>  




More information about the izpack-users mailing list