encryptic-team / encryptic

An encryption-focused open source note taking application
Mozilla Public License 2.0
348 stars 40 forks source link

Packaging is broken for osx release #72

Open daed opened 5 years ago

daed commented 5 years ago

Something about the gulp process breaks the osx package. Attempts to run Encryptic.app crash with an error report and give a error including:

"dyld: Library not loaded: @rpath/Electron Framework.framework/Electron FrameworkReferenced from: /Contents/MacOS/./Electron"

I'm not sure what it is yet, but downloading the electron package, and inserting the encryption files manually appears to work.

dayfuaim commented 5 years ago

After exec gulp release on Mac OSX 10.10.5 (latest master) and then tring to run the resulting ./release/Encryptic-0.0.4-darwin-x64/encryptic.app, I get the following error:

Dyld Error Message:
  Library not loaded: @rpath/Electron Framework.framework/Electron Framework
  Referenced from: /Users/USER/Documents/*/encryptic.app/Contents/MacOS/Electron
  Reason: no suitable image found.  Did find:
    /Users/XXXXX/Documents/encryptic/release/Encryptic-0.0.4-darwin-x64/encryptic.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework: file too short

/Users/XXXXX/Documents/encryptic/release/Encryptic-0.0.4-darwin-x64/encryptic.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework is 35 bytes.

UPDATE: I found out that after downloading Electron, in .zip archive, which gulp works with, all symlinks have been degraded to plain text, so... ;) When I downloaded fresh Electron from Github (https://github.com/electron/electron/releases/download/v5.0.1/electron-v5.0.1-darwin-x64.zip) and extracted it manually into release/ folder, Encryptic became working. :) So I think it's bug in gulp.

daed commented 5 years ago

I spent some time on this tonight. I agree with this being a symlink issue. It's either with the unzip module (not supported but would get worked on back in 2015, apparently) or with gulpplugins's zip function. I'm pretty sure it would need to be fixed in both place to actually fix the issue. There are a plethora of other modules I've found to fill the gap, each with their own set of issues.

I also looked into electron-builder. It looks like it works really well aside from the binaries being about double the previous size, but according to the documentation, I shouldn't expect to be able to build apps for all platforms from any one platform (?!) so I guess that's out.

daed commented 4 years ago

I got electron-builder working better now. It's throwing errors out if I try to change the artifact names. I think it's some issue with the underlying zip program. I wrote a post-build script to correct the artifact names instead. I also incorporated the 'web-only' release into the script so it can handle the entire release process at this point.

I've got it in a separate branch for the time being. Will merge after I get some more gulp cleanup done. I think I'm going to end up gutting and rewriting everything after the build/serve gulp tasks.

Also, file sizes are about 170M unpacked and 65M packed. I think that's reasonable at this point.