LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.7k stars 153 forks source link

Volume name longer than 27 characters #48

Closed maxpavlov closed 9 years ago

maxpavlov commented 9 years ago

At the process of generating a .dmg, I get the following error on step 16:

[ 1/20] Looking for target... [ OK ] [ 2/20] Reading JSON Specification... [ OK ] [ 3/20] Parsing JSON Specification... [ OK ] [ 4/20] Validating JSON Specification... [ OK ] [ 5/20] Looking for files... [ OK ] [ 6/20] Calculating size of image... [ OK ] [ 7/20] Creating temporary image... [ OK ] [ 8/20] Mounting temporary image... [ OK ] [ 9/20] Making hidden background folder... [ OK ] [10/20] Copying background... [ OK ] [11/20] Reading background dimensions... [ OK ] [12/20] Copying icon... [ OK ] [13/20] Setting icon... [ OK ] [14/20] Creating links... [ OK ] [15/20] Copying files... [ OK ] [16/20] Making all the visuals...
AssertionError: false == true

Please advise on how I can get a more detailed log of what's wrong with the process.

LinusU commented 9 years ago

Hmm, that's strange... I remember seeing a similar thing before. If you could run it with -v it should output a stack-trace, that would help a lot.

I've searched thru ds-store and macos-alias for assert but haven't really found anything that I think would be triggered...

LinusU commented 9 years ago

Actually, I just made some changes to macos-alias. Could you make sure that you are testing with version 0.2.6 of it.

You can check which one you have with npm ls and update with npm install. This must be done in the directory of appdmg which is usually /usr/local/lib/node_modules/appdmg. Run npm ls -g appdmg to see where it's installed.

LinusU commented 9 years ago

The easiest way probably is to npm remove -g appdmg, npm install -g appdmg.

maxpavlov commented 9 years ago

Ok, did it and now I see:

AssertionError: Volume name is not longer than 27 chars. I think it's the title. I'll change it.

By the way, when I am stuck on step 16 like this, I see that the .dmg is created somewhere and the space isn't being freed up until I restart which casts me uncapable of running the appdmg several times witout a restart since I am creating a large (8GB) dmg. Can you please make sure the app cleans up if fails in future? Just a hint, probably not a very common case.

maxpavlov commented 9 years ago

Yep, title couldn't be more then 27 chars. Got it. Thanks.

LinusU commented 9 years ago

Yeah, I previously discussed proper cleaning in #40. Normally it isn't needed but when things go wrong it's good to have. At least it's deleted upon restart, otherwise it would really be a pain.

Having a limit of 27 characters on the volume name is not too fun thought. I'm just guessing now but I think that we can just truncate the Volume Name in the alias file...

LinusU commented 9 years ago

I did a quick try and it turns out that truncating the volume name in the alias does indeed work. However, writing any garbage at all as the volume name still works so I don't really know how I want to solve it.

One solution would be to let node-alias use CFURLCreateBookmarkDataFromFile in the native code but that would be one more thing that would only work on OS X.

I'm closing this one in favour of LinusU/node-alias#7