Trouble with bundler
issueid=161 07-03-2009 18:45
Number of reported issues by Macros The Black: 1
Trouble with bundler

I am having trouble compiling my application with bundle.
It runs and creates an .exe but i always get error codes when trying to run the .exe file.
I get one error saying that


Then i get an error stating


I cannot figure out whats goin on.

If i run the script everything works fine but when i compile the script and try to run the .exe i get the errors above.

I cannot understand why the compiled version will not work?
Issue Details
Issue Number 161
Issue Type Feature
Project thinAir and Visual Designer
Category Unknown
Status Suggested
Priority Unknown
Suggested Version Unknown
Implemented Version (none)
Milestone (none)
Votes for this feature 0
Votes against this feature 0
Assigned Users (none)
Tags (none)

07-03-2009 18:58
Super Moderator
Hi Macro,

could you describe how do you create bundle, step by step, and where do you execute final file?


07-03-2009 20:28
thinBasic author

the bundled exe is nothing more than the obfuscated version of your original script source plus all the needed libraries and exe.

I will describe here the standard method to create a bundled exe. Let me know if any step is different from what you are doing now:
  • IMPORTANT: Be sure to have latest thinBasic version installed. Every obfuscated script is 1 to 1 with its thinBasic installation. If you think you can have (for any reason) a thinBasic installation with mixed files (coming from different thinBasic versions), please remove thinBasic and install it again.
  • Open your source script into thinAir
  • from menu Tool choose Bundle
  • be sure to have at least the following options marked: Obfuscate main scrip, Compress all files, Delete after run
  • "Activate Isolation" flag is important but not mandatory. This flag will instruct bundler to extract bundled files into a random generated directory when exe is executed. This will ensure to be able to run multiple copies of the same bundled exe
  • add all the additional files/directory you need to add into your bundled exe
  • Press Make button

The error you are receiving is fired when a thinBasic script has been obfuscated with a thinBasic version different from the one in the bundled exe. Every thinBasic obfuscated file is done with different keys present into thinBasic executable and thinVL.dll library.
It can also happen if you have manually obfuscated the script or if you have a thinBasic installation with mixed file versions.

Let me know.

08-03-2009 04:48
Alright i have got it compiling now but i am recieving file path errors for textures that my app uses.

Problem: Texture not found

File: C:\Users\Client\Documents\Thin basic\D3D TREE\z7ECtmp\Textures\bark7.bmp

When i run the app it is in the same directory as the original script and the textures folder is there as well.

When run the app extracts to the same directory.
There is a folder created called z7ECtmp that i presume is meant to contain the files needed to run my app.
Problem is that no files are created there and the folder is empty.

I am sure that this is because of the error regarding textures and the fact that the texture error stops the app from running.

Do i have to add the texture path when i am compiling or should the textures be automatically added because they are referenced in the script.

I have tried adding the texture folder path and the image file paths for each image in the bundler and this has made no difference.

08-03-2009 06:19
OK got it sorted and can compile now with no problems.
Seems that i was making mistakes about where to unpack bundle.

08-03-2009 10:41
thinBasic author
When creating scripts that will be executed as bundled exe with the Isolation flag, be sure to use APP_ScriptPath to get the directory where script is executed and files extracted because directory name will be randomly generated.

Also attention because that directory will be deleted at the end.


+ Reply