View Full Version : thinBundle module new features to complete exe creation
ErosOlmi
22-03-2007, 17:49
Roberto,
what I think is still missing in thinBundle module is the following:
possibility to add files, so something like "Bundle_AddFile"
possibility to reset, so something like "Bundle_Reset".
This functionality is needed in case with one script user wants to create more bundled exe. So after "Bundle_Builder" and testing all is ok, a "Bundle_Reset" will let user to restart a new bundle.
What do you think?
Ciao and thanks for the great job have already done.
Eros
RobertoBianchi
22-03-2007, 17:59
I say perfect, only you forgot the Bundle_Make method, ops sorry function!
Roberto
ErosOlmi
22-03-2007, 18:21
Perfect!
So, Bundle_Make will create the exe and Bundle_Reset will let you restart a new bundling process.
Thanks
Eros
RobertoBianchi
27-03-2007, 08:29
Added to thinbasic_bundle.dll the following functions:
Bundle_Reset
Bundle_Make
Bundle_AddFile
So you should be able to run this script
uses "BUNDLE"
dim i as long
' Put some garbage
Bundle_SetBundleName("Bundle")
Bundle_SetScriptName("c:\thinbasic\samplescripts\bundle\Bundle.tbasic")
Bundle_SetScriptParameters("Hello")
Bundle_SetCreationFolder("c:\Bundle")
Bundle_SetExtractionFolder("c:\temp")
Bundle_SetFlagCompressAllFiles(%TRUE)
Bundle_SetFlagAskBeforeExtract(%TRUE)
Bundle_SetFlagDeleteAfterRun(%TRUE)
Bundle_SetFlagObfuscateMainScript(%TRUE)
' Clean it up (code above is needed only for show the Bundle_Reset() use)
if Bundle_Reset() then msgbox 0, "Data Reset"
' Now set the correct data for the Smallest's bundle that is without additional modules
Bundle_SetBundleName("Smallest")
Bundle_SetScriptName("c:\thinbasic\samplescripts\bundle\Smallest.tbasic")
Bundle_SetScriptParameters("Hello")
Bundle_SetCreationFolder("c:\thinbasic\samplescripts\bundle\")
Bundle_SetExtractionFolder("c:\temp")
Bundle_SetFlagCompressAllFiles(%TRUE)
Bundle_SetFlagAskBeforeExtract(%TRUE)
Bundle_SetFlagDeleteAfterRun(%TRUE)
Bundle_SetFlagObfuscateMainScript(%TRUE)
' Make the bundle
DisplayResult(Bundle_Make())
' Now same of previous but also add thinAir.ini file
Bundle_SetBundleName("Smallest2")
Bundle_SetScriptName("c:\thinbasic\samplescripts\bundle\Smallest.tbasic")
Bundle_SetScriptParameters("Hello")
Bundle_SetCreationFolder("c:\thinbasic\samplescripts\bundle\")
Bundle_SetExtractionFolder("c:\temp")
Bundle_SetFlagCompressAllFiles(%TRUE)
Bundle_SetFlagAskBeforeExtract(%TRUE)
Bundle_SetFlagDeleteAfterRun(%TRUE)
Bundle_SetFlagObfuscateMainScript(%TRUE)
Bundle_AddFile("c:\thinbasic\thinair\thinair.ini")
' Invoke the Bundle_Builder
DisplayResult(Bundle_Builder())
SUB DisplayResult(i as long)
If i = 0 then
msgbox 0, "Bundled Executable Created."
else
if i = %BUNDLE_BUILDER_CANCELLED then
msgbox 0, "Bundle creation cancelled by user."
else
msgbox 0, "Error occured while creating bundle."
end if
end if
end sub
I'm still woarking to add the Bundle_AddFolder function and fixing some minor lacks.
Cheers,
Roberto
Michael Hartlef
27-03-2007, 08:59
That looks very good! thank you for this :)
ErosOlmi
27-03-2007, 11:43
I'm finishing to fix a bugs that oblidge me to change some internal thinCore structures.
After that I will release all those important features Roberto added to thinBundle.
Thanks Roberto.
Eros
RobertoBianchi
27-03-2007, 13:12
Added Bundle_AddFolder() function and set the readonly and system flag to the directories created with addfolder.
Ciao,
Roberto
This is great, thanks guys. Will make it very nice to share our work with others not into programming, but like using apps.