Giter VIP home page Giter VIP logo

electron-installer-dmg's People

Contributors

alexanderturinske avatar carlos121493 avatar dependabot[bot] avatar erickzhao avatar felixrieseberg avatar ffflorian avatar greenkeeper[bot] avatar imlucas avatar joshuapinter avatar jupjohn avatar kangas avatar malept avatar marshallofsound avatar mnaamani avatar pzrq avatar threema-danilo avatar zag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-installer-dmg's Issues

Path must be a string received undefined?

Any ideas why this grunt task fails with "Path must be a string? Also tried making the property names strings in the json literal.

var createDMG = require('electron-installer-dmg');
var opts = {
appPath: "casehub-darwin-x64",
name: "casehub",
background: 'app/images/osxDmgBackground.png',
icon: 'app/images/osxIcon.icns',
overwrite:true
};
createDMG(opts, function done(err) {
console.log("DIRTY BIG OSX DMG BUILD ERROR**********************", err);
});

Error with macOS node 12.2.0

Install on macOS mojave with node 12.2.0 gives an error:

$ npm install -g electron-installer-dmg
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
/usr/local/bin/electron-installer-dmg -> /usr/local/lib/node_modules/electron-installer-dmg/bin/electron-installer-dmg.js

> [email protected] install /usr/local/lib/node_modules/electron-installer-dmg/node_modules/fs-xattr
> node-gyp rebuild

  CXX(target) Release/obj.target/xattr/src/async.o
../src/async.cc:35:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(1, argv);
              ^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/async.cc:52:46: error: no matching member function for call to 'ToObject'
    v8::Local<v8::Object> bufferObj = value->ToObject();
                                      ~~~~~~~^~~~~~~~

On MacOS the icon entry in packagerConfig is ignored

I've the following configuration in my package.json:

  "config": {
    "forge": {
      "makers": [
        {
          "name": "@electron-forge/maker-dmg"
        },
        {
          "name": "@electron-forge/maker-squirrel"
        },
        {
          "name": "@electron-forge/maker-zip"
        }
      ],
      "packagerConfig": {
        "icon": "./assets/icons/api-2#016ed84e/img/128x128"
      }
    }
  },

where the assets folder looks like below:

% ls -lh assets/icons/api-2\#016ed84e/img/128x128.*
-rw-r--r--  1   7.3K assets/icons/api-2#016ed84e/img/128x128.icns
-rw-r--r--  1    66K assets/icons/api-2#016ed84e/img/128x128.ico
-rw-r--r--  1   6.2K assets/icons/api-2#016ed84e/img/128x128.png

I'm somehow under the impression, than when I run now npm run make under MacOS, then the .icns file suffix gets auto-magically appended to the value of icon, which is then used by the @electron-forge/maker-dmg maker.

However, I'm simply unable to have the default value of electron.icns for CFBundleIconFile changed to my assets/.../128x128.icns in the resulting Info.plist, which is listed below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>BuildMachineOSBuild</key>
    <string>18E226</string>
    <key>CFBundleDisplayName</key>
    <string>API Explorer</string>
    <key>CFBundleExecutable</key>
    <string>API Explorer</string>
    <key>CFBundleIconFile</key>
    <string>electron.icns</string>
    <key>CFBundleIdentifier</key>
    <string>com.electron.api-explorer</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>API Explorer</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.1</string>
    <key>CFBundleVersion</key>
    <string>1.0.1</string>
    <key>DTCompiler</key>
    <string>com.apple.compilers.llvm.clang.1_0</string>
    <key>DTSDKBuild</key>
    <string>10.15</string>
    <key>DTSDKName</key>
    <string>macosx10.15</string>
    <key>DTXcode</key>
    <string>1110</string>
    <key>DTXcodeBuild</key>
    <string>11A1027</string>
    <key>LSApplicationCategoryType</key>
    <string>public.app-category.developer-tools</string>
    <key>LSMinimumSystemVersion</key>
    <string>10.10.0</string>
    <key>NSCameraUsageDescription</key>
    <string>This app needs access to the camera</string>
    <key>NSHighResolutionCapable</key>
    <true/>
    <key>NSMainNibFile</key>
    <string>MainMenu</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>This app needs access to the microphone</string>
    <key>NSPrincipalClass</key>
    <string>AtomApplication</string>
    <key>NSQuitAlwaysKeepsWindows</key>
    <false/>
    <key>NSRequiresAquaSystemAppearance</key>
    <false/>
    <key>NSSupportsAutomaticGraphicsSwitching</key>
    <true/>
  </dict>
</plist>

Even, when I provide the full icon name like below it does not work:

      "packagerConfig": {
        "icon": "./assets/icons/api-2#016ed84e/img/128x128.icns"
      }

Is this is bug, or am I operating under wrong assumptions? I also tried the following approach without any success:

  "config": {
    "forge": {
      "makers": [
        {
          "config": {
            "icon": "./assets/icons/api-2#016eaa4f7069c01b91bd21b68170d84e/img/128x128.icns"
          },
          "name": "@electron-forge/maker-dmg"
        },
        {
          "name": "@electron-forge/maker-squirrel"
        },
        {
          "name": "@electron-forge/maker-zip"
        }
      ],
      "packagerConfig": {
        "icon": "./assets/icons/api-2#016eaa4f7069c01b91bd21b68170d84e/img/128x128"
      }
    }
  },

dmg isn't compressed

the appdmg spec has this:

format (enum[string], optional) - Disk image format UDRW - UDIF read/write image UDRO - UDIF read-only image UDCO - UDIF ADC-compressed image UDZO - UDIF zlib-compressed image UDBZ - UDIF bzip2-compressed image (OS X 10.4+ only) ULFO - UDIF lzfse-compressed image (OS X 10.11+ only)

Can this be added in to this package? It would save about 10-15% space in my project's dmg, and I'd rather use this package than appdmg directly.

DMG maker on macOS 12.3 fails due to bless

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.0.0-beta.63

Electron version

17.1.2

Operating system

macOS 12.3

Last known working Electron Forge version

No response

Expected behavior

Running yarn make --platform=arm64 with a valid Forge configuration should build the application.

Actual behavior

🚩 This error relates specifically to M1 arm64 Macs running macOS 12.3.

Prior to upgrading to macOS 12.3, the yarn make command was working perfectly. Now, @electron-forge/maker-dmg is failing due to the following error:

bless: The 'openfolder' is not supported on Apple Silicon devices.

Full error output

✖ Making for target: dmg - On platform: darwin - For arch: arm64

An unhandled error has occurred inside Forge:
An error occured while making for target: dmg
Command failed: bless --folder /Volumes/AppName-arm64 --openfolder /Volumes/AppName-arm64
bless: The 'openfolder' is not supported on Apple Silicon devices.

Error: Command failed: bless --folder /Volumes/AppName-arm64 --openfolder /Volumes/AppName-arm64
bless: The 'openfolder' is not supported on Apple Silicon devices.

    at makeError (/Users/xxx/node_modules/appdmg/node_modules/execa/index.js:174:9)
    at /Users/xxx/node_modules/appdmg/node_modules/execa/index.js:278:16
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.

Steps to reproduce

  1. Create a valid DMG config
  2. Run yarn make
  3. See error relating to bless

Additional information

The issue is due to an outdated version of appdmg in electron-installer-dmg which @electron-forge/maker-dmg depends on.

appdmg was recently patched in version 0.6.3 with a fix for this issue.

Until electron-installer-dmg is updated to use a newer version of appdmg, it is possible to force a newer appdmg version and fix this issue using Yarn Resolutions or an NPM package called NPM Force Resolutions. It's not ideal, but it works.

Here is what needs to get added to your package.json file.

"resolutions": {
  "**/@electron-forge/maker-dmg/electron-installer-dmg/appdmg": "^0.6.4"
}

feature /help to per or post install script execute

hello..
i am looking for this feature if we can do or any help.

actually after create dmg i required to copy some file on some location so if inside dmg after execute that script so something good.

but i don't know about mac.

so if youkanow anything or you can implement in this so something good.

Thanks
Dipen

An in-range update of debug is breaking the build 🚨

Version 2.4.0 of debug just got published.

Branch Build failing 🚨
Dependency debug
Current Version 2.3.3
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As debug is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 7 commits .

  • b82d4e6 release 2.4.0
  • 41002f1 Update bower.json (#342)
  • e58d54b Node: configurable util.inspect() options (#327)
  • 00f3046 Node: %O (big O) pretty-prints the object (#322)
  • bd9faa1 allow colours in workers (#335)
  • 501521f Use same color for same namespace. (#338)
  • e2a1955 Revert "handle regex special characters"

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

os.tmpDir() is deprecated

When running electron-installer-dmg, the following deprecation warning is displayed:
DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

Error: Must be run on OSX

I have tried running running this package on Heroku, and got the following error:

Error: Must be run on OSX

Possible to support making DMG's when on another OS?

OS support

Does this package can only be run on OSX ? When I package on Linux, I get the following error:
`
/home/xxxx/jenkins/workspace/Recorder-Build-test/gulpfile.js:35
if (err) throw err;
^

Error: Must be run on OSX
at module.exports (/home/xxxx/jenkins/workspace/Recorder-Build-test/node_modules/electron-installer-dmg/index.js:52:17)
at packageDmg (/home/xxxx/jenkins/workspace/Recorder-Build-test/gulpfile.js:28:3)
at /home/xxxx/jenkins/workspace/Recorder-Build-test/gulpfile.js:186:5
at /home/xxxx/jenkins/workspace/Recorder-Build-test/node_modules/electron-packager/index.js:266:7
at end (/home/xxxx/jenkins/workspace/Recorder-Build-test/node_modules/run-series/index.js:8:15)
at done (/home/xxxx/jenkins/workspace/Recorder-Build-test/node_modules/run-series/index.js:11:10)
at each (/home/xxxx/jenkins/workspace/Recorder-Build-test/node_modules/run-series/index.js:16:43)
at /home/xxxx/jenkins/workspace/Recorder-Build-test/node_modules/electron-packager/common.js:291:7
at next (/home/xxxx/jenkins/workspace/Recorder-Build-test/node_modules/rimraf/rimraf.js:74:7)
at FSReqWrap.CB [as oncomplete] (/home/xxxx/jenkins/workspace/Recorder-Build-test/node_modules/rimraf/rimraf.js:110:9)
`

DSStore-clean error

Receiving this error when running electron-installer-dmg. Using v0.2.1.

{ Error: ENOENT: no such file or directory, open '/Users/username/Apps/MyApp/node_modules/ds-store/assets/DSStore-clean'
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/username/Apps/MyApp/node_modules/ds-store/assets/DSStore-clean' }

Also, I run a .DS_Store clean program each time before building: find . -name '.DS_Store' -type f -delete Created a build without running it, yet the installer produced the same error.

Can't set window size for DMG-Installer

I am using ember electron to create my app , but i am having problem with macOS installer. To build my app i am using ember electron:make command and it takes options from eletron-forge-config.js file.I was trying to set a background image for dmg-installer, and as my image has size 600x571 , i set same window size.
But somehow it resized my image and my windows became 600x571, but image 450x427.
Then I tried to resize window size to 450x427 , but now it not resizing at all.
Here is my code now for dmg installer:
electronInstallerDMG: { title: 'DyeGraph', background: 'public/assets/images/logo.png', icon: '/Users/roman.blyztsiv/projects/dyegraph/public/assets/images/logo.png', window: { width: 450, height: 427 }, contents: [ { 'x': 94, 'y': 260, 'type': 'file', 'path': '/Users/roman.blyztsiv/projects/dyegraph/electron-out/DyeGraph-darwin-x64/DyeGraph.app' }, { 'x': 355, 'y': 260, 'type': 'link', 'path': '/Applications' } ] },
I was trying to make everything like here , but nothing is happening

Background image just shows white

I've created a png background image to the exact size (658 × 498) of the one provided from here (even matched color profile and no alpha channel). I then ran the option threw and it built with no errors or warnings. Actually I built once and it threw an error because I misspelled the filename, then corrected and it built successfully, so I know it's looking for it and must have found it. But on testing the resulting DMG the background is plain white, no black border from the template either. Just white. Any ideas why this would happen?

Version: 0.2.1
Node Version: 6.4.0

make reproducible builds

We need reproducible builds but the .dmg produced is different each time:

$ electron-installer-dmg --icon=../../../app/icons/png/96x96.png ./Cosmos\ Voyager.app FooBar1
$ electron-installer-dmg --icon=../../../app/icons/png/96x96.png ./Cosmos\ Voyager.app FooBar2
$ electron-installer-dmg --icon=../../../app/icons/png/96x96.png ./Cosmos\ Voyager.app FooBar3
$ ls -l FooBar*
-rw-r--r--@ 1 david  staff  164625758 Jul 23 17:39 FooBar1.dmg
-rw-r--r--@ 1 david  staff  164625772 Jul 23 17:40 FooBar2.dmg
-rw-r--r--@ 1 david  staff  164625780 Jul 23 17:40 FooBar3.dmg

--overwrite increasing continuously DMG size

I am running it in Macos Sierra 10.12.6.
I am using --overwrite argument to get a new installer, however seems it is adding to the current DMG file instead of over write it.
Yeah the final build runs the expected code, but the DMG continues growing.
Here is the exact line i am executing:

electron-installer-dmg --overwrite './out/Sky Pro Virtual Support Center-darwin-x64/Sky Pro Virtual Support Center.app' installer

First time i run that, i have a 60MB DMG, second time 120MB and so on.
Yeah the workaround is to first remove the DMG.

rm installer.dmg

Update node-appdmg to sign .dmg

hi!

it will be nice that electron-forge has the possibility of sign a dmg,

and for this reason, this module should update to last node-appdmg!

can it update?

thanks!!

hdiutils failure on OSX El Capitan

When running this through an npm script after successfully running electron-packager I get the following output:

Creating OSX package (this may take a while)

(node:10985) DeprecationWarning: setBackground is deprecated, please use setBackgroundPath

{ Error: Error running `hdiutil`! Exit code was 1
    at ChildProcess.<anonymous> (/Users/macspare/Documents/AppName/node_modules/appdmg/lib/util.js:23:17)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
  exitCode: 1,
  stdout: 'Preparing imaging engine…\nReading Protective Master Boot Record (MBR : 0)…\n',
  stderr: '\nhdiutil: convert failed - Invalid argument\n' }

Here is the script that runs:

var objPackage = require('../package.json');
var macOptions = {
    "appPath": "./out/" + objPackage.name + "-darwin-x64/" + objPackage.name + ".app",
    "name": objPackage.name,
    "out": "./out/installers/",
    "icon": "./assets/images/logo.png"
};

console.log('Creating OSX package (this may take a while)');

var createDMG = require('electron-installer-dmg');
createDMG(macOptions, function done (err)
{

    if(err){ console.log(err); } else { console.log('Successfully created package at ' + macOptions.out + macOptions.name + '.dmg'); }

});

Thanks.

Use GitHub Actions for CI

There is currently no CI running for this repository (presumably due to the travis-ci.org shutdown).

Wrote DMG to: undefined

DMG is well created. But at the end of the process, electron-installer-dmg display "Wrote DMG to: undefined"
Capture d’écran, le 2019-03-17 à 15 52 00

Error running electron-installer-dmg

Running electron-installer-dmg AppName.app OutputName getting following ouput

{ Error: spawn bless ENOENT
    at exports._errnoException (util.js:1034:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn bless',
  path: 'bless',
  spawnargs:
   [ '--folder',

     '/Volumes/OutputName',
     '--openfolder',
     '/Volumes/OutputName' ],
  cmd: 'bless --folder /Volumes/OutputName --openfolder /Volumes/OutputName',
  stdout: '',
  stderr: '' }

electron-installer-dmg fails when output path doesn't exist

I have an npm script:

"installer:osx": "electron-installer-dmg ./builds/releases/$npm_package_version/$npm_package_productName-darwin-x64/$npm_package_productName.app $npm_package_productName-$npm_package_version --out=builds/installer/osx/$npm_package_version",

Which should create a path similar to:

~/myProject/builds/installer/osx/0.0.1/myApp-0.0.1.dmg

but this fails when any part of the folder path does not exist. Other tools like electron-packager auto create paths. Should this one auto create the output path?

createDMG fails when running on m1 mac when running under x86_64 architecture

I'm trying to build an app for x86_64 on m1 mac. I'm running the build scripts through the compatibility layer, so it looks like this
arch -86_64 /path/build_app.sh
I have different versions of node for arm and x86 installed, so this particular script is running with node for x86. So when the script is running, it detects the architecture as x86 and tries to run a command that is incompatible with arm Macs

15:05:35.200 › Command failed: bless --folder /Volumes/SPINSInstaller --openfolder /Volumes/SPINSInstaller
bless: The 'openfolder' is not supported on Apple Silicon devices.

Is there any way to avoid this error and build for x86 on an arm machine?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.