From 847c880c77e80f125ae13955722acd5aa23a4e98 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 14:06:48 -0500 Subject: [PATCH 1/9] [github] macos-12 runner --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c151afef2..147ce2b99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: max-parallel: 3 matrix: #https://github.com/actions/runner-images - os: [ubuntu-22.04, macos-11, windows-2022] + os: [ubuntu-22.04, macos-12, windows-2022] outputs: buildtag: ${{ steps.ids.outputs.buildtag }} shortsha: ${{ steps.ids.outputs.shortsha }} From 7b8ab9227a0214cf40d43247a4be1ea73674f1b5 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 14:39:08 -0500 Subject: [PATCH 2/9] remove external appdmg node_module --- .github/workflows/build.yml | 7 ------- gulpfile.js | 4 ---- package.json | 4 +--- yarn.lock | 17 ----------------- 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 147ce2b99..b8fc7eaba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,13 +80,6 @@ jobs: npm config set fetch-retry-maxtimeout 600000 -g yarn install --immutable --immutable-cache --check-cache - # this forces appdmg install even though package.json optionalDependencies has/needs it. - - name: setup macos - if: ${{ startsWith(matrix.os, 'macos') }} - run: | - npm install appdmg@0.6.6 --python=python2.7 - continue-on-error: true - - name: yarn gulp clean-release run: yarn gulp clean-release continue-on-error: true diff --git a/gulpfile.js b/gulpfile.js index 8a6ede4e4..4a4279efd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,8 +1,6 @@ 'use strict'; var pkg = require('./package.json'); -// remove gulp-appdmg from the package.json we're going to write -delete pkg.optionalDependencies['gulp-appdmg']; const child_process = require('child_process'); const fs = require('fs'); @@ -677,10 +675,8 @@ function release_osx64() { console.log('running locally - skipping signing of app'); } - //var appdmg = require('gulp-appdmg'); const appdmg = require('./gulp-macdmg'); - // The appdmg does not generate the folder correctly, manually createDirIfNotExists(RELEASE_DIR); diff --git a/package.json b/package.json index cd6539da9..b9e23fb26 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,5 @@ "vinyl-source-stream": "^2.0.0", "yarn": "1.22" }, - "optionalDependencies": { - "appdmg": "^0.6.6" - } + "optionalDependencies": {} } diff --git a/yarn.lock b/yarn.lock index c65a69b7a..3d7cab82a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -251,23 +251,6 @@ appdmg@^0.6.0: path-exists "^4.0.0" repeat-string "^1.5.4" -appdmg@^0.6.6: - version "0.6.6" - resolved "https://registry.yarnpkg.com/appdmg/-/appdmg-0.6.6.tgz#d06bd82b530032fd7a8f0970a1c6ee6196e1efce" - integrity sha512-GRmFKlCG+PWbcYF4LUNonTYmy0GjguDy6Jh9WP8mpd0T6j80XIJyXBiWlD0U+MLNhqV9Nhx49Gl9GpVToulpLg== - 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" - append-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" From 80fd9b913bce315f02ccf40c9324542352175810 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 14:55:23 -0500 Subject: [PATCH 3/9] add appdmg@0.6.6 --- package.json | 4 +++- yarn.lock | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b9e23fb26..c2c65ffb0 100644 --- a/package.json +++ b/package.json @@ -92,5 +92,7 @@ "vinyl-source-stream": "^2.0.0", "yarn": "1.22" }, - "optionalDependencies": {} + "optionalDependencies": { + "appdmg": "0.6.6" + } } diff --git a/yarn.lock b/yarn.lock index 3d7cab82a..a2e0dcbd5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -234,6 +234,23 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +appdmg@0.6.6: + version "0.6.6" + resolved "https://registry.yarnpkg.com/appdmg/-/appdmg-0.6.6.tgz#d06bd82b530032fd7a8f0970a1c6ee6196e1efce" + integrity sha512-GRmFKlCG+PWbcYF4LUNonTYmy0GjguDy6Jh9WP8mpd0T6j80XIJyXBiWlD0U+MLNhqV9Nhx49Gl9GpVToulpLg== + 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.0: version "0.6.0" resolved "https://registry.yarnpkg.com/appdmg/-/appdmg-0.6.0.tgz#81b3beab624ab458e6104d87c5cfa4b172203821" From e082fc6ddd1deb0b266cbf42a8c375c6418d25aa Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 15:15:24 -0500 Subject: [PATCH 4/9] gulp-appdmg replaces gulp-macdmg --- .github/workflows/build.yml | 9 +++++++++ gulp-appdmg.js | 31 +++++++++++++++++++++++++++++++ gulp-macdmg.js | 30 ------------------------------ gulpfile.js | 15 ++++++--------- 4 files changed, 46 insertions(+), 39 deletions(-) create mode 100644 gulp-appdmg.js delete mode 100644 gulp-macdmg.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8fc7eaba..6c306fa21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,6 +80,15 @@ jobs: npm config set fetch-retry-maxtimeout 600000 -g yarn install --immutable --immutable-cache --check-cache + # this forces appdmg install even though package.json optionalDependencies has/needs it. + - name: setup macos + if: ${{ startsWith(matrix.os, 'macos') }} + run: | + sudo -H pip install setuptools packaging + sudo npm install -g yarn@1.22.0 node-gyp@10 macos-alias + yarn --network-timeout 1000000 + continue-on-error: true + - name: yarn gulp clean-release run: yarn gulp clean-release continue-on-error: true diff --git a/gulp-appdmg.js b/gulp-appdmg.js new file mode 100644 index 000000000..f3128c79e --- /dev/null +++ b/gulp-appdmg.js @@ -0,0 +1,31 @@ + +const appdmg = require('appdmg'); +const through = require('through2'); +const gutil = require('gulp-util'); + +const PluginError = gutil.PluginError; +const PLUGIN_NAME = 'gulp-appdmg'; + +module.exports = function(options) { + const stream = through.obj(function(file, encoding, next) { + next(); + }, function(callback) { + const self = this; + const ee = appdmg(options); + + ee.on('progress', function(info) { + gutil.log(`${info.current}/${info.total} ${info.type} ${info.title || info.status}`); + }); + + ee.on('error', function(err) { + self.emit('error', new PluginError(PLUGIN_NAME, err)); + callback(); + }); + + ee.on('finish', callback); + }); + + // returning the file stream + stream.resume(); + return stream; +}; diff --git a/gulp-macdmg.js b/gulp-macdmg.js deleted file mode 100644 index cf667d34b..000000000 --- a/gulp-macdmg.js +++ /dev/null @@ -1,30 +0,0 @@ -var appdmg = require('appdmg'); -var through = require('through2'); -var PluginError = require('plugin-error'); -var log = require('fancy-log'); - -var PLUGIN_NAME = 'gulp-macdmg'; - -module.exports = function(options) { - var stream = through.obj(function(file, encoding, next) { - next(); - }, function(callback) { - var self = this; - var ee = appdmg(options); - - ee.on('progress', function(info) { - log(info.current + '/' + info.total + ' ' + info.type + ' ' + (info.title || info.status)); - }); - - ee.on('error', function(err) { - self.emit('error', new PluginError(PLUGIN_NAME, err)); - callback(); - }); - - ee.on('finish', callback); - }); - - // returning the file stream - stream.resume(); - return stream; -}; diff --git a/gulpfile.js b/gulpfile.js index 4a4279efd..d6bed50d5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,8 @@ 'use strict'; var pkg = require('./package.json'); +// remove gulp-appdmg from the package.json we're going to write +delete pkg.optionalDependencies['gulp-appdmg']; const child_process = require('child_process'); const fs = require('fs'); @@ -675,7 +677,7 @@ function release_osx64() { console.log('running locally - skipping signing of app'); } - const appdmg = require('./gulp-macdmg'); + const appdmg = require('./gulp-appdmg'); // The appdmg does not generate the folder correctly, manually createDirIfNotExists(RELEASE_DIR); @@ -684,16 +686,12 @@ function release_osx64() { return gulp.src(['.']) .pipe(appdmg({ target: path.join(RELEASE_DIR, getReleaseFilename('macOS', 'dmg')), - basepath: path.join(APPS_DIR, pkg.name, 'osx64'), + basepath: path.join(appDirectory, metadata.name, 'osx64'), specification: { - 'title': 'Emuflight Configurator', - //'icon': 'assets/osx/app-icon.icns', // FIXME - 'icon-size': 128, - 'background': path.join(__dirname, 'assets/osx/dmg-background.png'), - 'contents': [ + title: 'Emuflight Configurator', + contents: [ { 'x': 180, 'y': 590, 'type': 'file', 'path': pkg.name + '.app', 'name': 'Emuflight Configurator.app' }, { 'x': 570, 'y': 590, 'type': 'link', 'path': '/Applications' } - ], background: path.join(__dirname, 'assets/osx/dmg-background.png'), format: 'UDZO', @@ -703,7 +701,6 @@ function release_osx64() { height: 755 } }, - //'code-sign': { 'signing-identity': process.env.APP_IDENTITY } }, }) ); From 47dbcc8d2f5302583499ddd9e29c47bd439a9972 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 15:19:47 -0500 Subject: [PATCH 5/9] node-gyp@9.4 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c306fa21..c6c1028d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: if: ${{ startsWith(matrix.os, 'macos') }} run: | sudo -H pip install setuptools packaging - sudo npm install -g yarn@1.22.0 node-gyp@10 macos-alias + sudo npm install -g yarn@1.22.0 node-gyp@9.4 macos-alias yarn --network-timeout 1000000 continue-on-error: true From cddac9dd960bc114ba59b0fd6df5aede2082f267 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 15:21:59 -0500 Subject: [PATCH 6/9] node-gyp@8.4 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6c1028d1..3b27c1f4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: if: ${{ startsWith(matrix.os, 'macos') }} run: | sudo -H pip install setuptools packaging - sudo npm install -g yarn@1.22.0 node-gyp@9.4 macos-alias + sudo npm install -g yarn@1.22.0 node-gyp@8.4 macos-alias yarn --network-timeout 1000000 continue-on-error: true From 081d5f3d2b830486047c4b6499844d0cc49fe8b2 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 15:23:42 -0500 Subject: [PATCH 7/9] node-gyp@7.1 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b27c1f4f..e12470d59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: if: ${{ startsWith(matrix.os, 'macos') }} run: | sudo -H pip install setuptools packaging - sudo npm install -g yarn@1.22.0 node-gyp@8.4 macos-alias + sudo npm install -g yarn@1.22.0 node-gyp@7.1 macos-alias yarn --network-timeout 1000000 continue-on-error: true From 73665a7dc320ec9c6c7039b27d78acd5bbb3c39b Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 15:26:02 -0500 Subject: [PATCH 8/9] node-gyp@5.1.1 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e12470d59..b8ec460a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: if: ${{ startsWith(matrix.os, 'macos') }} run: | sudo -H pip install setuptools packaging - sudo npm install -g yarn@1.22.0 node-gyp@7.1 macos-alias + sudo npm install -g yarn@1.22.0 node-gyp@5.1.1 macos-alias yarn --network-timeout 1000000 continue-on-error: true From bcc821586ee0e5596e45932be191a039c17198a7 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 23 May 2024 15:47:14 -0500 Subject: [PATCH 9/9] add macos-alias --- package.json | 3 ++- yarn.lock | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c2c65ffb0..b9814f8f1 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "yarn": "1.22" }, "optionalDependencies": { - "appdmg": "0.6.6" + "appdmg": "0.6.6", + "macos-alias": "^0.2.11" } } diff --git a/yarn.lock b/yarn.lock index a2e0dcbd5..ce5a45245 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3548,10 +3548,10 @@ lru_map@^0.3.3: resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= -macos-alias@~0.2.5: +macos-alias@^0.2.11, macos-alias@~0.2.5: version "0.2.11" resolved "https://registry.yarnpkg.com/macos-alias/-/macos-alias-0.2.11.tgz#feeea6c13ba119814a43fc43c470b31e59ef718a" - integrity sha1-/u6mwTuhGYFKQ/xDxHCzHlnvcYo= + integrity sha512-zIUs3+qpml+w3wiRuADutd7XIO8UABqksot10Utl/tji4UxZzLG4fWDC+yJZoO8/Ehg5RqsvSRE/6TS5AEOeWw== dependencies: nan "^2.4.0"