2013-03-15 27 views
1

將我的izpack安裝程序包裝到launch4j生成的EXE中時,除卸載程序信息外,一切正常。使用JAR安裝程序時,只要在安裝程序中點擊「退出」,「uninstaller.jar」就會被填充,在窗口實際關閉之前需要幾秒鐘。但是,使用包裝的EXE安裝程序時,該窗口立即關閉,「uninstaller.jar」文件保持2KB大小,並且無效。izpack&launch4j:無效的卸載程序

有沒有人有這方面的經驗?感謝您的建議和問候

帕斯卡爾

PS:在這裏,我完全POM:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>ch.diction</groupId> 
    <artifactId>dataexchange-viewer</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <name>Diction data exchange viewer</name> 

    <properties> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <java.version>1.7</java.version> 
     <java.minimum_version>1.7.0</java.minimum_version> 
     <swixml.version>2.5.20110919</swixml.version> 
     <swingx.version>1.6.1</swingx.version> 
     <izpack.plugin.version>5.0.0-beta11</izpack.plugin.version> 
     <izpack.compiler.version>5.0.0-beta11</izpack.compiler.version> 
    </properties> 

    <build> 
     <sourceDirectory>src/main/java</sourceDirectory> 
     <testSourceDirectory>src/test/java</testSourceDirectory> 
     <outputDirectory>target/main</outputDirectory> 
     <testOutputDirectory>target/test</testOutputDirectory> 
     <resources> 
      <resource> 
       <targetPath>ch/diction/dataexchange/viewer/resources</targetPath> 
       <directory>src/main/resources</directory> 
       <excludes> 
        <exclude>izpack/*</exclude> 
       </excludes> 
      </resource> 
     </resources> 
     <testResources> 
      <testResource> 
       <targetPath>ch/diction/dataexchange/viewer/resources</targetPath> 
       <directory>src/test/resources</directory> 
      </testResource> 
     </testResources> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>3.0</version> 
       <configuration> 
        <source>${java.version}</source> 
        <target>${java.version}</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <artifactId>maven-assembly-plugin</artifactId> 
       <configuration> 
        <archive> 
         <manifest> 
          <mainClass>ch.diction.dataexchange.viewer.system.Runner</mainClass> 
         </manifest> 
        </archive> 
        <descriptorRefs> 
         <descriptorRef>jar-with-dependencies</descriptorRef> 
        </descriptorRefs> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.bluestemsoftware.open.maven.plugin</groupId> 
       <artifactId>launch4j-plugin</artifactId> 
       <version>1.5.0.0</version> 
       <executions> 
        <execution> 
         <id>l4j-gui</id> 
         <phase>package</phase> 
         <goals> 
          <goal>launch4j</goal> 
         </goals> 
         <configuration> 
          <headerType>gui</headerType> 
          <outfile>target/${project.artifactId}.exe</outfile> 
          <jar>target/${project.artifactId}-${project.version}-jar-with-dependencies.jar</jar> 
          <classPath> 
           <mainClass>ch.diction.dataexchange.viewer.system.Runner</mainClass> 
          </classPath> 
          <icon>src/main/resources/img/diction-favicon.ico</icon> 
          <jre> 
           <minVersion>${java.minimum_version}</minVersion> 
          </jre> 
         </configuration> 
        </execution> 
        <execution> 
         <id>l4j-installer</id> 
         <phase>install</phase> 
         <goals> 
          <goal>launch4j</goal> 
         </goals> 
         <configuration> 
          <headerType>gui</headerType> 
          <outfile>target/${project.artifactId}-setup.exe</outfile> 
          <jar>target/${project.artifactId}-${project.version}.jar</jar> 
          <classPath> 
           <mainClass>com.izforge.izpack.installer.bootstrap.Installer</mainClass> 
          </classPath> 
          <icon>src/main/resources/img/diction-favicon.ico</icon> 
          <jre> 
           <minVersion>${java.minimum_version}</minVersion> 
          </jre> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 
      <plugin> 
       <groupId>org.codehaus.izpack</groupId> 
       <artifactId>izpack-maven-plugin</artifactId> 
       <version>${izpack.plugin.version}</version> 
       <configuration> 
        <baseDir>target</baseDir> 
        <installFile>src/main/resources/izpack/install.xml</installFile> 
       </configuration> 
       <executions> 
        <execution> 
         <phase>package</phase> 
         <goals> 
          <goal>izpack</goal> 
         </goals> 
        </execution> 
       </executions> 
       <dependencies> 
        <dependency> 
         <groupId>org.codehaus.izpack</groupId> 
         <artifactId>izpack-compiler</artifactId> 
         <version>${izpack.compiler.version}</version> 
        </dependency> 
       </dependencies> 
      </plugin> 
     </plugins> 
    </build> 

    <repositories> 
     <repository> 
      <id>google-swixml2</id> 
      <url>http://swixml2.googlecode.com/svn/mavenrepo</url> 
     </repository> 
    </repositories> 

    <dependencies> 
     <dependency> 
      <groupId>ch.diction</groupId> 
      <artifactId>dataexchange-base</artifactId> 
      <version>${project.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.swixml</groupId> 
      <artifactId>swixml</artifactId> 
      <version>${swixml.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.swinglabs</groupId> 
      <artifactId>swingx</artifactId> 
      <version>${swingx.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.codehaus.izpack</groupId> 
      <artifactId>izpack-compiler</artifactId> 
      <version>${izpack.compiler.version}</version> 
      <type>pom</type> 
     </dependency> 
    </dependencies> 
</project> 

而且我的IzPack INSTALL.XML:

<izpack:installation version="5.0" xmlns:izpack="http://izpack.org/schema/installation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://izpack.org/schema/installation http://izpack.org/schema/5.0/izpack-installation-5.0.xsd"> 
    <info> 
     <appname>Diction Data Exchange Viewer</appname> 
     <appversion>0.0.1</appversion> 
     <appsubpath>Diction/data-exchange-viewer</appsubpath> 
     <javaversion>1.7</javaversion> 
    </info> 

    <guiprefs width="800" height="600" resizable="no"> 
     <modifier key="useHeadingPanel" value="yes" /> 
     <splash>../src/main/resources/izpack/diction_logo_rgb.jpg</splash> 
    </guiprefs> 

    <locale> 
     <langpack iso3="eng" /> 
    </locale> 

    <resources> 
     <res src="../src/main/resources/izpack/registry-spec.xml" id="RegistrySpec.xml" /> 
    </resources> 

    <listeners> 
     <listener classname="RegistryInstallerListener" stage="install" /> 
     <listener classname="RegistryUninstallerListener" stage="uninstall" /> 
    </listeners> 

    <panels> 
     <panel classname="TargetPanel" /> 
     <panel classname="InstallPanel" /> 
    </panels> 

    <packs> 
     <pack name="Diction Data Exchange" required="yes"> 
      <description>Diction Data Exchange</description> 
      <file src="dataexchange-viewer.exe" targetdir="$INSTALL_PATH" override="true" /> 
     </pack> 
    </packs> 

    <natives> 
     <native name="COIOSHelper.dll" type="3rdparty" stage="both" /> 
    </natives> 

</izpack:installation> 

回答

2

我使用創建的工作卸載izpack 5.0.0-rc1。所以這個bug現在已經在izPack中修復了。

+0

你從哪裏找到版本'5.0.0-rc-1'?每個官方地方都說最新的是5.0.0-beta-11。 – 2013-08-08 03:48:50

+0

我從http://nexus.codehaus.org/snapshots/通過maven拉取快照... - – Torsten 2013-08-09 14:53:54

+0

[5.0.0-rc1已正式發佈](http://git.codehaus.org /gitweb.cgi?p=izpack.git;a=commit;h=d0e0e3ba1ba586690f4697e74f0371e3cd0f5709),它確實解決了這個問題。 – 2013-10-28 17:12:50