Skip to content
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

use 7zip for addon.zip creation #1821

Merged
merged 2 commits into from
Aug 21, 2017
Merged

Conversation

CvH
Copy link
Member

@CvH CvH commented Jul 20, 2017

Use our own build 7z to create the addon.zip files.
We still use plain zip (kodi understands nothing else then very basic deflate) as archive.
Somehow 7zip does a better job at compressing zip files, we got an slight saving of 2-5% file size (more or less, depending of compressed addon).
It is not too much but the saving is for basically free.

opinions @kszaq @vpeter4 @MilhouseVH ?

@@ -56,7 +56,7 @@ pack_addon() {
fi
cd $ADDON_BUILD
echo "*** compressing Addon $PKG_ADDON_ID ... ***"
zip -rq $PKG_ADDON_ID-$ADDONVER.zip $PKG_ADDON_ID;
$TOOLCHAIN/bin/7za a -l -mx9 -bsp0 -bso0 $PKG_ADDON_ID-$ADDONVER.zip $PKG_ADDON_ID;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any special reason for ; character at the end of line?
Also why doesn't we store symbolic links as links? Is kodi even capable to extract them correctly? I think this could save space in some cases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Symbolic links save space indeed but Kodi can't handle them. It unpacks symlinks as regular files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But even in this case addon itself is smaller. Which is good.
Anyway, replacing zip with 7za seems ok to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vpeter4 Any special reason for ; character at the end of line?
it works with or without - the old version had it too, idk if it was some workaround or something (I can drop if you like)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is present from start as I can see. I think you should remove it :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vpeter4 done

@CvH
Copy link
Member Author

CvH commented Aug 17, 2017

updated pr, added -tzip to avoid auto guessing the format (mentioned by @MilhouseVH )
this gains, surprisingly, another ~0,5-1%

@CvH
Copy link
Member Author

CvH commented Aug 18, 2017

@MilhouseVH rebased

@CvH
Copy link
Member Author

CvH commented Aug 20, 2017

@vpeter4 added your cleanup from #1901

@vpeter4
Copy link
Contributor

vpeter4 commented Aug 21, 2017

Good, closing my pr.

@MilhouseVH MilhouseVH merged commit ba468a6 into LibreELEC:master Aug 21, 2017
@CvH CvH deleted the 9.0-create_addon-7z branch October 25, 2017 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants