Merge branch 'master' of bitbucket.org:shmyga/gulp-haxetool
This commit is contained in:
@@ -184,11 +184,13 @@ class LinuxDEBPacker extends Packer {
|
|||||||
call() {
|
call() {
|
||||||
const target = this.targetPath;
|
const target = this.targetPath;
|
||||||
const buildDir = path.join(os.tmpdir(), 'build', this.config.name, 'debian');
|
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 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`);
|
fse.ensureDirSync(`${buildDir}/usr/share/applications`);
|
||||||
fs.writeFileSync(`${buildDir}/usr/share/applications/${this.config.meta.filename}.desktop`, desktop);
|
fs.writeFileSync(`${buildDir}/usr/share/applications/${this.config.meta.filename}.desktop`, desktop);
|
||||||
fse.copySync(`${target}`, `${buildDir}/usr/share/${this.config.meta.filename}/`);
|
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}/*`)
|
return gulp.src(`${buildDir}/*`)
|
||||||
.pipe(deb({
|
.pipe(deb({
|
||||||
package: this.config.meta.filename,
|
package: this.config.meta.filename,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Encoding=UTF-8
|
|||||||
Type=Application
|
Type=Application
|
||||||
Comment=<%=meta.title%> <%=meta.version%>
|
Comment=<%=meta.title%> <%=meta.version%>
|
||||||
Exec=bash -c 'cd "/usr/share/<%=meta.filename%>" && ./<%=meta.filename%>'
|
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%>
|
Name=<%=meta.title%>
|
||||||
Categories=Game
|
Categories=Game
|
||||||
Terminal=false
|
Terminal=false
|
||||||
|
|||||||
Reference in New Issue
Block a user