This forum is archived, go to the new forum!

This is the old fritzing discussion forum. Search it for valuable information from 2009 to 2015.

.FZBZ bins not shareable

CJMiller 5 years, 2 months ago

Now that I have finally had some success at making parts, I need to share them with some people. But my .fzbz bins get imported as empty with an error message that the parts could not be found. I opened my bin archive to examine it, and it seems that the .fzb goes by the locations on my filesystem, which seems odd since the archive contains the copies I am trying to share. And since it seems one cannot import parts directly yet, we are stuck.

 

Isn't there a way to specify that people's Fritzing installs look in the archive, instead of pointing it to my home filesystem?

 

Also, when I exported the bin, the .resulting .fzb file references mt icon.png, but doesn't include it in the .fzbz. So my blank import doesn't have any icon, either.

CJMiller 5 years, 2 months ago

Nearly forgot to mention - this is with the current version, running on MacOS 10.6.8.

CJMiller 5 years, 2 months ago

I have basically narrowed down the problem. It is the same as my other file I/O post below.

*There is a bug in the zip conversion*

When I take the fzbz file directly exported by Fritzing, and import it on another box, it does work. But when I unzip and re-zip any Fritzing files - this corrupts them and makes them useless. I don't understand why, since the notes say these are plain zip files. I have tried four common zip utilities and experienced the problem with every one. Either Fritzing uses some undocumented, quirky means of compression, or it is a bug. I have used re-named zip archives with other programs for many years and never had this problem before.

 

Since Fritzing does not export my icons, and I cannot open the fzbz, this means that my bins import with no icons. Which makes it hard for me to keep track of them since I cannot see well. I suppose I can distribute the bins with a script to move the icons.

 

CJMiller 5 years, 2 months ago

Also, not only does the unzip-rezip make the files unimportable! I tried manually installing the fzb and svg files to their contrib directories, and Fritzing would start with the bin present, but lacking parts icons. When I tried to move any part to the breadboard, it yielded a cascade of error messages complaining that it "could not find" the files which were in their correct positions. It was very curious behavior.

CJMiller 5 years, 2 months ago

Reading src:lib:quazip, I see that it is not a bug, but a "feature"...

You folks could have saved me quite a few hours of wasted efforts by just mentioning that the zips are made tamperproof. Maybe throw up an error box which says something like "Sorry, but the bin you are trying to import has been altered", or some such thing. Instead of leaving a user to puzzle over why the can't import/export their own work. This was extremely frustrating!

 

André Knörig 5 years, 2 months ago

André Knörig

Hi CJ, sorry to only find your post now. As far as we're aware, these are really just standard zip files. We haven't had any issue with them so far, also when using standard system zip tools. I can't speak for the Mac system zipper, though, but I can imagine it might be a bit special.

Do you have a simple to replicate example that we can look into?

CJMiller 5 years, 2 months ago

Hi Andre!

I don't have the files handy now, but try this yourself - export some .fzbz or .fzpz files. Unzip them, rezip them and try to re-import them again. I tried this on Mac and Windows partitionsd with the same results. Reading the source code in src:lib:quazip it seems to make tamperproof zips by generating a "magic number" based upon the machine and the time. So when the files get de-compressed and re-compressed later, they are corrupted. This seems to have been done on purpose. Mind you, I am not much of a programmer at all, so I could be wrong.

Fabian Althaus 5 years, 1 month ago

hej cj,

i tried it many times now in diffrent versions of fritzing on my machine (win7 64bit). i exported unziped reziped and imported fzbz and fzpz files now more than 10 times. i can not get the error message you got on your system. thats why it'll be really good to get one of the files you have trouble with. one thought of me was that you try to import parts with the same module-id, but that does not bring up the error message you have got.even if i modify the files in the fzbz and zip them again, and rename them back to fzbz i can import them as normal. i use winrar to make the zip file. ...

so please show us some of your files and we can try to solve the problem you have.

 

greetings and sorry for the trouble. i think we can find a good way to solve the problem.

Sulmaz 5 years ago

In order to fix the issue of bins no shareable - please follow the steps below 

1. make a new bin folder in fritzing, 

2. drag the parts that you want into that folder

3. right click and export the folder (make sure you don't simply rename your "mine" mins and export that directly it will not work 

4. Also export each and every single part that is inside your bin as well

5. close fritzing

6. in the fritzing applications, go into the bin folder and copy the core bin fzb file 

7. change the core bin fzb file to the xml extension 

8. Open each and every single part that you have exported and change the fzpz extension to zip, unzip the file 

9. Inside the file, you will find an fzp folder, change this to xml,

10. copy the moduleID for that part into your core bin fzb file

your core fzb file should look like this:

 

<?xml version="1.0" encoding="UTF-8"?>

<!-- Created with Fritzing (http://www.fritzing.org/) -->

<module fritzingVersion='0.7.7b.08.14.6293' >

<title>Bin Name</title>

<instances>

<instance moduleIdRef="ACpower_bin"path="">

<views>

<iconView layer="icon">

<geometry z="-1" x="-1" y="-1"></geometry>

</iconView>

</views>

</instance>

        <instance moduleIdRef="DCpower_bin"path="">

<views>

<iconView layer="icon">

<geometry z="-1" x="-1" y="-1"></geometry>

</iconView>

</views>

</instance>

        <instance moduleIdRef="DecadeBox_bin"path="">  ******** this is the moduleRef - that you are copying from the fzpz files

 

*** Note, if your file does not look like above, your part will not be shareable -- make sure that the path = "" 

*** Note (2) you MUST repeat step 10 for each and every part that you have in your bin

 

11. Now save the core bin file as an fzb file with the exact SAME name as your fzbz file that you exported from frtizing

 

12. The user importing your file, MUST copy the fzb into their fritzing applications bin folder

13. The user can then open fritzing and import the bin 

 

HOPEFULLY this SHOULD work :)

-Sulmaz