[deb] copy app icon
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gulp-haxetool",
|
||||
"version": "0.0.14",
|
||||
"version": "0.0.15",
|
||||
"description": "HaXe Tool for Gulp",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,7 +3,7 @@ Encoding=UTF-8
|
||||
Type=Application
|
||||
Comment=<%=meta.title%> <%=meta.version%>
|
||||
Exec=bash -c 'cd "/usr/share/<%=meta.filename%>" && ./<%=meta.filename%>'
|
||||
Icon=/usr/share/<%=meta.filename%>/<%=meta.icon%>
|
||||
Icon=/usr/share/<%=meta.filename%>/<%=iconfile%>
|
||||
Name=<%=meta.title%>
|
||||
Categories=Game
|
||||
Terminal=false
|
||||
|
||||
Reference in New Issue
Block a user