Skip to content

Commit

Permalink
Try gulp-macdmg
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Dec 9, 2023
1 parent 5c32ce9 commit 7d49109
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 11 deletions.
17 changes: 8 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const prompt = require('gulp-prompt');
const less = require('gulp-less');
const sourcemaps = require('gulp-sourcemaps');

const appdmg = require('./gulp-appdmg');

const cordova = require('cordova-lib').cordova;

const DIST_DIR = './dist/';
Expand Down Expand Up @@ -850,29 +848,30 @@ function getLinuxPackageArch(type, arch) {
}
// Create distribution package for macOS platform
function release_osx64(appDirectory) {
const macdmg = require('gulp-macdmg');

// appdmg does not generate the folder correctly, manually
createDirIfNotExists(RELEASE_DIR);

// The src pipe is not used
return gulp.src(['.'])
.pipe(appdmg({
return gulp.src([])
.pipe(macdmg({
target: path.join(RELEASE_DIR, getReleaseFilename('macOS', 'dmg')),
basepath: path.join(appDirectory, metadata.name, 'osx64'),
specification: {
title: 'Betaflight Configurator',
contents: [
{ 'x': 448, 'y': 342, 'type': 'link', 'path': '/Applications' },
{ 'x': 192, 'y': 344, 'type': 'file', 'path': `${metadata.name}.app`, 'name': 'Betaflight Configurator.app' },
],
background: path.join(__dirname, 'assets/osx/dmg-background.png'),
format: 'UDZO',
window: {
size: {
width: 638,
height: 479,
},
},
format: 'UDZO',
contents: [
{ 'x': 448, 'y': 342, 'type': 'link', 'path': '/Applications' },
{ 'x': 192, 'y': 344, 'type': 'file', 'path': `${metadata.name}.app`, 'name': 'Betaflight Configurator.app' },
],
},
}),
);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@
"yarn": "^1.22.19"
},
"optionalDependencies": {
"appdmg": "^0.6.4"
"appdmg": "^0.6.4",
"gulp-macdmg": "^0.0.1"
},
"resolutions": {
"jquery": "3.6.3",
Expand Down
29 changes: 28 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3639,6 +3639,23 @@ app-root-dir@^1.0.2:
resolved "https://registry.yarnpkg.com/app-root-dir/-/app-root-dir-1.0.2.tgz#38187ec2dea7577fff033ffcb12172692ff6e118"
integrity sha512-jlpIfsOoNoafl92Sz//64uQHGSyMrD2vYG5d8o2a4qGvyNCvXur7bzIsWtAC/6flI2RYAp3kv8rsfBtaLm7w0g==

[email protected]:
version "0.6.0"
resolved "https://registry.yarnpkg.com/appdmg/-/appdmg-0.6.0.tgz#81b3beab624ab458e6104d87c5cfa4b172203821"
integrity sha512-vDz8cMf5c6BfoS72OmmHzzuxG5DFVDM6YCAkscjYh3GASGEBBRCZ10Bn515ZPSPHOpfI9Xu3MlApbd49C58pJg==
dependencies:
async "^1.4.2"
ds-store "^0.1.5"
execa "^1.0.0"
fs-temp "^1.0.0"
fs-xattr "^0.3.0"
image-size "^0.7.4"
is-my-json-valid "^2.20.0"
minimist "^1.1.3"
parse-color "^1.0.0"
path-exists "^4.0.0"
repeat-string "^1.5.4"

appdmg@^0.6.4:
version "0.6.6"
resolved "https://registry.yarnpkg.com/appdmg/-/appdmg-0.6.6.tgz#d06bd82b530032fd7a8f0970a1c6ee6196e1efce"
Expand Down Expand Up @@ -7165,7 +7182,7 @@ extsprintf@^1.2.0, extsprintf@^1.4.0:
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07"
integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==

fancy-log@^1.1.0, fancy-log@^1.3.2:
fancy-log@^1.1.0, fancy-log@^1.3.2, fancy-log@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7"
integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==
Expand Down Expand Up @@ -8213,6 +8230,16 @@ gulp-less@^5.0.0:
through2 "^4.0.0"
vinyl-sourcemaps-apply "^0.2.0"

gulp-macdmg@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/gulp-macdmg/-/gulp-macdmg-0.0.1.tgz#ccb51296521118122a28d0f856d33e9139d4bef6"
integrity sha512-dIiujjp7XPvISRHijWExzMP2+SpFR623nbGhy/tK9WtyYcFdiFC2NUWqvP+VwcT2hsLkdGWJvy3frkBztC31CQ==
dependencies:
appdmg "0.6.0"
fancy-log "^1.3.3"
plugin-error "^1.0.1"
through2 "^3.0.1"

gulp-prompt@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/gulp-prompt/-/gulp-prompt-1.2.0.tgz#8f716dd16efc7464f90d9a82fde9dd7e835ee12e"
Expand Down

0 comments on commit 7d49109

Please sign in to comment.