Skip to content
Merged
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
1 change: 1 addition & 0 deletions HMCL/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ val makeDeb by tasks.registering(CreateDeb::class) {

version.set(project.version.toString())
releaseType.set(debChannel)
launcherClassName.set("org.jackhuang.hmcl.Launcher")
appShFile.set(layout.file(provider { artifactFile("sh") }))
iconFile.set(layout.projectDirectory.file("image/hmcl.png"))
outputFile.set(debFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public abstract class CreateDeb extends DefaultTask {
@Input
public abstract Property<ReleaseType> getReleaseType();

/// Launcher class name for Linux StartupWMClass property in the .desktop file.
@Input
public abstract Property<String> getLauncherClassName();

/// Executable `.sh` artifact produced by `makeExecutables`.
@InputFile
public abstract RegularFileProperty getAppShFile();
Expand Down Expand Up @@ -295,6 +299,7 @@ private String getDesktopInfo() {
StartupNotify=false
Categories=Game;
Keywords=mc;minecraft;
""".formatted(getCurrentType().getDisplayName(), getLauncherPath(), getIconTargetPath());
StartupWMClass=%s
""".formatted(getCurrentType().getDisplayName(), getLauncherPath(), getIconTargetPath(), getLauncherClassName().get());
Comment thread
Glavo marked this conversation as resolved.
}
}