| View previous topic :: View next topic |
| Author |
Message |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Mar 03, 2004 7:33 am Post subject: include all files into the one exe file |
|
|
hi,
i would like to do something i have never done and which is very possible with vds 5...it's just that i don't know how to do it step by step
i am wanting to include several text files into the exe file...text files that i can call on at various times during the execution of the code eg. "about" in the menu, "please register", and so on
also i want to include toolbar bmp files into the exe so that it all shows up as the one exe file
also i want to include dll files that i call on using the "external" command
can someone please explain step by step what to do...i have tried but didn't get very far
i hope it's not a stupid question...i just don't get it how to do it
thanks in advance
serge _________________
|
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Wed Mar 03, 2004 9:22 am Post subject: |
|
|
Hi Serge
I hope I can point to towrds the right direction atleast partly.
Read about #RESOURCE command in VDS 5 Help file.
1.Text files.
Add the text file as a TEXT resoruce
VDS 5 LOADFILE can load a resource text file as if it's a text file on disk.
| VDS 5 Help file wrote: | | LOADFILE is used to create a list holding the contents of a named text file. It is possible to load text into a string list, LIST or COMBO dialog element from a TEXT resource linked into the executable file. To use this facility, the name of the text file should be prefixed by a "#" character. I have added more than a MB of text files for my API constants reference - works well. |
Bitmaps again can be added as a BITMAP type of resouce
and while mentioning the file name where U use it prefix #
#RESOURCE ADD, BITMAP, fil1.bmp,fil1.bmp
Windows(actually vds ) places an 8-character limit on resource identifiers so fil1.bmp . Also note that I have kept the ID same as the file name. This will help in loading both inside the IDE(as the file from disk) as well as when compiled (as a resource).
DLLs for external command can be included as a binary resource but
you need to extract them back to disk before calling the external command. This is not a good idea due to several reasons inluding speed of extraction and on NT family machines if proper permissions are not there when run on a different user account - file extraction will fail.
Resources for use by exteral dlls (Images etc)
Not all dlls support reading from resources though my VDSGUI and I think PGWARE's VDSOBJ do support it. If they support then principle is same as in VDS. Add it as a BINARY resource type and prefix the file name with a # when you are specifying that file in a command/function. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Mar 03, 2004 12:51 pm Post subject: |
|
|
thanks codescript...i think i understand now how to do it...i did read the #resource section in the help file but it seemed like a foreign language to me at the time
i'll give it a try...i'll be wrapped if i can get it to work
i understand about the dll files
can i use the same idea to include dsu's as resources? for example
| Code: |
#resource add, dsu, whatever.dsu, whatever.dsu
|
or should i just use
| Code: | | #include whatever.dsu |
thanks again
serge _________________
|
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Mar 03, 2004 1:03 pm Post subject: |
|
|
this is so cool...just by using "dialog add,bitmap, ..." the bitmap is included in the exe...same with dsu's...this is so cool!!!
haven't tried "#resource add, text,..." yet
thanks again codescript
serge _________________
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Mar 03, 2004 4:37 pm Post subject: |
|
|
| Serge wrote: | can i use the same idea to include dsu's as resources? for example
| Code: |
#resource add, dsu, whatever.dsu, whatever.dsu
|
or should i just use
| Code: | | #include whatever.dsu |
|
The #include command will already add the DSU file into the script itself when compiling, so there is no need to distribute the DSU file itself with your programs. _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Wed Mar 03, 2004 4:52 pm Post subject: |
|
|
Just another thought. Prakash's Alloy would be the best way to go for including dll files. I have it and it works great. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Mar 04, 2004 11:43 am Post subject: |
|
|
thanks for all your help and replies...this feature is a great addition to vds 5 (to be able to have resource files included automatically in the exe file)
serge _________________
|
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Mar 12, 2004 9:32 pm Post subject: |
|
|
hehe, I been adding just about everything except havent tried DSU for long time, but my only problem is I'm limited to 4 per EXE, which forces me to make add on EXE(modules).
yes you can add text, zips, etc..
#RESOURCE ADD,BINARY,C:\VDS5\vRESOURCE\Binarys\Vloader.wdg,1
#RESOURCE ADD,BINARY,C:\VDS5\vRESOURCE\Binarys\help.txt,2
#RESOURCE ADD,BINARY,C:\VDS5\vRESOURCE\Binarys\update.zip,3
#RESOURCE ADD,BINARY,C:\VDS5\vRESOURCE\Binarys\install.ini,4
seems allmost any works... |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Fri Mar 12, 2004 11:57 pm Post subject: |
|
|
thanks for that vtol
i tired to include htm files and then call them up in the browser element of vds and got nothing...any ideas why? it seems that the browser element wants the full path to a htm file in order to work
why is there a limit of 4?
serge _________________
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Mar 13, 2004 12:13 am Post subject: |
|
|
Serge, the VDS browser element is just like IE but placed on the VDS
dialog - when you try to call it from your EXE, it's like telling it to go
to #test.htm, and it can't find it.
Instead, look into using BINFILE SAVERES to extract your HTM files from
the EXE.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sat Mar 13, 2004 12:32 am Post subject: |
|
|
oh ok ff...didn't know that...makes sense now
i will have a look at your suggestion
thanks ff
serge _________________
|
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sat Mar 13, 2004 8:28 am Post subject: |
|
|
You can do:
| Code: | list loadfile, 1, #some.htm
dialog set, browser1, @text(1) |
You can even alter the html text while it is in the list, before assigning it to the browser. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sat Mar 13, 2004 11:24 pm Post subject: |
|
|
what a great idea jules
thanks for that
serge _________________
|
|
| Back to top |
|
 |
|