electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.63k stars 1.74k forks source link

dmg license #1491

Closed akorchev closed 7 years ago

akorchev commented 7 years ago

Is there any event fired before uploading the assets? I am currently trying afterPack but it seems it is too early. I am adding a license agreement to a DMG in afterPack (using a Promise) but it looks as if afterPack doesn't wait and the DMG is uploaded before my script finishes and ends up corrupted. Here is my code:

afterPack() {
    return new Promise((resolve, reject) => {
         child_process.execFileSync(path.join(__dirname, 'licenseDMG.py'), [
             'DMG_FILE.dmg', 
             'eula.txt' 
         ])
         resolve()
     })
}
develar commented 7 years ago

License for DMG will be supported today.

develar commented 7 years ago

English supported. Russian and other non-ASCII langs — feel free to open issue if need.

akorchev commented 7 years ago

I tried 17.1.0 and got the following error:

: Exit code: 2. Command failed: Rez -a /var/folders/93/y7sx09v14ks_9syc38tzk2b40000gn/T/electron-builder-y3MwQL/0-3.r -o /Users/korchev/github/radzen-studio/dist/dist/Radzen-1.0.4.dmg
/var/folders/93/y7sx09v14ks_9syc38tzk2b40000gn/T/electron-builder-y3MwQL/0-3.r:282: ### /Applications/Xcode.app/Contents/Developer/usr/bin/Rez - Hex string spans lines.
/var/folders/93/y7sx09v14ks_9syc38tzk2b40000gn/T/electron-builder-y3MwQL/0-3.r:283: ### /Applications/Xcode.app/Contents/Developer/usr/bin/Rez - Invalid number.
/var/folders/93/y7sx09v14ks_9syc38tzk2b40000gn/T/electron-builder-y3MwQL/0-3.r:283: ### /Applications/Xcode.app/Contents/Developer/usr/bin/Rez - Expected ';' or '}', but got 'Unknown token'
develar commented 7 years ago

@akorchev Is it possible to provide your license text?

akorchev commented 7 years ago

license_en.txt

akorchev commented 7 years ago

Here is the code I am currently using to add a license. There is some escaping going on: https://github.com/andreyvit/create-dmg/blob/master/support/dmg-license.py#L96