beta and demo of smartversion command line, linux/mac build

Forum about beta and future version of Smartversion. Can contain feature request

Moderators: jaclaz, BestiaPL

beta and demo of smartversion command line, linux/mac build

Postby gvollant » Sat Jan 02, 2010 11:58 pm

I got version of sparkle from 1.5b2 to 1.5b6 to create a demo

http://gvollant.free.fr/demo_sparkle.zip : a demo of using smartversion with several sparkle version

http://gvollant.free.fr/smvsdk002.zip : the smartversion sdk (binary only for windows, but this is just a project to port on mac)

http://gvollant.free.fr/smv_all.zip : smartversion command line executable (win, mac, linux)
gvollant
Site Admin
 
Posts: 251
Joined: Sun May 30, 2004 4:53 pm

Re: beta and demo of smartversion command line, linux/mac build

Postby gvollant » Sat Jan 02, 2010 11:59 pm

About the demo


#!/bin/bash

./smv xz Sparkle_all04_demo_full.svf Sparkle_0.zip -v 0
./smv xz Sparkle_all04_demo_full.svf Sparkle_1.zip -v 1
./smv xz Sparkle_all04_demo_full.svf Sparkle_2.zip -v 2
./smv xz Sparkle_all04_demo_full.svf Sparkle_3.zip -v 3
./smv xz Sparkle_all04_demo_full.svf Sparkle_4.zip -v 4


First, I just recreate a zipfile with each version from the first .svf file, just here for demo.
We will not reuse Sparkle_all04_demo_full.svf


./smv czz Sparkle_all04.svf Sparkle_0.zip -n "Sparkle_0_zip 1.5b2" > nul
./smv iz Sparkle_all04.svf Sparkle_1.zip -n "Sparkle_1_zip 1.5b3" > nul
./smv iz Sparkle_all04.svf Sparkle_2.zip -n "Sparkle_2_zip 1.5b4" > nul
./smv iz Sparkle_all04.svf Sparkle_3.zip -n "Sparkle_3_zip 1.5b5" > nul
./smv iz Sparkle_all04.svf Sparkle_4.zip -n "Sparkle_4_zip 1.5b6" > nul

I build an historical file with version from 0 to 4

"czz" create a SVF file which contain the first version compressed (using zLib)
"iz" add a new version (using smartversion engine differential compression)
-n version_name give a name (optional)
Sparkle_all04.svf will take 4.5 MB



./smv restructure Sparkle_all04.svf -target Sparkle_3_4_history.svf -v 3-4 -cpr

We create a subset file with only version 3 to 4 (in fact , 1.5b5 and 1.5b6)
-cpr (optionel) : ask the first version is stored as compressed


./smv restructure Sparkle_all04.svf -target Sparkle_3_4_patch.svf -v 3-4 -ref
Now, I create a patch from version 3 to 4
-ref mean the first version is just stored as reference (only name + size + crc + md5)
Filesize take 780 KB

./smv c Sparkle_3_4_patch.svf -bz Sparkle_3.zip
Compare the coherency between the first version Sparkle_3_4_patch.svf and Sparkle_3.zip
We compare name, size and compute crc32/md5


./smv xz Sparkle_3_4_patch.svf Sparkle_4_rebuild.zip -bz Sparkle_3.zip
We apply patch and obtain Sparkle_4_rebuild.zip (same than original Sparkle_4.zip)

./smv c Sparkle_3_4_patch.svf -bz Sparkle_3.zip -v 1
We compare the second version of Sparkle_3_4_patch.svf (so this is 1.5b6) with Sparkle_3.zip.
We obtain a mismatch result

echo will be ok normally
./smv c Sparkle_3_4_patch.svf -bz Sparkle_4.zip -v 1
We compare the second version of Sparkle_3_4_patch.svf (so this is 1.5b6) with Sparkle_4.zip.
We obtain a success result


./smv crz Sparkle_all04p.svf Sparkle_0.zip -n "Sparkle_0_zip 1.5b2" > nul
./smv iz Sparkle_all04p.svf Sparkle_1.zip -n "Sparkle_1_zip 1.5b3" -bz Sparkle_0.zip > nul
./smv iz Sparkle_all04p.svf Sparkle_2.zip -n "Sparkle_2_zip 1.5b4" -bz Sparkle_0.zip > nul
./smv iz Sparkle_all04p.svf Sparkle_3.zip -n "Sparkle_3_zip 1.5b5" -bz Sparkle_0.zip > nul
./smv iz Sparkle_all04p.svf Sparkle_4.zip -n "Sparkle_4_zip 1.5b6" -bz Sparkle_0.zip > nul

From scratch, I create a patchfile from version 0 to 4
"czz" create a SVF file which contain the first version as reference
"iz" add a new version (using smartversion engine differential compression)
-n version_name give a name (optional)



./smv restructure Sparkle_all04p.svf -target Sparkle_3_4_history_b.svf -v 3-4 -bz Sparkle_0.zip -cpr
./smv restructure Sparkle_all04p.svf -target Sparkle_3_4_patch_b.svf -v 3-4 -ref

Another way to obtain the same file than upper, with restructure option
As the first version is stored as reference, we give the zipfile with “-bz”


./smv c Sparkle_3_4_patch_b.svf -bz Sparkle_3.zip
./smv xz Sparkle_3_4_patch_b.svf Sparkle_4_rebuild_b.zip -bz Sparkle_3.zip
We do compare and extract

There is option like cr,cz,i,x : same thing than crz,czz,iz,xz , but you give the direct file and not a zipfile


The sdk is basically the main of the command line version gived as sample, with all the smartversion engine provided as library.
gvollant
Site Admin
 
Posts: 251
Joined: Sun May 30, 2004 4:53 pm


Return to SmartVersion future

Who is online

Users browsing this forum: No registered users and 1 guest

cron