Merge branch 'master' of bitbucket.org:shmyga/gulp-haxetool

This commit is contained in:
2019-03-28 14:58:41 +03:00
2 changed files with 5 additions and 3 deletions

View File

@@ -184,11 +184,13 @@ class LinuxDEBPacker extends Packer {
call() {
const target = this.targetPath;
const buildDir = path.join(os.tmpdir(), 'build', this.config.name, 'debian');
const iconfile = `${this.config.meta.filename}${path.extname(this.config.meta.icon)}`;
const desktopTemplate = template(fs.readFileSync(path.resolve(__dirname, '..', 'template/linux/app.desktop')));
const desktop = desktopTemplate(this.config);
const desktop = desktopTemplate(Object.assign({iconfile:iconfile}, this.config));
fse.ensureDirSync(`${buildDir}/usr/share/applications`);
fs.writeFileSync(`${buildDir}/usr/share/applications/${this.config.meta.filename}.desktop`, desktop);
fse.copySync(`${target}`, `${buildDir}/usr/share/${this.config.meta.filename}/`);
fse.copySync(this.config.meta.icon, `${buildDir}/usr/share/${this.config.meta.filename}/${iconfile}`);
return gulp.src(`${buildDir}/*`)
.pipe(deb({
package: this.config.meta.filename,
@@ -426,4 +428,4 @@ Project.Builder = Builder;
Project.Runner = Runner;
module.exports = Project;
module.exports = Project;