Page 1 of 2

Engine3D.dll Question

Posted: Mon Mar 06, 2006 6:06 pm
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?

Posted: Mon Mar 06, 2006 6:08 pm
by DarkDragon
You have to give it with your programs.

Posted: Thu Mar 09, 2006 7:49 pm
by Vallan
Is it possible to include the .dll into the Exe, so that you dont have to give it with the programm?

Posted: Thu Mar 09, 2006 9:19 pm
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...

Posted: Thu Mar 09, 2006 9:47 pm
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:

Posted: Fri Mar 10, 2006 3:08 am
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.

Posted: Fri Mar 10, 2006 3:30 am
by theNerd
You can always use something like PEBundle or MoleBox to bundle all dependencies into one file (MoleBox is more powerful.)

Posted: Fri Mar 10, 2006 9:59 am
by Fred
PEBundle is definitely broken on some PC configurations, so i wouldn't advise to use it (and the development seems stopped).

Posted: Fri Mar 10, 2006 3:17 pm
by DarkDragon
Or how about Nacasi?

Posted: Wed Mar 15, 2006 8:34 pm
by Vallan
Perheaps you could include the dll by using "import" - "endimport" in PB4.

Posted: Wed Mar 15, 2006 8:40 pm
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.

Posted: Wed Mar 15, 2006 9:26 pm
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.

Posted: Wed Mar 15, 2006 9:35 pm
by Trond
IncludeBinary and write it to disk at the start of the program?

Posted: Wed Mar 15, 2006 9:59 pm
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.

Posted: Thu Mar 16, 2006 10:00 am
by Vallan
But what does "import" do, if it does not write the importet function in the File?