LB Booster
« Embedded Files »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:29am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Embedded Files  (Read 1185 times)
CirothUngol
New Member
Image


member is offline

Avatar

Odie, Odie, cha cha cha.


PM

Gender: Male
Posts: 44
xx Embedded Files
« Thread started on: Nov 23rd, 2013, 02:33am »

Here's a few suggestions regarding embedded files:

* Option to extract files to system %TEMP% folder.
I don't know if special permissions are needed for this, but it'd be nice to have the option of extracting to a less-visible neutral location.

* Option to extract files only if they don't exist.
...or something similar. It seems that the default behavior is to always over-write any files that are present, which may not always be desired (like with a default settings.ini, perhaps).

* Option to extract files only when triggered to do so.
I don't really know how this would work, but it'd also be nice to have some control over when, how often, or even if files were extracted.

* Block option to add embedded files unless .BAS file has been saved.
So that other block-heads such as myself won't waste their time trying to solve a problem that doesn't exist. ^_^

Thanx again for including the option to embed files into LB Booster. It's going to make a couple of my little projects neater, cleaner, more attractive, and easier to maintain. LBB is most certainly an "every day" utility. w00t.
User IP Logged

LB Booster + LB Workshop + LB Builder = My Programs on Google Drive
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Embedded Files
« Reply #1 on: Nov 23rd, 2013, 10:45am »

on Nov 23rd, 2013, 02:33am, CirothUngol wrote:
* Option to extract files to system %TEMP% folder.

I could do that. I may consider adding it to the next release if you think it would be really useful.

Quote:
* Option to extract files only if they don't exist. ...or something similar.

That's sort of how it currently works, except that it also tests to see if the file is identical to the embedded version; if not it gets overwritten. If you want to embed a file that can subsequently be modified, save it as a different name (maybe in %TEMP% if I provide that option) and in your program copy it to the required path/filename if it doesn't already exist.

Quote:
* Option to extract files only when triggered to do so. I don't really know how this would work

Nor me! If I add the 'extract to %TEMP%' option you would be able to achieve the equivalent in your own code by selectively copying from there to the desired destination.

Quote:
* Block option to add embedded files unless .BAS file has been saved.

I'll definitely look at fixing that issue one way or another.

Richard.
User IP Logged

CirothUngol
New Member
Image


member is offline

Avatar

Odie, Odie, cha cha cha.


PM

Gender: Male
Posts: 44
xx Re: Embedded Files
« Reply #2 on: Nov 23rd, 2013, 5:46pm »

on Nov 23rd, 2013, 10:45am, Richard Russell wrote:
I could do that. I may consider adding it to the next release if you think it would be really useful.

I would most certainly use it, and it seems the easiest and most direct way to allow users to control the placement of internal files. Also, providing the %TEMP% path as an internal variable (like DefaultDir$) would make user control even easier and more convenient.

Thanks for considering the suggestion. I think it would prove a great addition to the LibertyBASIC Booster.
User IP Logged

LB Booster + LB Workshop + LB Builder = My Programs on Google Drive
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Embedded Files
« Reply #3 on: Nov 23rd, 2013, 5:59pm »

on Nov 23rd, 2013, 5:46pm, CirothUngol wrote:
I would most certainly use it, and it seems the easiest and most direct way to allow users to control the placement of internal files. Also, providing the %TEMP% path as an internal variable (like DefaultDir$) would make user control even easier and more convenient.

OK, I'll add the option. You'll need to put the source file in %TEMP% first, but then you'd want to anyway for testing in the IDE.

I don't think I'll provide a predefined variable which points to %TEMP% for the simple reason that it would prevent you testing and debugging the program in LB. It's not difficult to do using CALLDLL:

Code:
    TempPath$ = space$(_MAX_PATH)
    calldll #kernel32, "GetTempPathA", _
      _MAX_PATH as long, TempPath$ as ptr, _
      ret as long
    TempPath$ = trim$(TempPath$) 

Edit: Anyway if you don't mind it being LBB-specific you can always use this hack:

Code:
    !TempPath$ = @tmp$ 

Richard.
« Last Edit: Nov 23rd, 2013, 6:34pm by Richard Russell » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls