Author |
Topic: Error extracting embedded files. (Read 647 times) |
|
CirothUngol
New Member
member is offline
Odie, Odie, cha cha cha.
Gender:
Posts: 44
|
|
Error extracting embedded files.
« Thread started 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.
|
|
Logged
|
LB Booster + LB Workshop + LB Builder = My Programs on Google Drive
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Error extracting embedded files.
« Reply #1 on: Nov 22nd, 2013, 10:29pm » |
|
on Nov 22nd, 2013, 3:54pm, CirothUngol wrote: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.
|
|
Logged
|
|
|
|
CirothUngol
New Member
member is offline
Odie, Odie, cha cha cha.
Gender:
Posts: 44
|
|
Re: Error extracting embedded files.
« Reply #2 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.
|
|
Logged
|
LB Booster + LB Workshop + LB Builder = My Programs on Google Drive
|
|
|
|