Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
import java.io.IOException;

public class GenerateAppImage extends ArtifactGenerator<LinuxPackager> {

private static final int IMAGETOOL_VERSION = 13;
private static final String IMAGETOOL_URL = "https://github.com/AppImage/AppImageKit/releases/download/" + IMAGETOOL_VERSION + "/appimagetool-%s.AppImage";

private static final String IMAGETOOL_URL = "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-%s.AppImage";

public GenerateAppImage() {
super("AppImage");
Expand Down Expand Up @@ -41,12 +40,13 @@ protected File doApply(LinuxPackager packager) throws Exception {
File appFolder = packager.getAppFolder();
File outputFolder = packager.getOutputDirectory();
String name = packager.getName();
String version = packager.getVersion();
File executable = packager.getExecutable();
File assetsFolder = packager.getAssetsFolder();
File iconFile = packager.getIconFile();

// output AppImage file
File appImage = new File(outputFolder, name + ".AppImage");
File appImage = new File(outputFolder, name + "_" + version + ".AppImage");

// AppDir folder
File appDir = new File(assetsFolder, "AppDir");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected File doApply(LinuxPackager packager) throws Exception {
builder.build(outputDirectory);

// renames generated RPM file if created
String suffix = "-1." + arch + ".rpm";
String suffix = "-1." + getRpmArchString(arch) + ".rpm";
File originalRpm = new File(outputDirectory, name + "-" + version + suffix);
File rpm = null;
if (originalRpm.exists()) {
Expand Down Expand Up @@ -129,4 +129,10 @@ private void addDirectory(Builder builder, String parentPath, File directory, Li
}
}

private String getRpmArchString(Architecture arch) {
if (arch == null) return "null";

return arch.toString().toLowerCase(); // Without Locale to match the redline_rpm way of handling conversion
}

}