From a1bf6451595a02c870bb43119ca7f1abff69a87f Mon Sep 17 00:00:00 2001 From: develar Date: Sat, 9 Jul 2016 11:32:19 +0200 Subject: [PATCH] fix(AppImage): bundle xorriso --- docker/appImage.sh | 4 ++-- package.json | 10 +++++----- src/targets/appImage.ts | 10 ++++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docker/appImage.sh b/docker/appImage.sh index e058ee141c7..5a767be54f8 100755 --- a/docker/appImage.sh +++ b/docker/appImage.sh @@ -2,5 +2,5 @@ set -e dir=${PWD##*/} -rm -rf ../${dir}.7z -7za a -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on ../${dir}.7z . \ No newline at end of file +rm -rf ~/AppImage-09-07-16.7z +7za a -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on ~/AppImage-09-07-16.7z . \ No newline at end of file diff --git a/package.json b/package.json index 7e451801627..0d1fa6fd56e 100644 --- a/package.json +++ b/package.json @@ -100,11 +100,11 @@ ] }, "devDependencies": { - "@types/debug": "0.0.26-alpha", - "@types/mime": "0.0.26-alpha", - "@types/progress": "^1.1.25-alpha", - "@types/semver": "^4.3.24-alpha", - "@types/source-map-support": "^0.2.25-alpha", + "@types/debug": "0.0.27-alpha", + "@types/mime": "0.0.27-alpha", + "@types/progress": "^1.1.26-alpha", + "@types/semver": "^4.3.25-alpha", + "@types/source-map-support": "^0.2.26-alpha", "ava-tf": "^0.15.3", "babel-plugin-array-includes": "^2.0.3", "babel-plugin-transform-es2015-destructuring": "^6.9.0", diff --git a/src/targets/appImage.ts b/src/targets/appImage.ts index 4e45db9f950..ebec0706c38 100644 --- a/src/targets/appImage.ts +++ b/src/targets/appImage.ts @@ -1,7 +1,7 @@ import { PlatformPackager, TargetEx } from "../platformPackager" import { LinuxBuildOptions, Arch } from "../metadata" import * as path from "path" -import { exec, unlinkIfExists, spawn, debug } from "../util/util" +import { exec, unlinkIfExists } from "../util/util" import { open, write, createReadStream, createWriteStream, close, chmod } from "fs-extra-p" import { LinuxTargetHelper } from "./LinuxTargetHelper" import { getBin } from "../util/binDownload" @@ -10,9 +10,11 @@ import { Promise as BluebirdPromise } from "bluebird" //noinspection JSUnusedLocalSymbols const __awaiter = require("../util/awaiter") -const appImageVersion = "AppImage-5" +const appImageVersion = process.platform === "darwin" ? "AppImage-09-07-16-mac" : "AppImage-09-07-16-linux" //noinspection SpellCheckingInspection -const appImagePathPromise = getBin("AppImage", appImageVersion, `https://dl.bintray.com/electron-userland/bin/${appImageVersion}.7z`, "19833e5db3cbc546432de8ddc8a54181489e6faad4944bd1f3138adf4b771259") +const appImageSha256 = process.platform === "darwin" ? "5d4a954876654403698a01ef5bd7f218f18826261332e7d31d93ab4432fa0312" : "ac324e90b502f4e995f6a169451dbfc911bb55c0077e897d746838e720ae0221" +//noinspection SpellCheckingInspection +const appImagePathPromise = getBin("AppImage", appImageVersion, `https://dl.bintray.com/electron-userland/bin/${appImageVersion}.7z`, appImageSha256) export default class AppImageTarget extends TargetEx { private readonly desktopEntry: Promise @@ -55,7 +57,7 @@ export default class AppImageTarget extends TargetEx { args.push("-zisofs", `level=${packager.devMetadata.build.compression === "store" ? "0" : "9"}:block_size=128k:by_magic=off`) args.push("set_filter_r", "--zisofs", "/") - await exec(process.platform === "darwin" ? path.join(appImagePath, "xorriso") : "xorriso", args) + await exec(process.env.USE_SYSTEM_FPM === "true" || process.arch !== "x64" ? "xorriso" : path.join(appImagePath, "xorriso"), args) await new BluebirdPromise((resolve, reject) => { const rd = createReadStream(path.join(appImagePath, arch === Arch.ia32 ? "32" : "64", "runtime"))