@@ -4,14 +4,12 @@ import gulp from "gulp";
|
||||
import deb from "gulp-debian";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import asset from "../../../../common/asset";
|
||||
import template from "../../../../common/template";
|
||||
import { type Config, Platform } from "../../../../core/type";
|
||||
import { Packer } from "../../../core/packer";
|
||||
|
||||
export class LinuxDEBPacker extends Packer {
|
||||
static NAME = "deb";
|
||||
static DEFAULT_ICON = asset("icon.jpg");
|
||||
|
||||
constructor(config: Config) {
|
||||
super(config, Platform.LINUX);
|
||||
@@ -20,7 +18,7 @@ export class LinuxDEBPacker extends Packer {
|
||||
call() {
|
||||
const target = this.targetPath;
|
||||
const buildDir = path.join(os.tmpdir(), "build", this.config.name, "debian");
|
||||
const icon = this.config.meta.icon || LinuxDEBPacker.DEFAULT_ICON;
|
||||
const icon = this.config.meta.icon!;
|
||||
const iconfile = `${this.config.meta.filename}${path.extname(icon)}`;
|
||||
const desktop = template.render("linux/app.desktop", { iconfile: iconfile, ...this.config });
|
||||
fse.ensureDirSync(`${buildDir}/usr/share/applications`);
|
||||
|
||||
Reference in New Issue
Block a user