View Full Version : pe file for thinbasic not possible?
largo_winch
03-03-2012, 13:30
hello. I have a general question belongs to technical site of programming.
a) where I can find Infos about "bundling" a text file buffer ? How does it work or what's the background of it? Is there any link for it how thinbasic make this bundle exe file?
b) why it's not possible to create a small exe/dll file with thinbasic? so far as I have understood "oxygen" module works for it and I thought there's no prevention or reason to involve this technique for thinbasic too, but I am asking, because I don't understand this technical site and background for thinbasic. perhaps somebody can talk about this topic or give some more infos, I am glad to see more about that one.
bye, largo (stressy work at uni, there's rather not enough time at the moment for programming closer with thinbasic)
You might want to look at the oxygen module for thinBasic. http://www.thinbasic.com/community/forumdisplay.php?335-O2-JIT-Compiler-Assembler
largo_winch
04-03-2012, 11:33
thanks kent, I know this link. I've found a trick how to use/embedding #file "myscript.exe" for thinbasic working in relation with ui module, that I didn't know. I will study "oxygen" to understand more about creation of pe file, that's working with oxygenbasic too as I noticed yesterday night ;) bye, largo
ErosOlmi
04-03-2012, 13:03
Largo,
in any case always remember that thinBasic is an interpreter while Oxygen is a compiler (JIT compiler and real compiler)
Even when thinBasic creates executable, they are bundled executable. It means it is not real thinBasic code compiled but a bundled exe is a sort of ZIP file containing all the necessary files (thinBasic engine plus thinBasic module plus original script obfuscated) needed to execute your script into a machine where thinBasic is not installed.
Ciao
Eros
largo_winch
05-03-2012, 10:03
thank you eros for infos!
Even when thinBasic creates executable, they are bundled executable. It means it is not real thinBasic code compiled but a bundled exe is a sort of ZIP file containing all the necessary files (thinBasic engine plus thinBasic module plus original script obfuscated) needed to execute your script into a machine where thinBasic is not installed.
do you have any link or content about this bundle.exe feature or where I can get more data about this zip file behaviour? Would be good to see more about it, thanks in advance. the mixing with oxygen/thinbasic is very interesting stuff for me. I will explore more around this topic. nice week!
bye, largo
Largo, i have done an experiment . making a bundled exe: file "ok.exe" without choosing to obfuscate the source.
now when i run the "ok.exe" it inflates itself to a hidden files, to see it you must enable show hidden files in folder options (in win xp)
http://s15.postimage.org/rm1uid8vf/inflate.jpg
and when i go to commnad prompt with dir/a command i got this:
http://s18.postimage.org/ln211phe1/dos.jpg
so the folder have all neccessary files to run the *.tbasic code (here it is tb10c.tbasic") without thinbasic installed. obfuscate code will prevent others from reading its content as a readable code.
i haven't read how this is done but may be this link :
http://en.wikipedia.org/wiki/Zlib usefull also read the articles about zlib
i saw many zip files in the form of exe when you run it is decompressing to a folder.
another possible example of bundling software is BAT to EXE, VBS to EXE Converter http://www.scriptcode.com/battoexe/
zlib Home Site:
http://zlib.net/
http://www.winimage.com/zLibDll/index.html
Zak, that is nice example and explanation of what is going on with bundling thanks. I will refer to this to refresh my memory time to time.
This is the first post that I tried to promote to an article. I just noticed that option. I hope I did it correctly.
ErosOlmi
05-03-2012, 21:46
This is the first post that I tried to promote to an article. I just noticed that option. I hope I did it correctly.
Yes, it is a nice feature.
When you ask to promote a post into an article, I receive a mail about your request.
I than check the request and if feasible, I do it so posts are visible into http://www.thinbasic.com/community/content.php
Ciao
Eros
Thanks Eros that is a very neat and useful option. Your explanation of how it works helps one feel at ease about using it. Thanks again!
thanks Kent ,Eros. i forgot to add that in my windows xp, to see the inflated files we must:
go to any folder, tools - folder option - view - then:
1- check "show hidden files and folders
2- uncheck "Hide protected operating system files"
after the experiment reverse that.
also suppose Eros change his plans and he hide the additional modules in deep subdirectoies, so to see them write in command prompt "dir/a/s" in wich s refer to subdirectories, a to all files 'hidden and others". remember the Dos days that is a glorious days. believe me i attend in the past a lessons just to see how they insert the 5.x inch floppy in their drives after that i buy an XT computer with the cpu 8088. with two 5.x floppies and of course without hard disk, (the 5 Mega byte hard drive was very expensive)
largo_winch
06-03-2012, 18:17
thanks for infos zak, although I've noticed the executable files (hidden ones) for bundles some month before too, that experiment wasn't new for me. ;)
does anybody knows if there exists any powerbasic example how to bundle such a bundle of *.tbasic files?
bye, largo