View previous topic :: View next topic |
Author |
Message |
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Tue Feb 18, 2003 11:01 pm Post subject: Embedded dll and include |
|
|
I would love to see the option to embedd the dll runtime file when compiling. Two options, one compiling without and one with. And also the ability to add 16bit icons.
And I would love to see an option to be able to include external scripts kinda like with the PHP include command, but it might look something like this #include, filename.vds
And the script would be inserted at the line of the include point and the script would be inserted normally when compiling.
And more directory paths. _________________
|
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Feb 18, 2003 11:15 pm Post subject: |
|
|
Hi Geo,
Several of us were kinda diappointed when SADE dropped the
option to integrate the runtime DLL in the EXE (VDS2x had that).
It wouldn't be too hard to write a VDS utility to insert code at
specific points - it'd just hafta be run before compiling...
Welcome to the board.
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Tue Feb 18, 2003 11:18 pm Post subject: |
|
|
Thanks for the welcome Mac.
Oh, I didn't know that.
Kinda strange he did that.
But It's really not a biggie.
When compressing the dll with UPX it only takes 180 kb and that is not bad concidering the power of VDS _________________
|
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Tue Feb 18, 2003 11:19 pm Post subject: |
|
|
You can use the BINFILE command to write binary data to the end of your exe and then extract it out on program execution. You would have to extract the dll out before it is called by the program.
- OR -
If you want to integrate the vdsrun40.dll or other dlls' into your exe you can also take a look at my software ALLOY, which will embed the vdsrun40.dll and other dll's, bmp's etc into the exe in an easy manner. |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Feb 19, 2003 12:54 am Post subject: |
|
|
Quote: | You can use the BINFILE command to write binary data to the end of your exe and then extract it out on program execution. You would have to extract the dll out before it is called by the program. |
Really? It's possible to do that? Any tips on how to use BINFILE to extract
the VDSRUN30/40/50.DLL before execution? _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Wed Feb 19, 2003 3:29 am Post subject: |
|
|
Not really possible to extract the vdsrun40.dll before execution as you have to call the BINFILE command which is interpreted by vdsrun40.dll, kind of a chicken and the egg type situation. This is exactly what Alloy does, it basically extracts out the vdsrun40.dll/30.dll before the exe's code is run, thus allowing you to have a single .exe file. |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Wed Feb 19, 2003 3:57 am Post subject: |
|
|
Be warned though about adding dlls into your program using binfile....
The size of the dll within your script will be about 3 times the size of the
dll itself. So if you have a 40 KB dll you want to tuck into your program,
it'll add about 120 kb to your program.
-Garrett |
|
Back to top |
|
|
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Wed Feb 19, 2003 8:27 am Post subject: |
|
|
Cool, I'll check out that Alloy software
Thanks guys. _________________
|
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Tue Feb 25, 2003 10:34 pm Post subject: |
|
|
I don't think it would add three times the size. It would only be neccesary to use three times the size of the file in number of characters to write and read from the file, but the actual result is the file being added only once.
Garrett wrote: | Be warned though about adding dlls into your program using binfile....
The size of the dll within your script will be about 3 times the size of the
dll itself. So if you have a 40 KB dll you want to tuck into your program,
it'll add about 120 kb to your program.
-Garrett |
|
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Feb 26, 2003 8:48 am Post subject: |
|
|
Or it's because the files first have to be unpacked before you can run them... |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu Feb 27, 2003 4:48 pm Post subject: |
|
|
Oops, I realize what Garrett meant now.
If you were to use something like the following, this would indeed be true:
BINFILE WRITE,1,HEX,AA 09 88 55
BINFILE WRITE,1,HEX,AA 09 88 55
BINFILE WRITE,1,HEX,AA 09 88 55
However it may be possible to append the DLL's binary data to the end of the script's .EXE file
and then when the script is executed, read the binary data from itself and write it to a separate
file.
Skit3000 wrote: | Or it's because the files first have to be unpacked before you can run them... |
|
|
Back to top |
|
|
ShinobiSoft Professional Member
Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Thu Feb 27, 2003 5:48 pm Post subject: |
|
|
I've been doing a little experimenting, and it is possible to append binary
data and resources to the exe itself. I've done it with BINFILE and
successfully then used the resources that were appended to the .exe.
It'll take some careful thought and planning, but it can be done.
I would not recommend this method for the VDS runtimes however.
_________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
Back to top |
|
|
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Thu Feb 27, 2003 5:51 pm Post subject: |
|
|
OK, while the BINFILE is on the subject here...
How can I append data to a file?
Everytime I try to write to a file using BINFILE it just overwrites the contents.
I'm writing an error log function that I'm gonna use in the error trapping portion of my program. _________________
|
|
Back to top |
|
|
ShinobiSoft Professional Member
Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Thu Feb 27, 2003 6:09 pm Post subject: |
|
|
I'm not going to get into details here, but I'll give you the general idea.
Steps:
1) Use BINFILE to read the original source file into a string list.
2) Use BINFILE to read files to append to source file into another string list.
3) Append string list 2 to string list 1
4) Repeat step 2 if more than one file to be appended to the original.
5) Use BINFILE to write the first string list as binary data.
Plan it carefully. And good luck. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
Back to top |
|
|
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Thu Feb 27, 2003 6:10 pm Post subject: |
|
|
Thanks m8.
Didn't even think about using LIST
Thanks alot. _________________
|
|
Back to top |
|
|
|