New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load/Save as uncompressed fz file #3168

Merged
merged 2 commits into from Apr 8, 2016

Conversation

Projects
None yet
2 participants
@zeehio
Copy link
Contributor

zeehio commented Dec 13, 2015

This pull request starts dealing with issue #3132.

  • Allow to save as *.fz file type:
    • Show "Fritzing uncompressed (*.fz)" in the "Save As" file type dialog.
    • saveBundledNonAtomicEntity function allows to save an *.fz 'bundle' by
      skipping the compression step (saves all files in the same directory).
  • Allow to load a *.fz file:
    • Drop readonly warning.
  • Rename private variable _fritzingExtensions_ to p_fritzingExtensions as
    variables starting with underscore are compiler reserved in misc.cc.

TO DO:

  • Deal with overwriting existing auxiliary files. Maybe using a file +
    subdirectory approach would be safer?
    • mysketch.fz
    • mysketch.fz_FILES/
  • Should the save as uncompressed option be extended to other bundled types
    (such as uncompressed custom parts...)
  • Should loaded files be copied to another directory just like *.fzz files
    are extracted to another directory?
  • Thorough testing and code review. Saving and loading are delicate parts of the code and I do not want to be hold responsible of any bug...

Philip Taffet and others added some commits Aug 26, 2015

Load/Save as uncompressed fz file
* Allow to save as *.fz file type:
  - Show "Fritzing uncompressed (*.fz)" in the "Save As" file type dialog.
  - saveBundledNonAtomicEntity function allows to save an *.fz 'bundle' by
    skipping the compression step (saves all files in the same directory).

* Allow to load a *.fz file:
  - Drop readonly warning.

* Rename private variable ___fritzingExtensions___ to p_fritzingExtensions as
  variables starting with underscore are compiler reserved in misc.cc.

TO DO:
  - Deal with overwriting existing auxiliary files. Maybe using a file +
    subdirectory approach would be more convenient?
     * mysketch.fz
     * mysketch.fz_FILES/
  - Should loaded files be copied to another directory just like *.fzz files
    are extracted to another directory?
  - Should the save as uncompressed option be available for other bundled types
    (such as custom parts...)
@el-j

This comment has been minimized.

Copy link
Member

el-j commented Mar 27, 2016

hello philip thanks for your work,
but i do not understand why you want to save an uncompressed fz. saving the fz will produce
a more complex behavior for all useres. e.g. parts can get lost very fast. what is the aim and the advantage for this option?

@zeehio

This comment has been minimized.

Copy link
Contributor Author

zeehio commented Mar 27, 2016

We (@ptaffet, myself and others) would like to save uncompressed fz files in order to be able to have a text-based format suitable for version control systems (such as git).

This change would allow easy Fritzing/Git (or github) interaction and would be very welcome by those of us who keep our arduino code in version control systems next to our schematics and documentation.

For sure we agree that for general releases, fzz files are the preferred way of saving a schematic (as you say parts are not lost).

I hope this makes sense to you, feel free to ask any question or discuss :-)

@el-j

This comment has been minimized.

Copy link
Member

el-j commented Apr 2, 2016

ok, i checked your changes, and i really like how it works.
one thing is a bit "sad". when you look into the fz, all parts has absolute paths to the fritzing core paths.
in my case somewhere in my userfolder-structure of my machine. but i see that this is a problem of the fritzing-export. maybe we can find a way to change that, so fritzing uses the "-parts"-path as a variable. but i intent this is much more work. i will merge your branch after a bit more testing.

thanks for this idea and the work so far!

@el-j el-j merged commit add3731 into fritzing:master Apr 8, 2016

@zeehio

This comment has been minimized.

Copy link
Contributor Author

zeehio commented Apr 8, 2016

Thanks for considering it and merging it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment