Replace files with izpack

Asked

Viewed 72 times

1

I have an installer that plays some files in a folder, but I wanted to use the same installer to update the application, so there are some files that cannot be overwritten. This way I thought of showing a dialog box when the file already exists asking if the user wants to overwrite.

My code izpack is this

 <pack name="Product" required="yes">
            <file src="../@{project.artifactId}.jar" targetdir="$INSTALL_PATH" />
            <fileset dir="../resources" targetdir="$INSTALL_PATH/resources">
                <include name="**/*" />
            </fileset>

            <fileset dir="dependency" targetdir="$INSTALL_PATH/lib">
                <include name="**/*" />
            </fileset>

            <fileset dir="../resources/icons" targetdir="$INSTALL_PATH">
                <include name="favicon.ico" />
            </fileset>

 </pack>

1 answer

1

I managed to solve using

<file src="../resources/myfile.properties" targetdir="$INSTALL_PATH/resources" override="false" />
<fileset dir="../resources" targetdir="$INSTALL_PATH/resources">
  <exclude name="**/myfile.properties" />
  <include name="**/*" />
</fileset>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.