Closed HamzaShahidAli closed 4 years ago
@edvin ? can you please share your thoughts what i am missing or what is the issue. Its working for mac native installer but on windows show error due to inno setup
Try to run the iscc.exe file with the given parameters manually and see what output it produces.
When i run iscc.exe file its showing errors on .ico file is not copying where iscc.exe file exist and also .exe file is not exist on that location.
@edvin Sir can you please help me to fix why this issue came on windows native installer only
I've got the same issue i think, it works by removing parameter for the icon. But I don't find any fix to use the icon yet.
Try running javapackager with the icon parameter directly and see what error message javapackager reports. That should help you narrow it down. All we do is call javapackager, so that's where you need to debug this.
I finally fix it ! The .ico file was too big, i reduced it to 128x128 pixels and it works !
Great, thanks for reporting back!
@Balthov60 i removed the parameter icon but still i am facing the same issue.
@Balthov60 @edvin Facing first issue https://www.screencast.com/t/WE4WUUPQ Facing Second Issue https://www.screencast.com/t/ri3lml6HHOj
Both issue occurred when manually compiling iss code generated by fxlauncher, if i fix manually these issues and installer created then the logic for update from server is not working, i thing its not defined in the iss file thats why please see the .iss file code
.ISS File Code
;This file will be executed next to the application bundle image
;I.e. current directory will contain folder Calimatic_Automator with application files
[Setup]
AppId={{groupId.Calimatic_Automator}}
AppName=Calimatic_Automator
AppVersion=1.0 AppVerName=Calimatic_Automator 1.0 AppPublisher=Caliber Inc AppComments=Calimatic_Automator AppCopyright=Copyright (C) 2019 ;AppPublisherURL=http://java.com/ ;AppSupportURL=http://java.com/ ;AppUpdatesURL=http://java.com/ DefaultDirName={pf}\Calimatic_Automator DisableStartupPrompt=Yes DisableDirPage=Yes DisableProgramGroupPage=Yes DisableReadyPage=Yes DisableFinishedPage=Yes DisableWelcomePage=Yes DefaultGroupName=Caliber Inc ;Optional License LicenseFile= ;WinXP or above MinVersion=0,5.1 OutputBaseFilename=Calimatic_Automator-1.0 Compression=lzma SolidCompression=yes PrivilegesRequired=admin SetupIconFile=Calimatic_Automator\Calimatic_Automator.ico UninstallDisplayIcon={app}\Calimatic_Automator.ico UninstallDisplayName=Calimatic_Automator WizardImageStretch=No WizardSmallImageFile=Calimatic_Automator-setup-icon.bmp ArchitecturesInstallIn64BitMode=x64
[Languages] Name: "english"; MessagesFile: "compiler:Default.isl"
[Files] Source: "Calimatic_Automator\Calimatic_Automator.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "Calimatic_Automator\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons] Name: "{group}\Calimatic_Automator"; Filename: "{app}\Calimatic_Automator.exe"; IconFilename: "{app}\Calimatic_Automator.ico"; Check: returnTrue() Name: "{commondesktop}\Calimatic_Automator"; Filename: "{app}\Calimatic_Automator.exe"; IconFilename: "{app}\Calimatic_Automator.ico"; Check: returnFalse()
[Run] Filename: "{app}\Calimatic_Automator.exe"; Parameters: "-Xappcds:generatecache"; Check: returnFalse() Filename: "{app}\Calimatic_Automator.exe"; Description: "{cm:LaunchProgram,Calimatic_Automator}"; Flags: nowait postinstall skipifsilent; Check: returnTrue() Filename: "{app}\Calimatic_Automator.exe"; Parameters: "-install -svcName ""Calimatic_Automator"" -svcDesc ""Calimatic_Automator"" -mainExe ""Calimatic_Automator.exe"" "; Check: returnFalse()
[UninstallRun] Filename: "{app}\Calimatic_Automator.exe "; Parameters: "-uninstall -svcName Calimatic_Automator -stopOnUninstall"; Check: returnFalse()
[Code] function returnTrue(): Boolean; begin Result := True; end;
function returnFalse(): Boolean; begin Result := False; end;
function InitializeSetup(): Boolean; begin // Possible future improvements: // if version less or same => just launch app // if upgrade => check if same app is running and wait for it to exit // Add pack200/unpack200 support? Result := True; end;
Ok @edvin i think its the java-packager throwing the exception because i face the same exception when run simple command to create exe package with JavaPackager
, can you help out how i can fix this issue or any one.
Command Run in Cmd
javapackager -deploy -native -outdir packages -outfile Final -srcdir . -srcfiles Hello.jar -appclass sample.Main
Exception
No base JDK. Package will use system JRE. No base JDK. Package will use system JRE. Creating app bundle: Main in C:\Users\DELL\Desktop\Java Packager\packages\bundles Result application bundle: C:\Users\DELL\Desktop\Java Packager\packages\bundles java.io.IOException: Exec failed with code 2 command [[C:\Program Files (x86)\InnoSetup6\iscc.exe, /oC:\Users\DELL\Desktop\Java Packager\packages\bundles, C:\Users\DELL\AppData\Local\Temp\fxbundler6308867820319632690\images\win-exe.image\Main.iss] in C:\Users\DELL\AppData\Local\Temp\fxbundler6308867820319632690\images\win-exe.image at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165) at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138) at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132) at com.oracle.tools.packager.windows.WinExeBundler.buildEXE(WinExeBundler.java:697) at com.oracle.tools.packager.windows.WinExeBundler.bundle(WinExeBundler.java:366) at com.oracle.tools.packager.windows.WinExeBundler.execute(WinExeBundler.java:173) at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352) at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319) at com.sun.javafx.tools.packager.Main.main(Main.java:476) Error: Bundler "EXE Installer" (exe) failed to produce a bundle.
@HamzaShahidAli I've got the same issue, maybe the reason is InnoSetup's version might not compatible. first I use InnoSetup6(same with you), and got the same issue. but when I downgrade the version to InnoSetup5, I can got the installer correctly.
someone also asked in stackoverflow with the same issue. The link
It might help you.
Ok @edvin i think its the java-packager throwing the exception because i face the same exception when run simple command to create exe package with
JavaPackager
, can you help out how i can fix this issue or any one. Command Run in Cmdjavapackager -deploy -native -outdir packages -outfile Final -srcdir . -srcfiles Hello.jar -appclass sample.Main
ExceptionNo base JDK. Package will use system JRE. No base JDK. Package will use system JRE. Creating app bundle: Main in C:\Users\DELL\Desktop\Java Packager\packages\bundles Result application bundle: C:\Users\DELL\Desktop\Java Packager\packages\bundles java.io.IOException: Exec failed with code 2 command [[C:\Program Files (x86)\InnoSetup6\iscc.exe, /oC:\Users\DELL\Desktop\Java Packager\packages\bundles, C:\Users\DELL\AppData\Local\Temp\fxbundler6308867820319632690\images\win-exe.image\Main.iss] in C:\Users\DELL\AppData\Local\Temp\fxbundler6308867820319632690\images\win-exe.image at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165) at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138) at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132) at com.oracle.tools.packager.windows.WinExeBundler.buildEXE(WinExeBundler.java:697) at com.oracle.tools.packager.windows.WinExeBundler.bundle(WinExeBundler.java:366) at com.oracle.tools.packager.windows.WinExeBundler.execute(WinExeBundler.java:173) at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352) at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319) at com.sun.javafx.tools.packager.Main.main(Main.java:476) Error: Bundler "EXE Installer" (exe) failed to produce a bundle.
I think javapackager only supports InnoSetup 5, but according to https://bugs.openjdk.java.net/browse/JDK-8221333 you should switch to WiX instead.
@MakeItEasy Thanks for answer and stack-overflow question belongs to me and i already fixed this issue using downgrade inno setup to 5 and everything works fine. Thanks @edvin and @MakeItEasy
When i am trying to create native installer for windows it show error while running mvn install command in cmd.
Error Output
No base JDK. Package will use system JRE. The jar ant-launcher.jar has a main class org.apache.tools.ant.launch.Launcher that does not match the declared main fxlauncher.Launcher The jar ant.jar has a main class org.apache.tools.ant.Main that does not match the declared main fxlauncher.Launcher The jar fxsampler.jar has a main class fxsampler.FXSampler that does not match the declared main fxlauncher.Launcher The jar javassist.jar has a main class javassist.CtClass that does not match the declared main fxlauncher.Launcher No base JDK. Package will use system JRE. The jar ant-launcher.jar has a main class org.apache.tools.ant.launch.Launcher that does not match the declared main fxlauncher.Launcher The jar ant.jar has a main class org.apache.tools.ant.Main that does not match the declared main fxlauncher.Launcher The jar fxsampler.jar has a main class fxsampler.FXSampler that does not match the declared main fxlauncher.Launcher The jar javassist.jar has a main class javassist.CtClass that does not match the declared main fxlauncher.Launcher Creating app bundle: Calimatic_Automator in D:\Office_Work\Main\IntelliJ_Idea_Projects\CaliMatic_Automator\target\installer\bundles Result application bundle: D:\Office_Work\Main\IntelliJ_Idea_Projects\CaliMatic_Automator\target\installer\bundles The jar ant-launcher.jar has a main class org.apache.tools.ant.launch.Launcher that does not match the declared main fxlauncher.Launcher The jar ant.jar has a main class org.apache.tools.ant.Main that does not match the declared main fxlauncher.Launcher The jar fxsampler.jar has a main class fxsampler.FXSampler that does not match the declared main fxlauncher.Launcher The jar javassist.jar has a main class javassist.CtClass that does not match the declared main fxlauncher.Launcher java.io.IOException: Exec failed with code 2 command [[C:\Program Files (x86)\InnoSetup6\iscc.exe, /oD:\Office_Work\Main\IntelliJ_Idea_Projects\CaliMatic_Automator\target\installer\bun dles, C:\Users\DELL\AppData\Local\Temp\fxbundler5171463807998518908\images\win-exe.image\Calimatic_Automator.iss] in C:\Users\DELL\AppData\Local\Temp\fxbundler5171463807998518908\image s\win-exe.image at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165) at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138) at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132) at com.oracle.tools.packager.windows.WinExeBundler.buildEXE(WinExeBundler.java:697) at com.oracle.tools.packager.windows.WinExeBundler.bundle(WinExeBundler.java:366) at com.oracle.tools.packager.windows.WinExeBundler.execute(WinExeBundler.java:173) at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352) at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319) at com.sun.javafx.tools.packager.Main.main(Main.java:476) Error: Bundler "EXE Installer" (exe) failed to produce a bundle. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 46.116 s [INFO] Finished at: 2019-11-22T18:19:03+05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (installer) on project Calimatic_Automator: Command execution failed.: Process exited with an error: -1 (E xit value: -1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException