Skip to content

Commit

Permalink
fix(AppImage): bundle xorriso
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Jul 9, 2016
1 parent f59c7bd commit a1bf645
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docker/appImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
rm -rf ~/AppImage-09-07-16.7z
7za a -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on ~/AppImage-09-07-16.7z .
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 6 additions & 4 deletions src/targets/appImage.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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<string>
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit a1bf645

Please sign in to comment.