I finally learned how to package the spark client into an EXE file.
Spark comes with the install4j_3_2 versionProgram, You can also download Versions later than 4.0 separately. For more information about install4j, seeArticle.
Run"Ant release"FromBuildDirectory.
// After ant is run, a target folder is generated in the folder.
RunStartup. batFromTarget \ build \ binDirectory to make sure your customized spark is functional.
RunSpark. install4jFromBuild \ InstallerDirectory and make the following mizmizations to the project in install4j:
- In "general settings", go to the "compiler variables" tab to change the version_revision to the correct number and find and replace "spark" with your custom application name. then go to the "Media File Options" tab to replace "spark"$ {Compiler: app_short_name}.
-
- In "launchers", rename the spark launcher$ {Compiler: app_name}, Then right-click that launcher and click "Edit launcher". Then go to "executable Info" to replace "spark"$ {Compiler: app_short_name}. Then go to "Windows version info" to replace "spark"$ {Compiler: app_name}.
-
- In "Installer", go to the "actions" tab to set the target file for the desktop link$ {Compiler: app_short_name}.
- In "Media", right-click on the Windows Media File and click "edit media file". Then go to "Installer options" to replace "spark"$ {Compiler: app_name}. Then go to "Bundled JRE" to choose the JRE to bundle.
-
- In "build", click on "Start build"