History
Since very early beginning WinBuilder offers the possibility to attach files directly to the script.
Because the files can be also binaries like *.exe, and a script should be openable by any text editor w/o destroying the binary contents, the attachements are coded in base64.
To avoid misunderstandings: Before encoding the files internally are zipped to save space.
Disadvantages
Let me start with an example from reality:
multiPE contains the classic script "CD-Opera" by Medevil. The script has neary 4 MB attachements, which are unchanged since long time.
But during project development, the script code sometimes changes.
On every change of only one script line 4 MB have to be uploaded and downloaded by the user.
First solution step
There exists a project (multiPE folder) mirror (multiPE_Enc folder) which contains all the attachments. multiPE contains the script code only.
An intelligent "Extract" handling decides whether to extract from script or from mirror script.
This has been realized in multiPE version 28
Second solution step
When the files are split to a mirror, they not have to be base64 encoded. When they are zipped binaries, they are remarkably smaller.
The mirror now has the name "multiPE_Zip"
I realized that in multiPE version 39.
Tests
The "classic" encoded files brought a multiPE size of about 45 MB
Step 1 brought a multiPE size of about 6 MB and a multiPE_Enc size of about 39 MB
Step 2 brought the same multiPE size and a multiPE_Zip size of about 27 MB
For all three alternities the build time of the XP track has been the same of about 3 minutes.
Certification
Processing with the SplitBinEx application of course changes some files and makes the certification of that files invalid.
When before processing, the file have had a valid certification, the certification is renewed by SplitBinEx.
Theory
The intelligent decide mechanism:
Modified "Extract" example:
Peter
Since very early beginning WinBuilder offers the possibility to attach files directly to the script.
Because the files can be also binaries like *.exe, and a script should be openable by any text editor w/o destroying the binary contents, the attachements are coded in base64.
To avoid misunderstandings: Before encoding the files internally are zipped to save space.
Disadvantages
Let me start with an example from reality:
multiPE contains the classic script "CD-Opera" by Medevil. The script has neary 4 MB attachements, which are unchanged since long time.
But during project development, the script code sometimes changes.
On every change of only one script line 4 MB have to be uploaded and downloaded by the user.
First solution step
There exists a project (multiPE folder) mirror (multiPE_Enc folder) which contains all the attachments. multiPE contains the script code only.
An intelligent "Extract" handling decides whether to extract from script or from mirror script.
This has been realized in multiPE version 28
Second solution step
When the files are split to a mirror, they not have to be base64 encoded. When they are zipped binaries, they are remarkably smaller.
The mirror now has the name "multiPE_Zip"
I realized that in multiPE version 39.
Tests
The "classic" encoded files brought a multiPE size of about 45 MB
Step 1 brought a multiPE size of about 6 MB and a multiPE_Enc size of about 39 MB
Step 2 brought the same multiPE size and a multiPE_Zip size of about 27 MB
For all three alternities the build time of the XP track has been the same of about 3 minutes.
Certification
Processing with the SplitBinEx application of course changes some files and makes the certification of that files invalid.
When before processing, the file have had a valid certification, the certification is renewed by SplitBinEx.
Theory
The intelligent decide mechanism:
[Build-Binary] Set,#4,False If,#2,EQUAL,InterfaceEncoded,Set,#3,#1 Else,Begin If,Not,EXISTVAR,%exe%,Begin Set,%exe%,SplitBinEx.exe If,Not,EXISTFILE,%Tools%\%exe%,ExtractFile,%SplitBinScript%,Folder,%exe%,%Tools% End System,ERROROFF IniRead,#1,Main,HasBinary,%_BinFile% If,%_BinFile%,EQUAL,,Set,%_BinFile%,#1 Else,Begin StrFormat,EXT,%_BinFile%,%_ext% If,%_ext%,EQUAL,.zip,Begin Set,%_BinDir%,%ProjectDir%_Zip\ Set,#4,True End Else,Set,%_BinDir%,%ProjectDir%_Enc\ Set,%_BinFile%,%_BinDir%%_BinFile%,GLOBAL End Set,#3,%_BinFile% End
Modified "Extract" example:
[ExtractFile_Ex] Run,%SplitBinScript%,Build-Binary,#1,#2,OUT:%_BinFile%,OUT:%_IsZip% If,%_isZip%,EQUAL,False,ExtractFile,%_BinFile%,#2,#3,#4 Else,ShellExecute,Hide,%Tools%\7z.exe,"e -y #$q-o#4#$q #$q%_BinFile%\#2.7z#$q #3"
Peter