fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 134 forks source link

当name配置为中文时,生成安装包出错.平台windows #322

Closed icefrag closed 1 year ago

icefrag commented 1 year ago

我的配置

    <build>
        <plugins>
            <plugin>
                <groupId>io.github.fvarrui</groupId>
                <artifactId>javapackager</artifactId>
                <version>1.6.7</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>package</goal>
                        </goals>
                        <configuration>
                            <name>中国</name>
                            <mainClass>org.example.JavaFXApplication</mainClass>
                            <bundleJre>true</bundleJre>
                            <generateInstaller>true</generateInstaller>
                            <administratorRequired>false</administratorRequired>
                            <platform>windows</platform>
                            <!--                            <jrePath>D:\Program Files (x86)\jre1.8</jrePath>-->
                            <jrePath>D:\Program Files\Java\jre1.8.0_251</jrePath>
                            <additionalResources>
                                <!-- 从根目录开始-->
                                <additionalResource>config.properties</additionalResource>
                                <!--                                <additionalResource>.cache</additionalResource>-->
                            </additionalResources>
                            <winConfig>
                                <generateSetup>true</generateSetup>
                                <generateMsi>false</generateMsi>
                                <generateMsm>false</generateMsm>
                                <disableDirPage>false</disableDirPage>
                                <setupMode>installForAllUsers</setupMode>
                                <setupLanguages>
                                    <english>compiler:Default.isl</english>
                                    <Chinese>compiler:\Languages\ChineseSimplified.isl</Chinese>
                                </setupLanguages>
                            </winConfig>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

报错信息:

[ERROR]         Error on line 27 in D:\script-workspace\time\target\assets\中国.iss: 系统找不到指定的文件。.
[ERROR]         Compile aborted.
[ERROR]     Setup installer generation failed due to: Command execution failed: iscc /OD:\script-workspace\time\target /F中国_1.0-SNAPSHOT D:\script-workspace\time\target\assets\中国.iss
[ERROR] 
org.codehaus.plexus.util.cli.CommandLineException: Command execution failed: iscc /OD:\script-workspace\time\target /F中国_1.0-SNAPSHOT D:\script-workspace\time\target\assets\中国.iss
    at io.github.fvarrui.javapackager.utils.CommandUtils.executeOnDirectory (CommandUtils.java:19)
    at io.github.fvarrui.javapackager.utils.CommandUtils.execute (CommandUtils.java:29)
    at io.github.fvarrui.javapackager.packagers.GenerateSetup.doApply (GenerateSetup.java:62)
    at io.github.fvarrui.javapackager.packagers.GenerateSetup.doApply (GenerateSetup.java:18)
    at io.github.fvarrui.javapackager.packagers.ArtifactGenerator.apply (ArtifactGenerator.java:44)
    at io.github.fvarrui.javapackager.packagers.Packager.generateInstallers (Packager.java:440)
    at io.github.fvarrui.javapackager.maven.PackageMojo.execute (PackageMojo.java:377)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
fvarrui commented 1 year ago

Hi @icefrag! Maybe your issue could be related to #297 since BOM should be included when iss.vtl template is rendered before calling iscc.

fvarrui commented 1 year ago

Which version of Inno Setup are you using?

fvarrui commented 1 year ago

Due to lack of activity, I close this topic. If the problem persists, please don't hesitate to reopen it.