diff --git a/src/linuxPackager.ts b/src/linuxPackager.ts index 18fde509251..bc968461272 100755 --- a/src/linuxPackager.ts +++ b/src/linuxPackager.ts @@ -12,6 +12,7 @@ const template = require("lodash.template") const __awaiter = require("./awaiter") const tmpDir = BluebirdPromise.promisify(<(config: TmpOptions, callback: (error: Error, path: string, cleanupCallback: () => void) => void) => void>_tpmDir) +const installPrefix = "/opt" export class LinuxPackager extends PlatformPackager { private readonly debOptions: LinuxBuildOptions @@ -77,7 +78,7 @@ export class LinuxPackager extends PlatformPackager { await outputFile(tempFile, this.debOptions.desktop || `[Desktop Entry] Name=${this.appName} Comment=${this.debOptions.description} -Exec="${this.appName}" +Exec="${installPrefix}/${this.appName}/${this.appName}" Terminal=false Type=Application Icon=${this.metadata.name} @@ -218,7 +219,7 @@ Icon=${this.metadata.name} use(options.fpm, it => args.push(...it)) - args.push(`${appOutDir}/=/opt/${this.appName}`) + args.push(`${appOutDir}/=${installPrefix}/${this.appName}`) args.push(...(await this.packageFiles)!) await exec(await this.fpmPath, args) return destination @@ -235,4 +236,4 @@ async function writeConfigFile(tempDir: string, templatePath: string, options: a const outputPath = path.join(tempDir, path.basename(templatePath, ".tpl")) await outputFile(outputPath, config) return outputPath -} \ No newline at end of file +}