Engine3D.dll Question

Advanced game related topics
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Engine3D.dll Question

Post by netmaestro »

If you create a program which employs the command InitEngine3D(), does the Engine3D.dll have to be distributed with your program? The help file says it has to be copied from your PB\Compilers folder to your project folder, but the resulting .exe seems to need it if it is moved out of there. Is this right or is there a way to have it included and just distribute a standalone exe?
BERESHEIT
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

You have to give it with your programs.
bye,
Daniel
Vallan
User
User
Posts: 24
Joined: Thu Mar 09, 2006 1:25 pm

Post by Vallan »

Is it possible to include the .dll into the Exe, so that you dont have to give it with the programm?
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

No, because the 3d command init3D() is searching the dll in the folder of the exe... not in memory....
May you can do a binary include and then, when running the exe, temporary write the dll to the exe's folder...
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Can be used this:
http://www.purebasic.fr/english/viewtopic.php?t=18203
from ts-soft to include it in the main source. That program works perfectly. However, after that, there will be needed some tricks to call the .dll functions :? .

I want to do that with this lib from Karlkox:
http://www.purebasic.fr/english/viewtopic.php?t=19865
or for FMOD, or MIDAS, ... or for any .dll.

I find a good idea to put (hidding it, indeed :P ) one or more .dll inside an .exe :idea:

A way to do it in a fast way, and with no special tricks, is: to include it as binary in the source code (using PureBin2Data by ts-soft for example), and then create the .dll file in the same dir that the .exe before use the .dll stuff. Deleting the .dll file just before finishing program execution. :wink:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Hmm, including a dll sorta defeat the point of a dll (the dll being standalone and thus easily updated by itself or replaced).

But I was wondering. Windows does have resource features,
why not just add the dll's as a exe resource, and load it from there?
Mind you I have never tried this, but it sounds plausible.
theNerd
Enthusiast
Enthusiast
Posts: 131
Joined: Sun Mar 20, 2005 11:43 pm

Post by theNerd »

You can always use something like PEBundle or MoleBox to bundle all dependencies into one file (MoleBox is more powerful.)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

PEBundle is definitely broken on some PC configurations, so i wouldn't advise to use it (and the development seems stopped).
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Or how about Nacasi?
bye,
Daniel
Vallan
User
User
Posts: 24
Joined: Thu Mar 09, 2006 1:25 pm

Post by Vallan »

Perheaps you could include the dll by using "import" - "endimport" in PB4.
Google 4ever!
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Vallan wrote:Perheaps you could include the dll by using "import" - "endimport" in PB4.
This does not include the dll and is not aimed for that.
theNerd
Enthusiast
Enthusiast
Posts: 131
Joined: Sun Mar 20, 2005 11:43 pm

Post by theNerd »

Fred wrote:PEBundle is definitely broken on some PC configurations, so i wouldn't advise to use it (and the development seems stopped).
I found out the author now works for thInstall (which costs $7,500 per application to use) and has ceased developing PEBundle (anti-competitive clause in his employment contract.)

I have played around with MoleBox and it is very slick. Highly recommended if you can afford the Pro version and is far superior to PEBundle, anyhow.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

IncludeBinary and write it to disk at the start of the program?
theNerd
Enthusiast
Enthusiast
Posts: 131
Joined: Sun Mar 20, 2005 11:43 pm

Post by theNerd »

Trond wrote:IncludeBinary and write it to disk at the start of the program?
Good point! It could actually be written as a custom binary resource and extracted when the app first runs if it isn't already present.
Vallan
User
User
Posts: 24
Joined: Thu Mar 09, 2006 1:25 pm

Post by Vallan »

But what does "import" do, if it does not write the importet function in the File?
Google 4ever!
Post Reply