LB Booster
IDE and Compiler >> Integrated development environment >> Error extracting embedded files. http://lbb.conforums.com/index.cgi?board=ide&action=display&num=1385139254 Error extracting embedded files.
Post by CirothUngol on Nov 22nd, 2013, 3:54pm
Hiya Richard! Thanks again for the excellent utility, it's easily one of the best translator/converters that I've ever used. I was delighted to see the inclusion of embedded files in the latest version (something I will definitely use often), but I'm having an issue when extracting embedded files.
When I run an executable in which I have included the LB Booster help file, BBCWrun throws up an error stating, for example: "Cannot create file D:\Temp\D:\Programming\LB Booster\lbb.chm"
Apparently LB Booster is retaining the full path to the embedded files. Is there any way to prevent this? Also, is there any method to tell it exactly where to extract embedded files other than the current directory? I'm hoping to figure this out, as I intend to make extensive use of the nifty embedding feature. Thanks in advance for any reply.
Re: Error extracting embedded files.
Post by Richard Russell on Nov 22nd, 2013, 10:29pm
Also, is there any method to tell it exactly where to extract embedded files other than the current directory?
I'm afraid not - it will only extract to the directory containing the EXE or a sub-directory thereof. This is largely to ensure that you don't spray files around the target PC, which the end user could easily be unhappy with (especially considering that you won't normally know what the directory structure of that PC is - in general you don't even know the drive letter!).
This will also be the cause of your other problem: the filepath(s) in the 'Embedded resource files' list must be relative to the EXE's directory. Entering an absolute path there will result in the kind of garbled string you quoted.
If you want to store files in other places you will need to use a 'proper' installer which knows about the Special Folders (e.g. %APPDATA%) and how to discover their locations.
Richard. Re: Error extracting embedded files.
Post by CirothUngol on Nov 23rd, 2013, 12:56am
OK, thanks for the quick reply. My actual desire would be to extract to the current folder. However, I still have the main problem. The embedded file won't extract because of the junked-up path. [quick edit]
Ahh, now I see. Since it's not uncommon for me to bang-out a quickie one-off 12-line program, I was trying to embed files into a BASIC program that I hadn't yet saved. In order for the paths to be relative, there must be a .BAS file for them to be relative to. So just for the record, saving the .BAS file prior to creating the executable is a prerequisite for embedding files.
Now it works great, thanks for this! I originally created a JustBASIC utility because of my need for embedding files which works rather well, but it's horrible for larger archives and slow when decompressing oodles of files. With this I can simply include a .7z archive and decompress it to wherever is needed... most excellent.